The structure of a MongoDB database
MongoDB is widely regarded as the leading NoSQL database in terms of popularity and usage—its power, ease of use, and versatility make it an excellent choice for large- and small-scale projects. Its scalability and performance enable the data layer of your app to have a very solid foundation.
In the following sections, you will take a deeper look into the basic concepts and building blocks of MongoDB: the document, the collection, and the database. Since this book takes a bottom-up approach, you will start from the very bottom and see an overview of the simplest data structures available in MongoDB and then take it up from there into documents, collections, and so on.
Documents
MongoDB is a document-oriented database. But what does that actually mean?
In MongoDB, documents serve a similar purpose to rows in a traditional relational database. Each document in MongoDB is a data structure that consists of key-value pairs, representing...