[SERVER-39885] Should I split the sub documents in separate collections or not, in MongoDB? Created: 28/Feb/19 Updated: 06/Dec/22 Resolved: 28/Feb/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Abhilash Lohar | Assignee: | Backlog - Triage Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | questions | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Triage
|
| Participants: |
| Description |
|
I have the following data set in MongoDB:
Now my question is: Should I split the above data set and create separate collections for menus, sections & items or should not split. There is an another feature in my application, in which users can mark the items as favourite, so in that case I will need to save the information in another collection whose columns will be "user_id" & "item_id", but if we not split the data set how can I get item id as primary key. |
| Comments |
| Comment by Eric Sedor [ 28/Feb/19 ] |
|
Hi Abhilash, the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. |
| Comment by Danny Hatcher (Inactive) [ 28/Feb/19 ] |
|
Program Management Note
|
| Comment by Abhilash Lohar [ 28/Feb/19 ] |
|
I want search business by item name, what should be my query. Anybody can help me? |