MongoDBQuestion 01 of 8
MongoDB basics
Answer out loud or in your head first, then compare.
Answer
MongoDB is a document database. It stores data in collections as BSON documents, which you use much like JSON objects but with extra types.
JavaScript
{ _id: ObjectId('...'), name: 'Anna', tags: ['customer'] }A document can contain arrays and nested objects. I design the data model around how it's read and updated.
To be precise: a flexible model doesn't mean no schema in the application. You can enforce validation in the database. MongoDB supports indexes, aggregations and transactions.
Pitfall: I don't put all of a user's data into one document without limits.
How did it go? Be honest — “Not yet” puts the question on your review list.