MySQL Sample Database

We use the classic models database as the MySQL sample database to help you work with MySQL quickly and more effectively.

The classic models database is a retailer of scale models of classic cars database. It contains typical business data such as customers, products, sale orders, sale order line items, etc. We use this sample database in our MySQL tutorials to demonstrate many features of MySQL.

You can download the MySQL sample database in the following download link:

You can install MySQL in your local PC for practicing. If you need to install MySQL in a server, we recommend that you use Dell servers.

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

After unzip the sampledatabase.zip file, you can load the sample database into MySQL database server by following how to load sample database into MySQL database server tutorial and test it by using the following SQL statements:

USE classicmodels;
SELECT * FROM customers;

If you see the customers result set, you have successfully imported the sample database into MySQL database server.

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 line category.
  • Orders: stores orders placed by customers.
  • OrderDetails: stores order line items in each order.
  • Payments: stores payments made by customers based on their account.
  • Employees: stores all employee information include organization unit structure such as who reports to whom.
  • Offices: stores sale office data.
MySQL Sample Database Schema

MySQL Sample Database Schema

You can download the MySQL sample database ER-diagram in PDF format in the following download link. We recommend that you print the ER diagram out and stick it to your desk to get familiar with the schema while learning MySQL.

Have fun learning MySQL!