0% found this document useful (0 votes)
12 views

Lab-Report

Uploaded by

Rashadur Rahaman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Lab-Report

Uploaded by

Rashadur Rahaman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Department of Computer Science & Engineering(CSE)

Lab Report
Course Information
Course Title: Database System Lab
Course Code: CSE-3102

Submitted To
Tanveer Hasan
Lecturer at Bangladesh University

Submitted By
Student Name: Fardin Ahmed Shawon
ID: 202231064039 Batch: 64 Section: A

Student Name: Mohammad Likhon


ID: 202231064045 Batch: 64 Section: A

Student Name: Mehedi Hasan


ID: 202231064017 Batch: 64 Section: A

Student Name: Md Riaz


ID: 202231064079 Batch: 64 Section: A

Student Name: MD. Rafiul Awal


ID: 202231064029 Batch: 64 Section: A
Title: E-ticketing Web Application With PHP &
MySQL
Introduction:

This lab report describes the design and development of an e-ticketing web
application. The application facilitates online bus ticket booking for users and
provides a robust management system for administrators. This report elaborates
on the system's features, backend SQL functionalities, and database structure.

Language Used: HTML, CSS, JavaScript, PHP & MySQL

Features Description:

User Features:

1. User Registration: Users can create an account by providing their


National ID (NID), name, mobile number, email, and password.
2. User Authentication: Login and logout mechanisms ensure secure
access.
3. User Information & Password Update: Users can update their profile and
reset their password.
4. Journey Search: Users can search for buses based on journey dates and
destinations.
5. Seat Selection: Users can select their preferred seats when booking a
ticket.
6. Booking History: Users can view and print their ticket booking history.
7. Feedback Submission: Users can send messages or feedback to
administrators.

Admin Features:

1. Admin Authentication: Secure login and logout for administrators.


2. Admin Dashboard: A central hub for managing the system.
3. Bus Information Management: Add, update, or delete bus information.
4. User Monitoring: View user details and manage their accounts.
5. Feedback Monitoring: Review user messages and feedback.
6. Booking History Management: Monitor all bookings, including user and
seat details.
7. Cancel Booking: Cancel any ticket booking if required.
Backend SQL and Description:

Database Operations:

1. Create Table: Utilized 5 times to define the database schema.


2. Insert: Used 4 times to add user, admin, bus, and booking details.
3. Read: Executed 10 times to retrieve information dynamically.
4. Update: Performed 3 times to modify existing records.
5. Delete: Used 3 times to remove unwanted data.
6. SQL Join (Self Join): Implemented 2 times for data retrieval across related
tables.

SQL JOIN Examples:

1. Query to Retrieve Booking Details:

SELECT
user_info.name,
user_info.nid,
user_info.mobile,
bus_info.operator,
bus_info.regNum,
bus_info.jFrom,
bus_info.jTo,
purchase_history.journey_date,
purchase_history.price,
purchase_history.seat_no,
purchase_history.purchase_id
FROM
user_info
JOIN
purchase_history ON purchase_history.nid = user_info.nid
JOIN
bus_info ON purchase_history.regNum = bus_info.regNum;

2. Query to Fetch User-specific Bookings:

SELECT

purchase_history.regNum,

purchase_history.journey_date,
purchase_history.price,

purchase_history.seat_no,

bus_info.operator,

bus_info.model,

bus_info.class,

bus_info.bType,

bus_info.coachNo,

bus_info.jFrom,

bus_info.jTo,

bus_info.depTime,

bus_info.arrTime

FROM

purchase_history

JOIN

bus_info ON purchase_history.regNum = bus_info.regNum

WHERE

nid='$nid';

ER Diagram of Database:

The database structure consists of five primary tables, each connected


through relationships:

1. user_info: Stores user details including NID, name, mobile, email, and
password.
2. admin_info: Maintains administrator credentials and contact details.
3. bus_info: Contains bus details such as operator, model, class, coach
number, journey route, and price.
4. purchase_history: Logs ticket purchases with journey and seat details.
5. user_feedback: Records user feedback and messages.
Diagram Description:

● Primary Keys: Each table has unique identifiers such as nid in


user_info and purchase_id in purchase_history.
● Relationships:
○ user_info.nid connects with purchase_history.nid.
○ bus_info.regNum connects with purchase_history.regNum.

Diagram:
Conclusion:

This e-ticketing application provides a comprehensive solution for managing


bus ticket bookings. With a user-friendly interface and robust backend, the
system ensures seamless operations for both users and administrators. The use
of PHP and MySQL ensures dynamic functionality and efficient database
management, making it a scalable solution for online ticket booking systems.

You might also like