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.
N-ary Storage Model (Row/Record)
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.
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|
https://github.com/BohuTANG/nessDB
https://github.com/BohuTANG/nessDB
https://github.com/BohuTANG/nessDB/wiki
Bohu Tang
2011
2016