Video Transcript (English)
Congratulations on completing this unit on Advanced Schema Design Patterns!
Schema design patterns can provide a solution to optimize the performance of your application when purely referencing or embedding data will not work.
In this unit, we built on your foundational knowledge of Data Modeling by exploring more advanced design patterns and applying them to a bookstore app.
We started with the single collection pattern, which helps boost performance without embedding documents.
We examined the two variants of the single collection pattern and learned how to apply them.
Next, we looked at the subset pattern, which helps reduce the overall size of documents that are frequently used by applications.
We used MongoDB’s aggregation framework to apply the subset pattern by migrating reviews embedded in a book document into their own separate collection.
Then, you learned how to use the bucket pattern to organize specific groups of data.
We took a closer look at how documents containing user views for a specific book could be bucketed by time period.
Next up was the outlier pattern and how it can be used to prevent a few queries, or documents, from driving our solution.
We applied the outlier pattern to the reviews collection in our application to accommodate a small number of customer reviews that received an abnormal amount of comments.
Finally, you learned how to use the archive pattern to move inactive documents out of your primary database.
We applied the pattern to our book review documents and showed what the corresponding archive document might look like.
These advanced schema design patterns will provide a common language for you and your teams.
They’ll also allow you to model your data in MongoDB and improve the performance of your applications.
If you'd like to learn more, you can review MongoDB’s documentation and check out the other patterns in the MongoDB blog series “Building with Patterns: A Summary”.
