Advanced Schema Design Patterns
Learn how to apply advanced schema design patterns to an application to improve performance and avoid common anti-patterns.
Advanced Schema Design Patterns
Unit Overview
In this unit, you’ll learn about advanced schema design patterns that will help you model your data in MongoDB. You’ll learn about the Single Collection Pattern, Subset Pattern, Bucket Pattern, Outlier Pattern, and Archive Pattern. Using an example application, you'll be able to apply each pattern.
Prerequisites
- MongoDB and the Document Model
- Data Modeling for MongoDB Overview
- Identifying Database Workloads
- Modeling Data Relationships
- Schema Design Patterns
Lessons in This Unit
- Lesson 1 – Single Collection Pattern
- Lesson 2 – Subset Pattern
- Lesson 3 – Bucket Pattern
- Lesson 4 – Outlier Pattern
- Lesson 5 – Archive Pattern
Sarah Evans | Senior Curriculum Engineer
Sarah is a Senior Curriculum Engineer on the Curriculum team at MongoDB. Prior to MongoDB, she taught and developed curricula for developer bootcamps. Sarah has a MAT degree from Columbia University Teachers College and studied Software Engineering at Flatiron School in Chicago, IL.
Manuel Fontan Garcia | Senior Technologist
Manuel is a Senior Technologist on the Curriculum team at MongoDB. Previously he was a Senior Technical Services Engineer in the Core team at MongoDB. In between Manuel worked as a database reliability engineer at Slack for a little over 2 years and then for Cognite until he re-joined MongoDB. With over 15 years experience in software development and distributed systems, he is naturally curious and holds a Telecommunications Engineering MSc from Vigo University (Spain) and a Free and Open Source Software MSc from Rey Juan Carlos University (Spain).
John McCambridge | University Curriculum Engineer
John is a Curriculum Engineer on the University team at MongoDB. Before his work as a Curriculum Engineer, he was an instructor and teaching assistant for coding boot camps at UT (Austin), and UCLA. Additionally, he worked as a QA engineer for a startup called Coder and spent five years at Apple Inc. John is a passionate software engineer and educator who enjoys taking complex topics and making them digestible for the community.
Emily Pope | Senior Curriculum Designer
Emily is a Senior Curriculum Designer at MongoDB. Prior to MongoDB, Emily worked closely with professors at MIT and Columbia to design bootcamps in full stack development and data science at Emeritus. She also worked as an instructional designer on database and computer science learning experiences at Cengage. Emily loves learning about the everchanging tech space and is passionate about making these skills accessible to a global audience.
Vick Mena | Director, Curriculum
My name is Vick and I've been in the wild for over 25 years. I grew up at IBM working on the BIOS for the IBM eServer line in Austin, TX before moving to Wall St. I've worked on all phases of software development from low-level to middleware to UI but feel most comfortable in the middle. I also drank the devops kool-aid having moved a product line to AWS while at Dow Jones & Co with the help of an amazing team. I then pivoted into the secure space and worked on software/hardware reverse engineering. I always thought I'd eventually teach and this role lets me leverage all of my experience to lead this motley crew of passionate educators.
Daniel Curran | Senior Curriculum Designer
Daniel is a Senior Curriculum Designer at MongoDB. Before joining MongoDB, he worked as an Instructional Designer and Content Developer specializing in technical content for a host of international clients. Daniel's goal is to remove obstacles so learners can feel confident on their journey to become masters of MongoDB.
Welcome! My name is Sarah.
I'm a Curriculum Engineer
In this unit, we'll explore advanced design patterns and apply them to a bookstore app.
Understanding schema design patterns and how to use them will help you improve the performance of your application and avoid common pitfalls, also known as anti-patterns.
Before we go any further, let's quickly review our definition of the word pattern.
Patterns are guidelines for responding to common problems.
By definition, patterns can be reused. While not a full solution on its own, a pattern can be a starting point to help you reach your full solution.
Patterns can be adapted and combined to meet specific needs and to optimize your application performance.
Ultimately, schema design patterns can provide a solution when simply referencing or embedding will not work.
The patterns you'll learn in this unit can be used with patterns that you may already be familiar with and use in your applications.
First, we'll show you how to use the single collection pattern to boost performance without embedding documents.
Next, you'll learn how to apply the subset pattern to reduce the overall size of documents that are frequently used by applications.
After that, you'll learn how to use the bucket pattern to organize specific groups of data to discover trends and optimize storage.
Then, we’ll show you how to use the outlier pattern to prevent a few queries or documents from negatively impacting the majority of our app use cases.
And, finally, you'll learn how to use the archive pattern to move less frequently used data from active collections to alternative storage to boost scalability and performance.
Each video in this unit will cover one of these design patterns.
Then you'll put what you learned into practice by completing quizzes and labs.
There's a lot to cover, but understanding when and how to use these patterns will set you up to create data models that best meet the needs of your applications.
Let’s get started.