You are on page 1of 6

List of Entities and Attributes

ENTITIES ATTRIBUTES
User ID
First_Name
Middle_Name
Last _Name
Age
Gender
City
Pin_code
State
Mobile_no.

Train Train_No
Name
Capacity
Destination
Train_Desc
Arrival_Time

Station Station_No
Arrival_Time
Hault
Departure
Name
Train_No

Ticket Ticket_id
No. Of Passenger
First_Name
Ticket_Price
PNR_No
Train_No
ID
Ticket Status Ticket_id
Confirmed
RAC
Waiting
ID

Payment ID
Ticket_Id
Paid_Amt
Pay_Date
Pay_Desc

ABSTRACT
This Project is about creating the database about Railway
Reservation System

The railway reservation system facilitates the passengers to enquire


about the trains available on the basis of destination, booking and
cancellation of tickets, enquire about the status of the booked ticket,
etc. The aim of case study is to design and develop a database
manumber(20)aining the records of different trains, train status, and
users. The record of train includes its number, name,
description,capacity,time, destination.

Users can book their tickets for the train in which seats are available.
For this, user has to provide the desired train number and the date
for which ticket is to be booked. Before booking a ticket for a user,
the validity of train number is checked. Once the train number and
time are validated, it is checked whether the seat is available. If yes,
the ticket is booked with confirm status and corresponding ticket ID
is generated which is stored along with other details of the user. The
ticket once booked can be canceled at any time. For this, the
passenger has to provide the ticket ID (the unique Key).User can do
the payment by different modes(UPI,Cash,Card).
ER DIAGRAM
DATA MODEL OF RAILWAY MANAGEMENT SYSTEM
Create table User( ID number(20) primary key,
First_Name varchar2(20) ,
Middle_name varchar2(20), Last_name varchar2(20),
Gender varchar2(20),
Age number,
Mobile_No. varchar2(20),
City varchar2(20), State varchar2(20),
Pin_Code varchar2(20)(20);

Create table Train( Train_No. number(20) primary key,


Train_Name varchar2(20),
Capacity number(20), Train_Desc. varchar2(20),
Destination varchar2(20)
Arrival_Time varchar2(20);

Create table Station( Train_No. number(20), Station_No. primary key varchar2(20),


Arrival_Time varchar2(20) Hault varchar2(20), Departure varchar2(20) );

Create table Ticket ( Ticket_Id number(20) primary key, First_Name varchar2(20),


Ticket_Price varchar2(20), PNR_No. number(20) , Train_No. number(20), ID
number(20) );

Create table Ticket_Status ( Ticket_Id number(20) primary key, Confirmed


varchar2(20), RAC varchar2(20), Waiting varchar2(20) , ID number(20);

Create table Payment ( Pay_date number(20), Ticket_Id number(20), Paid_Amt.


number(20), ID number(20), Pay_Desc. varchar2(20) );

Create table Travels _In ( ID number(20) foreign key, Train_No. number(20) foreign
key, Constranumber(20) foreign key(ID) references User(ID), Constranumber(20)
foreign key(Train_No.) references Train(Train_No.) );

Create table Books & Cancel ( ID number(20) ,First_Name varchar2(20),


Constranumber(20) foreign key (ID) references User(ID), Constranumber(20) foreign
key (ID) references Ticket(ID) );

Create table Reaches ( Train_No. number(20) , Arrival_time varchar2(20),


Constranumber(20) foreign key(train_no.) references Train(train_no.) );

Create table exist Start (Train_No. number(20) , Arrival_time varchar2(20),


Constranumber(20) foreign key(train_no.) references Train(train_no.) );

Create table Shows (Ticket_Id number(20), ID number(20), Constranumber(20)


foreign key(Ticket_Id) references Ticket(Ticket_Id), Constranumber(20) foreign
key(Ticket_Id ) references Ticket_Status( Ticket_Id) );

You might also like