InletDownload

Guide

Sample databases for PostgreSQL, MySQL, SQLite and MongoDB

For practice data, use Pagila or dvdrental on PostgreSQL, Sakila, employees or world on MySQL, Chinook or Northwind on almost anything, and MongoDB’s own sample datasets. Check the licence before you ship one inside something else: they range from MIT to Creative Commons share-alike to unstated.

Updated 9 October 2026

At a glance

DatabaseEnginesWhat it modelsLicence
Inlet Music StoreSQLiteA music shop: albums, tracks, invoices, playsComes with Inlet; made-up data
ChinookPostgreSQL, MySQL, SQLite, SQL Server, Oracle, DB2A digital music shopMIT
SakilaMySQLA DVD rental shopNew BSD (schema and data files)
PagilaPostgreSQLSakila, portedPostgreSQL licence
dvdrentalPostgreSQLSakila-style DVD rentalNot stated
employeesMySQL300,000 employees, 2.8 million salary rowsCC BY-SA 3.0
worldMySQLCountries, cities, languagesNot stated; data © Statistics Finland
NorthwindSQL Server; PostgreSQL and SQLite portsA small trading companyMIT (Microsoft’s); Ms-PL and MIT for the ports
MongoDB sample datasetsMongoDBFilms, Airbnb listings, restaurants, weather…Not stated

The licences are as each project states them, checked on 9 October 2026. “Not stated” means we couldn’t find a licence from the official source; ask the publisher before redistributing those. Links below go to the official source only: we don’t host copies.

Inlet Music Store

SQLite. The sample that comes with Inlet: a small music shop with fictional artists and made-up customers. Ten tables (genres, artists, albums, tracks, customers, invoices, invoice_lines, playlists, playlist_tracks, play_events), two views (artist_revenue, top_tracks), foreign keys, a trigger and a partial index. It holds 24 artists, 96 albums, 1,058 tracks, 400 customers, 2,500 invoices with 6,250 lines, and 6,000 play events: enough to try joins, filters and plans without waiting.

Get it and load it: in Inlet, choose File › Open Sample Database. Inlet builds it into a SQLite file of your own the first time; change it as you like.

Chinook

PostgreSQL, MySQL, SQLite, SQL Server, Oracle, DB2. A digital media shop: artist, album, track, genre, media_type, playlist, playlist_track, customer, employee, invoice and invoice_line. The music data came from a real iTunes library; customers and employees are fictitious and the sales are generated. The same data in every engine makes it handy for comparing them.

Licence: MIT, copyright Luis Rocha.

Get it: the releases page of lerocha/chinook-database. Release 1.4.5 has Chinook_PostgreSql.sql, Chinook_MySql.sql, Chinook_Sqlite.sqlite and scripts for the other engines.

Load it. The PostgreSQL and MySQL scripts drop any existing database called chinook (Chinook on MySQL), create it and switch to it, so run them while connected to another database:

psql -d postgres -f Chinook_PostgreSql.sql
mysql -u root -p < Chinook_MySql.sql
sqlite3 Chinook_Sqlite.sqlite     # already a database file

Sakila

MySQL. A DVD rental shop: films, actors, categories, inventory, stores, staff, customers, rentals and payments, with views, stored procedures, functions and triggers. It was first developed by Mike Hillyer of the MySQL documentation team as a standard schema for examples.

Licence: the sakila-schema.sql and sakila-data.sql files are under the New BSD licence. The documentation that comes with them isn’t under an open licence.

Get it: sakila-db.tar.gz or .zip, from MySQL’s example databases page.

Load it. Unpack it, then in the mysql client (the schema script creates the sakila database):

SOURCE sakila-db/sakila-schema.sql;
SOURCE sakila-db/sakila-data.sql;

Pagila

PostgreSQL. A port of Sakila to PostgreSQL. Separate files hold the schema and the data (as COPY or as INSERT statements), and extra files add JSONB examples.

Licence: “made available under PostgreSQL license”, says its README.

Get it: github.com/devrimgunduz/pagila.

Load it:

git clone https://github.com/devrimgunduz/pagila.git
createdb pagila
psql -d pagila -f pagila/pagila-schema.sql
psql -d pagila -f pagila/pagila-data.sql

The README also has Docker and Docker Compose instructions.

dvdrental

PostgreSQL. The sample used by the PostgreSQL Tutorial site (now part of Neon’s site): a DVD rental business in the Sakila style, with 15 tables, 7 views, 8 functions, a trigger, a domain and a sequence. It comes as a pg_restore archive.

Licence: not stated on the official page. Ask before redistributing it.

Get it: dvdrental.zip from the sample database page.

Load it:

unzip dvdrental.zip               # gives dvdrental.tar
createdb dvdrental
pg_restore --no-owner -d dvdrental dvdrental.tar

--no-owner makes you the owner of everything, instead of the postgres role the archive names, which your server may not have.

employees

MySQL. About 300,000 employees with 2.8 million salary records over time, plus departments, managers and job titles: about 167 MB of data, big enough to make a missing index show. It comes with a test suite that checks the load.

Licence: Creative Commons Attribution-Share Alike 3.0 Unported (CC BY-SA 3.0). The original data was created by Fusheng Wang and Carlo Zaniolo at Siemens Corporate Research.

Get it: github.com/datacharmer/test_db, linked from MySQL’s example databases page.

Load it:

git clone https://github.com/datacharmer/test_db.git
cd test_db
mysql -u root -p < employees.sql
mysql -u root -p -t < test_employees_md5.sql     # checks the data loaded correctly

world

MySQL. Three small tables: country, city and countrylanguage. The classic first database for learning joins and GROUP BY. Treat the figures as sample data, not current statistics.

Licence: MySQL’s documentation doesn’t state one. It credits the data to Statistics Finland, which holds the copyright.

Get it: world-db.tar.gz or .zip, from MySQL’s example databases page.

Load it. The script creates the world database:

tar xzf world-db.tar.gz
mysql -u root -p < world-db/world.sql

Northwind

SQL Server originally; ports for PostgreSQL and SQLite. Microsoft’s old Access and SQL Server sample: a small food trading company with customers, orders and order details, products, categories, suppliers, employees, shippers and territories.

Licence: Microsoft’s instnwnd.sql is in the microsoft/sql-server-samples repository, which is under the MIT licence. The ports have their own: the PostgreSQL port pthom/northwind_psql is under the Microsoft Public License (Ms-PL); the SQLite port jpwhite3/northwind-SQLite3 is under MIT. For ports to other engines, check each repository’s licence.

Get it:

Load it:

# PostgreSQL
git clone https://github.com/pthom/northwind_psql.git
createdb northwind
psql -d northwind -f northwind_psql/northwind.sql

# SQLite: the repository includes a ready-made file
git clone https://github.com/jpwhite3/northwind-SQLite3.git
sqlite3 northwind-SQLite3/dist/northwind.db

MongoDB sample datasets

MongoDB. MongoDB’s own sample data, in nine databases:

DatabaseContents
sample_airbnbAirbnb listings and reviews
sample_analyticsAccounts, customers and transactions for a mock financial service
sample_geospatialShipwrecks, with coordinates
sample_guidesPlanets
sample_mflixFilms, comments, cinemas and users, including vector embeddings
sample_restaurantsNew York restaurants
sample_suppliesSales from a mock office-supply shop
sample_trainingCompanies, grades, inspections, posts, routes, trips, zip codes
sample_weatherdataWeather reports

Licence: MongoDB’s documentation doesn’t state one for the sample data. sample_airbnb is described as a randomised subset of the public data from Inside Airbnb. Fine for learning; ask before redistributing.

Load it into Atlas: on the Clusters page, open your cluster’s … menu, choose Load Sample Dataset, pick the datasets and confirm. Or with the Atlas CLI:

atlas clusters sampleData load <cluster name>

Load it into your own server (MongoDB’s documented archive, restored with mongorestore):

curl https://atlas-education.s3.amazonaws.com/sampledata.archive -o sampledata.archive
mongorestore --archive=sampledata.archive --port=<port>

Add --uri '<connection string>' instead of --port if your server needs a user and password.

In Inlet

Inlet opens SQLite files, so Chinook’s Chinook_Sqlite.sqlite or Northwind’s northwind.db open directly, and the Music Store sample is one menu item away (File › Open Sample Database). For the PostgreSQL, MySQL and MongoDB samples, load them with the commands above, then connect to that server. On PostgreSQL, Inlet’s ER diagram is a quick way to see how a sample’s tables relate.

Related

Sources