Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.


Define Data Relationships in Sequelize Models

Earlier, we saw an example of defining a one-to-many data relationship between two tables by adding a foreign key column to a table. When interacting with the database directly, developers write and execute SQL statements to make changes to the database.

When using an ORM like Sequelize, you don't interact with the database directly. Instead, you define models and model relationships to conf...