Sample MySQL Database for Learning SQL
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:
In this article, I will instruct you to create this database in MySQL.
This database is made for example in the study guide SQL (MySQL) at:
Download script at:
With MySQL, you just need to care about the file:
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.
LearningSQL is a small database simulating the data of a bank:
|ACCOUNT||The table saves the bank accounts. Each of customer can register multiple accounts each of which corresponds to a product type provided by the bank.
(See more: PRODUCT)
|ACC_TRANSACTION||The table saves the transaction history between the bank and a certain account.|
|BRANCH||The branch of bank.|
|CUSTOMER||The table of customers|
|DEPARTMENT||The department table of bank|
|EMPLOYEE||The employee table of bank|
|PRODUCT||The products and services of bank, such as:
|PRODUCT_TYPE||The types of products and services, such as: