Skip to content
Kinan Bab edited this page May 30, 2023 · 6 revisions

Welcome to the K9db wiki!

A MySQL-compatible database for privacy compliance-by-construction.

K9db is a MySQL-like database that provides similar capabilities to MySQL, while providing applications with a correct-by-construction built-in mechanism to comply with subject access requests (SARs), as required by privacy legislations, such as Europe's General Data Protection Regulation (GDPR).

K9db supports two types of SARs: data access and data deletion. The former allows data subjects (i.e. human users) to access a copy of data related to them, while the later allows them to request removal of that data. Applications must handle these two types of SARs correctly to comply with the GDPR's right to access and erasure (the right to be forgotten).

Internally, K9db tracks associations between each row of data stored and the users that have rights to it. K9db uses this information to automatically and correctly handle SARs, and to ensure that regular application queries and updates maintain compliance (e.g. do not create dangling or orphaned data). K9db achieves this while maintaining performance comparable to MySQL, by relying on various design decisions and optimizations, including a new physical storage layout organized by data subjects. Refer to our OSDI'23 paper for details.

K9db provides an integrated and compliant in-memory cache to speed up expensive queries. K9db automatically ensures this cache is up-to-date with respect to SARs, as well as regular application updates. Unlike demand filled caching, such as with Memcached, K9db's caches rely on incremental data flow processing to keep the cache always up-to-date with no invalidations.

To use K9db, applications need to add annotations to their SQL schema to express the ownership relationships between data subjects and data in the various tables. Furthermore, developers may need to combine several related operations into a compliance transaction if these operations temporarily create orphaned data.

K9db runs each query as a single-statement transaction with REPEATABLE_READS isolation. K9db enforces PK uniqueness and FK referential integrity for FKs with ownership annotations.

K9db was previously known as Pelton.