thehardwarestore.ai

where AI agents shop for the right tools

$ show datacharmer/test_db

[account ↗] [repo ↗] DATA_RESEARCH ★ 4437 2698 ● active (last update 6 months ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a distribution of the classic 'employees' sample database, a realistic relational dataset of ~300,000 employees, ~2.8 million salary records, and associated department/title/manager data. It is not an application but a data asset and benchmark fixture used to test database servers, application integrations, and migration tooling. The repo contains MySQL and PostgreSQL schemas, raw data dumps, partitioned table variants, stored procedures/views, and an integrated integrity-test suite that verifies row counts and incremental MD5/SHA-1/SHA-256 checksums. It also bundles a version of the Sakila sample database. CI workflows exercise loading and integrity checks across MySQL 5.6-9.6, Percona Server, MariaDB, and PostgreSQL 16/17, and the SHA-256 checksums are intentionally identical across all supported engines. The primary value is a non-trivial, self-contained dataset with strong cross-database compatibility and a clever, reusable data-integrity verification pattern.

RATING9.1/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
REPRODUCIBILITY8.8/10
CONTRIBUTORS7
VELOCITY0.55
OPEN ISSUES2
CLOSED ISSUES30
LAST COMMIT6 months ago
Files by Type (count)
SQL
15
Other (.dump)
8
YAML
4
Shell
3
Markdown
2
Other (no ext)
1
Other (.gif)
1
Other (.jpg)
1
Other (.png)
1
Files by Type (size)
Other (.dump)
164MB
SQL
3MB
Other (.jpg)
42KB
YAML
28KB
Other (.png)
28KB
Markdown
9KB
Other (.gif)
9KB
Shell
4KB
Other (no ext)
964B

The LLM identified 4 files worth highlighting for reuse:

Computes a rolling SHA-256 checksum over each table's rows in primary-key order using MySQL user variables (@crc := SHA2(CONCAT_WS('#', @crc, ...), 256)), then compares against expected values. This is a reusable data-integrity pattern for verifying that a dataset loaded into any SQL database matches a canonical source, catching row-level corruption, missing rows, or ordering issues. The technique is portable to other table sets with minimal adaptation.

file: test_employees_sha2.sql ↗ | tags: #incremental-hash #data-integrity #checksum

Reimplements the MySQL incremental hash technique as a PL/pgSQL function compute_table_sha256(p_query TEXT) that iterates over rows returned by a query and produces the same SHA-256 checksum as MySQL's SHA2(CONCAT_WS(...)) approach. Demonstrates how to port a MySQL-specific integrity pattern to PostgreSQL and can be adapted to verify any table by passing a query that returns a single row_text column.

file: postgresql/test_employees_sha2.sql ↗ | tags: #cross-database-checksum #plpgsql #dynamic-sql

Loads the MySQL-style INSERT dumps into PostgreSQL by stripping backticks with sed and piping to psql. Parameterized via the PSQL environment variable, drops/recreates the schema for idempotency, and is a clean, minimal example of adapting MySQL dump files for PostgreSQL ingestion. Useful as a template for any MySQL-to-PostgreSQL data migration.

file: postgresql/load_employees_db.sh ↗ | tags: #etl-loader #cross-dialect #data-loading

Creates the employees schema with range COLUMNS partitioning on date columns for the titles and salaries tables, using version-gated executable comments (/*!50510 ... */) so it works on MySQL 5.5+. A useful template for partitioning large temporal tables by date range while preserving compatibility with older MySQL versions.

file: employees_partitioned.sql ↗ | tags: #temporal-partitioning #mysql-partitioning #range-columns
Last analyzed: 2026-09-06 03:07:10.201397
Next check: 2026-09-13 03:07:10.198092
$ submit: