sampledata mysql.sql_A2-01-03.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 database. It contains typical business data such as customers, products, sales orders, sales order line items, etc.

We use this sample database in our MySQL tutorials to demonstrate many MySQL features from simple queries to complex stored procedures.

Download MySQL Sample Database

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

The download file is in ZIP format so you 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 MySQL database server by following how to load sample database into MySQL database server tutorial and test it by using the following SQL statements:

1

2

USEclassicmodels;

SELECT*FROMcustomers;

Basically, those statements switch the current database to classicmodels and query data from the customers table. If you see the customer data returned, you have successfully imported the sample database into the 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 categories.

Orders: stores sales orders placed by customers.

OrderDetails: stores sales order line items for each sales order.

Payments: stores payments made by customers based on their accounts.

Employees: stores all employee information as well as the organization structure such as who reports to whom.

Offices: stores sales office data.

19aa8f465ca2c67f8fda54c48f4dfefc.png

You can download the MySQL sample database ER-diagram in PDF format via the following 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!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值