Music retail · chinook.demodb.dev
Chinook
sample database.
A digital music store database for learning SQL, joins, and data tooling.
-- Artists by track count
SELECT Artist.Name, COUNT(Track.TrackId) AS Tracks
11 tables · 0 views · 15,607 rows
-- 6 high-confidence cross-database table matches
Useful next steps
Tools for your next step.
CodeGrapher
See how Chinook connects.
Explore tables, relationships and linked meanings.
QueryDock
A home for SQL experiments.
Run PostgreSQL, SQLite and DuckDB in your browser.
Schema at a glance
Browse the recordsets.
MeaningGraph × Chinook
The meaning behind the tables.
Explore the entities in this database and what they represent.
- Artist ↗
A recording artist or band, known by its name.
Chinook conceptMeaningGraph definition ↗ - Album ↗
An album by one artist, known by its title.
Chinook conceptMeaningGraph definition ↗ - Track ↗
One audio or video track that the store sells, usually on an album.
Chinook conceptMeaningGraph definition ↗ - Genre ↗
A music genre such as Rock or Jazz, assigned to tracks.
Chinook conceptMeaningGraph definition ↗ - Media type ↗
The file format of a track, such as "MPEG audio file" or "Protected AAC audio file".
Chinook conceptMeaningGraph definition ↗ - Playlist ↗
A named list of tracks. A track can be on many playlists and a playlist holds many tracks; PlaylistTrack records which track is on which list.
Chinook conceptMeaningGraph definition ↗ - Customer ↗
A person who buys music from the store. Some customers name a company.
Extends shared conceptcustomerMeaningGraph definition ↗ - Employee ↗
A member of the store's staff. Employee.Title is the job title.
Mapped tablesEmployeeExtends shared conceptemployeeMeaningGraph definition ↗ - Invoice ↗
A billing invoice for tracks purchased by a customer. Chinook has 412 invoices dated from 2021-01-01 to 2025-12-22. It is an invoice record, not the request to supply represented by an order.
Extends shared conceptinvoiceMeaningGraph definition ↗ - Invoice line ↗
One track bought on an invoice.
Mapped tablesInvoiceLineExtends shared conceptinvoice lineMeaningGraph definition ↗
Explore SQLite in DataTug
Known limits.
- Editing needs exactly one primary-key column. 1 of 11 tables here have a composite key or none, so they open read-only: PlaylistTrack.
- Views are not listed in the local SQLite browser; this dataset has none.
- A table opens with its first 100 rows. There is no paging yet.
Explore PostgreSQL in DataTug
Read-only.
- Explore PostgreSQL in DataTug is read-only by design: you can browse tables and records, but nothing can be edited, deleted or reset.
- It reads the hosted PostgreSQL copy through the public OpenVaultDB server with read-only TugQL queries, never the database directly.
- A table opens with its first 100 rows. There is no paging yet.
- To change data, use the editable local SQLite copy that Explore SQLite in DataTug opens in your browser.
Downloads
Use this fixture
where you work.
Provider files are checked against the provider’s pinned checksums; the complete JSON, YAML, PostgreSQL script, MySQL, SQL Server and Oracle scripts and inGitDB archive may be generated from those checked files or by DataTug, and are pinned by a lock; the matrix says which, per dataset. Pick a complete database or a single table.
Every file here, including the inGitDB archive, MySQL script, SQL Server script and Oracle script that DemoDB generates from the pinned fixture, contains Chinook data from https://github.com/lerocha/chinook-database and is licensed MIT. The header of each generated script carries the licence and the attribution. Keep the licence and attribution notices with any copy. Source and licence →