GlassDB

a SQL database you can see through — pager, write-ahead log, B+tree and query planner written from scratch in Rust, running in your browser as WebAssembly. No server. No mock data. The real engine.

Never used a database? Perfect — this page is for you. A database is the invisible filing cabinet behind nearly every app: it stores records and finds them again, fast. This page runs a real one inside your browser, behind a glass wall, so you can watch it work. Think of it as a library: records live on shelves (pages), signs point to the right shelf (the tree), and a safety diary (the log) makes sure a power cut can never corrupt anything. Click any button below — no code needed.

Try it — one click

loading engine…

Every button runs a real query. Watch the right side light up, then read “What just happened?” below.

Results

Click a button above to see results here.

The strategy — the engine explains how it decided to search

Before running anything, the engine picks a strategy — shortcut or full search — and explains it here.

Write your own — for the SQL-curious

Ctrl+Enter runs

Shelves it visited — each square is one “shelf” (page) of records

fetched a shelf already in hand updated a shelf safety diary
A play-by-play of everything the engine touches appears here as it happens.

The signs

how it finds one record without reading them all — shelves visited by the last query glow

The tree appears once a table exists.

How to read this page

  • The grid of squares is the database file: every square is a “shelf” holding a chunk of records. Watch which ones light up — that's exactly how much work your question caused.
  • The tree works like signs in a library: start at the top, follow two or three arrows, land on the one right shelf. That's why finding ID #250 touches 2 shelves while searching by age checks all of them.
  • The purple lines are the safety diary: every change is written there first and saved to disk before the real records are touched. If the power died mid-save, the diary is replayed on restart — finished saves survive, half-finished ones vanish. Nothing is ever left corrupted.
  • The strategy panel is the engine thinking out loud: “I have a shortcut for this” vs. “I'll have to check everything.”