Skip to content

nomemory/neat-sample-databases-generators

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

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!

List of scripts

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

Running the scripts

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.

Supported Schemas

ER diagrams were generated using DBeaver.

HR Schema (SQL)

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.

HR Schema

classicmodels (SQL)

This is a classic schema describing a online-shop.

It's one of the official sample schemas for MySQL.

classicmodels

About

Neat java scripts (!not javascript) to generate arbitrary data for various sample databases (hr schema, classicmodels, etc.)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages