Im new to mongo, I dont get it all. In mySQL I have something like this:
Schedule
|Hour | Saturday | Sunday | Monday
|13:00| Math |Spanish |Biology |Chemistry|
|14.00 | Subject |Subject |Subject| Subject|
How I can design it, but in a mongo way?
Thanks.
You would nest the days of the week inside a single document (a record) and inside of each of the days, you would have key value pairs of
time : subjectThis can be even more detailed if you want, such as including the name of the teacher:
As you can see, MongoDB encourages nesting of related data.