9-11 September 2019
Europe/Lisbon timezone

What SQLite Devs Wish Linux Filesystem Devs Knew About SQLite

11 Sep 2019, 12:00
7m
Jade/room-I&II (Corinthia Hotel Lisbon)

Jade/room-I&II

Corinthia Hotel Lisbon

160

Speaker

Dr Richard Hipp (SQLite)

Description

(1) SQLite is the most widely used database in the world. There are probably in excess of 300 billion active SQLite databases on Linux devices. SQLite is a significant client of the Linux filesystem - perhaps the largest single non-streaming client, especially on small devices such as phones.

(2) Unlike other relational database engines, SQLite tends to live out on the edge of the network, not in the datacenter.

(3) An SQLite database is a single ordinary file in the filesystem. The database file format is well-defined and stable. The US Library of Congress designates SQLite database files as a recommended format for long-term archive storage of structured data.

(4) SQLite is not a client/server database. SQLite is a library. The application makes a function call that contains SQL text and SQLite translates that SQL into a sequence of filesystem operations that implement the desired operation, all within the same thread. There is no messaging and no IPC. There is no server process that hangs around to coordinate access to the database file.

(5) SQLite does not get to choose a filesystem type or mount options. It has to make due with whatever is at hand. Therefore, SQLite really wants to be able to discover filesystem properties at run-time, so that it can tune its behavior for maximum performance and reliability.

(6) Diagrams showing how SQLite creates the illusion of atomic commit on a non-atomic filesystem.

I agree to abide by the anti-harassment policy Yes

Primary author

Dr Richard Hipp (SQLite)

Presentation Materials