Sample MySQL Database for Learning SQL

1- Introduction

LearningSQL is a small database, used as an example in the instructions of learning SQL on the website of  o7planning. There are 3 version on Databases: 
  • Oracle
  • MySQL
  • SQLServer.
In this document, I will instruct you to create this database on MySQL.
This database is made for example in the study guide SQL (MySQL) at:

2- Download Script

Download script at:
Direct Mediafire
Download Download
With MySQL, you just need to care about the file:
  • LearningSQL-MySQL-Script.sql

3- Run Script

3.1- Create SCHEMA LearningSQL in MySQL Workbench

Create Schema named learningsql:
After Schema has been created, right-click on Schema, set up to default Schema to work.
Copy content of LearningSQL-MySQL-Script.sql and execute in SQL window.
Running successfully.

4- Overview Database LearningSQL

LearningSQL is a small database simulating the data of a bank:

5- The structure of the tables

5.1- ACCOUNT

5.2- ACC_TRANSACTION

5.3- BRANCH

5.4- BUSINESS

5.5- CUSTOMER

5.6- DEPARTMENT

5.7- EMPLOYEE

5.8- INDIVIDUAL

5.9- OFFICER

5.10- PRODUCT

5.11- PRODUCT_TYPE