DBDB.io The Encyclopedia of Database Systems · Est. 2017
Database of Databases

Database Entry

NeDB


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.[03][01]

Source Code
https://github.com/louischatriot/nedb[01]
Developer
Country of Origin
FR
Start Year
2013 [07]
Project Type
Open Source
Written in
JavaScript
Supported Languages
JavaScript
Inspired By
Redis
Compatible With
MongoDB
License
MIT License

Database Entry

NeDB


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.[03][01]

History


In May 2013, Louis Chatriot began developing a lightweight embeddable and in memory database system that used a subset of the MongoDB API.

Data Model


Indexes[04][05][06]


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, although 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, for example it takes 35ms for a database containing 10,000 documents. Additionally, indexes allow for the database to perform fast reads and writes. The amount is approximately 5,000 writes and 25,000 reads per second.

Query Interface


The JavaScript API is a subset of MongoDB.

Storage Architecture


The DBMS reads the entire database into memory. It can then flush out all changes on shutdown.

Storage Organization


Stored Procedures


System Architecture


Citations

7 sources
  1. GitHub - louischatriot/nedb: The JavaScript Database, for Node.js, nw.js, electron and the browser · GitHub github.com
  2. Home · louischatriot/nedb Wiki · GitHub github.com
  3. NeDB: A Lightweight JavaScript Database stackabuse.com
  4. Indexing · louischatriot/nedb Wiki · GitHub github.com
  5. Server-side JavaScript - Database Manual - MongoDB Docs mongodb.com
  6. nedb/lib/indexes.js at master · louischatriot/nedb · GitHub github.com
  7. Initial commit github.com
Revision #4 Last Updated: