Loading...

Build your own SQLite

Learn about SQL syntax, SQLite's file format, B-trees and more

In this challenge, you'll build a barebones SQLite implementation that supports basic SQL queries like SELECT. Along the way you'll learn about SQLite's file format, how indexed data is stored in B-trees and more.

Stages

Print page size
< 5 minutes

In this stage, you'll implement one of SQLite's dot-commands: .dbinfo. This command prints metadata related a SQLite database, and you'll implement one of these values: the database page size. You'll do this by parsing a file that uses the SQLite database file format.

Print number of tables
1h +

In this stage, you'll extend support for the .dbinfo command added in the previous stage. Specifically, you'll implement functionality to print the number of tables. You'll do this by parsing a file that uses the SQLite database file format.

show all...