Skip to content

torymur/sqlite-repr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQLite3 Representation

SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. SQLite is the most used database engine in the world, built into all mobile phones and most computers and comes bundled inside countless other applications that people use every day.

The SQLite file format is stable, cross-platform and backwards compatible, the developers pledge to keep it that way through the year 2050.

All that makes it interesting to peek into their on-disk database file format to understand it for software development objective and troubleshooting reasons, as well as to study format of SQLite databases for academic purposes or regular self-education.

Objective

This project provides the visual tool available at https://torymur.github.io/sqlite-repr/ to explore SQLite’s on-disk database file format.

It has some already included database examples to show off main type of SQLite pages like table/index interior/leaf btree pages, freelist and overflow and some other SQLite features.

It also allows you to load and parse your own database file. However, parsing may still fail even for valid database files, as the parser does not yet support all SQLite features.

If that happens, please consider opening an issue and including a minimal example that reproduces the sequence of database queries.

Development

To run UI locally, please follow the instructions here

Map 🗺️

Parser

  • Table Interior Btree page
  • Table Leaf Btree page
  • Index Interior Btree page
  • Index Leaf Btree page
  • Freelist pages
  • Overflow pages
    • Spilled record values
    • Spilled record headers (rare)
  • Pointer map pages
  • Lock-byte page
  • Freeblock & Fragmented bytes

UI

  • Hybrid, Hex, Text field repr
  • Preloaded example databases, details
  • Page View
  • Tree View
  • Reserved space
  • Add yours
  • Console

About

Visual representation of on-disk database file format used by all releases of SQLite since version 3.0.0.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages