This project involves designing a database system for a company that provides services to bus companies. The system covers two main services:
- Driver Outsourcing - Managing the assignment and tracking of outsourced drivers.
- Trip, Maintenance, and Ticket Management - Recording bus trips, maintenance activities, and ticket sales.
The project is structured into three essential stages:
- Conceptual Model - High-level representation using ER diagrams.
- Logical Model - Translating the conceptual model into a relational schema.
- Physical Model - Implementing the database using SQL.
/conceptual-model/
- Contains ER diagrams and documentation./logical-model/
- Includes relational schemas and normalization process./physical-model/
- SQL scripts for database creation and sample data.
- Define entities, attributes, and relationships.
- Create an Entity-Relationship (ER) diagram.
- Convert the ER diagram into a relational schema.
- Normalize tables to reduce redundancy and improve integrity.
- Write SQL scripts to create tables, constraints, and indexes.
- Insert sample data for testing.
- Diagram Tools: EERCASE
- SQL: DDL (Data Definition Language), DML (Data Manipulation Language)
-
Clone this repository:
git clone https://github.com/Shellyda/project-design-database.git
-
Navigate to the project directory:
cd project-design-database
-
Execute theses SQL scripts in your preferred DBMS:
Create database:
psql -U user -d database -f physical-model/create_database.sql
Populate database:
psql -U user -d database -f physical-model/populate_database.sql
Feel free to fork the repository and submit pull requests to improve the project!
This project is licensed under the MIT License.