Database Viewer
Browse the SQL that builds any database used across the lessons, without running it.
Loaded: Fuzzy search database ยท fuzzy-search.database-init
-- CREATE EXTENSION also makes PGlite load pg_trgm for this database.
CREATE EXTENSION pg_trgm;
CREATE TABLE documents (
id SERIAL PRIMARY KEY,
title TEXT NOT NULL,
body TEXT NOT NULL
);
INSERT INTO documents (title, body)
VALUES
('SQL indexes', 'Indexes help PostgreSQL find rows without reading the whole table.'),
('JOIN patterns', 'Joins combine rows from related tables into one result.'),
('Query tuning', 'Slow queries get faster with the right index and a better plan.'),
('React components', 'Components split a user interface into small reusable pieces.'),
('CSS grid layouts', 'Grid and flexbox position elements on a web page.'),
('Neural networks', 'Neural networks learn patterns from training data.'),
('Chatbots', 'Language models answer questions written in natural language.'),
('Vector search', 'Embeddings let a database find documents with a similar meaning.');