Get Advice Icon

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

LokiJS
LokiJS

11
16
+ 1
1
Mongoose
Mongoose

763
580
+ 1
38
Add tool

LokiJS vs Mongoose: 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, Mongoose is detailed as "MongoDB object modeling designed to work in an asynchronous environment". Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box.

LokiJS can be classified as a tool in the "In-Memory Databases" category, while Mongoose is grouped under "Object Document Mapper (ODM)".

LokiJS and Mongoose are both open source tools. Mongoose with 19K GitHub stars and 2.63K forks on GitHub appears to be more popular than LokiJS with 4.95K GitHub stars and 389 GitHub forks.

What is LokiJS?

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.

What is Mongoose?

Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box.
Get Advice Icon

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

Why do developers choose LokiJS?
Why do developers choose Mongoose?

Sign up to add, upvote and see more prosMake informed product decisions

    Be the first to leave a con
    What companies use LokiJS?
    What companies use Mongoose?
      No companies found

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

      What tools integrate with LokiJS?
      What tools integrate with Mongoose?

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

      What are some alternatives to LokiJS and Mongoose?
      Redis
      Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
      Pouchdb
      PouchDB enables applications to store data locally while offline, then synchronize it with CouchDB and compatible servers when the application is back online, keeping the user's data in sync no matter where they next login.
      SQLite
      SQLite is an embedded SQL database engine. Unlike most other SQL databases, SQLite does not have a separate server process. SQLite reads and writes directly to ordinary disk files. A complete SQL database with multiple tables, indices, triggers, and views, is contained in a single disk file.
      NeDB
      Embedded persistent or in memory database for Node.js, nw.js, Electron and browsers, 100% JavaScript, no binary dependency. API is a subset of MongoDB's and it's plenty fast.
      MongoDB
      MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
      See all alternatives
      Decisions about LokiJS and Mongoose
      No stack decisions found
      Interest over time
      Reviews of LokiJS and Mongoose
      Review ofMongooseMongoose

      I inherited a stack where Mongoose is used in the database layer.

      It's been several months and it's still the single highest source of daily WT*s in my backend development. The API is full of irregularities and the design is a poor mix of object-orientation and stateful objects with a lot implicit behavior. Mongoose made the choices of taking the worst parts of ORMs and using them in a context where the benefits of ORMs don't apply. The only reason I'm keeping it is its handy .populate() feature. Expect bad surprises!

      How developers use LokiJS and Mongoose
      Avatar of Mathieu Lory
      Mathieu Lory uses LokiJSLokiJS

      LokiJS handle in-memory database store for configs, users..

      Avatar of AyeDeals
      AyeDeals uses MongooseMongoose

      We use mongoose and node-native for database querying.

      Avatar of anthillsolutions
      anthillsolutions uses MongooseMongoose

      No-brainer for accessing Objects with NodeJS.

      How much does LokiJS cost?
      How much does Mongoose cost?
      Pricing unavailable
      Pricing unavailable
      News about LokiJS
      More news