-
Notifications
You must be signed in to change notification settings - Fork 0
Concept Simple Mode
Turkce Dokumantasyon | English Documentation
Category: Core Concepts & Architecture
Subsystem: Schemaless Operations (AmberDB::Base)
Entry Type: Architectural Concept
Simple Mode is AmberDB's lightweight operational mode for using tables without creating or defining schema files (.table).
When simple => 1 is configured (or when accessing unmapped tables), AmberDB bypasses schema validation, secondary inverted index maintenance (.fld, .src, .fac, .srt), and metadata lookups. Records are stored directly into the master Berkeley DB (DB_File) hash table (.db) as native key-value pairs.
This mode is ideal for:
- Session stores and temporary tokens.
- Key-value caching layers and rate-limiting counters.
- Rapid prototyping and one-off CLI utilities.
- Schemaless arbitrary JSON payloads.
Simple Mode vs Standard Mode
Standard Schema Mode:
insert_id() > Validates Schema > Writes .db > Updates .inx, .fld, .src, .fac, .srt
Simple Mode (simple => 1):
insert_id() > Writes directly to .db (Zero Index Overhead, Maximum Ingestion Speed)
In Simple Mode:
- Primary key operations (
insert_id,read_id,modify_id,delete_id,exist_id) run with full ACID safety at maximum$O(1)$ speed. - Filtered lookups (
field_fetch) automatically fall back to fast C-level sequential table scans (recs_scan).
# Initialize AmberDB instance in Simple Mode
my $adb = AmberDB->new(
cfg => { simple => 1, no_backup => 1 },
path => { dbase_dir => "./dbstore" }
);
# Insert key-value records without any pre-existing .table file
$adb->insert_id("sessions", "sess_98234a", 1001, "admin", time(), "192.168.1.50");
# Read back directly
my @session = $adb->read_id("sessions", "sess_98234a");
print "User: $session[1], Role: $session[2]\n";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