MongoDB documents do not specify the way in which the data within the document is structured or organized. Due to this, the documents within a collection, despite being related in structure, could potentially be wildly different in their structure.
Sometimes this is an extremely useful feature of MongoDB in that it provides a huge amount of flexibility in storing data that might change in structure over time or that is fluid with each document created. In most cases though, this flexibility can be more of a problem when dealing with normalized data, data that has a strict structure that you want to be consistent and predictable.
Mongoose is a library that can be used on top of MongoDB within your application to control the structure of the data you are placing in your collection’s documents. In this video, we introduce how Mongoose can be used to create a schema for your collections so that all documents within that collection follow a very prescribed data structure.
Personal Recommendation (unpaid)
Programming and software development are awesome! Being that you are learning along with me, there is a really good chance you can make this a career. Based on my own life experience, let me suggest to you that you go get a Computer Science degree from Neumont College of Computer Science and kick your life into hyper-drive.