{Event}  Save 50% on registration to MongoDB.local NYC with code BANNER50! Learn more >

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

MongoDB Architecture Guide

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

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