0% found this document useful (0 votes)
15 views24 pages

Airline Management System

The document outlines a project report on an Airline Management System developed using Python and MySQL, detailing its functionalities such as user registration, flight management, and ticket booking. It includes acknowledgments, problem analysis, software and hardware requirements, and future enhancement suggestions. The system aims to automate operations, improve efficiency, and enhance user experience in airline management.

Uploaded by

leo.nardo98354
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views24 pages

Airline Management System

The document outlines a project report on an Airline Management System developed using Python and MySQL, detailing its functionalities such as user registration, flight management, and ticket booking. It includes acknowledgments, problem analysis, software and hardware requirements, and future enhancement suggestions. The system aims to automate operations, improve efficiency, and enhance user experience in airline management.

Uploaded by

leo.nardo98354
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Airlines Management

• Developed By:
Roll No:
1.Roushan Kumar Sinha.
22719020
2.Divyansh Krishn.
22719004
Project Report of Informatics Practices
On
Airline Management
System

By :
Aditya Prakash
Roll No.: 22718992

Under Guidance of :
Mr. Tej Pradhan
ACKNOWLEDGEME
NT
First and foremost I praise and thank
almighty from the depth of my heart, which
has been the source of strength in the
completion of my project. I extend my sincere
thanks to

Principal Miss Paramjit Kaur, for his co-

ordination in
extending every possible support for the
completion of
Mr. Tej
forthis project.
guiding meI immensely
would like to express
through a deep
the course
of the
Pradhan
sense of
thanks
project.&He
gratitude
always to my teacher
evinced in charge
keen interest in
my work. I
also thank my Parents for their motivation &
support.
I must thank my classmates for their timely
help
support for completion of this project. Last but
not
least, I would like to thank all those who had
helped
CERTIFICATE

This is to certify

that
Aditya
of class XII Praksh
‘A’ of Sarala Birla Public

School
successfully completedhasthe Information
Practices

project entitled
“Airline management System”

as prescribed by CBSE in the year 2024-

25

__________________ _________________
Signature of Signature of
_
the Internal the external

Examiner Examiner
INDEX

S.N CONTENTS Problem Definition PAGE

O1. Problem Analysis Software and

2. Hardware Requirements Scope

3. for Future Enhancement Source

4. Code Output Bibliography

5.

6.

7.
Problem
Definition
Definition and Working of Functions
The Airline Management System is a Python-based application
integrated with a MySQL database. It facilitates user
registration, login, flight management (admin), and ticket
booking/cancellation (users). Below are the core functions and
their functionalities:
1. Database Connection
Establishes a connection to the MySQL database
(connect_db)
airline_management.
2. User Registration
Allows new users (admin or regular) to register by providing
(register_user)
a username,

password, and role. Ensures unique usernames using

3. database
User Login
constraints.
Authenticates users based on their credentials and returns
(login)
their role

(admin/user).
4. Add Flight
Admins can add new flights with details such as
(add_flight)
name, source,

destination, departure time, and seats available.


5. View Flights
Displays all flight details, including flight ID, name, source,
(view_flights)
destination,

departure time, and available seats.


6. Book Ticket
(book_ticket)
Users can book tickets by selecting a flight. This updates
the bookings table and decreases the seats_available in the
flights table.
7. Cancel Ticket
Users can cancel previously booked tickets. This removes the
(cancel_ticket)
record from

the bookings table and updates the seat availability for the
corresponding flight.
8. Main Menu
Manages the flow of the program by providing options for
(main)
registration,

login, and role-based menus for admins and users.


Problem
Analysis
• Current

Challenges:
1. Manual management of flight schedules and
consuming and error-
bookings
prone. is time-
2. Lack of centralized and secure storage for user and

flight data. 3. Difficulties in tracking seat availability in

• Proposed Solution: The system automates key operations


real-time.

such as user
authentication, flight management, and ticket handling. It
provides

real-time data access and updates, improving efficiency

and accuracy.
Software and Hardware
Requirements
Hardware

• Processor: Intel Core i3 or equivalent


Requirements

(minimum)
• RAM: 4GB (minimum) • Storage: 50MB for program and

database • Operating System: Windows/Linux/MacOS with

Python and MySQL


installe
d
Software

• Python 3.8 or
Requirements

• MySQL
above Server 8.0 or

• Libraries: mysql-connector-python Text


above

• Editor or IDE (e.g., VSCode, PyCharm,

Spyder)
Scope of Future
Enhancements
1.Enhanced User

Roleso Introduce additional user roles, such as "Guest"


view flight details without registration or
users, who can
login.
o Benefit: Simplifies access for potential customers and
them to explore services before committing, thereby
encourages
improving

user engagement and potential bookings.


2. Payment

o Incorporate a secure online payment gateway to allow


Integration
pay for tickets directly through the
users to
system.
o Benefit: Streamlines the booking process, reduces
manual payment handling, and improves customer
thesatisfaction
need for

with a seamless experience.


3. Advanced Flight Search

FiltersoAdd functionality for users to search flights using specific

criteria
such as source, destination, departure time, or price
range.
relevant flights, enhancing the overall user
experience.
o Benefit: Saves time for users by allowing them to
4. Real-Time Flight
quickly find
Updates
o Integrate APIs from airline systems to provide live
updates
flight schedules,
on delays, or
cancellations.
o Benefit: Ensures passengers receive accurate
information, reducing confusion and improving trust in
and timely
the system.
5. Graphical User Interface

(GUI)o Develop a user-friendly GUI using frameworks like PyQt,


or web-based technologies (e.g., Flask/Django). The
Tkinter,
interface could

include dropdowns for selection, calendars for date

picking,Aand
o Benefit: GUI makes the system more accessible to
interactive dashboards for admins.
limited technical knowledge, increasing adoption and
users with
satisfaction.
6. Mobile

Application
o Extend the system's reach by developing a mobile
compatible with Android and iOS
application
platforms.
o Benefit: Provides flexibility to users who prefer
bookings on the go, increasing convenience and
managing their
engagement.
7. Data Analytics and

Reporting
o Implement tools to analyze booking trends, user
peak travel
preferences,
times. and
o Benefit: Enables admins to make data-driven
adding more flights during high-demand periods
decisions, such as
or tailoring

promotions to user behavior.


8. Multilingual

Support
o Add support for multiple languages to cater to a
base
diverse
. user
o Benefit: Increases usability for non-English speakers,
the system’s reach and
broadening
inclusivity.
9. Email and SMS

Notifications
o Send automated email and SMS notifications for
confirmations, flight reminders, or
booking
cancellations.
o Benefit: Keeps passengers informed and engaged,
communication and user
enhancing
satisfaction.

How These Features Enhance


Airline
Management
• Streamlining Operations: Features like real-time updates,
advanced
search filters, and secure payment integration reduce
manual workload and ensure operational efficiency.
• Improving Customer Experience: A GUI, multilingual
notifications
support, and provide a personalized and user-friendly
experience.

Boosting Revenue: Analytics and reporting help identify

trends, enabling
targeted promotions and optimizing resource allocation.
• Increasing Accessibility: A mobile app and enhanced user
roles make the system accessible to a broader audience,
encouraging more users to utilize the service.

• Promoting Reliability: Real-time updates and a secure

payment gateway
build trust among users, leading to higher satisfaction and
repeat

business.
Source
Python Code
code
import

mysql.connector
# Database

Connection
return
def connect_db():
host="localhost",
mysql.connector.connect(
user="root", # Replace with your MySQL

username
password="12345", # Replace with your MySQL
) password

database="airline_management"
# User

Registration
def
conn = connect_db()
register_user():
cursor = conn.cursor()

username = input("Enter username: ")


password = input("Enter password: ")

role = input("Enter role (admin/user):

").lower()
if print("Invalid
role not in ("admin", "user"):
role! Please choose 'admin'

or 'user'.")
tryreturn

:
cursor.execute("INSERT INTO users (username, password, role) VALUES (%s,
%s, %s)", (username,
password,
role))
conn.commit()
print(f"{role.capitalize()} registered
successfully!")
except
print("Username already
mysql.connector.IntegrityError:
exists.")
finally
conn.clos
:
e()

# User

Login
conn = connect_db()
def
cursor = conn.cursor()
login():

username = input("Enter username: ")


password = input("Enter password: ")

cursor.execute("SELECT role FROM users WHERE username = %s AND password


password
))
= %s", (username,
result =

cursor.fetchone()
conn.close()
return result[0],
if result:
username
else
print("Invalid
:
credentials.")

return None, None

# Admin: Add

Flight
conn
def =
add_flight():

connect_db()
cursor =
conn.cursor()
flight_name = input("Enter flight

name:
source
") = input("Enter source: ") destination = input("Enter destination:

") departure_time = input("Enter departure time (YYYY-MM-DD

HH:MM:SS): ") seats_available = int(input("Enter number of seats

available: ")) cursor.execute("INSERT INTO flights (flight_name, source,

destination, departure_time,
seats_available) VALUES (%s, %s, %s,
%s, %s)",
(flight_name, source, destination, departure_time,
conn.commit()
seats_available))
print("Flight added

successfully!")
conn.close()
# View All

Flights
conn = connect_db()
def
cursor = conn.cursor()
view_flights():

cursor.execute("SELECT * FROM

flights")
forprint(f"ID: {flight[0]}, flight_name: {flight[1]}, source: {flight[2]},
flight in cursor.fetchall():
departure_time:
{flight[5]}") {flight[4]}, seats_available:
destination: {flight[3]},
conn.clos

e()
# User: Book Ticket
def
book_ticket(username)
conn = connect_db()
:
cursor = conn.cursor()

cursor.execute("SELECT user_id FROM users WHERE username =

%s", (username,))
user_id = cursor.fetchone()[0]

view_flights()
flight_id = int(input("Enter Flight ID to book: ")) cursor.execute("SELECT

seats_available FROM flights WHERE flight_id = %s", (flight_id,)) seats

= cursor.fetchone() if seats and seats[0] > 0:

cursor.execute("INSERT INTO bookings (user_id, flight_id) VALUES (%s, %s)",

(user_id, flight_id)) cursor.execute("UPDATE flights SET seats_available =


(flight_id,
)) seats_available - 1 WHERE flight_id = %s",
conn.commit()
print("Ticket booked
successfully!")
else
print("No seats available for this
:
flight.")
conn.clos

e()
# User: Cancel Ticket
def
cancel_ticket(username
conn = connect_db()
):
cursor = conn.cursor()

cursor.execute("SELECT user_id FROM users WHERE username = %s",

(username,))
user_id = cursor.fetchone()[0]
flights f ON b.flight_id = f.flight_id WHERE b.user_id =
%s", (user_id,))
cursor.execute("SELECT b.booking_id, f.flight_name, f.source, f.destination
bookings =
FROM bookings b JOIN
cursor.fetchall()
if for
bookings:
booking in
print(f"Booking ID: {booking[0]}, Flight: {booking[1]}, From:
bookings:
{booking[2]}, To: {booking[3]}")
booking_id = int(input("Enter Booking ID to cancel: "))
cursor.execute("DELETE FROM bookings WHERE booking_id = %s AND user_id =
user_id
%s", (booking_id,
))
cursor.execute("UPDATE flights f JOIN bookings b ON f.flight_id = b.flight_id SET
f.seats_available
(booking_id,)) + 1 WHERE b.booking_id = %s",
f.seats_available =
conn.commit() print("Booking

cancelled successfully!")

else

: print("No bookings

found.")
conn.clos

e()

# Main

Menu
def main():
while
print("\n--- Airline Management
True:
System ---")

print("1. Register")
print("2. Login")

print("3. Exit")
choice = input("Enter choice: ")

if register_use
choice == "1":
r()
elif choice ==
role, username =
"2":
login()

if while
role == "admin":
True:
print("\n--- Admin Menu ---")
print("1. Add Flight")

print("2. View Flights")


print("3. Logout")

admin_choice = input("Enter

choice: ")
if add_flight
admin_choice == "1":
elif admin_choice
()
== "2":
view_flight

s()
elif admin_choice

brea
== "3":

k ==
elif role

while
"user":

True:
print("\n--- User Menu ---")

print("1. Book Ticket")

print("2. Cancel Ticket")

print("3. View Flights")

print("4. Logout") user_choice

= input("Enter choice: ") if

user_choice == "1":

book_ticket(userna

elif
me)user_choice ==

cancel_ticket(userna
"2":

me)
elif user_choice ==

view_flight
"3":

s()user_choice ==
elif

brea
"4":

k ==
elif choice

print("Exiting system.
"3":

Goodbye!") break

if __name__ ==
main(
"__main__":
)
Mysql
code
-- Create Database
CREATE DATABASE

airline_management;

-- Use the
USE
Database
airline_management;

-- Create Users
Table TABLE
CREATE

users
user_id
( INT AUTO_INCREMENT

PRIMARY KEY, username

VARCHAR(50) UNIQUE NOT NULL,

password VARCHAR(50) NOT NULL,

); role ENUM('admin', 'user') NOT NULL

-- Insert Initial Admin and User


Credentials
INSERT INTO users (username, password,

role) VALUES ('admin', 'admin123', 'admin'),

('user1', 'user123', 'user');

-- Create Flights
Table TABLE
CREATE

flights ( INT AUTO_INCREMENT


flight_id

PRIMARY KEY, flight_name

VARCHAR(50) NOT NULL, source

VARCHAR(50) NOT NULL,


destination VARCHAR(50) NOT

NULL, departure_time

DATETIME NOT NULL,

); seats_available INT NOT NULL

-- Create Bookings
Table TABLE
CREATE

bookings ( INT AUTO_INCREMENT PRIMARY


booking_id

KEY, user_id INT NOT NULL, flight_id INT NOT

NULL, booking_date DATETIME DEFAULT

CURRENT_TIMESTAMP, FOREIGN KEY (user_id)

REFERENCES users(user_id), FOREIGN KEY

(flight_id) REFERENCES flights(flight_id)

);
Outpu
t
SQL
tables
Bibliography

• NCERT Informatics Practices Class

12
• Informatic Practices Sumita Arora Class
12

You might also like