Skip to content

Instantly share code, notes, and snippets.

View runner855's full-sized avatar

Dario Milani runner855

  • Abstract srl
  • Padua - Italy
  • 19:15 (UTC +02:00)
  • X @runner855
View GitHub Profile
@runner855
runner855 / Sequelize-Step-by-Step.md
Created December 21, 2020 12:06 — forked from zcaceres/Sequelize-Step-by-Step.md
Let's get an overview of Sequelize!

Sequelize: Step-By-Step

Sequelize is a powerful library in Javascript that makes it easy to manage a SQL database. Sequelize can layer over different protocols, but here we'll use PostgreSQL. At its core, Sequelize is an Object-Relational Mapper – meaning that it maps an object syntax onto our database schemas. Sequelize uses Node.JS and Javascript's object syntax to accomplish its mapping.

Under the hood, Sequelize used with PostgreSQL is several layers removed from our actual database:

  1. First, we write our Sequelize, using Javascript objects to mimic the structure of our database tables.
  2. Sequelize creates a SQL string and passes it to a lower-level library called pg (PostgreSQL).
  3. pg connects to your PostgreSQL database and queries it or transforms its data.
  4. pg passes the data back to Sequelize, which parses and returns that data as a Javascript object.
@runner855
runner855 / README-Template.md
Created November 3, 2020 20:35 — forked from jlopenshaw41/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites