Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. One big collection or nested collections

One big collection or nested collections

Scheduled Pinned Locked Moved JavaScript
questionmongodbperformance
3 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    waldette 2022
    wrote on last edited by
    #1

    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:

    1. Do every table as a little collection and put a userid key on every table

    2. 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

    P 1 Reply Last reply
    0
    • W waldette 2022

      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:

      1. Do every table as a little collection and put a userid key on every table

      2. 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

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      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.

      Advanced TypeScript Programming Projects

      W 1 Reply Last reply
      0
      • P Pete OHanlon

        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.

        Advanced TypeScript Programming Projects

        W Offline
        W Offline
        waldette 2022
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups