SlideShare a Scribd company logo
1 of 27
RELATIONAL DATABASE PROJECT
Introduction to the Project
To create a railway reservation system intended to
streamline the booking, cancellation and inquiry
processes that passengers might undertake, as well
as to support administrative functions for managing
train schedules and handling lost items.
Application of relational database
management principles through the
development of a robust, scalable, and
user-centric railway ticketing and
management system.
Objective Focus
It is designed to bring multiple benefits
to various stakeholders, including
passengers, railway administration and
database administrators.
Benefit
Case Study: Railway
Reservation System
Reservation
• reservation_id (primary_key)
• train_number
• passenger_email_id
• date_of_travel
• booking_date
• no_of_passengers
• reservation_status
• payment_status
• total_fare
• seat_number
Lost_Items
• Sdescription (partial_key)
• no_of_items
• date_lost
• status
Entities & their Attributes
Route
• route_id (primary_key)
• start_station
• end_station
• distance
Passenger
• passenger_name
• email_id (primary_key)
• contact_number
• residential_address
Train
• train_number (primary_key)
• source
• destination
• arrival_time
• departure_time
• total_seats
• days_operating
• seats_available
Simple
Derived
Stored
Multi-value
Single Value
Attribute Types
seat_number
All attributes except seat_number
first_name, last_name, email_id, contact_number, city, country, province,
route_id, start_station, end_station, train_number, source, destination,
arrival_time, departure_time, total_seats, days_operating, total_fare,
payment_status, reservation_status, no_of_passengers, booking_date,
reservation_id, description, no_of_items, date_lost, status
passenger_name and
residential_address
Composite
seats_available and distance
train_number, total_fare,
train_route
Constraints &
Domains
applied
Domains
• Primary Key Constraints
• email_id route_id,
train_number, reservation_id
• Foreign key Constraints
• train_number in Reservation,
passenger_email_id in
Reservation
• Check Constraints
• days_operating attribute in the
Route_and_Train table might
be restricted to actual days of
the week
• Entity integrity Constraints:
• No primary key value is NULL
Constraints
1. Mapping Regular Entities
Mapping ERD
to Relations
4. Mapping of 1:1 Relationship
5. Mapping 1:N Relationship
• passenger, train, route and
reservation entities are mapped to
respective relations
2. Mapping Weak Entities
• Lost Items is mapped to a new
relation with description and
reservation_id as it’s primary
keys.
• Train and the Route are
mapped into a merged
relation
• train_number in Reservations
references Trains
• passenger_email_id in
Reservations references
Passengers
• route_id in Train references the
Route.
6. Mapping M:N Relationship
• Since there are no M:N
relationships identified in the
ERD, this step is NA.
3. Mapping Multi-valued
attributes
• A new relation Reservation_seat_number
is created and the reservation_id along
with seat_number are it’s primary keys.
1. Passenger Table:
This relation is in 1NF as there are no repeating groups or composite attributes. The primary key is email_id.
2. Route_and_Train Table:
It is in 1NF with train_number serving as a primary key. It was ensured that each attribute like start_station,
end_station, etc., only holds single, atomic values.
3. Reservation Table:
It is in 1NF as long as seat_number is considered atomic and not multi-valued. The primary key is
reservation_id.
4. Lost Item Table:
In 1NF with each attribute storing a single value.
5. Reservation_seat_number Table:
To be in 1NF, we have ensured that seat_number is a single value per row and not a list of seat numbers.
Normalization process
Creation of
database using
MySQL
Creation of passenger relation:
Creation of reservation relation:
Creation of route_and_train relation:
Creation of Lost_Items relation:
Creation of reservation_seat_number relation:
Querying
database using
MySQL
Query 1:
Retrieve all passengers’ names who ride the train in the year (2023) and the destination was
Toronto.For each passenger, retrieve the contact information
Query 2:
Retrieve the source, destination, departure time, arrival time for all the available trains and
sort this information based on the train number.
Query 3:
Calculate the annual income of each train during the year 2022 and 2023. Group them by the
year. Sort the year in ASC order.
Query 4:
Find the maximum income, the minimum income, and the average income for each train.
Query 5:
Retrieve all the booked and cancelled tickets and their related information such dates, train
numbers.
Query 5:
Retrieve all the booked and cancelled tickets and their related information such dates, train
numbers.
Query 6:
The management decided to add a new train. So, and by SQL commands, add a new train to the
database AND update any related tables. The information about the new train is as follows: Number
400
Source: Montreal, Destination: London (ON) , Departure time: 10:00, Arrival time: 15:00 , Total number
of seats available:120 , The price for this route will be 140$. The train will be just on Saturday’s.
Validation snapshot:
Conlusion
This project highlights the effectiveness of relational
databases in improving operational efficiency and
scalability in transportation management systems with:
1.Robust Database Schema: Implemented with
integrity constraints to ensure data accuracy.
2.Efficient Data Management: Normalization reduced
redundancy, enhancing performance.
3.Dynamic Functionality: Executed complex SQL
queries for real-time data operations.
4.Scalability and Adaptability: Designed to
accommodate future expansions and changes.
References
2. Fundamental of Database Systems (7th
Edition), Elmasri & Navathe (2016)
3. Draw.io
Used to draw the relational schema diagram
https://draw.io/
4. MySQL
Used to implement the database system
1. Edraw Max Online. (2024)
Network Diagram Software
https://www.edrawmax.com/online/en/

More Related Content

Similar to 202412343_Relational_Database_Presentation.pptx

Towards better bus networks: A visual analytics approach
Towards better bus networks: A visual analytics approachTowards better bus networks: A visual analytics approach
Towards better bus networks: A visual analytics approachivaderivader
 
Documentation of railway reservation system
Documentation of railway reservation systemDocumentation of railway reservation system
Documentation of railway reservation systemSandip Murari
 
Simulation of BART Station at Embarcadero, SFO using Arena
Simulation of BART Station at Embarcadero, SFO using ArenaSimulation of BART Station at Embarcadero, SFO using Arena
Simulation of BART Station at Embarcadero, SFO using ArenaPreethi Jayaram Jayaraman
 
An efficient and cost effective public bus transportation timetabling routing...
An efficient and cost effective public bus transportation timetabling routing...An efficient and cost effective public bus transportation timetabling routing...
An efficient and cost effective public bus transportation timetabling routing...eSAT Journals
 
IRJET- Smart Railway System using Trip Chaining Method
IRJET- Smart Railway System using Trip Chaining MethodIRJET- Smart Railway System using Trip Chaining Method
IRJET- Smart Railway System using Trip Chaining MethodIRJET Journal
 
Railway management system, database mini project
Railway management system, database mini projectRailway management system, database mini project
Railway management system, database mini projectshashank reddy
 
Railway reservation system
Railway reservation systemRailway reservation system
Railway reservation systemAbhishek Yadav
 
Database project design report of Centro bus transit system
Database project design report of Centro bus transit systemDatabase project design report of Centro bus transit system
Database project design report of Centro bus transit systemAnkur Gupta
 
Online Bus Reservation
Online Bus ReservationOnline Bus Reservation
Online Bus ReservationAstha Patel
 
IRJET- Explore the World
IRJET- 	  Explore the WorldIRJET- 	  Explore the World
IRJET- Explore the WorldIRJET Journal
 
Online railway reservation system
Online railway reservation systemOnline railway reservation system
Online railway reservation systemPIYUSH Dubey
 
Tugas bdl
Tugas bdlTugas bdl
Tugas bdlGus Rah
 
Railway reservation system
Railway reservation systemRailway reservation system
Railway reservation systemKOYELMAJUMDAR1
 
How can Open Data Revolutionise your Rail Travel?
How can Open Data Revolutionise your Rail Travel?How can Open Data Revolutionise your Rail Travel?
How can Open Data Revolutionise your Rail Travel?theODI
 
IRJET- Railway Reservation and Route Optimization System with Implementation
IRJET-  	  Railway Reservation and Route Optimization System with ImplementationIRJET-  	  Railway Reservation and Route Optimization System with Implementation
IRJET- Railway Reservation and Route Optimization System with ImplementationIRJET Journal
 
Railway Reservation System (2).pptx
Railway Reservation System (2).pptxRailway Reservation System (2).pptx
Railway Reservation System (2).pptxsomeone53414
 
Software Engineering ppt
Software Engineering pptSoftware Engineering ppt
Software Engineering pptshruths2890
 
SACHDEVA_SHALEEN_1437822_Evaluation Report on IRCTC.com_CI7700
SACHDEVA_SHALEEN_1437822_Evaluation Report on IRCTC.com_CI7700SACHDEVA_SHALEEN_1437822_Evaluation Report on IRCTC.com_CI7700
SACHDEVA_SHALEEN_1437822_Evaluation Report on IRCTC.com_CI7700Shaleen Sachdeva
 

Similar to 202412343_Relational_Database_Presentation.pptx (20)

Towards better bus networks: A visual analytics approach
Towards better bus networks: A visual analytics approachTowards better bus networks: A visual analytics approach
Towards better bus networks: A visual analytics approach
 
Documentation of railway reservation system
Documentation of railway reservation systemDocumentation of railway reservation system
Documentation of railway reservation system
 
Simulation of BART Station at Embarcadero, SFO using Arena
Simulation of BART Station at Embarcadero, SFO using ArenaSimulation of BART Station at Embarcadero, SFO using Arena
Simulation of BART Station at Embarcadero, SFO using Arena
 
An efficient and cost effective public bus transportation timetabling routing...
An efficient and cost effective public bus transportation timetabling routing...An efficient and cost effective public bus transportation timetabling routing...
An efficient and cost effective public bus transportation timetabling routing...
 
IRJET- Smart Railway System using Trip Chaining Method
IRJET- Smart Railway System using Trip Chaining MethodIRJET- Smart Railway System using Trip Chaining Method
IRJET- Smart Railway System using Trip Chaining Method
 
Railway management system, database mini project
Railway management system, database mini projectRailway management system, database mini project
Railway management system, database mini project
 
Railway reservation system
Railway reservation systemRailway reservation system
Railway reservation system
 
Data mining
Data miningData mining
Data mining
 
Database project design report of Centro bus transit system
Database project design report of Centro bus transit systemDatabase project design report of Centro bus transit system
Database project design report of Centro bus transit system
 
Online Bus Reservation
Online Bus ReservationOnline Bus Reservation
Online Bus Reservation
 
IRJET- Explore the World
IRJET- 	  Explore the WorldIRJET- 	  Explore the World
IRJET- Explore the World
 
Online railway reservation system
Online railway reservation systemOnline railway reservation system
Online railway reservation system
 
Tugas bdl
Tugas bdlTugas bdl
Tugas bdl
 
Dbms presentation!!
Dbms presentation!!Dbms presentation!!
Dbms presentation!!
 
Railway reservation system
Railway reservation systemRailway reservation system
Railway reservation system
 
How can Open Data Revolutionise your Rail Travel?
How can Open Data Revolutionise your Rail Travel?How can Open Data Revolutionise your Rail Travel?
How can Open Data Revolutionise your Rail Travel?
 
IRJET- Railway Reservation and Route Optimization System with Implementation
IRJET-  	  Railway Reservation and Route Optimization System with ImplementationIRJET-  	  Railway Reservation and Route Optimization System with Implementation
IRJET- Railway Reservation and Route Optimization System with Implementation
 
Railway Reservation System (2).pptx
Railway Reservation System (2).pptxRailway Reservation System (2).pptx
Railway Reservation System (2).pptx
 
Software Engineering ppt
Software Engineering pptSoftware Engineering ppt
Software Engineering ppt
 
SACHDEVA_SHALEEN_1437822_Evaluation Report on IRCTC.com_CI7700
SACHDEVA_SHALEEN_1437822_Evaluation Report on IRCTC.com_CI7700SACHDEVA_SHALEEN_1437822_Evaluation Report on IRCTC.com_CI7700
SACHDEVA_SHALEEN_1437822_Evaluation Report on IRCTC.com_CI7700
 

Recently uploaded

Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightDelhi Call girls
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Delhi Call girls
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...amitlee9823
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 

Recently uploaded (20)

Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 

202412343_Relational_Database_Presentation.pptx

  • 2. Introduction to the Project To create a railway reservation system intended to streamline the booking, cancellation and inquiry processes that passengers might undertake, as well as to support administrative functions for managing train schedules and handling lost items. Application of relational database management principles through the development of a robust, scalable, and user-centric railway ticketing and management system. Objective Focus It is designed to bring multiple benefits to various stakeholders, including passengers, railway administration and database administrators. Benefit
  • 4.
  • 5. Reservation • reservation_id (primary_key) • train_number • passenger_email_id • date_of_travel • booking_date • no_of_passengers • reservation_status • payment_status • total_fare • seat_number Lost_Items • Sdescription (partial_key) • no_of_items • date_lost • status Entities & their Attributes Route • route_id (primary_key) • start_station • end_station • distance Passenger • passenger_name • email_id (primary_key) • contact_number • residential_address Train • train_number (primary_key) • source • destination • arrival_time • departure_time • total_seats • days_operating • seats_available
  • 6. Simple Derived Stored Multi-value Single Value Attribute Types seat_number All attributes except seat_number first_name, last_name, email_id, contact_number, city, country, province, route_id, start_station, end_station, train_number, source, destination, arrival_time, departure_time, total_seats, days_operating, total_fare, payment_status, reservation_status, no_of_passengers, booking_date, reservation_id, description, no_of_items, date_lost, status passenger_name and residential_address Composite seats_available and distance train_number, total_fare, train_route
  • 7. Constraints & Domains applied Domains • Primary Key Constraints • email_id route_id, train_number, reservation_id • Foreign key Constraints • train_number in Reservation, passenger_email_id in Reservation • Check Constraints • days_operating attribute in the Route_and_Train table might be restricted to actual days of the week • Entity integrity Constraints: • No primary key value is NULL Constraints
  • 8. 1. Mapping Regular Entities Mapping ERD to Relations 4. Mapping of 1:1 Relationship 5. Mapping 1:N Relationship • passenger, train, route and reservation entities are mapped to respective relations 2. Mapping Weak Entities • Lost Items is mapped to a new relation with description and reservation_id as it’s primary keys. • Train and the Route are mapped into a merged relation • train_number in Reservations references Trains • passenger_email_id in Reservations references Passengers • route_id in Train references the Route. 6. Mapping M:N Relationship • Since there are no M:N relationships identified in the ERD, this step is NA. 3. Mapping Multi-valued attributes • A new relation Reservation_seat_number is created and the reservation_id along with seat_number are it’s primary keys.
  • 9.
  • 10. 1. Passenger Table: This relation is in 1NF as there are no repeating groups or composite attributes. The primary key is email_id. 2. Route_and_Train Table: It is in 1NF with train_number serving as a primary key. It was ensured that each attribute like start_station, end_station, etc., only holds single, atomic values. 3. Reservation Table: It is in 1NF as long as seat_number is considered atomic and not multi-valued. The primary key is reservation_id. 4. Lost Item Table: In 1NF with each attribute storing a single value. 5. Reservation_seat_number Table: To be in 1NF, we have ensured that seat_number is a single value per row and not a list of seat numbers. Normalization process
  • 18. Query 1: Retrieve all passengers’ names who ride the train in the year (2023) and the destination was Toronto.For each passenger, retrieve the contact information
  • 19. Query 2: Retrieve the source, destination, departure time, arrival time for all the available trains and sort this information based on the train number.
  • 20. Query 3: Calculate the annual income of each train during the year 2022 and 2023. Group them by the year. Sort the year in ASC order.
  • 21. Query 4: Find the maximum income, the minimum income, and the average income for each train.
  • 22. Query 5: Retrieve all the booked and cancelled tickets and their related information such dates, train numbers.
  • 23. Query 5: Retrieve all the booked and cancelled tickets and their related information such dates, train numbers.
  • 24. Query 6: The management decided to add a new train. So, and by SQL commands, add a new train to the database AND update any related tables. The information about the new train is as follows: Number 400 Source: Montreal, Destination: London (ON) , Departure time: 10:00, Arrival time: 15:00 , Total number of seats available:120 , The price for this route will be 140$. The train will be just on Saturday’s.
  • 26. Conlusion This project highlights the effectiveness of relational databases in improving operational efficiency and scalability in transportation management systems with: 1.Robust Database Schema: Implemented with integrity constraints to ensure data accuracy. 2.Efficient Data Management: Normalization reduced redundancy, enhancing performance. 3.Dynamic Functionality: Executed complex SQL queries for real-time data operations. 4.Scalability and Adaptability: Designed to accommodate future expansions and changes.
  • 27. References 2. Fundamental of Database Systems (7th Edition), Elmasri & Navathe (2016) 3. Draw.io Used to draw the relational schema diagram https://draw.io/ 4. MySQL Used to implement the database system 1. Edraw Max Online. (2024) Network Diagram Software https://www.edrawmax.com/online/en/

Editor's Notes

  1. In the digital age, the efficiency of transportation systems hinges significantly on the robustness and responsiveness of their supporting informational infrastructures. Keeping these points in mind, the Railway reservation system is designed to facilitate passenger services for a hypothetical railway network. The primary scenario of this project encompasses the management of train schedules, passenger bookings, ticket, validations, and cancellations through a centralized database system. The objective is to develop a comprehensive database system that simulates real-world operations of a railway ticketing system. This project focuses on integrating various functionalities into a cohesive system that not only facilitates the operational needs of a railway service but also enhances the user experience for passengers. The project is expected to yield numerous benefits to various stakeholders such as railway administration.
  2. The relational schema could potentially be refined to Second Normal Form by eliminating the redundant source and destination attributes from the route_and_train relation. These attributes have been retained for potential future scenarios where multiple trains might run on the same route but with different starting or ending points..