Loading...

Build your own SQLite

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

Start Building
C
C
C#
C#
C++
C++
Clojure
Clojure
Elixir
Elixir
Gleam
Gleam
Go
Go
Java
Java
JavaScript
JavaScript
Kotlin
Kotlin
Python
Python
Ruby
Ruby
Rust
Rust
TypeScript
TypeScript
Zig
Zig

This challenge requires a CodeCrafters Membership.

You're welcome to study the full challenge structure and stage instructions for free. A membership is needed for submitting code and viewing solutions.

Want to try a free challenge? Try Build your own Shell — it's free this month.

SQLite is a popular SQL database engine. In this challenge, you'll build your own version of SQLite that is capable of reading a SQLite database file and answering basic SQL queries like SELECT and using indexes.

Along the way, you'll learn about the SQLite file format, SQL syntax and more.

Stages

Print page size
Login via GitHub to view this stage
Print number of tables
Login via GitHub to view this stage
Print table names
Login via GitHub to view this stage
Count rows in a table
Login via GitHub to view this stage
Read data from a single column
Login via GitHub to view this stage
Read data from multiple columns
Login via GitHub to view this stage
Filter data with a WHERE clause
Login via GitHub to view this stage
Retrieve data using a full-table scan
Login via GitHub to view this stage
Retrieve data using an index
Login via GitHub to view this stage