From the course: MongoDB Node.js Developer Associate Cert Prep
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Scaling a data model
From the course: MongoDB Node.js Developer Associate Cert Prep
Scaling a data model
- In this video, you will learn about the problems that arise when we create data models that aren't scalable and how to avoid them. MongoDB's first principle of data that is accessed together should be stored together is mostly because your query pattern how you access your data needs to align with your data model in order to have optimum efficiency of query result time, memory usage, CPU usage, and storage. This is a very complex topic, so in this lesson we will teach you some of the basics. First, when creating a data model, we want to avoid documents that are unbounded. Unbounded means that the document size grows infinitely. This can happen when we use document embedding. Here's an example. Let's examine the sample document model of a blog post and its comments. Currently, all the comments on one blog post are in an array in the blog post document. This looks okay, but what if we get a lot of comments on this post?…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Introduction to data modeling3m 8s
-
(Locked)
Types of data relationships2m 57s
-
(Locked)
Modeling data relationships2m 17s
-
(Locked)
Embedding data in documents3m 2s
-
(Locked)
Referencing data in documents1m 27s
-
(Locked)
Scaling a data model2m 43s
-
(Locked)
Using Atlas tools for schema help3m 26s
-
(Locked)
Introduction to MongoDB data modeling review54s
-
(Locked)
-
-