# 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.
没有合适的资源?快使用搜索试试~ 我知道了~
收起资源包目录
30W数据.zip (25个子文件)
30W数据
先看我.txt 150B
test_db-master
test_employees_md5.sql 5KB
sql_test.sh 2KB
show_elapsed.sql 272B
employees_partitioned_5.1.sql 8KB
Changelog 964B
employees.sql 3KB
sakila
sakila-mv-data.sql 3.24MB
sakila-mv-schema.sql 23KB
README.md 333B
load_dept_manager.dump 1KB
images
employees.gif 10KB
employees.jpg 42KB
employees.png 28KB
load_titles.dump 20.7MB
load_dept_emp.dump 13.5MB
load_employees.dump 16.9MB
load_salaries1.dump 37.96MB
employees_partitioned.sql 6KB
README.md 4KB
load_departments.dump 250B
load_salaries3.dump 37.27MB
objects.sql 4KB
test_employees_sha.sql 5KB
load_salaries2.dump 37.96MB
共 25 条
- 1
资源推荐
资源预览
资源评论
2018-08-03 上传
5星 · 资源好评率100%
192 浏览量
5星 · 资源好评率100%
2020-12-15 上传
2023-04-04 上传
105 浏览量
144 浏览量
165 浏览量
5星 · 资源好评率100%
5星 · 资源好评率100%
156 浏览量
资源评论
也许________
- 粉丝: 0
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功