AsaDB logo markAsaDB

Prolog Language SQL Engine

Local-first database software

Official Home Page

Persistent data path

Storage Engine & B+Tree

Local rows, indexes, pages, caching, and recovery boundaries in storage format v3.

4 KB slotted pages

asadb_page_manager.pl defines the fixed 4 KiB ASPG page format: a 32-byte header, page type, ID, record and slot counts, free-space bounds, sibling pointers, and checksum. Slots grow forward while payload grows backward from the page end.

Records and page I/O

asadb_record_manager.pl manages typed rows, heap pages, RIDs, scans, updates/deletes, index invalidation, snapshots, append undo, mutation backup, and recovery. asadb_pager.pl performs fixed-offset disk I/O, allocation, scanning, flushing, and invalidation.

Persistent B+Tree

asadb_btree.pl supplies compatibility-tree helpers and the persistent B+Tree. Page zero holds index metadata; internal and linked leaf pages support equality/range lookups and ordered RID traversal. The bulk builder uses 2,048-entry external sorted runs so a complete index list does not remain in the Prolog heap.

Recovery boundary: AsaDB uses append undo, mutation backups, transaction snapshots, and atomic replacement. It is not ARIES and does not currently provide MVCC.

Read compatibility and backup rules →