NeDB is a lightweight embedded document DBMS written in JavaScript. It supports Node.js, nw.js, Electron, and web browser environments. It is designed to be partially compatible with MongoDB's JSON-based query API. NeDB is useful for storing small amounts of data in memory. When the amount of data exceeds the bounds of what NeDB can hold effectively, switching to MongoDB is intended to be straightforward because it uses the same API.


In May 2013, Louis Chatriot began developing a lightweight embeddable and in memory database system that used a subset of the MongoDB API. It was completed in 2017 and now is on GitHub where individuals can contribute to the project by fixing several bugs but no additional features are being implemented currently. However, several separate teams have forked copies of the original NeDB database and began implementing their own ideas and additional features that weren't originally intended by the original creator.

Query Interface

Custom API

The JavaScript API is a subset of MongoDB. The syntax for the query commands are the same as MongoDB, which allows for easy mitigation to MongoDB once the amount of data becomes too large for NeDB.

Concurrency Control

Not Supported

NeDB does not support concurrency because each process receives its own copy of the database and it is not possible for the system to sync the views that two separate processes have of the data. Additionally, Javascript is inherently single-threaded resulting in NeDB not being able to support concurrency because it is written completely in Javascript.


Not Supported

NeDB does not support logging because all data is stored in memory. However, a NeDB logger has been created that can be used to insert documents into a NeDB-readable database.


Not Supported

Although MongoDB does support joins, NeDB does not because the only similarites between NeDB and MongoDB are the syntax for queries used in the API. Additionally, NeDB does not support joins because it is not a relational database but rather a document store database.

Isolation Levels

Not Supported

NeDB does not support any isolation levels because no concurrency is guaranteed by the system.

Stored Procedures

Not Supported



NeDB supports indexing and helps provide a sufficient speed boost. It allows for indexing of any field, including those in nested documents. An index can be created at any point, even after data has been inserted. However, it is most efficient if done when the application is started because the index is created synchronously. The time to create an index is quite fast so it doesn't impact startup time too much. Additionally, indexes allow for the database to perform fast reads and writes.

Storage Architecture


NeDB stores all databases in memory in order to perform fast find and query operations. Storing all the data in memory causes NeDB to only perform well on smaller datasets.


Not Supported

Foreign Keys

Not Supported

Data Model

Document / XML

System Architecture


Storage Organization


NeDB Logo