1.1 Introduction To SQL: Data Query Language (DQL)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 34

Bus Reservation System

CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION TO SQL

SQL which is an abbreviation for Structured Query Language is a language


to request data from a database, to add, update, or remove data within a database, or to
manipulate the metadata of the database.

Sometimes SQL is characterized as non-procedural because procedural languages


generally require the details of the operations to be specified, such as opening and
closing tables, loading and searching indexes, or flushing buffers and writing data to
file systems. Therefore, SQL is considered to be designed at a higher conceptual level
of operation than procedural languages.

Commonly used statements are grouped into the following categories:

Data Query Language (DQL)

SELECT - Used to retrieve certain records from one or more tables.


Data Manipulation Language (DML)

INSERT - Used to create a record.

UPDATE - Used to change certain records.

DELETE - Used to delete certain records.


Data Definition Language (DDL)

CREATE - Used to create a new table, a view of a table, or other object in


database.

ALTER - Used to modify an existing database object, such as a table.

DROP - Used to delete an entire table, a view of a table or other object in the
database.

Dept. of CSE, GAT 2018-2019 1


Bus Reservation System

Transaction Control Language(TCL)


These commands are to keep a check on other commands and their affect on the
database. These commands can annual changes made by other commands by rolling
back to original state. It can also make changes permanent

Data Control Language (DCL)


GRANT - Used to give a privilege to someone.
REVOKE - Used to take back privileges granted to someone.

1.2 INTRODUCTION TO FRONT END SOFTWARE


The “front end languages” live in the browser. After you type in an address in
the address bar at the top and hit Enter, your browser will receive at least an HTML
file from the web server. Each of these languages performs a separate but very
important function and they work harmoniously together to determine how the web
page is STRUCTURED (HTML), how it LOOKS (CSS), and how it FUNCTIONS
(JavaScript). Front end web development is NOT design (you won’t be playing
around in Photoshop or anything), but a front end developer does apply the work of
designers to the webpage by translating their well-designed layouts into real code.
The front end developer stands between the designer on one end and the back end
developer on the other, translating the design into code and plugging the data from
the back end developer into the right spots.

PHP is a server-side scripting language designed primarily for web development


but also used as a general-purpose programming language. Originally created
by Rasmus Lerdorf in 1994, the PHP reference implementation is now produced by
The PHP Development Team. PHP code may be embedded into HTML or it can be
used in combination with various web template systems, web content management
systems and webframeworks.PHP code is usually processed by a
PHP interpreter implemented as a module in the web server or as a Common Gateway
Interface(CGI) executable. The web server software combines the results of the
interpreted and executed PHP code, which may be any type of data, including images,

Dept. of CSE, GAT 2018-2019 2


Bus Reservation System

with the generated web page. PHP code may also be executed with a command-line
interface (CLI) and can be used to implement standalone graphical applications.
The standard PHP interpreter, powered by the Zend Engine, is free
software released under the PHP License. PHP has been widely ported and can be
deployed on most web servers on almost every operating system and platform, free of
charge.

1.3 PROJECT REPORT OUTLINE


The Report is arranged in the following way:
Chapter1: Introduction
Chapter2: Requirement Specification
Chapter3: Objectives of the project
Chapter4: Implementation
Chapter5: Front end design
Chapter6: Testing
Chapter7: Results

Dept. of CSE, GAT 2018-2019 3


Bus Reservation System

CHAPTER 2
REQUIREMENT SPECIFICATION
2.1 SOFTWARE REQUIREMENTS
Operating System : 64bit operating system, x64-based processor
Database : MYSQL
Tools : WAMP SERVER

2.2 HARDWARE REQUIREMENTS


Processor : Intel®core™i3-7100U CPU @2.40GHz
RAM : 4.00 GB
Hard Disk : 1 TB
Compact Disk : CD-ROM, CD-R, CD-RW
Input device : Keyboard, Mouse
Output device : Laptop Display Screen

Dept. of CSE, GAT 2018-2019 4


Bus Reservation System

CHAPTER 3
OBJECTIVE OF THE PROJECT
The Bus ticket reservation system is currently maintaining the project Transport
Company’s process manually which is a very time consuming process. It deals with
transport industry’s ticket booking and transport maintenance, so it becomes a very
tedious job for the ticket booking transporter to look after these particulars to
complete the task at right time. The bus ticket booking system not only deals with
transporters owned vehicles but also takes into consideration about the other
types project of system transport vehicles available with other transporters .

 This system will lead to increase in the ticket booking efficiency of


the project Staff and members of the Ticket Booking Agency with little
throughput.
 This system project is made as user friendly as possible so that any one can use it
with little knowledge of system computers.
 The ticket booking project will reduce the ticket booking tedious job of system
paperwork by keeping all the project details of bus ticket booking, cancelling
tickets are stored in the form database in computer’s hard disk.

The objective of my project is to make easy the ticket booking project system of
Ticket Booking Agency simple, reliable, user friendly, and corrective. Moreover less
time consuming as compared to manual work.

Dept. of CSE, GAT 2018-2019 5


Bus Reservation System

CHAPTER 4
IMPLEMENTATION
4.1 ER DIAGRAM EMAIL_ID LNAME

FNAME PHONE
PHONE
ROUTENO
PASS_ID PASS_ID
BUSTYPE
AVALIABLE_S
EATS

BUS_NO
1 BUS 1 MANAG N PASSENGER
ES

GENDER
1 BUS_LOCATION

BO0KING_ID BUS_ROUTE 1

TRAVELS_
THROUG
BUS_LOCATION
H

BOOKS
ROUTE_NO 1
N N
N TICKET_
DATE
NDEPART_
TIME DEPART_
HAS

DATE
SOURCE
DESTINATION
TICKET

N PASS_ID
ROUTE SEATNO
BOOKINGID

BOOKING_DETAILS TICKETNO

BOOKING_ID

NO_OF_
BOOK_DATE SEATS
PASS_ID
BUS_NO TICKET_
NO
Fig 4.1:ER Diagram

Dept. of CSE, GAT 2018-2019 6


Bus Reservation System

4.2 MAPPING OF ER DIAGRAM TO SCHEMA


DIAGRAM

PASSENGER

PASS_ID FNAME LNAME ADDRESS GENDER EMAIL_ID

ROUTE

ROUTE_NO SOURCE DESTINATION DEPART_DATE DEPART_TIME

BUS

BUS_NO AVAILABLE_SEATS BUS_TYPE ROUTE_NO PASS_ID

BOOKING_DETAILS

BOOKING_ID BOOK_DATE NO_OF_SEATS PASS_ID BUS_NO TICKET_NO

TICKETS

TICKET_NO TICKET_DATE SEAT_NO TICK_AMT_IN_RS BOOKING_ID PASS_ID

CONTACT_NO

PASS_ID PHONE

BUS_LOCATION

BOOKING_ID BUS_LOCATION BUS_ROUTE

Dept. of CSE, GAT 2018-2019 7


Bus Reservation System

4.3 MAPPING OF THE ER SCHEMA TO RELATIONS


An entity exists in the real world project with. A relationship shows how two entities
relate to each other both entities and relationships can have attributes. Anything that is
useful to know about an entity or a relationship is an attribute. Since the database
must be able to find an entity or a relationship, it must be able to identify it with a set
of attributes that is unique.

1. Mapping Of 1-N Relationship


For each regular binary 1-N relationship type R identify the relation S that
represents the participating entity type at the N side of the relation type include as
foreign key in S the primary key of relation T that represents the other entity type
participating in R.
There is 1-N relationship between Bus and the Passenger, where one bus can have
many passengers. Consider the N side i.e Passenger and include in it the primary key
of T.
PASSENGER
PK FK
PASS_ID FNAME LNAME ADDRESS GENDER EMAIL_ID BUS_NO
There is 1-N relationship between Passenger and the Ticket, where one passenger can
buy many tickets. Consider the N side i.e Ticket and include in it the primary key of
T.
TICKETS
PK FK
TICKET_NO TICKET_DATE SEAT_NO TICK_AMT_IN_RS BOOKING_ID PASS_ID

Dept. of CSE, GAT 2018-2019 8


Bus Reservation System

4.4 NORMALIZE THE RELATIONS


Database normalization, or simply normalization, is the process of organizing
the columns (attributes) and tables (relations) of a relational database to reduce data
redundancy and improve data integrity. Normalization involves arranging attributes in
relations based on dependencies between attributes.
1. First Normal Form (1NF):
There are no duplicated rows in the table. Each cell is single valued or atomic.
PASSENGER
PASS_ID FNAME LNAME PHONE ADDRESS GENDER EMAIL_ID

2. Second Normal Form (2NF):


A table is in 2NF if it is in 1NFand if all non-key attributes are fully functionally
dependent on all of the key.
PASSENGER
PASS_ID FNAME LNAME PHONE ADDRESS GENDER EMAIL_ID

3. Third Normal Form (3NF):


A table is in 3NF if it is in 2NF and if it has no transitive dependency.

X->Y, Y->Z, X->Z


According to CODD’s definition a relation schema R is in 3NF If it is satisfies 2NF
and no non prime attribute of R is transitively dependent on the primary key. Since
the database is relationally-schema mapped and it is normalized upto 3NF , it is in its
highest normal form i.e 3NF.

Dept. of CSE, GAT 2018-2019 9


Bus Reservation System

4.5 CREATION OF TABLES

Creating Passenger Table


Create table Passenger
(Pass_id varchar (50) primary key,
Fname varchar (50),
Lname varchar (50),
Phone int,
Address varchar (100),
Gender char (6),
Email_id varchar (50));

Creating Route Table


Create table Route
(Route_no varchar (10) primary key,
Source char (50),
Destination char (50),
Depart_date varchar (20),
Depart_time varchar (20));

Creating Bus Table


Create table Bus
(Bus_no varchar (10) primary key,
Available_seats int,
Bus_type varchar (50),
Route_no varchar (10),
Index (route_no),
Foreign key (Route_no) references Route (Route_no) on delete cascade,
Pass_id varchar (20),
Index (Pass_id), Foreign key (Pass_id) references Passenger (Pass_id) on delete
cascade);

Dept. of CSE, GAT 2018-2019 10


Bus Reservation System

Creating Booking_Detail Table


Create table Booking_details
(Booking_id varchar (10) primary key,
Book_date varchar (20),
Num_of_seats int,
Pass_id varchar (20),
Index (Pass_id),
Foreign key (Pass_id) references Passenger (Pass_id) on delete cascade,
Bus_no varchar (10),
Index (bus_no),
Foreign key (Bus_no) references bus (Bus_no) on delete cascade,
Ticket_no int);

Creating Tickets Table


Create table ticket
(Ticket_noint primary key,
Ticket_date varchar (20),
Seat_numbers varchar (50),
Tick_amt_in_rsint,
Booking_id varchar (10),
Index (booking_id),
Foreign key (Booking_id) references Booking_details (booking_id) on delete cascade,
Pass_id varchar (10),
Index (Pass_id),
Foreign key (Pass_id) references Passenger (Pass_id) on delete cascade);

Alter table Booking_details


Add constraint foreign key (Ticket_no) references Ticket (Ticket_no) on delete
cascade;

Creating Contact_No Table


Create table Contact_No

Dept. of CSE, GAT 2018-2019 11


Bus Reservation System

(Pass_id varachar(20),
Phone int,
Primary key(Pid,Phone),
Foregin key (Pass_id) references passenger (pid));

Creating Bus_Location Table


Create table Bus_Location
(Booking_id varchar (20),
Bus_location varchar (20),
Bus_route varchar (20),
Primary (Booking_id ,Bus location),
Foregin key (Booking_id) references passenger (Pass_id));

4.6 INSERTION OF TUPLES


Insertion Of Passenger
Insert into passenger values ('ab-110', 'pradeep', 'gowda','974024296', 'no 22 1st
main,peenya 2nd stage,blore', 'male', '[email protected]');
Insert into passenger values ('bg-111', 'ullas', 'gowda',’987654123’, 'no 45 2nd a
cross,vijyanagar,bangalore', 'male', '[email protected]');
Insert into passenger values('ac-112', 'vasu', 'kumar',’773595521’, 'no 10 5th
cross,bank street,hyderabad', 'male', '[email protected]');
Insert into passenger values ('yh-113', 'spandana', 'bhatt',’994550521’, 'no 124 4th
main 2nd a cross,chennai', 'female', '[email protected]');
Insert into passenger values ('rn-114', 'thrushar', 'rao',’974024296’, 'no 5/2 4th
main,1st cross,peenya,blore', 'male', '[email protected]');
Insert into passenger values('hk-115', 'shasi', 'kumar',’852469751’, 'no 11 11th main
,basaveshwarnagar,blore', 'male', '[email protected]');

Insertion Of Route
Insert into route values ('a1', 'bangalore', 'mangalore', '15-10-2018', '7:00 p.m');
Insert into route values ('b4', 'bangalore', 'kerala', '10-11-2018', '9:00 p.m');
Insert into route values ('v3', 'hyderabad', 'pune', '20-10-2018', '6:00 p.m');

Dept. of CSE, GAT 2018-2019 12


Bus Reservation System

Insert into route values ('c2', 'bangalore', 'mysore', '23-11-2018', '7:00 p.m');
Insert into route values ('n3', 'chennai', 'bangalore', '19-10-2018', '9:00 a.m');
Insert into route values('b2', 'bangalore', 'madkeri', '1-12-2018', '10:00 p.m');

Insertion Of Ticket
Insert into ticket values ('12', '15-10-2018', 'd:1', '500','1254', 'yh-133');
Insert into ticket values ('25', '10-11-2018', 'a:1-4 b:1,2 d:1', '10500', '2987', 'ac-112');
Insert into ticket values('73', '20-10-2018', 'c:1,2 d:1,2 b:1', '4000', '4521', 'bg-111');
Insert into ticket values ('05', '23-11-2018', 'e:1,2 f:1,2', '2800', '1241', 'ab-110');
Insert into ticket values ('47', '19-10-2018', 'a:1-4 b:11-4', '3000', '3261', 'hk-115');

Update booking_details
Set ticket_no=05
Where booking_id='1241';

Update booking_details
Set ticket_no=12
Where booking_id='1254';

Update booking_details
Set ticket_no=25
Where booking_id='2987';

Update booking_details
Set ticket_no=73
Where booking_id='4521';

Update booking_details
Set ticket_no=47
Where booking_id='3261';

Dept. of CSE, GAT 2018-2019 13


Bus Reservation System

Insertion Of Bus
Insert into bus values ('ap11z6','10','multi-axle semi sleeper','b2','bg-111');
Insert into bus values('tn-18v7979','10','non-a/c,seater','b4','ac-112');
Insert into bus values ('tn-46d0066','15','volvo a/c multi semi sleeper','n3','ac-112');
Insert into bus values ('ka-10a2848','20','a/c sleeper','v3','hk-115');
Insert into bus values('ka-13f3211','10','non a/c,sleeper',''a1,'ab-110');
Insert into bus values ('ka-22m6523','15','non a/c,seater','c2','yh-113');
Insert into bus values ('ka-15n1210','15','non a/c,seater','a1','rn-114');

Insertion Of Booking_details
Insert into booking_details values ('1241','4-10-2018','4','ab-110','ka-13f3211');
Insert into booking_details values ('1254','3-11-2018','2','yh-113','ka-22m6523');
Insert into booking_details values ('2987','29-10-2018','7','ac-112','tn-18v7979');
Insert into booking_details values ('4521','1-10-2018','5','bg-111','ap11z6');
Insert into booking_details values ('3261','25-09-2018','8','hk-115','ka-10a2848');

Insertion Of Bus_Location
Insert into bus_location values ('bg-111','udupi','mangalore');
Insert into bus_location values ('ac-112','arakalagud','madkeri');
Insert into bus_location values ('yh-113','ramanagar','mysore');
Insert into bus_location values ('rn-114','kunigal','bangalore');
Insert into bus_location values ('hk-115','kutta','kerala');

Insertion Of Contact_no
Insert into contact_no values ('ab-110','998654789');
Insert into contact_no values ('ac-112','974024298');
Insert into contact_no values ('bg-111','914563287');
Insert into contact_no values ('hk-115','735319609');
Insert into contact_no values ('rn-114','735315608');
Insert into contact_no values ('yh-113',779535521');

Dept. of CSE, GAT 2018-2019 14


Bus Reservation System

4.7 CREATION OF TRIGGERS AT BACK END

The following trigger calculates the GST. The ticket amount when entered in the front
end table Ticket, the amount will be multiplied with 18% and then added to the
initial ticket amount. If the amount entered is less than 0, then there will be no GST
calculated.
Delimiter $$
Create Trigger Bus_Fare_Charges_Check Before Insert On Ticket
For Each Row Begin
If New.Tick_Amt_In_Rs < 0 Then
Set New.Tick_Amt_In_Rs = 0;
Elseif New.Tick_Amt_In_Rs > 0 Then
Set New.Tick_Amt_In_Rs = New.Tick_Amt_In_Rs + (New.Tick_Amt_In_Rs *0.18);
End If;
End;
$$
Delimiter;

4.8 CREATION OF STORED PROCEDURE AT BACK END

The stored procedure combines two tables Passenger and Booking_Details with the
combining key Pass_id . The resulting view would be having the Fname, Lname from
the Passenger table and Booking_id, Book_date and the Num_of_seats from
Booking_id table.

Delimiter $$
Create Procedure Proc (In Keypass_Id Varchar (20))
Begin
Select P.Fname, P.Lname, B.Booking_Id, B.Book_Date, B.Num_Of_Seats
From Passenger P ,Booking_Details B
Where P.Pass_Id= B.Pass_Id And P.Pass_Id =Keypass_Id;
End

Dept. of CSE, GAT 2018-2019 15


Bus Reservation System

$$
Call Proc ('AB-110')
$$

Dept. of CSE, GAT 2018-2019 16


Bus Reservation System

CHAPTER 5
FRONT END DESIGN
5.1 CONNECTIVITY TO DATABASE

These several methods for connecting to a MySQL database using PHP:

 MySQL Improved (mysqli) extension


 PDO (PHP Data Objects)
 Legacy MySQL (mysql_) functions
 Connecting to a remote MySQL database using PHP

Connecting to mysql using the mysql improved extension

The mysql Improved extension uses the mysqli class, which replaces the set of legacy
mysql functions.

To connect to mysql using the mysql Improved extension, follow these steps:

1 .Use the following PHP code to connect to mysql and select a database. Replace
username with your username, password with your password, and dbname with the
database name.

<?php $mysqli = new pdo('mysql:host=localhost;dbname=dbname', 'username',


'password');?>

2. After the code connects to mysql and selects the database, you can run SQL
queries and perform other operations. For example, the following PHP code runs a
SQL query that extracts the last names from the employees table, and stores the
result in the $result variable

<?php
$result = $mysqli->query("SELECT lastname FROM employees");
?>
3. Finally, we close the connection. Although this isn’t strictly speaking
necessary.PHP will automatically close the connection when the script ends
<?php//close connection

Dept. of CSE, GAT 2018-2019 17


Bus Reservation System

mysqli_close($db);

5.2 FRONT END CODE

Systems design is the process of defining the architecture, components,


modules, interfaces, and data for a system to satisfy specified requirements. Systems
design could see it as the application of systems theory to product development. There
is some overlap with the disciplines of systems analysis, systems architecture and
systems engineering. If the broader topic of product development "blends the
perspective of marketing, design, and manufacturing into a single approach to product
development," then design is the act of taking the marketing information and creating
the design of the product to be manufactured. Systems design is therefore the process
of defining and developing systems to satisfy specified requirements of the user.

Until the 1990s systems design had a crucial and respected role in the data
processing industry. In the 1990s standardization of hardware and software resulted in
the ability to build modular systems. The increasing importance of software running
on generic platforms has enhanced the discipline of software engineering.

Object-oriented analysis and design methods are becoming the most widely
used methods for computer systems design.[citation needed] The UML has become
the standard language in object-oriented analysis and design.[citation needed] It is
widely used for modeling software systems and is increasingly used for high
designing non-software systems and organizations.[citation needed]

System design is one of the most important phases of software development


process. The purpose of the design is to plan the solution of a problem specified by
the requirement documentation. In other words the first step in the solution to the
problem is the design of the project.

Dept. of CSE, GAT 2018-2019 18


Bus Reservation System

CREATING FRONT END PAGE TO LINK ALL TABLES:


<html>

<head>

<title>bus reservation database</title>


<Style>

Body {

Background-Image:Url("Https://Relaunch.Jedox.Com/Wp-
Content/Uploads/2017/01/Header-Background-Slider-1_Compressed.Jpg");

Background-Repeat: No-Repeat;

Background-Size: 100% 100% }


</Style>

<Body>

<Center><Font Face="Monotype Corsiva" Color="Crimson" Size=20>Fill The


Form With
Appropriate Details</Font></H1><Br><Br>

</Center><Font Face="Times New Roman" Size=5 Color="Black">

<Form Action="Cvalue.Php" Method="Post">

Pass_Id:<Input Type="Text" Name="T1"/><Br><Br>

First-Name:<Input Type="Text" Name="T2"/><Br><Br>

Last-Name:<Input Type="Text" Name="T3"/><Br><Br>

Phone:<Input Type="Int" Name="T4"/><Br><Br>

Address:<Input Type="Text" Name="T5"/><Br><Br>

Gender:<Input Type="Text" Name="T6"/><Br><Br>

Email_Id:<Input Type="Text" Name="T7"/><Br><Br>

<Input Type="Submit" Name="Submit"/><Br></Font>

<Input Type = "Button" Value= "Back" Onclick= "History.Back()">

Dept. of CSE, GAT 2018-2019 19


Bus Reservation System

</Form>

</Body>

</Html>

CONNECTIVITY TO BACK END FROM FRONT END TO INSERT USING


PHP
<html>
<body>

<?php

$servername = "localhost";

$username = "root";

$password = "";

$dbname = "br";

// create connection

$conn = new mysqli($servername, $username, $password, $dbname);

// check connection

if ($conn->connect_error) {

die("connection failed: " . $conn->connect_error);

$pass_id=$_post["t1"];

$fname=$_post["t2"];

$lname=$_post["t3"];

$phone=$_post["t4"];

$address=$_post["t5"];

$gender=$_post["t6"];

$email_id=$_post["t7"];
$sql = "insert into passenger (pass_id,fname,lname,phone,address,gender,email_id)
Dept. of CSE, GAT 2018-2019 20
Bus Reservation System

values ('$pass_id','$fname','$lname','$phone','$address','$gender','$email_id')";

if ($conn->query($sql) === true) {

echo "new record created successfully";


} else {

echo "error: " . $sql . "<br>" . $conn->error;

}
$conn->close();
?>

<form action="proj.html" method="post">

<input type="submit"/>

</body>

</html>

DELETION FROM FRONT END:


<Html>

<Head>

<Title>Delete Page</Title>

<Style>

Body {

Background-Image:Url("Https://Relaunch.Jedox.Com/Wp-
Content/Uploads/2017/01/Header-Background-Slider-1_Compressed.Jpg");

Background-Repeat: No-Repeat;

Background-Size: 100% 100% }

</Style>

<Body>

<Center><Font Face="Monotype Corsiva" Color="Crimson" Size=20>Enter The


Record To
Be Deleted</Font></H1><Br><Br>

Dept. of CSE, GAT 2018-2019 21


Bus Reservation System

</Center><Font Face="Times New Roman" Size=5 Color="Black">

<Form Action="Cdelete.Php" Method="Post">

Pass_Id:<Input Type="Text" Name="T1"><Br><Br>

<Input Type="Submit" Name="Submit"/><Br></Font>

<Input Type = "Button" Value= "Back" Onclick= "History.Back()">

</Form>
</Body>

</Html>

CONNECTIVITY TO BACK END FROM FRONT END TO DELETE USING


PHP
<Html>

<Body>

<?Php

$Servername = "Localhost";

$Username = "Root";

$Password = "";

$Dbname = "Br";

// Create Connection

$Conn = New Mysqli($Servername, $Username, $Password, $Dbname);

// Check Connection

If ($Conn->Connect_Error) {

Die("Connection Failed: " . $Conn->Connect_Error); }

$Pass_Id=$_POST["T1"];
// Sql To Delete A Record
$Sql = "DELETE FROM PASSENGER WHERE PASS_ID='$Pass_Id'";

If ($Conn->Query($Sql) === TRUE) {

Dept. of CSE, GAT 2018-2019 22


Bus Reservation System

Echo "Record Deleted Successfully";


} Else {

Echo "Error Deleting Record: " . $Conn->Error;

$Conn->Close();

?>

<Form Action="Proj.Html" Method="POST">

<Input Type="SUBMIT"/>

</Body>

</Html>

SEARCH FROM FRONT END:


<Html>

<Head>

<Title>Search Page</Title>

<Style>

Body {

Background-Image:Url("Https://Relaunch.Jedox.Com/Wp-
Content/Uploads/2017/01/Header-Background-Slider-1_Compressed.Jpg");

Background-Repeat: No-Repeat;

Background-Size: 100% 100% }

</Style>

</Head>

<Body>

<Center><Font Face="Monotype Corsiva" Color="Crimson" Size=20>To Retrive


A Customer Detail</Font></H1><Br><Br>
Dept. of CSE, GAT 2018-2019 23
Bus Reservation System

<Form Action="Csearch.Php" Method="Post">

<Br>

<Br>

<Font Face="Times New Roman" Size=5 Color="Black">Enter The Customer_Id


To
Search<Br><Br>

<Br>

Customer_Id:<Input Type="Text" Name="T1">


<Br><Br><Br></Font>

<Input Type="Submit" Name="Submit">

<Input Type = "Button" Value= "Back" Onclick= "History.Back()">

<Br>

<Br>

<Br>

<Br>

<Br>

<Br>

</Form>

</Body>

</Html>

Dept. of CSE, GAT 2018-2019 24


Bus Reservation System

5.3 CONNECTIVITY TO DATABASE


<?Php
$Servername = "Localhost";
$Username = "Root";
$Password = "";
$Dbname = "Br";
// Create Connection
$Conn = New Mysqli($Servername, $Username, $Password, $Dbname); // Check
Connection
If ($Conn->Connect_Error) {
Die("Connection Failed: " . $Conn->Connect_Error);
}

Dept. of CSE, GAT 2018-2019 25


Bus Reservation System

CHAPTER 6
TESTING
This chapter gives the outline of all testing methods that are carried out to get
a bug free system. Quality can be achieved by testing the product using different
techniques at different phases of the project development. The purpose of testing is to
discover errors. Testing is the process of trying to discover every conceivable fault or
weakness in a work product. It provides a way to check the functionality of
components sub assemblies and/or a finished product. It is the process of exercising
software with the intent of ensuring that the Software system meets its requirements
and user expectations and does not fail in an unacceptable manner. There are various
types of test. Each test type addresses a specific testing requirement.

6.1 TESTING PROCESS

Testing is an integral part of software development. Testing process certifies


whether the product that is developed compiles with the standards that it was designed
to. Testing process involves building of test cases against which the product has to be
tested.

6.2 TESTING OBJECTIVES

The main objectives of testing process are as follows.


 Testing is a process of executing a program with the intent of finding
an error.
 A good test case is one that has high probability of finding
undiscovered error.
 A successful test is one that uncovers the undiscovered error.

Dept. of CSE, GAT 2018-2019 26


Bus Reservation System

6.3 TEST CASES


The test cases provided here test the most important features of the project.

6.3.1 Test cases for the project


Table 6.1 Test Case

Sl No Test Input Expected Results Observed Results Remarks

1 Insert a Record New tuple should be Ouery OK 1 row PASS


inserted affected or inserted
2 Search a Record Display the Record Requried Record TRUE
Displayed
3 Search a Record Display the Record No Record Found FAIL

4 Delete a Record Delete the Record Ouery OK 1 row PASS


affected or Record
Deleted
5 Create trigger Trigger Created Ouery OK Trigger PASS
created
6 Create Stored Store Prodecures Ouery OK 1 Stored PASS
Procedure Created Procedures Created

Dept. of CSE, GAT 2018-2019 27


Bus Reservation System

CHAPTER 7
RESULTS
This section describes the output of the “BUS RESERVATION DATABASE”.
The snapshots are shown below for each module.

7.1 SNAPSHOTS
Displaying the creation of tables at the back end using my sql console in wamp
server.

Figure 7.1: Creation Of Tables

Dept. of CSE, GAT 2018-2019 28


Bus Reservation System

Displaying the insertion of tables at the back end using my sql console in wamp
server.

Fig 7.2: Insertion Of Tables

Displaying triggers at the back end using my sql console in wamp server.

Fig 7.3: Display Of Trigger

Dept. of CSE, GAT 2018-2019 29


Bus Reservation System

Displaying stored procedures at the back end using my sql console in wamp server.

Fig 7.4: Display Of Stored Procedure

Displaying the bus reservation database from the front end using my sql console in
wamp

Fig 7.5: Front End

Dept. of CSE, GAT 2018-2019 30


Bus Reservation System

Displaying front end table layout using my sql console in wamp server

Fig 7.6: Front End Table Layout

Displaying insert layout from front end using my sql console in wamp server

Fig 7.7: Front End Insert layout

Dept. of CSE, GAT 2018-2019 31


Bus Reservation System

Displaying search layout from front end using my sql console in wamp server

Fig 7.8: Front End Search Layout

Displaying the delete layout from front end using my sql console in wamp server

Fig 7.9: Front End Delete Layout

Dept. of CSE, GAT 2018-2019 32


Bus Reservation System

CONCLUSION
The main objective of proposed system is to provide for a quick and efficient
retrieval of information. Any type of information would be available whenever
the user requires. The system should be easy to operate also.To work gets
easier,when he/she can use a database on a computer, rather than managing all
the details on paper.The model can be made more customized based on
requirement. The database structure is quite simple, which makes it easy for also
other programmers to understand it.
During my database management course I have learned about the basics of
database design.This project gave me the opportunity to try our new skills in
practice.While doing this project I also gained deeper understanding on database
design and how it can be implemented in real life situations. I believe we can use
our database designing skills also in other projects.
In conclusion, a database is a far more efficient mechanism to store and organize
data than spreadsheets it allows for a centralized facility that can easily be
modified and quickly shared among multiple users. It also allows the possibility
of queries to obtain information for various surveys. Due to the number of users
reading and modifying the data in the database, it is an ideal use for such a
system

Dept. of CSE, GAT 2018-2019 33


Bus Reservation System

REFERENCES
[1] Elmasri, Ramez. Fundamentals of database systems. Pearson Education
India, 2008.
[2] Greken T and Ratschiller T, 2000.Web applications development with
PHP.Now riders publishing,2000.
[3] Ware B, open source development with LAMP using linux, Apache,My
SQL,And PHP Addison-wesley Longman publishing Co-,Inc.,2002
[4] Welling L and Laura Thomson PHP and My SQL web development Same
publishing,2003

Dept. of CSE, GAT 2018-2019 34

You might also like