From the course: MongoDB Java Developer Associate Cert Prep

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

The MongoDB document model

The MongoDB document model

- Welcome back team. In this video, we'll learn about the MongoDB document model. MongoDB stores data in structures known as documents. That's why it's classified as a document database. Let's take a look at how documents are structured and what data types you can store in them. We'll also define MongoDB's flexible schema model and discuss how it helps to evolve our applications quickly. First, let's take a closer look at how MongoDB stores our data. The MongoDB database structures data in documents which are similar to JSON objects. Here's an example of a simple document describing a product in an electronic store. We can see that the document has five fields, including a colors field, which holds an array of strings and an available field, which holds a Boolean. While documents are displayed in a JSON format, they're stored in the database in a format called BSON. BSON, short for Binary JSON, is an extension of JSON…

Contents