Publishing · pubs.demodb.dev
Pubs
sample database.
Microsoft's classic publishing sample database, with authors, books, publishers, stores, sales, and publisher-logo images.
-- Titles by publisher
SELECT titles.title, publishers.pub_name, titles.price FROM
11 tables · 1 views · 255 rows
-- 5 high-confidence cross-database table matches
Useful next steps
Tools for your next step.
CodeGrapher
See how Pubs 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 × Pubs
The meaning behind the tables.
Explore the entities in this database and what they represent.
- Publisher ↗
An organization that publishes books and other titles.
Extends shared conceptorganizationMeaningGraph definition ↗ - Book ↗
A publication listed in the Pubs title catalogue.
Pubs conceptMeaningGraph definition ↗ - Store ↗
A retail location that sells publications.
Pubs conceptMeaningGraph definition ↗ - Employee ↗
An employee assigned to a Pubs publisher.
Mapped tablesemployeeExtends shared conceptemployeeMeaningGraph definition ↗ - Sale ↗
A completed store sale of one publication, with quantity, date, and payment terms.
Mapped tablessalesPubs conceptMeaningGraph definition ↗
Explore SQLite in DataTug
Known limits.
- Editing needs exactly one primary-key column. 4 of 11 tables here have a composite key or none, so they open read-only: discounts, roysched, sales, titleauthor.
- Views are not listed: the local SQLite browser shows the 11 tables only, not the 1 views. The schema pages on this site list them.
- 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 PostgreSQL script, JSON, YAML, inGitDB archive, MySQL script, SQL Server script and Oracle script that DemoDB generates from the pinned fixture, contains Pubs data from https://github.com/microsoft/sql-server-samples 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 →