What is KDBS?
KDBS is an OLTP database engine that enforces the rules your data must obey inside the engine.
In this article
KDBS is a relational database engine for online transaction processing (OLTP): keyed reads and writes, short transactions, and joins along primary keys. It narrows its feature set to that workload, and uses what that saves to enforce, inside the engine, the rules that applications usually check in their own code.
Why the rules belong in the engine
An application keeps a list of things it must never get wrong: no duplicate ids, no group over its limit, no state change that skips a step. When each service checks these in code, every service and every author must get them right. When the engine enforces them, they hold for every writer: a service, a script or an agent.
What the engine enforces
| Rule | Status |
|---|---|
| A primary key belongs to one row; a deleted row’s key stays taken until an explicit PURGE | Built |
Upper bounds per group on COUNT(*) and SUM(column) (CREATE ASSERTION) | Built |
| Foreign keys, checked on write | Built |
| Durability chosen per transaction, with the possible loss stated | Built |
| Allowed state changes for a column | Concept |
| Execute a retried request at most once | Concept |
How KDBS runs a statement
- A client sends SQL over KWP/1, a binary protocol.
- The parser turns the statement into a fixed sequence of steps: the plan is chosen when the statement is parsed, and it does not change as the data grows.
- The steps run on the CPU core that the client’s session is on.
- Rows are stored in a B+ tree ordered by primary key. Structures the engine learns from the workload sit next to the tree and may make a query faster, but never change its answer.
- Changes are written to a write-ahead log, with the durability the transaction chose.