Sections
Getting started
CLI flags & config
SQL
DDLDMLSELECTFunctions & expressionsTransactions
Clients
HTTP APINative driversPostgreSQL / MySQL wire protocolBinary RPC
Features
RBAC (multi-user)Embeddings (semantic search)File importBackupsDemo showcase mode and .fdb management
Operations
DeploymentArchitectureFileDB on Windows: tray and autostart
Reference
FileDB vs PostgreSQL / MySQL
AI
AI Features: overviewAI Chat and AI AgentSmart Export and AI Import MappingEmbeddings and Hybrid SearchAI setup: providers and presets
Dashboards
Dashboards: overviewDatasets and chartsNo-Code query builderDashboards AI assistantWidgets, grid and filtersPublic links and exportLayout, text cards and KPI comparison

Transactions

Syntax

BEGIN;
INSERT INTO accounts (id, balance) VALUES (1, 100);
UPDATE accounts SET balance = balance - 50 WHERE id = 1;
UPDATE accounts SET balance = balance + 50 WHERE id = 2;
COMMIT; -- or ROLLBACK

How it works

Transactions are implemented via a compensating-action log: every mutation records its inverse (INSERTDELETE, UPDATE → restore the pre-image, DELETE → re-insert). ROLLBACK replays the log in reverse.

This is not MVCC — the current model is closer to read-committed, without snapshot isolation. But ROLLBACK genuinely undoes every change in the session, and the WAL (fsynced on every commit) guarantees a committed transaction survives any crash — kill, SIGTERM, power loss.

Writer serialization

Writes are serialized SQLite-style: a database-wide writer lock with DEFERRED/IMMEDIATE modes — concurrent writers never interleave, which keeps reasoning about consistency simple at the cost of sequential writes.

Related pages
← Previous
Functions & expressions
Next →
HTTP API