MongoDB Architecture Optimization: Nested Object List versus Dynamic Collection -


i building multi-product application using mean stack , love have feedback on optimising mongo database architecture.

basically building online course platform, similar - lot simpler - udemy.com, teachers can create multiple courses , students can sign individual courses. 1 of big difference when student signs course, he/she can access course. , he/she have sign again join course. there no relationship between courses.

in nutshell, students collection must specific each course, unique username per course. question is: should create dynamic mongodb collection each course? if "course1" created teacher, "course1id-students" collection created. using mongoose quite easy love have feedback on dynamic collections. option create single courses collection. within collection, add studentlist array of object. schema similar to:

courses: {     id,     coursetile,     studentlist: [         {             id,             email,             password,             ...         }],     ... } 

thanks in advance!


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -