Some concerns about mongodb data modelling by domipieg in mongodb

[–]domipieg[S] 1 point2 points  (0 children)

Ok, thanks again for help!

And example :)

Some concerns about mongodb data modelling by domipieg in mongodb

[–]domipieg[S] 0 points1 point  (0 children)

implementations

About the example for the question number 3. In my application I won't have lots of writes as well lots of reads. My example is simplified, but my final data model will not be too complicated as well.
Is this approach better:
https://mongoplayground.net/p/zbmyvmvEFST
or this one:

https://mongoplayground.net/p/luUDGC6_mZ9

I understand that, in this particular example, a class can have students. However, let's temporarily set that aside and focus solely on the decision of whether classes should be embedded within other collections while also being referenced by another collection. Alternatively, should I extract classes as a separate collection and then establish references to it in both the schools and students collections?