Need advice about which tool to choose?Ask the StackShare community!
LokiJS vs Sequelize: What are the differences?
Developers describe LokiJS as "In-memory JavaScript Datastore with Persistence". LokiJS is a document oriented database written in javascript, published under MIT License. Its purpose is to store javascript objects as documents in a nosql fashion and retrieve them with a similar mechanism. Runs in node (including cordova/phonegap and node-webkit), nativescript and the browser. On the other hand, Sequelize is detailed as "Easy-to-use multi sql dialect ORM for Node.js & io.js". 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.
LokiJS belongs to "In-Memory Databases" category of the tech stack, while Sequelize can be primarily classified under "Object Relational Mapper (ORM)".
LokiJS and Sequelize are both open source tools. It seems that Sequelize with 18.9K GitHub stars and 2.99K forks on GitHub has more adoption than LokiJS with 4.91K GitHub stars and 387 GitHub forks.
Pros of LokiJS
- Can query the objects directly3
Pros of Sequelize
- Good ORM for node.js40
- Easy setup30
- Support MySQL & MariaDB, PostgreSQL, MSSQL, Sqlite19
- Open source14
- Free13
- Promise Based11
- Recommend for mongoose users4
- Atrocious documentation, buggy, issues closed by bots3
- Typescript2
Sign up to add or upvote prosMake informed product decisions
Cons of LokiJS
Cons of Sequelize
- Docs are awful30
- Relations can be confusing9