One big collection or nested collections
-
Hello,
I want to dev an app with users, teachers, students, calendar, scheduler, etc... One user only can access to his own data, never can see other students or calendar of another user (except admin who can access to every data).
I dont know the best model for tthis app with mongodb. What is better:
-
Do every table as a little collection and put a userid key on every table
-
Do one big collection for every user and nested documents or collections for.every table.
What is the best options for a good scalable and performance?
Thanks, i hope u can gelp.me
-
-
Hello,
I want to dev an app with users, teachers, students, calendar, scheduler, etc... One user only can access to his own data, never can see other students or calendar of another user (except admin who can access to every data).
I dont know the best model for tthis app with mongodb. What is better:
-
Do every table as a little collection and put a userid key on every table
-
Do one big collection for every user and nested documents or collections for.every table.
What is the best options for a good scalable and performance?
Thanks, i hope u can gelp.me
Let me check to see if I have this correct. You want each type of user (teacher or student) to have a calendar and scheduler. If you never need to share calendars or schedules then having the calendar/schedule as a capability of the user is a clean way to manage this in Mongo.
-
-
Let me check to see if I have this correct. You want each type of user (teacher or student) to have a calendar and scheduler. If you never need to share calendars or schedules then having the calendar/schedule as a capability of the user is a clean way to manage this in Mongo.
Uff, I'm so sorry for my english. It's so hard for me explain my problem in not native language. I have users, users can access to his data, and his data are students, teachers, shceduler, calendar, ... This means, every user have his own data, and this data it's for app tables. I have a mongodb, no sql. Thanks, I hope I explained better now.