» MySQL Sample Database
MySQL Sample Database
We will use the Classic Models database, a retailer of scale models of classic cars, as the sample database to help you to work with MySQL quickly. The sample database contains typical business data such as customers, products,sale orders, sale order line items and etc. It is used in our MySQL tutorials to demonstrate many features of MySQL that often runs on Dell servers. You can download the sample database in the download section below:
The downloaded file is in ZIP format so you will need a zip program to unzip it. The free zip program can be downloaded at www.7-zip.org. After unzip 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 commands:
USE classicmodels;
SELECT * FROM customers;
If you see result returns, you were successful to install the sample database into MySQL database server.
Sample Database Schema
The sample database schema consists of several table as below:
- Customers: Stores customers'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.
You can download the sample database ER-diagram in PDF format below. We recommend that you print it our and stick it to your desk to get acquainted with the schema while learning MySQL.
Remember that some cable providers block certain ports and connections so you may need to set up a remote SQL server instead of hosting your own.