SQLIte database file format diagrams

November 9, 2022 -
Tags: data_types, databases, indexes, storage

During my CodeCrafters SQLite project, I’ve found the SQLite database file format document to be rather complete, but nonetheless, for a variety of reasons, hard to use.

In this article I present easy to read diagrams, that one can refer to while developing the exercises.

Content:

Introduction

The fields described in the diagrams are a subset of the full specification - they’re only those required to solve the problems of the CodeCrafters project; some concepts are therefore skipped, e.g. overflow.

The green background color indicates fields that are shared across different page types; if fields of a child are highlighted, but not the parent, it means that the child itself is optional, but when present, its highlighted fields are mandatory.

The diagram files can be found in the related repository of mine; the reference format is PlantUML.

If you find any error, please contact me, or add a comment (below)!

Index interior page

Index interior page

Index leaf page

Index leaf page

Table interior page

Table interior page

Table leaf page

Table leaf page