Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Railway management System, Assignments of Database Management Systems (DBMS)

Railway management System is Database management system project using SQL,PHP,HTML 5

Typology: Assignments

2020/2021
On special offer
30 Points
Discount

Limited-time offer


Uploaded on 04/03/2021

chinmay-vijayanand-gaikawad
chinmay-vijayanand-gaikawad 🇮🇳

3

(1)

1 document

1 / 41

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Padmabhushan Vasantdada Patil Pratishtan’s College of
Engineering
Sion, Mumbai-400 022
Mumbai University
A
MINI PROJECT REPORT
ON
RAILWAY RESERVATION SYSTEM
Submitted to the
Padmabhushan Vasantdada Patil Pratishtan’s College of
Engineering
Bachelor of Engineering
In
Computer Engineering
Submitted By:
GAIKAWAD CHINMAY VIJAYANAND
VU1F1819058
SALVI SUYASH PRAVIN
VU1F1819060
Under the guidance of
Prof. Asharani Shinde
Department of Computer Engineering
Padmabhushan Vasantdada Patil Pratishtan’s College of
Engineering
Sion, Mumbai-400 022
Mumbai University
2020-2021
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
Discount

On special offer

Partial preview of the text

Download Railway management System and more Assignments Database Management Systems (DBMS) in PDF only on Docsity!

Padmabhushan Vasantdada Patil Pratishtan’s College of

Engineering

Sion, Mumbai-400 022

Mumbai University

A

MINI PROJECT REPORT

ON

RAILWAY RESERVATION SYSTEM

Submitted to the

Padmabhushan Vasantdada Patil Pratishtan’s College of

Engineering

Bachelor of Engineering

In

Computer Engineering

Submitted By:

GAIKAWAD CHINMAY VIJAYANAND VU1F

SALVI SUYASH PRAVIN VU1F

Under the guidance of

Prof. Asharani Shinde

Department of Computer Engineering

Padmabhushan Vasantdada Patil Pratishtan’s College of

Engineering

Sion, Mumbai-400 022

Mumbai University

2 | P a g e

Department of Computer Engineering

INDEX

CONTENTS PAGE

NO.

• INTRODUCTION^4

• EXPLANATION^ OF^ RAILWAY

RESERVATION SYSTEM

• LIST^ OF^ SQL^ &^ PHP^ CONCEPTS

USED IN RAILWAY RESERVATION

SYSTEM

• EXPLANATION OF EACH & EVERY

SQL & PHP CONCEPTS USED IN

RAILWAY RESERVATION SYSTEM

• CODING/IMPLEMENTATION^11

• OUTPUTS^37

• CONCLUSION^41

• REFERENCES^41

4 | P a g e

Department of Computer Engineering

INTRODUCTION

Database

The database is a collection of inter-related data which is used to retrieve, insert

and delete the data efficiently. It is also used to organize the data in the form of a

table, schema, views, and reports, etc.

For example: The bank Database organizes the data about the manager, staff,

employees, customers and branch etc.

Using the database, user can easily retrieve, insert, and delete the information.

Database Management System

  • Database management system is a software which is used to manage the database. For example: MySQL, Oracle, etc are a very popular commercial database which is used in different applications.
  • DBMS provides an interface to perform various operations like database creation, storing data in it, updating data, creating a table in the database and a lot more.
  • It provides protection and security to the database. In the case of multiple users, it also maintains data consistency.

DBMS allows users the following tasks:

  • Data Definition: It is used for creation, modification, and removal of definition that defines the organization of data in the database.
  • Data Updation: It is used for the insertion, modification, and deletion of the actual data in the database.
  • Data Retrieval: It is used to retrieve the data from the database which can be used by applications for various purposes.
  • User Administration: It is used for registering and monitoring users, maintain data integrity, enforcing data security, dealing with concurrency control, monitoring performance and recovering information corrupted by unexpected failure.

5 | P a g e

Department of Computer Engineering

Advantages of DBMS

  • Controls database redundancy: It can control data redundancy because it stores all the data in one single database file and that recorded data is placed in the database.
  • Data sharing: In DBMS, the authorized users of an organization can share the data among multiple users.
  • Easy Maintenance: It can be easily maintainable due to the centralized nature of the database system.
  • Reduce time: It reduces development time and maintenance need.
  • Backup: It provides backup and recovery subsystems which create automatic backup of data from hardware and software failures and restores the data if required.
  • Multiple user interface: It provides different types of user interfaces like graphical user interfaces, application program interfaces.

Disadvantages of DBMS

  • Cost of Hardware and Software: It requires a high speed of data processor and large memory size to run DBMS software.
  • Size: It occupies a large space of disks and large memory to run them efficiently.
  • Complexity: Database system creates additional complexity and requirements.
  • Higher impact of failure: Failure is highly impacted the database because in most of the organization, all the data stored in a single database and if the database is damaged due to electric failure or database corruption then the data may be lost forever.

Relational database management systems (RDBMS) is used to store and manage

huge volume of data. This is called relational database because all the data is

stored into different tables and relations are established using primary keys or

other keys known as Foreign Keys.

A Relational Database Management System (RDBMS) is a software that:

  1. Enables user to implement a database with tables, columns and indexes.
  2. Guarantees the Referential Integrity between rows of various tables.
  3. Updates the indexes automatically.
  4. Interprets an SQL query and combines information from various tables.

7 | P a g e

Department of Computer Engineering

EXPLANATION OF RAILWAY RESERVATION SYSTEM

Railway Management System is easy to use, secured and error free system

created using the concepts of MySQL and PHP. It provides a user-friendly

interface while working. Customer can access their respective details anywhere

and anytime. Various functions provided are as follows:

  1. Create Account- To create account in RAILWAY RESERVATION SYSTEM, account holder's email id, mobile no and date of birth is required.
  2. Train Enquiry- Account Holder can Enquire about train anytime according to his convenience with date of journey and station.
  3. Train Schedule- Account Holder can check Train schedule available in Database.
  4. Train Booking- Account Holder can book any available seat from any specific trains on a particular date.
  5. Get PNR status- Account Holder can check his booking status anytime.
  6. Cancel Train Booking - Account Holder can cancel booking of specific train if booked and data will be deleted.
  7. User Information- Account Holder can Check their details and booking history online.
  8. Delete Account- Account Holder can Delete his account RAILWAY RESERVATION SYSTEM and data from database will be removed.

8 | P a g e

Department of Computer Engineering

LIST OF SQL & PHP CONCEPTS USED IN RAILWAY

RESERVATION SYSTEM

PHP PDO

1. Connecting to MySQL database

2. Insert Data to MySQL Database

3. Retrieve Data from MySQL Database

4. Updating Data into MySQL Database

5. Deleting Data from MySQL Database

10 | P a g e

Department of Computer Engineering

iv. Updating Data into MySQL Database:

In order to run an UPDATE query with PDO just follow the steps below:

  • create a correct SQL UPDATE statement
  • replace all actual values with placeholders
  • prepare the resulting query
  • execute the statement, sending all the actual values to execute() in the form of array.

v. Deleting Data from MySQL Database:

Like the UPDATE a WHERE clause ensures the correct record is removed.

11 | P a g e

Department of Computer Engineering

CODING/IMPLEMENTATION

Index.html

RAILWAY RESERVATION SYSTEM

admin.html

13 | P a g e

Department of Computer Engineering

echo "
<a href="http://localhost/railway/cancelled.php"> View all cancelled tickets
"; //echo "
<a href="http://localhost/railway/logout.php"> Logout
"; } else { echo "

User ID:
Password:
"; } ?>
Go to Home Page!!!

Booked.php

PNRIdTrain_noDate_Of_Journey< td>FareTrain_ClassSeatsStatus"; while ($row=mysqli_fetch_array($result)) { echo "".$row[0]."".$row[1]."".$row[2]."".$row[5]." ".$row[6]."".$row[7]."".$row[8]."".$row[9]." "; }

14 | P a g e

Department of Computer Engineering

echo ""; echo "
<a href="http://localhost/railway/admin_login.php">Go Back to Admin Menu!!! "; $conn->close(); ?>

Cancel.php

query($sql) === TRUE) { echo "Cancellation Successful!!!"; } else { echo "

Error:". $conn->error; } echo "

Home Page
"; $conn->close(); ?>

Db.php

16 | P a g e

Department of Computer Engineering

$cdresult=mysqli_query($conn,$cdquery); echo " <option value = "" > "; while ($cdrow=mysqli_fetch_array($cdresult)) { $cdTitle=$cdrow['sname']; echo " <option value = "$cdTitle" > $cdTitle ";

} ?>

Date of Journey:



Go to Home Page!!!

Schedule.php

Train_noTrain_nameStarting_PointArrival_Ti meDestination_PointDeparture_TimeDayDistance "; while ($cdrow=mysqli_fetch_array($cdresult)) { echo " ".$cdrow['trainno']."".$cdrow['tname']."".$cdrow['sp'] ."".$cdrow['st']."".$cdrow['dp']."".$cdrow['dt']."".$cdrow['dd']."".$cdrow['distance']." "; } echo "";

17 | P a g e

Department of Computer Engineering

$cdquery="SELECT * FROM schedule where trainno='".$_GET["trainno"]."' ORDER BY distance ASC "; $cdresult=mysqli_query($conn,$cdquery); $stations=array(); $arrival=array(); $departure=array(); $distance=array(); $i=0; while($cdrow=mysqli_fetch_array($cdresult)) { $stations[$i]=$cdrow["sname"]; $arrival[$i]=$cdrow["arrival_time"]; $departure[$i]=$cdrow["departure_time"]; $distance[$i]=$cdrow["distance"]; $i+=1; } echo "

"; $temp=0; while ($temp<$i-1) { echo " "; $temp+=1; } echo "
IdStaring_PointArrival_TimeDestination_Poi ntDeparture_TimeDistance
".($temp+1)."".$stations[$temp]."".$departure[$temp]." ".$stations[$temp+1]."".$arrival[$temp+1]."".($distan ce[$temp+1]-$distance[$temp])."
"; echo "
Go Back to Train Menu!!!
"; echo "
Go Back to Admin Menu!!! "; ?>

19 | P a g e

Department of Computer Engineering

require "db.php";

if ($conn->connect_error) { die("Connection failed: ". $conn->connect_error); } $mobile=$_POST["mno"]; $pwd=$_POST["password"]; $query = mysqli_query($conn,"SELECT * FROM user WHERE user.mobileno=$mobile AND user.password='".$pwd."' ") or die(mysql_error()); $temp1; $temp2; if($row = mysqli_fetch_array($query)) { echo "Welcome "; $temp1=$row['emailid']; $temp2=$row['id']; echo "$temp1"; echo "

"; $query2 = mysqli_query($conn," select * from user,resv where user.id=resv.id AND user.mobileno=$mobile ") or die(mysql_error()); echo "

"; while($row = mysqli_fetch_array($query2)) { echo ""; } echo "
PNRTrain_noDate_Of_JourneyTotal_Fa reTrain_ClassSeats_ReservedStatus
".$row["pnr"]."".$row["trainno"]."".$row["doj"]."</td

".$row["tfare"]."".$row["class"]."".$row["nos"]."
"; if(mysqli_num_rows($query2) == 0) { echo "No Reservations Yet !!!

"; } } $_SESSION["id"]=$temp2; //$rowcount=mysqli_num_rows($result); if(mysqli_num_rows($query) == 0) { echo "Wrong Combination!!!

"; echo " Home Page
"; die(); } ?>

20 | P a g e

Department of Computer Engineering

Enter PNR for Cancellation:



Home Page
"; $conn->close(); ?>

User_Login.html

Enter the details:

Registered Mobile No:

Password:



Home Page

Seat Plan.php

Train_noStarting_PointDestination_Point ".$_GET["trainno"]."".$_GET["sp"]."".$_GET["dp"]."