From the course: Data Modeling in MongoDB
Unlock the full course today
Join today to access over 23,400 courses taught by industry experts.
Challenge: Create the proper relationships and summary documents for an online store - MongoDB Tutorial
From the course: Data Modeling in MongoDB
Challenge: Create the proper relationships and summary documents for an online store
(upbeat music) - [Instructor] Okay, it's time for our second challenge. Let's apply some of our new modeling techniques to our current data model for the eCommerce website. As a refresher, here's the data model that we landed on with the first code challenge. And again, we have a simple customer here with their basic information, a wish list with an array of items, a shopping cart also with an array of items including a quantity for each item, and the orders array which is an array of their previous orders. Each of which has an ID, the order date, and yes, an array of items with a quantity. So, that was our first stab at modeling out the data needed for our application. Now ,with our new advanced modeling techniques, let's take another run at this data model and see what we can do with it. So for this challenge, what I want you to do is refactor the current customer collection. I will provide you with sample said…
Contents
-
-
-
-
(Locked)
Embedded documents as subdocuments3m 56s
-
(Locked)
Summary and partial documents6m 7s
-
(Locked)
One-to-one relationships6m 45s
-
(Locked)
One-to-many relationships with embedded documents7m 43s
-
(Locked)
One-to-many relationships with back references4m 3s
-
(Locked)
Many-to-many relationships5m 17s
-
(Locked)
Challenge: Create the proper relationships and summary documents for an online store1m 33s
-
(Locked)
Solution5m 52s
-
(Locked)
-
-