A list of scripts that are genering DDL and DML scripts to fill-up sample schemas with data.
Scripts are written in Java, and can be run using jbang.
To install jbang - check the official documentation - or simply:
curl -s "https://get.sdkman.io" | bash
source ~/.bash_profile
sdk install java
sdk install jbang
Data is generated using mockneat.
Contributions are welcomed!
Script | Schema | Targets |
---|---|---|
scripts/classicmodels_mysql.java | classicmodels | mysql, mariadb |
scripts/classicmodels_postgresql.java | classicmodels | postgresql |
scripts/hr_schema_mysql.java | HR | mysql, mariadb |
scripts/hr_schema_postgresql.java | HR | postgresql |
After cloning the project:
jbang scripts/hr_schema_mysql.java > inserts.sql
Most scripts support various options (e.g.: generating more data, or target various databases). The best way to see the options a script is offering:
jbang scripts/hr_schema_mysql.java --help
Each subsequent run will generate arbitrary data, different than the previous run.
ER diagrams were generated using DBeaver.
If you ever had the chance to work with Oracle DB this is probably one of the most known sample schemas to play with.
It models an HR application containing information about the Company's Locations, Departements, Employees and their Managers.
This is a classic schema describing a online-shop.
It's one of the official sample schemas for MySQL.