Fold Database (FoldDB)
High-Level Concept
FoldDB is a decentralized data store that manages data through strict schema-based updates and queries. It operates as an append-only ledger, appending new data versions and transformations instead of modifying existing entries, preserving a complete, auditable history. The database is encrypted by default and records all read and write operations, tracking who accessed which data and through which schema.
Access is controlled through trust distance settings on schema fields and micropayment-based read and write operations. Security policies are defined at the schema level and can be configured based on specific use cases.
Data and Storage
FoldDB stores data as structured records, with each record represented as an atom. Different schemas referencing the same data use atom references, ensuring updates to one schema propagate across all others. The append-only structure prevents data loss, supports auditing, and allows reverting to previous states. While this increases the number of stored atoms over time, it maintains a verifiable history.
Schema management optimizes data structures, identifies inconsistencies, and automates schema migrations. Pattern-based data integrity checks detect anomalies and enforce validation rules. Storage efficiency adjustments balance redundancy and retrieval speed.
Queries and Mutations
Queries and mutations can be executed against any data node and schema. The request is sent to the node, where a security check is performed, and a micropayment invoice is generated. Once the invoice is paid, the results are returned. These processes are enforced at the database level rather than the network level. Schema-defined access policies determine both security restrictions and transaction costs.
Usage-based query optimization analyzes request patterns to improve performance and minimize latency. Context-aware permission management refines access controls, ensuring secure and efficient data interactions.