In this project for class CSE-3330 (Database Systems & File Structures), I have developed a Railway Reservation System database implementing a complete database solution from schema design to query execution.
- SQLite3 Command Line Interface: Used to execute import statements and queries
- VSCode: Used to write the SQL code (
RRS.sql
file)
First, I Designed the database structure as shown in the ER diagram below:
Then I created four interconnected tables (Train, Train_Status, Passenger, Booking) with appropriate constraints as shown:
- I modified the .csv files to address formatting issues:
- Adjusted "Available on Weekdays" attribute in
train.csv
- Converted birthdates from MM/DD/YYYY to YYYY-MM-DD in
passenger.csv
- Adjusted "Available on Weekdays" attribute in
- Then I imported data using SQLite's
.import
command:
I Implemented various SELECT statements for:
- Passenger booking lookups
- Train availability checks
- Age-based filtering
- Waitlist management
RRS.sql
: ContainsCREATE TABLE
statements with constraintsdemo.sql
: Contains.import
commands andSELECT
queriesRRS_Dataset/
: Is the directory containing.csv
data files
If you have any questions or feedback related to this project, or if you just want to connect, feel free to reach out to me at:
- Email: shubhamcweb@gmail.com
- LinkedIn: linkedin.com/in/shubhamcweb