MySQL Sample Database

We use the classicmodels database as a MySQL sample database to help you work with MySQL quickly and effectively.

The classicmodels database is a retailer of scale models of classic cars. It contains typical business data, including information about customers, products, sales orders, sales order line items, and more.

We’ll use this sample database in our MySQL tutorials to demonstrate a wide range of MySQL features, from simple queries to complex stored procedures.

Download MySQL Sample Database

You can download the sample database from the following link:

Download MySQL Sample Database

The download file is in ZIP format, so you’ll need a zip program to unzip it. You can download a free zip program at www.7-zip.org.

After uncompressing the sampledatabase.zip file, you can load the sample database into the MySQL database server by following the tutorial on how to do so.

MySQL Sample Database Schema

The MySQL sample database schema consists of the following tables:

  • customers: stores customer’s data.
  • products: stores a list of scale model cars.
  • productlines: stores a list of product lines.
  • orders: stores sales orders placed by customers.
  • orderdetails: stores sales order line items for every sales order.
  • payments: stores payments made by customers based on their accounts.
  • employees: stores employee information and the organization structure such as who reports to whom.
  • offices: stores sales office data.

The following picture illustrates the ER diagram of the sample database:

MySQL Sample Database

You can download the MySQL sample database ER diagram in PDF format from the following link:

Download MySQL Sample Database Diagram PDF A4

We recommend printing out the ER diagram and placing it on your desk to help you become familiar with the schema as you learn MySQL.

Have fun learning MySQL!

Was this tutorial helpful?