You are on page 1of 14

A

ADVANCE DATABASE MANAGEMENT SYSTEM


PROJECT
ON
“RAILWAY RESERVATION SYSTEM (project Name)”

Session 2016-17

Submitted To: Submitted By:


Ms. Krishna Gupta Student Name
Assistant Professor (CSE, Dept.) Roll No.

Rajasthan College of Engineering for Women


Rajasthan Technical University
Bhankrota, Ajmer Road, Jaipur
INTRODUCTION

Description: This is a railway ticker, when any updation about train timings are found... it informs
all the client ticker's about the update and they roll the updates.one can also roll default timings..

RAILWAY RESERVATION SYSTEM should be able to manage all the reservation related
functions. The system should be distributed in nature. This system is divided into five zones.

 NORTH ZONE
 SOUTH ZONE
 EAST ZONE
 WEST ZONE
 CENTRAL ZONE

Each zone should have same functionalities. Each zone will stores the information about train
name, train schedules, availability. The administrator should be able to enter any change related to
the train information like change in train name, number etc. The system should be able to reserve
seat in a train for a passenger. First the clerk will check for availability for the seats in a particular
train on a specified date of journey. If it is available the clerk will reserve seats. The passenger will
be given a unique PNR no. The system should be able to cancel a reservation. The clerk will delete
the entries in the system. The passenger can check their reservation status online by entering their
PNR no. The system will display his current status like confirmed, RAC or waiting list. They are
also able to see information related to the train schedules. The system should be able to print the
cancellation ticket which will have total fare and the amount deducted.

PURPOSE

The purpose of this source is to describe the railway reservation system which provides the train
timing details, reservation, billing and cancellation on various types of reservation namely,

 Confirm Reservation for confirm Seat.


 Reservation against Cancellation.
 Waiting list Reservation.
 Online Reservation.
 Total Reservation.

RAILWAY RESERVATION METHODS:-

ONLINE BOOKING: With the help of this people can book their tickets online through internet,
sitting in their home by a single click of mouse. Using their credit cards people can easily get their
tickets done within minutes. There are certain charges for online booking as well.
COUNTER BOOKING: This is the oldest method of booking the tickets. The reservation
counters are there at railway department from where people can get the tickets to their respective
destinations.
Railway passengers frequently need to know about their ticket reservation status, ticket availability
on a particular train or for a place, train arrival or departure details, special trains etc.. Customer
information centers at the railway stations are unable to serve such queries at peak periods. The
number of the reservation counters available to the passengers and customers are very less.

TABLES:-
1. Create a table for User and insert values in it?
 Create a Table:
create table user1(
email_id varchar(30) primary key,
password varchar(20),
full_name char(30),
gender char(10),
age int,
city char(20),
state char(20),
mobile number(10));
 Inserting Values:
 insert into user1 values('shreyashruti2@gmail.com','shreya1','shreya
shruti','female',20,'patna','bihar',8725662455);
 insert into user1 values('sakshijain061@gmail.com','cute77','sakshi
jain','female',20,'kota','rajasthan',7727893502);
 insert into user1
values('232shruti@gmail.com','shruti23','shruti','female',20,'patna','bihar',7611952607
);
 insert into user1 values('luhan143@gmail.com','luhu143','lu
han','male',25,'delhi','delhi',9782552738);
 insert into user1 values('rj2325@ymail.com','rj5672','rocky
singh','male',25,'chandigarh','punjab',9999000066);
 insert into user1 values('ashishjain@ymail.com','ash177','ashish
jain','male',20,'udaipur','rajasthan',9829468727);
 insert into user1
values('chanyeol69@ymail.com','chan66','chanyeol','male',23,'mumbai','maharashtra',
8233076514);
 insert into user1 values('s_bakshi@gmail.com','shalib','shalin
bakshi','male',20,'delhi','delhi',8947006957);
 insert into user1 values('lavi45@gmail.com','1445lv','lavi
malhotra','female',22,'bangalore','karnataka',7736660231);
 insert into user1 values('yuna0110@gmail.com','0110park','yuna
park','female',22,'vadodra','gujarat',9000189676);

 To Display the Table User:


 Select * from user1;

2. Create table for Passenger and also insert values in it?


 Create a Table:
create table passenger(
pnr_no number(20) primary key,
p_name char(20),
age int,
gender char(10),
res_status varchar(20));

 Inserting Values in table:


 insert into passenger values(2649045682,'gaurav',21,'male','WL/14');
 insert into passenger values(2437682882,'shalin bakshi',20,'male','CNF');
 insert into passenger values(1956765738,'lavi malhotra',22,'female','CNF');
 insert into passenger values(3954938206,'harshita sheikh',25,'female','RAC2');
 insert into passenger values(4267826483,'farhat khan',18,'female','CNF');
 insert into passenger values(5372626477,'akshat sinha',30,'male','WL/63');
 insert into passenger values(2657289512,'aarushi jain',15,'female','WL/1');
 insert into passenger values(2563424558,'abhilekh kant',23,'male','CNF');
 insert into passenger values(3528568937,'sakshi jain',20,'female','CNF');
 insert into passenger values(3784528567,'shreya shruti',20,'female','CNF');

 Display The table Passenger:


 Select * from passenger;

3. Create a table Train and Insert values in it?


 Create a Table:
create table train(
train_id number(7) primary key,
train_name char(30),
train_type char(20),
avail_days char(10),
seat_avail number(5));

 Inserting values in it:


 insert into train values(12466,'ranthambore express','express','MTWTFSS',120);
 insert into train values(12396,'ziyarat express','express','Thurday',1000);
 insert into train values(12956,'jaipur mumbai superfast','superfast','MTWTFSS',1200);
 insert into train values(12258,'jaipur pune superfast','superfast','MTh',1200);
 insert into train values(12432,'double decker','superfast','MTWTFSS',1500);
 insert into train values(13010,'ananya express','express','MW',1300);
 insert into train values(19650,'bikaner guwahati express','express','M',1500);
 insert into train values(15645,'rajdhani express','superfast','MTWTFSS',2000);
 insert into train values(13459,'ajmer bhopal express','express','MTWTFSS',1000);
 insert into train values(12471,'sampurna kranti express','express','MTWTFSS',1500);

 Display table Train:


 Select * from train;
4. Create a table Route and Insert values in it?
 Create a Table:
create table route(
source_dist varchar(10),
stop_no int,
arriv_time varchar(20),
depar_time varchar(20));
 Inserting Values in table:
 insert into route values('1500Km',20,'10:55AM','11:10AM');
 insert into route values('3155Km',11,'02:20AM','02:35AM');
 insert into route values('800Km',10,'12:30PM','02:05PM');
 insert into route values('600Km',7,'08:05AM','09:00AM');
 insert into route values('273Km',5,'10:00PM','06:00AM');
 insert into route values('3000Km',9,'09:05AM','09:15AM');
 insert into route values('4500Km',21,'09:20AM','09:25AM');
 insert into route values('1342Km',8,'05:10PM','05:30PM');
 insert into route values('900Km',10,'03:45PM','03:50PM');
 insert into route values('1342Km',13,'05:00PM','05:10PM');

 Display the Table Route:


 Select * from route;
5. Create a table Station and Insert values in it?
 Create a Table:
create table station(
station_id char(10) primary key,
station_name char(30));
 Inserting values in Table:
 insert into station values('PNBE','Patna Junction');
 insert into station values('JP','Jaipur Junction');
 insert into station values('NDLS','New Delhi Junction');
 insert into station values('BKN','Bikaner Junction');
 insert into station values('GWH','Guwahati Junction');
 insert into station values('AJM','Ajmer Junction');
 insert into station values('MB','Mumbai Junction');
 insert into station values('PN','Pune Junction');
 insert into station values('IN','Indore Junction');
 insert into station values('BHP','Bhopal Junction'

 Display the Table Station:


 Select * from station;
6. Create a table Train status and Insert values in it?
 Create a Table:
create table train_status(
avail_days char(10),
booked_status varchar(5),
wait_status varchar(5),
avail_status int);

 Inserting values in table:


 insert into train_status values(27,120,110,'MTWTFSS');
 insert into train_status values(32,1000,920,'Thursday');
 insert into train_status values(0,1200,900,'MTWTFSS');
 insert into train_status values(13,1200,1145,'MTh');
 insert into train_status values(36,1500,1392,'MTWTFSS');
 insert into train_status values(67,1300,1200,'MW');
 insert into train_status values(88,1500,1355,'M');
 insert into train_status values(99,2000,1800,'MTWTFSS');
 insert into train_status values(0,1000,600,'MTWTFSS');
 insert into train_status values(135,1500,1434,'MTWTFSS');

 Display the Table Train Status:


 Select * from train_status;
QUERIES:-
1. select train_id, train_name from train where train_name like 'j%';

2. select email_id, password, age from user1 where gender='male';

3. select pnr_no, p_name from passenger where res_status='CNF';


 Alter table route :->
alter table route add train_id number(7);
 Update the table route :->
update route set train_id=12466 where stop_no=20;
update route set train_id=12396 where stop_no=11;
update route set train_id=12956 where stop_no=10;
update route set train_id=12258 where stop_no=7;
update route set train_id=12432 where stop_no=5;
update route set train_id=13010 where stop_no=9;
update route set train_id=19650 where stop_no=21;
update route set train_id=15645 where stop_no=8;
update route set train_id=13459 where stop_no=10;
update route set train_id=12471 where stop_no=13;
 Display Table route :->
select * from route;

4. select train_name, avail_days from train t right outer join route r on(t.train_id=r.train_id);
5. select count(*) from passenger;

6. select train_id from train union select train_id from route;

7. delete from train_status where avail_status=1500;


select * from train_status;
8. select * from station order by station_name asc;

9. select max(age) from passenger;

10. select lower(res_status) from passenger;


11. select * from user1 where state in('bihar', 'rajasthan');

12. select * from route where stop_no > 10;

13. select train_name, train_id from train where seat_avail between 1200 and 1500;

You might also like