AnnouncementIntroducing MongoDB 8.0, the fastest MongoDB ever! Read more >>
white paper

Database Schema Example

Choosing the right database schema for your application impacts performance and your ability to quickly adapt to evolving business requirements. A flexible data model, such as the one found in MongoDB, lets you store or aggregate any type of data and dynamically change schema without application downtime.

Data in MongoDB is stored in documents and similarly structured documents are typically organized into collections. Also, MongoDB documents tend to have all data for a given record in a single document.

Let’s use a database schema example from a blogging application to help illustrate the document model in MongoDB. For the blog, you could model the data as two collections -- one to represent visitors and the other for the articles. Each document of this blog database could contain multiple comments, multiple tags, and multiple categories, each expressed as an embedded array.

Here is an illustration of this database schema example:



To learn more about MongoDB’s flexible data model and its benefits, read our white paper.

Email Me the PDF

More like this

View all resources
chevron-right
general_content_white_paper

MongoDB Architecture Guide

MongoDB enables you to meet the demands of modern apps with an application data platform built on several core architectural foundations

general_content_white_paper

Who Owns Security in the Cloud?

At MongoDB, our overriding mission is to make data easier to work with. This can’t happen if data becomes compromised for any reason

general_content_white_paper

Application-Driven Intelligence: Defining the Next Wave of Modern Apps

The digital economy demands smarter applications and faster predictive insights

Read it later?
Please provide your email and we’ll email this to you