From the course: Databases for Node.js Developers
Unlock this course with a free trial
Join today to access over 24,400 courses taught by industry experts.
Using MySQL for our users and orders - Node.js Tutorial
From the course: Databases for Node.js Developers
Using MySQL for our users and orders
- [Instructor] In this chapter, we are going to handle users and orders in our system using MySQL. Why are we using MySQL here? So we have structured data. Users and orders follow a clear structure with well-defined relationships. We want to maintain data integrity because we need to ensure that orders are always linked to valid users. And we also want to maintain asset compliance. This will become important when we later want to create an order. So in our application, we already have a section to manage users and also to manage orders. The order management as such will come then a little bit later in the process because we will need to have our shopping basket to finalize that, but we will at least create the schemas for that. And for these schemas, we will use Sequelize, which is an object-relational mapper, and ORMs, letters similar to ODMs like Mongoose, interact with the data base using JavaScript object instead of writing raw SQL queries. So by the end of this, we'll have a…
Contents
-
-
-
-
-
-
(Locked)
Using MySQL for our users and orders1m 8s
-
(Locked)
Setting up MySQL with Docker2m 49s
-
(Locked)
Exploring MySQL with MySQL Workbench1m 57s
-
(Locked)
Introducing Sequelize1m 51s
-
(Locked)
Setting up the database connection7m 43s
-
(Locked)
Designing the database structure2m 1s
-
(Locked)
Creating a user model for Sequelize7m 47s
-
(Locked)
Creating the order models for Sequelize11m 56s
-
(Locked)
Loading and syncing the models13m 5s
-
(Locked)
Creating, updating and deleting users with Sequelize12m 52s
-
(Locked)
Securing credentials with password hashing7m 2s
-
(Locked)
Implementing the user login9m 15s
-
(Locked)
-
-
-