How It Works
Traditional DB vs OnDB
Benefits
- Complete audit trail — All historical versions are preserved and can be queried
- Tamper-proof history — Past states cannot be altered or deleted
- Cryptographic verifiability — When on-chain mode is enabled, every change is recorded with a block height and transaction hash
- Conflict-free — No race conditions on writes since each version is a distinct record
Implications
- Storage grows with each update (each version is a new record)
- Historical versions can be queried by timestamp if needed
- Data is never physically removed from the blockchain
- “Deletes” are logical — they mark records as deleted but prior versions persist
Data Retention
While the underlying storage is immutable, OnDB supports configurable retention policies per collection to manage storage costs.The first 30 days of retention are free for all collections. Costs only apply for retention periods beyond 30 days.
Configuring Retention
From the Dashboard:- Navigate to your application
- Select the Retention tab
- Expand a collection to view/edit its settings
- Enter the retention period in days (leave empty for permanent)
- Click Save to apply changes
Recommended Retention by Data Type
Next Steps
CRUD Operations
See how append-only storage affects CRUD operations
Data Storage
Store data with payment handling