Explore the basic design of the database structure used to store orders.
- [Instructor] Before we create…the data structures for our order management,…let's real quick review what we want to build.…I've created a little ERD diagram for that.…So, as you see here, we have an order entity.…So, we will create a table order.…In this order, we'll store a user ID…because we have to know who ordered that.…We also want to store an email address…so even if the user deletes his or her user account…right after placing the order…so that we still have some way to get in touch…with the user, and we also want to store some status…of the order.…
For every order, we want to store a set of order items.…You see here, we have a one to many relation.…This means an order item is associated with the order…through the order ID because that's the same ID…as the order has here, and then, every item in an order…has an SKU, some quantity, some name, and a price.…So, this means that one order consists of many order items…depending on how many individual items…a user has put into the basket.…
Now, let's implement the models for that.…
- Basics of relational and nonrelational databases
- Preparing your environment
- When to use document databases
- Inserting data into MongoDB
- Basic insert operations for MongoDB
- Querying data from MongoDB with Node.js
- Using key-value stores
- Using relational databases with Node.js
- Adding MySQL and Sequelize to a project
Skill Level Intermediate
Node.js: Build Your First Microservicewith Daniel Khan2h 9m Intermediate
Building a Website with Node.js and Express.jswith Ray Villalobos3h 16m Intermediate
1. Get Started with Databases for Node.js
2. Prepare Your Environment
3. Use Document Databases with Node.js
4. Use Key-Value Stores with Node.js
5. Use Relational Databases with Node.js
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.