Skip to content

Latest commit

 

History

History

Mini-project2.2c

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Mini Project 2.2c: Using Sequelize to make SQL queries from an ExpressJS app

Credit to Shift_Up coach Adrian Laurenzi

Become

Welcome to Mini Project 2.2c

This project introduces Sequelize, which is a query engine for ExpressJS. Sequelize is a popular library that allows interfacing with your database through a Javascript-friendly interface. It is not required for querying your database, but using query engines, which exist in all web languages, is standard and considered a more elegant alternative to writing all SQL directly. It also provides security features to prevent things like SQL injection attacks. This mini-project is a follow-on to Mini-project 2.2b.

Mini Project Instructions

  1. Replace each SQL query you made in Mini-Project 2.2b with calls to Sequelize. You can refer to the docs on the query interface here.

  2. Under the hood, when you run Sequelize commands a standard SQL query ends up being made to the database. You should inspect the resulting SQL queries that are being made from each Sequelize request and compare the SQL to the SQL you wrote originally for Mini-project 2.2b. In a text file called queries.sql write out the queries generated by Sequelize and explain what you see that's different from the queries you wrote.

  3. As usual put your code into the Unit2/Module2.2/Mini-Project2.2c/ directory, and submit it for coach review as a Pull Request.