From the course: Data Modeling in MongoDB

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Solution

Solution

(upbeat music) - [Instructor] Okay, let's see how we did with our eCommerce data model. We'll start with the customers and again, I wanted to keep this simple, and just have a few basic properties, we know that we can stuff as many properties as we need to but for now as placeholders, name, email, phone is sufficient. Looking now at the Wish List, we can see that the Wish List is simply an array of objects. Each object represents a product with its ID, the name, description, price, we could certainly add the image in here as well, and then the other information that the designers wanted us to show on these pages. The Shopping Cart really looks a lot like the Wish List did with the exception of the products now having a quantity field, so the user can toggle what's in their cart. And finally, the Order History. Again, it's an array of orders, the orders have an ID and a date, an array of items, and each item is a…

Contents