# test_db
A sample database with an integrated test suite, used to test your applications and database servers
This repository was migrated from [Launchpad](https://launchpad.net/test-db).
See usage in the [MySQL docs](https://dev.mysql.com/doc/employee/en/index.html)
## Where it comes from
The original data was created by Fusheng Wang and Carlo Zaniolo at
Siemens Corporate Research. The data is in XML format.
http://timecenter.cs.aau.dk/software.htm
Giuseppe Maxia made the relational schema and Patrick Crews exported
the data in relational format.
The database contains about 300,000 employee records with 2.8 million
salary entries. The export data is 167 MB, which is not huge, but
heavy enough to be non-trivial for testing.
The data was generated, and as such there are inconsistencies and subtle
problems. Rather than removing them, we decided to leave the contents
untouched, and use these issues as data cleaning exercises.
## Prerequisites
You need a MySQL database server (5.0+) and run the commands below through a
user that has the following privileges:
SELECT, INSERT, UPDATE, DELETE,
CREATE, DROP, RELOAD, REFERENCES,
INDEX, ALTER, SHOW DATABASES,
CREATE TEMPORARY TABLES,
LOCK TABLES, EXECUTE, CREATE VIEW
## Installation:
1. Download the repository
2. Change directory to the repository
Then run
mysql < employees.sql
If you want to install with two large partitioned tables, run
mysql < employees_partitioned.sql
## Testing the installation
After installing, you can run one of the following
mysql -t < test_employees_md5.sql
# OR
mysql -t < test_employees_sha.sql
For example:
mysql -t < test_employees_md5.sql
+----------------------+
| INFO |
+----------------------+
| TESTING INSTALLATION |
+----------------------+
+--------------+------------------+----------------------------------+
| table_name | expected_records | expected_crc |
+--------------+------------------+----------------------------------+
| employees | 300024 | 4ec56ab5ba37218d187cf6ab09ce1aa1 |
| departments | 9 | d1af5e170d2d1591d776d5638d71fc5f |
| dept_manager | 24 | 8720e2f0853ac9096b689c14664f847e |
| dept_emp | 331603 | ccf6fe516f990bdaa49713fc478701b7 |
| titles | 443308 | bfa016c472df68e70a03facafa1bc0a8 |
| salaries | 2844047 | fd220654e95aea1b169624ffe3fca934 |
+--------------+------------------+----------------------------------+
+--------------+------------------+----------------------------------+
| table_name | found_records | found_crc |
+--------------+------------------+----------------------------------+
| employees | 300024 | 4ec56ab5ba37218d187cf6ab09ce1aa1 |
| departments | 9 | d1af5e170d2d1591d776d5638d71fc5f |
| dept_manager | 24 | 8720e2f0853ac9096b689c14664f847e |
| dept_emp | 331603 | ccf6fe516f990bdaa49713fc478701b7 |
| titles | 443308 | bfa016c472df68e70a03facafa1bc0a8 |
| salaries | 2844047 | fd220654e95aea1b169624ffe3fca934 |
+--------------+------------------+----------------------------------+
+--------------+---------------+-----------+
| table_name | records_match | crc_match |
+--------------+---------------+-----------+
| employees | OK | ok |
| departments | OK | ok |
| dept_manager | OK | ok |
| dept_emp | OK | ok |
| titles | OK | ok |
| salaries | OK | ok |
+--------------+---------------+-----------+
## DISCLAIMER
To the best of my knowledge, this data is fabricated and
it does not correspond to real people.
Any similarity to existing people is purely coincidental.
## LICENSE
This work is licensed under the
Creative Commons Attribution-Share Alike 3.0 Unported License.
To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to
Creative Commons, 171 Second Street, Suite 300, San Francisco,
California, 94105, USA.
MySQL使用的测试样例数据库,Employees Sample Database,datacharmer/test-db
需积分: 0 17 浏览量
更新于2023-03-23
1
收藏 33.96MB GZ 举报
Employees Sample Database
Employees 数据库提供了6张表,总共有400万条数据记录(其中30万条员工记录、280万条工资记录),导出数据大约160MB,该数据库兼容多种存储引擎,支持分区表。
另外除了基本数据外,Employees数据库还包括一套测试,这些测试可以在测试数据上执行,以确保加载的数据的完整性。
这些测试样例数据,用来测试应用程序、数据库服务是一个不错的选择。
详细的介绍及使用说明见:
MySQL官网 :https://dev.mysql.com/doc/employee/en/index.html
Github 仓库: https://github.com/datacharmer/test_db/releases
小青龍
- 粉丝: 222
最新资源
- (源码)基于ESP32的无线控制应用.zip
- ppt模板:蓝色大气未来智慧城市发展规划年终报告模板.pptx
- plc机械手控制系统设计4组.doc
- 大数据方案介绍.docx
- 电信大数据的研究与应用.docx
- 别墅智能家居系统方案设计书要求.doc
- 通信中练习综合能力.doc
- 计算机技术在生物信息学研究中的应用分析.docx
- 计算机的认识和计算PPT.ppt
- 湖南科技计划项目管理申报指南.doc
- 应用型本科院校《数据通信与计算机网络》课程的改革与探索.docx
- Docker安装-Nginx.doc
- 电力营销系统现状与信息化系统的建设探讨.docx
- 电力调度自动化系统及计算机网络防雷措施.doc
- Vb保存幅图到Access数据库.doc
- (源码)基于Arduino的Si5351替代石英项目.zip
