Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Project Report
ACKNOWLEDGEMENT
We take this opportunity to present our votes of thanks to all those who guide us and acted as lightening
pillars to enlighten our way throughout this project that has led to successful and satisfactory completion
of this study.
We are really grateful to our subject teacher Miss Samia Ghazala for providing us with an opportunity to
undertake this project in this university and providing us with all the facilities and knowledge. We are
highly thankful for her active support, valuable time and advice, whole-hearted guidance, sincere
cooperation and involvement during the study and in completing the preparation of our project within the
time stipulated.
Lastly, We are thankful to all those, particularly the various friends , who have been instrumental in
creating proper, healthy and conductive environment and including new and fresh innovative ideas for us
during the project, their help, it would have been extremely difficult for us to prepare the project in a time
bound framework.
Thank You.
th
26 December 2014
Database System
Project Report
TABLE OF CONTENTS
ACKNOWLEDGEMENT...........................................................................................................................1
TABLE OF CONTENTS.............................................................................................................................1
TABLE OF FIGURES.................................................................................................................................3
CHAPTER 1: INTRODUCTION................................................................................................................4
1.1 PROJECT OVERVIEW..............................................................................................................4
1.2 AIMS AND OBJECTIVES..........................................................................................................4
1.3 PROJECT SCOPE.......................................................................................................................4
CHAPTER 2: SYSTEM DESIGN..............................................................................................................5
2.1 DATA DICTIONARY.................................................................................................................6
2.2 ENTITY RELATIONSHIP DIAGRAM......................................................................................8
2.3 RELATIONAL MODEL.............................................................................................................9
CHAPTER 3: CODING..............................................................................................................................9
3.1 SQL PORTION..........................................................................................................................10
3.2 MS ACCESS PORTION............................................................................................................15
CHAPTER 4..............................................................................................................................................17
4.1 SNAP SHOTS................................................................................................................................17
4.2 REFERENCES...............................................................................................................................19
th
26 December 2014
Database System
Project Report
TABLE OF FIGURES
Figure 1 DATA DICTIONARY...................................................................................................................6
Figure 2 ENTITY RELATIONSHIP DIAGRAM........................................................................................8
Figure 3 TABLE RELATIONAL DIAGRAM.............................................................................................9
th
26 December 2014
Database System
Project Report
CHAPTER 1
INTRODUCTION
1.1 Project Overview
This project will help in solving all the problems in existing system of Railway Reservation System. In
existing system all data is stored in files which is awkward method and many problems are faced by the
users and passengers, so this project will help to enter data easily in computer database then no problems
will be faced by the users and passengers. The user can easily find any data at any time in a few seconds.
It includes modules required to successfully operate railway reversion process smoothly. It has train
master to add modify train information, Train schedule to enter train schedule details include all the
source and destination station names, arrival time and departure time. It includes automatic fare
calculation as per the distance between two stations. Reservation modules consist of automatic seat no
and train no allocation system. Daily scheduling and updating of not available seats in train can be done
easily. All master like train master, train schedule, reservation fees, can be modified individually from
front end and changes reflect in all modules immediate. Therefore proposed Online Railway Reservation
System has been designed to automate the process of railway for ticket reservation and back office
activities. System can make the daily activities efficient and providing the fast response.
Saves Time and Effort
You can save the time needed to travel to the railway reservation office and waiting
in the queue for your turn.
th
26 December 2014
Database System
Project Report
The scope of our project is to solve all existing problems in Railway Reservation
System. Pakistan has some of the most spectacular and unforgettable rail journeys
in the world. Here you experience a simple way. There's no better way to enjoy
Pakistan's outback, cities, coastal towns and regional areas in comfort. An
advantage of this DBMS is that DBMS allows large amounts of data to be stored in
the most efficient manner. The data is stored in lists of independent information.
Additional data sets can be added at any time. Relationships between the data sets
are defined in the DBMS, and can be altered without affecting the data.
th
26 December 2014
Database System
Project Report
CHAPTER 2
SYSTEM DESIGN
2.1 Data Dictionary
Following are the tables along with their attributes and Meta data
Table name
Passenger
Column name
PNR
Email_ID
Password
First Name
Last Name
Gender
Age
Mobile_N0
City
Security_Question
Security_Answer
Null\not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
null
null
Data type\size
Int
nvarchar(40)
nvarchar(20)
Varchar(40)
Varchar(60)
Varchar(40)
int
bigint
Char(20)
nvarchar(60)
nvarchar(80)
Primary key
Yes
No
No
No
No
No
No
No
No
No
No
Foreign key
No
No
No
No
No
No
No
No
No
No
No
Reservation
R_ID
PNR
Not null
Not null
int
int
Yes
No
No
Yes
Has
P_S ID
PNR
Seat_ID
Reservation_Date
Reservation_Time
Not null
Not null
Not null
Not null
Not null
int
int
int
Datetime
Datetime
Yes
No
No
No
No
No
Yes
Yes
No
No
Seat
Seat_ID
Train_ID
Seat_Status
Not null
Not null
Not null
int
int
nvarchar(40)
Yes
No
No
No
Yes
No
Train
Train_ID
Route_ID
Train_Name
Not null
Not null
Not null
int
int
Char(20)
Yes
No
No
No
Yes
No
TrainSchedule
T_S_ID
Train_ID
Arrival_Time
Departure_Time
T_Date
T_Day
Not null
Not null
Not null
Not null
Not null
Not null
int
int
Datetime
Datetime
Datetime
Varchar(30)
Yes
No
No
No
No
No
No
Yes
No
No
No
No
Route
Route_ID
Source_Station
Not null
Not null
int
nvarchar(30)
Yes
No
No
No
th
26 December 2014
Database System
Project Report
Destination_Station
Fares
Not null
Not null
nvarchar(30)
money
No
No
No
No
th
26 December 2014
Database System
Project Report
th
26 December 2014
Database System
Project Report
CHAPTER 3
CODING
3.1 SQL Portion
Create database Railway_Reservation_System
create table Passenger
(PNR int not null constraint pik_id primary key,
Email_ID nvarchar(40) not null,
Passwrd nvarchar(20) not null,
FirstName varchar(40) not null,
LastName varchar(60) not null,
Gender varchar(40) not null,
Age int not null,
Mobile_No bigint not null,
City char(20) not null,
Sequrity_Question nvarchar(60) null,
Security_Answer nvarchar(80) null)
select * from Passenger
Insert into Passenger
values(1,'maryammukhtiar@yahoo.com','*****','Maryam','Mukhtiar','Femal
e',31,0300-4321768,'KARACHI','what is your favourite place?','Faisal
masjid')
Insert into Passenger
values(2,'shaukat_ali88@live.com','********','Shaukat','Ali','Male',34
,0314-4276490,'FAISLABAD','what is your fvaourite colour?','Purple')
Insert into Passenger
values(3,'madihakiran@hotmail.com','******','Madiha','Kiran','Female',
26,0314-4276490,'ISLAMABAD','what is your favourite ride?','Roller
coaster')
Insert into Passenger
values(4,'abidaziz@gmail.com','*******','Abid','Aziz','Male',32,03153258043,'ATTOCK','what is your favourite country?','America')
Insert into Passenger
values(5,'zubiashahid@live.com','******','Zubia','Shahid','Female',28,
0346-2428634,'PESHAWAR','what is your favourite company?','Axact')
Insert into Passenger
values(6,'raheemahmed@yahoo.com','****','Raheem','Ahmed','Male',45,034
5-3276832,'MULTAN','what is your favourite city?','Islamabad')
th
26 December 2014
Database System
Project Report
Reservation
Reservation
Reservation
Reservation
Reservation
Reservation
Reservation
26 December 2014
10
Database System
Project Report
values(5,5,6,12/6/2014,'1:40:00')
Insert into Has
values(6,6,8,12/9/2014,'5:13:58')
Insert into Has
Values(7,6,9,12/14/2014,'11:00:36')
select * from Has
create table Seat
(Seat_ID int not null constraint pky_id primary key,
Train_ID int not null constraint fky_id foreign key
references Train(Train_ID),
Seat_Status nvarchar(40) not null)
select * from Seat
Insert into Seat
values(1,1,'AVAILABLE')
Insert into Seat
values(2,1,'AVAILABLE')
Insert into Seat
values(3,2,'AVAILABLE')
Insert into Seat
values(4,4,'AVAILABLE')
Insert into Seat
values(5,2,'NOT AVAILABLE')
Insert into Seat
values(6,3,'AVAILABLE')
Insert into Seat
values(7,3,'AVAILABLE')
Insert into Seat
values(8,8,'AVAILABLE')
Insert into Seat
values(9,4,'AVAILABLE')
Insert into Seat
values(10,5,'AVAILABLE')
Insert into Seat
values(11,5,'AVAILABLE')
Insert into Seat
values(12,6,'AVAILABLE')
Insert into Seat
values(12,6,'AVAILABLE')
Insert into Seat
values(14,6,'NOT AVAILABLE')
Insert into Seat
values(15,7,'AVAILABLE')
th
26 December 2014
11
Database System
Project Report
26 December 2014
12
Database System
Project Report
values(4,4,'7:00:00','7:30:00',12/16/2014,'THURSDAY')
Insert into TrainSchedule
values(5,5,'9:00:00','9:30:00',12/17/2014,'FRIDAY')
Insert into TrainSchedule
values(6,6,'11:00:00','11:30:00',12/18/2014,'SATURDAY')
Insert into TrainSchedule
values(7,7,'2:00:00','2:30:00',12/19/2014,'SUNDAY')
Insert into TrainSchedule
values(8,8,'4:00:00','4:30:00',12/20/2014,'MONDAY')
select*from TrainSchedule
Create table Route
(Route_ID int not null constraint pkr_id primary key,
Source_Station nvarchar(30) not null,
Destination_Station nvarchar(30) not null,
Fares money not null)
select * from Route
Insert into Route
values(1,'KARACHI','MULTAN',1500.00)
Insert into Route
values(2,'KARACHI','LAHORE',1400.00)
Insert into Route
values(3,'LAHORE','PESHAWAR',1600.00)
Insert into Route
values(4,'LAHORE','FAISLABAD',1400.00)
Insert into Route
values(5,'PESHAWAR','MULTAN',1800.00)
Insert into Route
values(6,'MULTAN','KARACHI',1700.00)
Insert into Route
values(7,'FAISLABAD','ATTOCK',1350.00)
Insert into Route
values(8,'ATTOCK','LAHORE',1200.00)
Insert into Route
values(9,'QUETTA','KARACHI',1900.00)
select * from Route
th
26 December 2014
13
Database System
Project Report
th
26 December 2014
14
Database System
Project Report
th
26 December 2014
15
Database System
Project Report
CHAPTER 4
Snap Shots
Home Page
Form Page
th
26 December 2014
16
Database System
Project Report
Passenger Query Form for Ticket Slip
Ticket Query
th
26 December 2014
17
Database System
Project Report
Ticket Slip
References
th
http://onlinestudyarea.blogspot.com/2012/11/online-railway-reservationsystem.html
http://www.scribd.com/doc/100203820/Railway-Reservation-ProjectReport#scribd
http://www.muengineers.in/computer-project-list/java-projects-list/railwayreservation-system
http://seminarprojects.com/Thread-railway-reservation-system-full-report
http://download.intel.com/education/easysteps/makeonlinerailwayreservation
s.pdf
http://www.google.com.pk/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=11&cad=rja&uact=8&ved=0CEcQ
FjAK&url=http%3A%2F%2Ffree4ebook.com%2Frailway
26 December 2014
18
Database System
Project Report
%2520%25282%2529.doc&ei=kbGbVKSYCZOfugT6o4DYCQ&usg=AFQjCNEVO
ajMWUg6Ufa36mFTtffkRhl9Zw&bvm=bv.82001339,d.c2E
The reference is also taken from lectures of Database Systems and Lab work.
th
26 December 2014
19