Airline Management
Airline Management
My sincere thanks goes to our principal sir Mr. P Varadarajan for his
coordination in extending every possible support in the completion of
this project.
Last but not the least I would like to thank all those who directly or
indirectly helped me towards the completion of this project.
Index
Introduction to Python
Introduction to MySQL
Flight Information
Database Design
Hardware and Software Requirement
Source Code
Output
Bilibography
Python Overview
Easy :- Python is a very easy to learn and understand; using this python
tutorial, any beginner can understand the basics of python.
Interpreted :- It is interpreted (executed) line by line. This makes it easy to
test and debug.
Object Oriented :- The python programming language supports classes
and objects.
Free and Open-Source :- The language and it‟s source code are available
to the public for free; there is no need to buy a costly license.
Portable :- Since it is open source, we can run python on windows, mac,
linux, or any other platforms. Our programs will work without needing to
the changed for every machine.
GUI (Graphical User Interface) programming :- We can use it to develop a
GUI (Graphical User Interface). One way to do this is through „Tkinter‟.
Large Library :- Python provides us with a large standard library. We can
use it to implement a variety of functions without needing to reinvent the
wheel every time. Just pick the code we need and continue. This lets us to
focus on other important tasks.
Advantages of Python
Portable
Free & Open-Source
Readable
Embeddable
Improved Productivity
Simple and Easy
Object Oriented
Interpreted
Extensive Libraries
Extensible
About MySql
NEED OF FMS
Tables_in_Airline_Management
Class_Details
Flight_Details
Food_Items
Customer_Details
Software - Python
- MySQL
- Python Connector
Source Code
import mysql.connector
obj=mysql.connector.connect(host="localhost",user="root",passwd="root",charse
t="utf8")
mycursor=obj.cursor()
mycursor.execute("Use Airline_Management")
obj.commit()
def luggage():
if x==1:
elif x==2:
else:
print(" **************** PLEASE ENTER A VALID OPTION
**************************** ")
food()
obj.commit()
def food():
if x==1:
elif x==2:
elif x==3:
else:
food()
obj.commit()
def classtype():
if x==1:
def fooditems():
print(" ")
print(" ")
print(" ")
print(" ")
mycursor.execute("select * from food_items")
x=mycursor.fetchall()
for i in x:
print("_________________________________________________________
_________________________________")
def admin1():
while True:
if x==1:
print("1. classtype")
print("2. food")
print("3. luggage")
if x1==1:
classtype()
elif x1==2:
food()
elif x1==3:
luggage()
else:
admin1()
elif x==2:
print("1. classtype")
print("2. food")
print("3. luggage")
print("4. records")
if y==1:
else:
z=mycursor.fetchall()
for i in z:
print(i)
break
def admin():
while True:
if sec=="admin":
admin1()
else:
admin()
break
def record():
d=mycursor.fetchall()
print("name: ",d[1])
print("mobile number: ",d[2])
print("flight name",d[4])
print("classtype: ",d[5])
print("departure place",d[6])
print("destination",d[7])
def ticketbooking():
if cmob==0000000000:
ticketbooking()
obj.commit()
def flightavailable():
print(" ")
print(" ")
print(" ")
print(" ")
x=mycursor.fetchall()
for i in x:
print(" ")
print("___________________________________________________________
_______________________________")
def user():
while True:
print("4. my details")
print("5. exit")
if x==1:
flightavailable()
elif x==2:
fooditems()
elif x==3:
ticketbooking()
elif x==4:
records()
else:
break
def menu1():
print("1. admin")
print("2. user")
print("3. exit")
while True:
if x==1:
admin()
elif x==2:
user()
else:
menu1()
break
print("****************** WELCOME TO PARGS AIRLINES
**********************")
menu1()
Output
BILIBOGRAPHY
www.google.com
https://www.python.org/doc/essays/blurb/
https://dev.mysql.com/doc/refman/8.4/en/what-is-
mysql.html