The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Sequelize: Model Definition Basics

Sequelize: Model Definition Basics

2:37
Sequelize is an Object Relational Mapper (ORM), which simplifies interacting with relational databases by abstracting away the need to use SQL directly. This lesson introduces defining models with Sequelize in Node.js. > You will need the [Postgres database](http://www.postgresql.org/) for this lesson! For Mac users, [postgressapp](http://postgresapp.com/) makes this easy.
Watch this lesson now
Avatar
egghead.io

Sequelize is an Object Relational Mapper (ORM), which simplifies interacting with relational databases by abstracting away the need to use SQL directly. This lesson introduces defining models with Sequelize in Node.js.

You will need the Postgres database for this lesson! For Mac users, postgressapp makes this easy.

Avatar
Norik

Pro tip:

You can use [options.paranoid=true] instead of adding a visible field.. to show non-deleted rows.

Avatar
Mike

The visible attribute is meant more as a "published" flag. In hindsight, I probably should have called it published.

In reply to Norik
Avatar
Geoffrey

I would recommend using a different model name the posts. Most people naturally associate post with the http verb and it could be confusing. Pet store models are usually easiest.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?