dbms-project-railway-reservation
dbms-project-railway-reservation
RAILWAY REGISTRATION
SYSTEM
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING
By
Page | 1
ACKNOWLEDGMENT
We would like to thank ‘Ms. Tamina Thakur’ for assigning us with this project.
Through the project we are able to grasp more technical and have a hands-on practical
experience with projects. Through it we are able to learn how a project is created and
how necessary and crucial technical knowledge is. We are really grateful to the
faculty that has provided us with the necessary guidelines.
Page | 2
DECLARATION STATEMENT
This is to declare that this report has been written by us. No part of the report is copied
from the other sources. All information included from other sources has been duly
acknowledged. We aver that if any part of the report is found to be copied, we will take
full responsibility for it.
Signature :………………
Signature :……………….
Signature :……………….
Page | 3
TABLE OF CONTENTS
Page | 4
ABSTRACT
In our country India there are number of counters for the reservation of
the seats and when can easily make reservation and get tickets. Then this
project contains Entity relationship model diagram based on railway
reservation and its reduction to the relation model. There is also a design
of database of the railway reservation system based on relation model. For
example, of some SQL queries to retrieves data from rail management
database.
For future expansion the proposed system can be web enabled so that the
clients can make various and queries about rains between stations. Due to
this, sometimes a lot of problems occur and they are facing many disputes
with customers. To solve the above problem, we designer database which
includes customer details availability future of seats in trains and number
of trains and their details.
Passengers can book their tickets for train in which seats are available. For
this with a passenger have two provide the desired train number and the
date for which ticket is to be booked. Before booking a ticket for a
passenger, the validity of train number and booking is checked. Once the
train number and the booking data are validated, it is check whether a seat
is available or not. If yes, the ticket is booked which confirm status and
corresponding to get ID is generated with cheese sorted along with the
other details of the passenger. The ticket once book can be cancelled
anytime. For this, the passenger has to provide the ticket ID (the unique
key). The ticket ID is searched and corresponding row is deleted. With
this the first ticket with waiting status also get confirmed.
Page | 6
Page | 7
ENTITIES ATTRIBUTES
USER_ID
First _Name
Last_ Name
Gender
USER Age
Email
Aadhar_ number
Mobile_ number
City
State
Pin code
password
Passenger_ ID
Name
Gender
Age
Pnr_ number
Passenger Seat_ number
Booked_ by
Reservation_ status
Train Number
Train_ name
Arrival_ Time
Train Departure_ Time
Availability_ of_ seats
Date1
Page | 8
No1
name
arrival_time
Station train_ no
id
user_id
Status
Ticket Number_ of_ passengers
Train no
User_id
Books Id
User_id
Cancel Id
Passenger_id
Page | 9
MAPPING TO ER DAIGRAM
PASSENGER
Passenger ID PNR No Age Gender User ID
TRAIN
STATION
TICKET
CANCEL
User ID ID Passenger ID
BOOKS
User ID ID
STARTS
Train No Station No
REACHES
Train No Station No Time
Page | 10
STOPS AT
Train No Station No
Page | 11
3.ABOUT SQL
USER1:
create table user1( user_id numeric(2)
primary key,
first_name varchar(10),
last_name varchar(10),
adhar_no varchar(10),
gender varchar(1), age numeric(2), mobile_no numeric(10), email
varchar(30), city varchar(10), state varchar(10), pincode varchar(10),
password varchar(20));
TRAIN:
create table TRAIN( train_no varchar(10) primary key,
train_name varchar(20),
arrival_time time, departure_time time, availability_of_seats varchar(5),
date1 date);
STATION:
create table STATION( no1 numeric(3) , name varchar(20), arrival_time
time, train_no varchar(10), primary key(no1,train_no), foreign
Page | 12
PASSENGER:
BOOKS:
id varchar(10),
Page | 13
CANCEL:
Below is the code for the insertion of the values in the table;-
now the given value is inserted to the table for the view
now we use
Page | 16
Here we used ‘RES’ for reserved Ticket and WAT for the Waiting Ticket
Here we can use one User id for booking number of tickets as we can
user_id =10 booked more than one time.
Now we use
Select * from Ticket;
This will display all the value inserted by us
Page | 18
Here we have used ‘NA’ for unreserved Tickets which is in the waiting list
By using this command now, we can view all the elements that we have
currently inserted
Page | 19
OUTPUT:
We have used
OUTPUT:
We have used
Page | 21