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

Database Entry

nessDB


nessDB is an embedded key-value DBMS written in ANSI C with BSD license. It does not require any external dependencies and works in most POSIX systems.[03][04]

Source Code
https://github.com/BohuTANG/nessDB[01]
Developer
Country of Origin
CN
Start Year
2011 [15]
End Year
2016
Project Type
Open Source
Written in
C
Supported Languages
C, C++, Java, Lua, Python
Operating Systems
BSD, Linux
License
BSD License

As for storage engine, nessDB used LSM-tree (Log-Structured Merge Tree) in v1.8, B-epsilon-tree in v2.0. nessDB also used fractional cascading to speed up the query.

Database Entry

nessDB


nessDB is an embedded key-value DBMS written in ANSI C with BSD license. It does not require any external dependencies and works in most POSIX systems.

As for storage engine, nessDB used LSM-tree (Log-Structured Merge Tree) in v1.8, B-epsilon-tree in v2.0. nessDB also used fractional cascading to speed up the query.[03][04]

Checkpoints[05]


nessDB does not support recovery and checkpoint.

Compression[06]


nessDB uses QuickLZ, a compression library written in C, to compress the key-value pair when storing the pair into tree nodes.

Concurrency Control[07][08]


There are two mutexes for the meta-data and SST (Small-Splittable Tree), and no tuple level latch. A thread must get the latch before merging the SST nodes.

Data Model[05][09][10]


nessDB is a key-value DBMS, which supports Redis-like protocol, such as SET, GET, DEL, EXISTS. To be specific, both key and value are general raw data and are represented by a pointer with length.

Foreign Keys[05]


nessDB is a key-value DBMS so it does not support foreign key.

Indexes[03][04]


nessDB used LSM-tree (Log-Structured Merge Tree) in v1.8, Small-Splittable Tree in v2.0. Those data structures are suitable for high-performance insertion compared to B-tree.

Isolation Levels[08]


nessDB uses a single mutex for the whole SST structure instead of tuple-level latches.

Joins[05]


nessDB does not support join. It is a key-value DBMS with only interfaces such as SET, GET, DEL, EXISTS.

Query Execution[05]


nessDB is a key-value DBMS and each query only involves a single key-value pair.

Query Interface[11]


nessDB is an embedded DBMS with custom C API, as well as wrappers for Java, Python and Lua.

Storage Architecture[12]


nessDB is a disk-oriented DBMS. All data are stored in non-volatile storage after shutdown.

Storage Model[13]


nessDB uses a Small-Splittable Tree (SST), a B-Epsilon-tree with small height (level), for storage engine. SST has multiple levels with exponential expanding size. For level 0, the data is un-sorted and the other levels are sorted. This data structure is designed for random write workloads.

Storage Organization[14][13]


For a tree node file, there is a header which stored count of the key-value pair in each level. The header is followed by several var-length key-value pairs with data offset. The following diagram shows the structure of a tree node file, and the first line represents the header part.

| L0 count | L1 count | L2 count | L3 count |
| Key 0 length | key 0 data | data offset | operation flag|
| Key 1 length | key 1 data | data offset | operation flag|
...
| Key N length | key N data | data offset | operation flag|

Stored Procedures


System Architecture


Views


Citations

15 sources
  1. https://github.com/BohuTANG/nessDB github.com Dead — Check Archive
  2. Pages · bohutang/nessDB Wiki · GitHub github.com
  3. https://github.com/BohuTANG/nessDB/blob/master/README github.com Dead — Check Archive
  4. https://sec.douban.com/c?_s=a5944e68702a7900175abcb708be87fbf81a50088f6836e62e70fdc48d72ba13&a=1&r=https://www.douban.com/note/257014437 douban.com
  5. nessDB/README at 6de40ee7d75f8c0c3b71082e05f1f79abebb7bb0 · bohutang/nessDB · GitHub github.com
  6. nessDB/engine/index.c at 6de40ee7d75f8c0c3b71082e05f1f79abebb7bb0 · bohutang/nessDB · GitHub github.com
  7. nessDB/engine/meta.h at 6de40ee7d75f8c0c3b71082e05f1f79abebb7bb0 · bohutang/nessDB · GitHub github.com
  8. nessDB/engine/index.h at 6de40ee7d75f8c0c3b71082e05f1f79abebb7bb0 · bohutang/nessDB · GitHub github.com
  9. nessDB v1.8 with LSM-Tree « Another Word For It durusau.net
  10. nessDB/util/msg.h at 4c36de92ef238bf9449993e6b3b5c09994860af3 · bohutang/nessDB · GitHub github.com
  11. nessDB/bindings at 6de40ee7d75f8c0c3b71082e05f1f79abebb7bb0 · bohutang/nessDB · GitHub github.com
  12. nessDB/engine/index.c at 6de40ee7d75f8c0c3b71082e05f1f79abebb7bb0 · bohutang/nessDB · GitHub github.com
  13. nessDB/spec/small-splittable-tree.txt at 6de40ee7d75f8c0c3b71082e05f1f79abebb7bb0 · bohutang/nessDB · GitHub github.com
  14. https://dl.acm.org/citation.cfm?id=1248393 acm.org
  15. add github.com
Revision #15 Last Updated: