Command Line Application to generate database templates/examples.
- Generate database templates
- Generate normalizated database templates
- Generate Stored Procedures, incluinng transactions
- Generate SQL Views
- Generate Triggers
- Link: https://github.com/ortizdavid/dbsample
- Download binary file:
- Add to Path Environment variable
- Run command:
dbsample
dbsample -sample <SAMPLE_NAME> -type <SAMPLE_TYPE> -rdb <RELATIONAL_DATABASE>
- db-user-roles - Database with Users and Roles
- db-countries - All Countries and Cities
- db-people - Database People Tables Structure
- db-recruitment - Database for Recruitment System
- db-sales - Database for Sales
- view-product-data - SQL View Product normalizated data Sample
- view-min - Minimal SQL View Sample
- trg-lock-insert - Trigger to Lock Insert into a table
- trg-min - Minimal Trigger Sample
- sp-product-stock - Product Stock Procedure Sample, including transactions
- sp-min - Minimal Procedure Sample, including transactions
- database - Database
- procedure - Stored Procedure
- trigger - Trigger
- view - SQL View
- mysql - MySQL
- postgres - PostgreSQL
dbsample -sample db-countries -type database -rdb postgres
dbsample -sample db-people -type database -rdb mysql
dbsample -sample db-sales -type database -rdb mysql
dbsample -sample db-user-roles -type database -rdb mysql
dbsample -sample trg-lock-insert -type trigger -rdb postgres
dbsample -sample trg-min -type trigger -rdb mysql
dbsample -sample sp-product-stock -type procedure -rdb postgres
dbsample -sample sp-min -type procedure -rdb mysql
dbsample -sample trg-lock-insert -type trigger -rdb postgres
dbsample -sample trg-min -type trigger -rdb mysql
dbsample -help
dbsample -examples
dbsample -list-samples
dbsample -list-types
dbsample -list-rdbs