ER
ER
ER Diagram for Hospital:
Security_quest
Passenger
P_name
Age
Gender
Seat_no.
Reserve_status
Train_Status
Wait_seat
Avail_seat
Booked_seat
Train
T_name
Train_type
Avail_class
Route
Arr_time
Depart_time
Stop no.
Station
Station_name
Step 3: Mapping of Attributes
a. Simple Attributes
Simple attributes which cannot be divided into subparts.
Example: Seat Number of passenger
b. Composite Attributes
Composite attributes which can be divided into subparts.
Example: Passenger Name, Reservation status
P_name
First_Name
Middle_Name
Last_name
Reserve_status
Waiting
Confirmed
U_id Passenger table makes foreign key references to U_id of User table.
Status_id Passenger table makes foreign key references to Status_id of Train_Status Table.
Train_id Passenger table makes foreign key references to Train_id of Train Table
Train_Status
Train_id Train_status table makes foreign key references to Train_id of Train Table
PNR Train_status table makes foreign key references to PNR of Passenger table.
Train
Route
Station_id Route table makes foreign key references to Station_id of Station table.
Train_id Route table makes foreign key references to Train_id of Train Table