https://github.com/wisskirchenj/sales-database
Pure database-project to create, fill and work with a Sales-database. On MySQL running in docker.
https://github.com/wisskirchenj/sales-database
database-views docker-compose er-model mysql trigger
Last synced: about 1 month ago
JSON representation
Pure database-project to create, fill and work with a Sales-database. On MySQL running in docker.
- Host: GitHub
- URL: https://github.com/wisskirchenj/sales-database
- Owner: wisskirchenj
- Created: 2023-08-22T21:01:19.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-11T07:17:34.000Z (about 2 years ago)
- Last Synced: 2025-02-24T04:42:07.906Z (over 1 year ago)
- Topics: database-views, docker-compose, er-model, mysql, trigger
- Homepage:
- Size: 73.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IDEA EDU Course ...
Implemented in the Java SQL for Backend Developers Track of hyperskill.org's JetBrain Academy.
Project goal is to exercise SQL, as I tend to forget its syntax quicker than any other programming language.
Also, translating ER-diagrams, creating triggers, views is not my usual daily work but helps me in the job still.
## Project status
Project was completed on 27.08.23.
## Repository Contents
Sources for all project tasks (5 stages).
## Progress
22.08.23 Project started. IDEA-setup and first repo, setting up `docker-compose.yml` for a docker MySQL-image.
22.08.23 Stage 1 completed. Translating the given ER-diagram of six relations-connected tables into a DDL.
22.08.23 Stage 2 completed. Inserting some basic data into the tables using `AFTER INSERT` trigger to keep an
inventory table in sync with sales. Add a clean script to be able to repeat all exercises.
23.08.23 Stage 3 completed. Create a composite index (which unfortunately does not help to solve the problem here).
Then create a view to group total sales on model. Query this view.
26.08.23 Stage 4 completed. Create an employee report only on Sales Assistants, that calculates the employee's monthly
sales bonus based on their share in the monthly company revenue. Quite complex query - here saved as report view - using
`WITH` sub-selects, `CASE` statement and more.
27.08.23 Final Stage 5 completed. Create a model report - again saved as view - with some sales indicators as sales inventory ratio.