In this video, learn how to set up Sequelize for the sample project.
- [Instructor] Our shopping cart…is still missing a checkout function.…What should such a function do?…It should, first, create an order,…and then, it should save and associate all items stored…in the basket to it.…When this is done, it should clear the basket.…This is a good task for a relation of databases…especially it is a good use case for transactions.…We should make sure that at no point in time…the data can get into an inconsistent state.…For instance, it should not happen that an order is created…and then something goes wrong…while storing the ordered items leaving the database…with an empty order.…
It's either all or nothing.…To build that, we, first of all, have to add MySQL…and sequelize to our project.…I've already opened the shopsy project here.…I opened the Integrate terminal, View, Integrate terminal.…There I will now install npm install dash dash save…mysql2 and sequelize.…
Similar to Mongodb in Redis we have to set up a connection.…We will, again do this in server then, www.…I open that now, and here right after the require for redis…
- 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.