Node object-relational mappers (ORMs)

Last updated Sep 06, 2021nodelibslists

Object Relational Mapping (ORM) is the process of mapping between objects and relational database systems (PostgreSQL, MySQL, MariaDB, SQLite, MSSQL, etc.)

Choosing an ORM for your Node.js app can be daunting. There are many different libraries that allow you to query and manipulate data from your JavaScript application, and each varies in its design and level of abstraction.

ORMs are often capable of connecting to different databases, which comes handy during switching from one db to the other.

  • Sequelize - Promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. It features solid transaction support, relations, eager and lazy loading, read replication and more.
  • Bookshelf - JavaScript ORM for Node.js, built on the Knex SQL query builder, designed to work with PostgreSQL, MySQL, and SQLite3.
  • Objection - An ORM for Node.js that aims to stay out of your way and make it as easy as possible to use the full power of SQL, built on an SQL query builder called knex, work with SQLite3, Postgres and MySQL.
  • Waterline - Uses the concept of an adapter to translate a predefined set of methods into a query that can be understood by many databases like MySQL, PostgreSQL, MongoDB, Redis, etc.