You are on page 1of 14

A

Micro-Project
on

Bus reservation system


Submitted To
MSBTE
In Partial Fulfilment of Requirement of Diploma
Of Computer Engineering
Under I Scheme
Submitted By

Mr. Manav Satish Pawar

Mr. Govind Vilas Shetye

Mr. Vaishnav Subhash Kasar

Under the Guidance Of

Mr. P.D. Kate


FOR ACADEMIC YEAR 2023-2024
YASHWANTRAO BHONSLE INSTITUTE OF TECHNOLOGY,
SAWANTWADI.
MAHARASHTRA STATE
BOARD OF TECHNICAL
EDUCATION
CERTIFICATE
This is to certify that,
Mr. Manav Satish Pawar Roll No.26
Mr. Govind Vilas Shetye Roll No.29
Mr. Vaishnav Subhash Kasar Roll No.31
Of Third semester of diploma in COMPUTER ENGINEERING of institute
Yashwantrao Bhonsale institute of technology (1742) has completed the Micro
Project satisfactorily in subject Database Management System (22319) for the
academic year 2023 to 2024 as prescribed in the curriculum.

SUBJECT TEACHER HOD PRINCIPAL

Seal of
Institute
INDEX
Sr. Contains Page.
No. No.

1. Abstract 4

2. Introduction 5

3. Project Explanation 6

4. Project Requirements 7

ER diagram of bus reservations system


5. 8
PHP MySQL Bus Reservation
6. System 9

7. Conclusion 13

8. References 14
Abstract:-

A bus reservation system is a comprehensive software platform thatstreamlines


the process of booking bus tickets, offering passengers a user-friendly interface
to search for routes, choose seats, calculate fares, and make secure online
payments, with features such as real- time availability updates and cancellation
options. For bus operators,the system provides tools to manage schedules, fleet,
pricing, and real-time tracking, offering data analytics for decision-making,
administrative controls, and integration with GPS systems, ultimately enhancing
efficiency, improving passenger experiences, and optimizing the bus
transportation industry. Additionally, these systems often incorporate features
like reporting and analytics, which help operators analyze historical data on
passenger preferences, booking trends, and route performance, enabling them
to fine-tune their services and pricing strategies. Furthermore, customer
support options such as live chat, email, and phone assistance, and integration
with external systems, including travel agencies and third- party booking
platforms, make the bus reservation system a holistic solution for the industry,
driving convenience for passengers and operational efficiency for bus
companies.
Introduction:-

A bus reservation system operates using a Database Management System


(DBMS) to efficiently manage and organize the vast amount of data involved in
the booking and management of bus services. The DBMS acts as the backbone
of the system, storing and retrieving information seamlessly. When a passenger
interacts with the system, whether through a website or a mobile app, their
requests trigger a series of database operations. These typically include
searching for available routes, retrieving bus schedules, and checking seat
availability.

The DBMS stores information on routes, schedules, seat layouts, and passenger
data. When a booking is made, the system updates the database to reflect the
reserved seats and the passenger's details. Moreover, the DBMS handles
payment processing securely, ensuring that financial data is stored and managed
in compliance with industry standards. It also enables real-time tracking of bus
locations and performance monitoring, as it stores and updates the bus's GPS
data. Data analytics tools integrated into the DBMS analyze historical booking
data to provide insights into passenger preferences and booking trends. Overall,
a well-designed DBMS is integral to the functionality of a bus reservation system,
ensuring data accuracy, security, and efficient
operations.
Project Explanation:-

Our project involves developing a basic bus reservation system that enables
passengers to search for routes, check schedules, book seats, and make
payments, with a Database Management System (DBMS) managing data
storage and retrieval. The system will feature a user-friendly interface for
entering journey details, interactive seat selection, fare calculation, and secure
payment processing. It will store route information, seat availability, booking
details, and financial transactions in the DBMS, ensuring data integrity and
security. This project offers practical experience in creating a simplified
reservation system, with potential for future expansion, and demonstrates your
ability to design and manage a database-driven application, a valuable skill in
software development and database management.
The Requirements:-

We should have knowledge of HTML, CSS, PHP and MySQL for creating the login
system. Text Editor - For writing the code. We can use any text editor such as
Notepad, Notepad++, Dreamweaver, etc.

XAMPP - XAMPP is a cross-platform software, which stands for Cross-


platform(X) Apache server (A), MySQL (M), PHP (P), Perl (P). XAMPP is a
complete software package, so, we don'tneed to install all these separately.
ER diagram of bus reservations system:-
PHP MySQL Bus Reservation System:-
1. Database Connection:

<?php
$servername = "localhost";
$username = "your_username";
$password = "your_password";
$dbname = "your_database_name";

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

// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);

}
?>
2. User Registration:

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$username = $_POST['username'];
$password = password_hash($_POST['password'], PASSWORD_BCRYPT);

$sql = "INSERT INTO users (username, password) VALUES (?, ?)";


$stmt = $conn->prepare($sql);
$stmt->bind_param("ss", $username, $password);

if ($stmt->execute()) {
echo "Registration successful.";
} else {
echo "Error: " . $stmt->error;

$stmt->close();
}

?>
3. User Login:

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$username = $_POST['username'];
$password = $_POST['password'];

$sql = "SELECT * FROM users WHERE username = ?";


$stmt = $conn->prepare($sql);
$stmt->bind_param("s", $username);

$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows == 1) {
$row = $result->fetch_assoc();
if (password_verify($password, $row['password']))
{ echo "Login successful.";
} else {
echo "Incorrect password.";

}
} else {
echo "User not found.";

$stmt->close();
}

?>
4. Bus Booking:

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$user_id = $_POST['user_id'];
$bus_id = $_POST['bus_id'];
$seat_number = $_POST['seat_number'];

// Check seat availability and other conditions before booking

$sql = "INSERT INTO bookings (user_id, bus_id, seat_number) VALUES (?, ?,


?)";
$stmt = $conn->prepare($sql);
$stmt->bind_param("iii", $user_id, $bus_id, $seat_number);

if ($stmt->execute()) {
echo "Booking successful.";
} else {
echo "Error: " . $stmt->error;

$stmt->close();
}

?>
Conclusion:-

The development and implementation of a basic bus reservation system using a


Database Management System (DBMS) have yielded significant benefits. This
project has demonstrated the effectiveness of using a well-structured database to
streamline the bus booking process, making it more convenient for passengers
and efficient for bus operators. By leveraging the power of a DBMS, we have
successfully managed and organized vast amounts of data, from routes and
schedules to seat availability and passenger information. This system not only
simplifies the booking process but also enables real-time tracking, secure
payment processing, and data analysis for informed decision-making. As this
project showcases, a DBMS is a fundamental component in modernizing the
bus transportation industry, enhancing both customer experiences and
operational efficiency.
Reference:-

https://www.scribd.com/doc/23190984/Bus-Reservation-System-in-Dbms.

https://www.academia.edu/40839070/BUS_TICKET_RESERVATION_SYSTEM.

You might also like