Need advice about which tool to choose?Ask the StackShare community!

Knex.js

175
383
+ 1
49
Sequelize

807
1.4K
+ 1
136
Add tool

Knex.js vs Sequelize: What are the differences?

ORM solutions help facilitate data-driven API development. They function as a high-level API to execute CRUD, and to initialize data through code. Sequelize is an Object Relation Mapping or ORM for Node.js which is easy to learn and has lots of cool features such as synchronization, association, validation and so on. With support for PostgreSQL, MySQL, MariaDB, SQLite, and MSSQL. It is available via NPM. Knex.js is an SQL query builder for JavaScript used for relational databases including PostgreSQL, MySQL, SQLite2 and Oracle. It supports transactions, connection pooling, streaming queries, a thorough test suite, and the ability to run in the browser. Knex can be used in both Node.Js and the browser, limited only by WebSQL’s constraints.

Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Knex.js
Pros of Sequelize
  • 11
    Write once and then connect to almost any sql engine
  • 10
    Faster
  • 8
    Nice api, Migrations/Seeds
  • 7
    Flexibility in what engine you choose
  • 7
    Free
  • 5
    Multi support and easy to use
  • 1
    Simple query API
  • 40
    Good ORM for node.js
  • 30
    Easy setup
  • 19
    Support MySQL & MariaDB, PostgreSQL, MSSQL, Sqlite
  • 14
    Open source
  • 13
    Free
  • 11
    Promise Based
  • 4
    Recommend for mongoose users
  • 3
    Atrocious documentation, buggy, issues closed by bots
  • 2
    Typescript

Sign up to add or upvote prosMake informed product decisions

Cons of Knex.js
Cons of Sequelize
    Be the first to leave a con
    • 30
      Docs are awful
    • 9
      Relations can be confusing

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    What is Knex.js?

    Knex.js is a "batteries included" SQL query builder for Postgres, MySQL, MariaDB, SQLite3, and Oracle designed to be flexible, portable, and fun to use. It features both traditional node style callbacks as well as a promise interface for cleaner async flow control, a stream interface, full featured query and schema builders, transaction support (with savepoints), connection pooling and standardized responses between different query clients and dialects.

    What is Sequelize?

    Sequelize is a promise-based ORM for Node.js and io.js. It supports the dialects PostgreSQL, MySQL, MariaDB, SQLite and MSSQL and features solid transaction support, relations, read replication and more.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Knex.js?
    What companies use Sequelize?
    See which teams inside your own company are using Knex.js or Sequelize.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Knex.js?
    What tools integrate with Sequelize?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Knex.js and Sequelize?
    Slick
    It is a modern database query and access library for Scala. It allows you to work with stored data almost as if you were using Scala collections while at the same time giving you full control over when a database access happens and which data is transferred.
    Spring Data
    It makes it easy to use data access technologies, relational and non-relational databases, map-reduce frameworks, and cloud-based data services. This is an umbrella project which contains many subprojects that are specific to a given database.
    DataGrip
    A cross-platform IDE that is aimed at DBAs and developers working with SQL databases.
    Dataform
    Dataform helps you manage all data processes in your cloud data warehouse. Publish tables, write data tests and automate complex SQL workflows in a few minutes, so you can spend more time on analytics and less time managing infrastructure.
    Microsoft SQL Server Management Studio
    It is an integrated environment for managing any SQL infrastructure, from SQL Server to Azure SQL Database. It provides tools to configure, monitor, and administer instances of SQL Server and databases. Use it to deploy, monitor, and upgrade the data-tier components used by your applications, as well as build queries and scripts.
    See all alternatives