man(7)
β¨ NAME β¨
okay bestie, welcome to the man(7) page (yes that's the manual section, we're being extra official today π
) β it's all about wgdb, aka the shared memory database library. that's the whole vibe. no cap. π«Ά
πΈ SYNOPSIS πΈ
so the synopsis here is literally just a lil signpost:
[see Doc folder and http://whitedb.org for the full manual]
that's it. that's the synopsis. the full manual is living in the Doc folder and over at http://whitedb.org, so go look there if you want the deep lore π₯
π DESCRIPTION π
okay so let me tell you about WhiteDB, because she is iconic β¨
WhiteDB is a lightweight NoSQL database library written in C, and she operates fully in main memory. the way that there's no server process?? no daemon, no little guy running in the background, nothing. data is read and written directly from/to shared memory, and there are no sockets between WhiteDB and your application program. none. zero. and bestie, all the data is accessible to separate processes π¦
each database record is a tuple of N elements, encoded in WhiteDB's simple compact format. you can store both conventional datatypes and direct pointers to records β and the pointer thing? that's the cheat code, it enables highly efficient traversal of complex data π
every element is encoded as an integer, and you can configure it as either 32 or 64 bits. the integers in the tuple encode values directly or as pointers. and here's the gag: columns have no type π any encoded value can be stored to any field. you can always get a direct pointer to a record, store it into a field of a record, or just use it in your own program directly. so a record pointer basically works as an automatically assigned id of the record, and accessing the record requires no search at all. literally zero searching. main character energy fr fr π
the low bits of an integer in a record indicate the type of data. anything that does not fit into the remaining bits gets allocated separately and is pointed to by that same integer. cute, right? π
for concurrency control we use a database level lock implemented via a task-fair atomic spinlock queue β but wait, there's more, because alternative faster and simpler preference policies can be configured: either a reader-preference or a writer-preference spinlock. and we provide safe atomic updates of simple values without taking a write lock. obsessed. π
the simplest index we provide is a T-tree index on any field containing any mixture of objects (integers, strings, etc β she does not discriminate π). and the index is automatically maintained when records are added, deleted or changed. no manual upkeep, we love a self-sufficient queen π
two mechanisms are available for storing the shared memory database to disk:
- the whole database can be dumped and restored πΎ
- all inserts, deletions and updates can be logged to a file π
π¦ SEE ALSO π¦
the Whitedb web site can be found at:
http://whitedb.org
go visit her, she's lovely π
π REPORTING PROBLEMS π
if something's giving bug energy, please use either:
https://github.com/priitj/whitedb
or just email the authors. we're nice, we promise π«Ά
π AUTHORS π
Copyright (C) 2008-2014 Tanel Tammet (tanel.tammet@gmail.com), Priit JΓ€rv (priit@whitedb.org)
and that's the whole page bestie, ty for coming to my TED talk π this was version 0.7, dated 27 Jan 2014, from the whitedb man page β and yes, we know the manual section says man(7), we're just built different β¨ bye ily π
π¦ where this page comes from
- debian bookworm: whitedb 0.7.3+git211004-1+b1 Β· GPL-3.0-or-later
- debian trixie: whitedb 0.7.3+git211004+dfsg-1+b2 Β· GPL-3.0-or-later
- ubuntu jammy: whitedb 0.7.3+git211004-1 Β· GPL-3.0-or-later
- ubuntu noble: whitedb 0.7.3+git211004+dfsg-1 Β· GPL-3.0-or-later
- ubuntu questing: whitedb 0.7.3+git211004+dfsg-1
- ubuntu resolute: whitedb 0.7.3+git211004+dfsg-2 Β· GPL-3.0-or-later
- ubuntu stonking: whitedb 0.7.3+git211004+dfsg-2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms