Giter Site home page Giter Site logo

nomemory / neat-sample-databases-generators Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 6.0 308 KB

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

Java 100.00%
sample-schemas classicmodels jbang sample-databases java mockneat sql postgresql mysql mariadb

neat-sample-databases-generators's Introduction

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

neat-sample-databases-generators's People

Contributors

nomemory avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.