Embedded document database for Node.js [closed]
Asked Answered
S

3

15

What is the best embedded NoSQL database for Node.js?

My node.js application is too tiny to use a big database like mongodb which need extra configurations.

I tried EJDB, but it need too much disk space (about 1.5MB for each record).

I also search the web, but google gave me so many choices, which made me so confused.

Here are some requirements:

  • fast and lightweight
  • no need too much config
  • be able to store large amount of data (about hundred thousand records, total size in 1GB)
  • better package for Node.js
Shote answered 2/11, 2013 at 14:20 Comment(1)
For new projects you might want to take a look at AceBase, which is a very lightweight and fast NoSQL database engine for Node.js. Very easy to setup and use within minutes, zero config necessary. It's free, all source is open and hosted at GitHubSiracusa
S
17

The most popular embedded Node.js database on GitHub is NeDB

Silvestro answered 2/11, 2013 at 14:22 Comment(5)
Can you use Mongoose with NeDB since it is a subset of MongoDB?Charitacharitable
I've tried to hack it together but it's a serious effort to get Mongoose working with it. Mainly because of the mongo core packages, kerberos and bson stuff in many places. It could be done. Camo is another ODM and works for mongo and nedb.Award
In mid-2019, NeDB hasn't seen a new release in over 3 years.Yielding
If you prefer the Promise syntax rather than the callback version, take a look: github.com/bajankristof/nedb-promisesTitograd
NeDB is no longer maintained. For those looking for an alternative, have a look at AceBaseSiracusa
S
0

Check this one: https://www.npmjs.com/package/ultradb
* no need for configuration, just point database file
* written for node in C, uses native node API - NAPI
* ideal for storing logs, large number of documents
* not ideal if you need to query over documents properties - you'll have to handle all kind of indexing yourself
* works as part of node, no separate processes
* multicore processors friendly - scales with node processes, multiple node instances/forks can work simultaneously on same database
* about 300kB

Safko answered 29/8, 2018 at 21:36 Comment(1)
Linux only... :(Bibliopegy
W
-4

Maybe redis with storing documents as hashes? http://redis.io/commands#hash

It works perfectly on Rapsberry Pi with about 100 hits per minute.

Also there is a good ORM for it - http://jugglingdb.co/

Whitney answered 2/11, 2013 at 14:27 Comment(2)
I don't believe redis is an embedded database.Transponder
redis is not an embedded databaseSargassum

© 2022 - 2024 — McMap. All rights reserved.