-
Notifications
You must be signed in to change notification settings - Fork 0
Concept File Structure
Turkce Dokumantasyon | English Documentation
Category: Core Concepts & Architecture
Subsystem: Physical Storage & File Formats (AmberDB::Base)
Entry Type: File Format & Extension Reference
AmberDB employs deterministic and purpose-driven file extensions across its physical storage tier. This file architecture is categorized into three distinct classes:
- Authoritative Master Data: The single source of truth. If lost, these cannot be derived from elsewhere; they must be backed up.
-
Derived Secondary Indexes: Inverted indexes and bitsets precomputed from master data. If corrupted or missing, they are reconstructed deterministically via
$adb->set_index(). - Runtime & Recovery Files: Transaction undo journals, RAM-disk caches, staging buffers, and backup archives.
| Extension | Classification | Reconstructible? | Description |
|---|---|---|---|
.db |
Authoritative Master Data | ❌ NO | Berkeley DB (DB_File Hash) primary document table. |
.del |
Authoritative Master Data | ❌ NO | Soft-deleted records recycle bin (keep_deleted). |
.aut |
Authoritative Master Data | ❌ NO | Chronological user action and change audit ledger (log_owner). |
.cnt |
Authoritative Master Data | ❌ NO | High-concurrency atomic view/hit counter store (use_counter). |
.unq |
Authoritative Master Data | ❌ NO | Bidirectional string-to-foreign-key dictionary and uniqueness index (_${blk}.unq). |
.inx |
Derived Secondary Index | YES | Primary 8-byte packed binary index containing all active record IDs. |
.fld |
Derived Secondary Index | YES | Field value match_block). |
.src |
Derived Secondary Index | YES | Word tokens search_block). |
.fac |
Derived Secondary Index | YES | Columnar bitset index for multi-dimensional facet filtering (facet_block). |
.srt |
Derived Secondary Index | YES | Monotonic pre-sorted binary array of record IDs (sort_block). |
.slg |
Derived Secondary Index | YES | Bidirectional URL slug map (_0.slg ID _1.slg Slug |
.jinx |
Derived Secondary Index | YES | 8-byte packed primary index for cold/junk records (use_junk). |
.jfld |
Derived Secondary Index | YES | Inverted field match index for cold records. |
.jsrc |
Derived Secondary Index | YES | Full-text search index for cold records. |
.table |
Schema Definition | ❌ NO | Table schema configuration file (schema/*.table). |
.dbase |
Schema Definition | ❌ NO | Database group configuration file (schema/*.dbase). |
.amberdb |
Backup Archive | — | Compressed, SHA-256 verified portable database archive. |
.csv |
Continuous WAL | — | Append-only daily audit stream (backup/YYYY/YYYY-MM-DD.csv). |
.txn |
ACID Journal | Transient | Active transaction undo-journal rollback file (txn/*.txn). |
.cache |
Shared Memory | YES | RAM-disk shared memory cache file (cache/*.db). |
.tmp |
Disk Buffer | Transient | Transient staging buffer file under buffer/ (buffer_write). |
.lock |
Process Mutex | Transient | Operating system flock synchronization mutex lock file. |
AmberDB's native .amberdb archiving utility (AmberDB::Tools->dump) deliberately excludes derived secondary indexes (.inx, .fld, .src, .fac, .srt, .slg) from backup archives.
Consequently, a 10 GB database compresses down to 500 MB - 1 GB, containing only authoritative tables (.db, .del, .aut, .cnt, .unq) and schemas (.table). Upon restoring (restore), the engine reconstructs all secondary indexes automatically with zero data loss.
AmberDB — High-Performance Schema-Driven NoSQL Database Engine for Perl.
Copyright 2005-2026 Maruf Cetin. Released under the Artistic License 2.0.
CPAN · GitHub Repository · Issue Tracker
- Berkeley DB (DB_File) Engine
- AmberDB Table Schema
- Global Flags
- Table Schema Flags
- Directory Structure
- File Structure (Extensions)
- Repeat Blocks
- Auto-Increment ID
- ASCII ID
- Relational Records
- Record Anatomy
- JOIN-Free Architecture
- Packed Binary Index
- Strict 2PL Locking
- Undo Journal & Rollback
- Tiered Junk Indexing
- Disjunctive Faceting
- Phonetic Accent Search
- 2-Pillar Disaster Recovery
- RAM-Disk Acceleration
- In-Memory Schema Mutation
- Simple Mode
- new
- config
- set_datadir
- insert_id
- insert_list
- modify_id
- modify_list
- delete_id
- delete_list
- read_id
- read_all
- read_list
- exist_id
- exist_list
- exist_table
- table_count
- table_keys
- table_lastid
- table_attr
- table_create
- field_fetch
- field_filter
- search_table
- facet_menu
- field_fltkeys
- field_allfltkeys
- facet_rules
- slug_read
- slug_fetch
- transact_start
- transact_end
- transact_commit
- transact_rollback
- transact_recover
- flock_open
- flock_close
- cache_setup
- cache_read
- cache_write
- cache_delete
- cache_preload
- cache_ensure
- buffer_write
- buffer_read
- buffer_delete
- recs_scan
- recs_get
- recs_put
- recs_del
- locale_uc
- locale_lc
- locale_sort
- locale_to_ascii
- locale_num2text
- locale_format_currency
- locale_format_date
- array_sort
- array_punch
- array_filter
- array_sublist
- deep_copy
- log_owner
- use_counter
- use_junk
- keep_deleted
- auto_id
- buffer_write
- simple
- no_write
- no_backup
- jnktype
- keys_only
- id_type
- language
- .db · .table · .dbase
- .inx · .fld · .src
- .fac · .srt · .slg
- .unq · .del · .aut
- .cnt · .txn · .amberdb
- .csv · .cache · .tmp