0% found this document useful (0 votes)
18 views32 pages

Airline Management

The document acknowledges the support received from various individuals in completing a project, particularly highlighting the contributions of the principal and project guide. It provides an overview of Python and MySQL, detailing their features, advantages, and applications in a Flight Management System. Additionally, it includes database design, source code examples, and hardware/software requirements for the project.

Uploaded by

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

Airline Management

The document acknowledges the support received from various individuals in completing a project, particularly highlighting the contributions of the principal and project guide. It provides an overview of Python and MySQL, detailing their features, advantages, and applications in a Flight Management System. Additionally, it includes database design, source code examples, and hardware/software requirements for the project.

Uploaded by

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

Acknowledgement

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.

I would like to express my deep sense of gratitude and thanks to my


project guide Ms. Roshani Ma’am for guiding me immensely
throughout the course of this project. She always evinced deep interest
in my work. Her constructive advices and constant motivation has been
the guiding force for the successful completion of this project.

I take this opportunity to thank my parents for their unconditional


support and motivation.

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

 Python is a general-purpose high-level programming language. It is an


open source language, released under a GPL-Compatible license.
 Python Software Foundation (PSF), a non-profit organization, holds the
copy-right of python.
 Guido Van Rossum conceived python in the late 1980s. It was released in
1991 at Centrum Wiskunde & Informatica (CWI) in the Netherlands as a
successor to the ABC language.
 He named this language after a popular comedy show called „Monty
Python‟s Flying Circus‟ (and not after python - the snake).
 In the last few years, it‟s popularity has increased immensely. According
to stackoverflow.com‟s recent survey, python is in the top ten most
popular technologies in 2018.
 It is also dynamically-typed because it carries out type-checking at run
time. It does so to make sure that the type of construct matches what we
except it to be.
 The distinctive feature of python is that it is an interpreted language. The
Python IDLE (Integrated Development & Learning Environment) executes
instruction one line at a time. The python programming language is one
of the richest languages.
Features of Python

 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

MySql is a fast, easy to use RDBMS (Relational Database Management


System) being used for many small and big businesses. MySql is
developed, marketed and supported by MySQL AB, which is a Swedish
Company.

MySql is becoming is so popular because of many good reasons :-

 MySql is released under an open-source language. So we have


nothing to pay to use it.
 MySql is a very powerful program in it‟s own right. It handles a large
subset of the functionality of the most expensive and powerful
database packages.
 MySql uses a standard form of the well-known SQL data language.
 MySql works on many operating system and with many languages
including PHP, PERL, C, C++, JAVA, etc.
 MySql works very quickly and works well even with large data sets.
 MySql is very friendly to PHP, the most appreciated language for web
development.
 MySql supports large databases, up to 50 million rows or more in a
table. The default file size limit for a table is 4 GB, but we can
increase this (if our operating system can handle) to a theoretical limit
of 8 millions Tera-Bytes (TB).
 MySql is customizable. The open-source GPL license allows
programmers to modify the MySql software to fit their own specific
environments.

FLIGHT MANAGEMENT SYSTEM

A flight management system (FMS) is a fundamental


component of a modern airliner's avionics. An FMS is a
specialized computer system that automates a wide variety of
in-flight tasks, reducing the workload on the flight crew to the
point that modern civilian aircraft no longer carry flight
engineers or navigators. A primary function is in-flight
management of the flight plan. Using various sensors (such as
GPS and INS often backed up by radio navigation) to determine
the aircraft's position, the FMS can guide the aircraft along the
flight plan. From the cockpit, the FMS is normally controlled
through a Control Display Unit (CDU) which incorporates a
small screen and keyboard or touch screen. The FMS sends the
flight plan for display to the Electronic Flight Instrument System
(EFIS), Navigation Display (ND), or Multifunction Display (MFD).
The FMS can be summarized as being a dual system consisting
of the Flight Management Computer (FMC), CDU and a cross
talk bus. The modern FMS was introduced on the Boeing 767,
though earlier navigation computers did exist. [1] Now, systems
similar to FMS exist on aircraft as small as the Cessna 182. In its
evolution an FMS has had many different sizes, capabilities and
controls. However certain characteristics are common to all
FMSs.

NEED OF FMS

 Minimized documentation and no duplication of records.


 Reduced paper work.
 Improved patient care
 Better Administration Control
 Faster information flow between various departments
 Faster information flow between various departments
 Effective billing of various services
 Exact stock information
DataBase

Table for Tables:


Query- Show Tables;

Tables_in_Airline_Management
Class_Details
Flight_Details
Food_Items
Customer_Details

Table to describe Class_Details Table:


Query- Desc Class_Details;

Field Type Null Key Default Extra


Class_ID Int NO PRI Null Auto_increment
Class_Type varchar(25) NO
Price int NO

Table for Class_Details:


Query- Select * from Class_Details;

Class_ID Class_Type Price


101 Economic 3000
102 Middle 6000
103 Business 10000

Table to describe Flight_Details:


Query- Desc Flight_Tables;

Field Type Null Key Default Extra


Flight_ID int NO PRI NULL auto_increment
Flight_Name varchar(30) YES NULL
Departure varchar(30) YES NULL
Destination varchar(30) YES NULL
Day varchar(30) YES NULL
F_time time YES NULL
Business int YES NULL
Middle int YES NULL
Economic int YES NULL

Table for Flight_Details:


Query- Select * from Flight_details;

Flight_ Flight_Na Depart Destinati Day F_tim Busin MIdd Econo


ID me ure on e ess le mic
2001 Vistara Vadoda Mumbai Sund 04:00: 10000 6000 3000
ra ay 00
2002 Air_India Vadoda Delhi Sund 03:50: 15000 7500 5000
ra ay 00
2003 Indigo Vadoda Bangalur Sund 06:50: 13000 8000 4000
ra u ay 00
2004 Indigo Vadoda Ahmeda Sund 12:30: 6000 3000 2500
ra bad ay 00
2005 Emirates Mumba Dubai Sund 11:30: 50000 3400 24000
i ay 00 0

Table to describe Food_Items:


Query- Desc Food_Items;

Feild Type Null Key Default Extra


SNo. int NO PRI NULL auto_increment
Food_Name varchar(30) NO
Price int NO

Table for Food_Items


Query- Select * from Food_Items;

SNo Food_Name Price


1 Water Bottle 99
2 Tea 169
3 Coffee 219
4 Chocolate Shake 329
5 Aloo Paratha 199
6 Cheese Sandwich 219

Table to describe Customer_Details:


Query- Desc Customer_Details;

Field Type Null Key Default Extra


Cus_ID int NO PRI NULL auto_increment
Cus_Nam varchar(30) YES NULL
e
Mob_No bigint(20) YES NULL
Fl_ID int YES NULL
Class varchar(30) YES NULL

Table for Customer_Details:


Query- Select* from Customer_Details;

Cus_ID Cus_Name Mob_No Fl_ID Class


1 Aditya 97121056XX 2005 Business
2 Aarya 92659537XX 2005 Business
3 Jit 94729457XX 2001 Economic
4 Kavan 93857294XX 2002 Middle
Hardware and Software Required

Hardware - Processor: Multi-core, 2.5 GHz or above


Ram: 4 GB

Operating System: Windows,MacOS,Linux

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")

mycursor.execute("create table if not exists food_items(sl_no


int(4)auto_increment primary key,food_name varchar(40)not null,price int(4) not
null)")

mycursor.execute("Create table if not exists luggage(Luggage_id int (4)


auto_increment primary key,weight int(3) not null,price int(4) not null)")
mycursor.execute("Create table if not exists class_details(class_id int(4)
auto_increment primary key,Class_type varchar(40) not null,price int(10) not
null)")

mycursor.execute("create table if not exists flight_details(flight_id varchar(50)


auto_increment primary key,flight_name
varchar(40),departure(40),destination(40),day varchar(40),f_time time,business
int,Economic int)")

mycursor.execute("create table if not exists Customer_details(Cus_id int(10)


auto_increment primary key,Cus_name varchar(50),Mob_no bigint,fl_id
int,fl_name varchar(50),Class varchar(25),dept varchar(25),dest varchar(25),day
varchar(25),fl_time time,price int)")

obj.commit()

def luggage():

print("what do you want to do?")

print("1. add luggage")

print("2. delete luggage")

x=int(input("enter your choice: "))

if x==1:

lname=input("enter luggage type: ")

mycursor.execute("insert into luggage values({},'{}'".format('null',lname))

elif x==2:

lid=int(input("enter your luggage id: "))

mycursor.execute("delete from luggage where luggage_id={}".format(lid))

else:
print(" **************** PLEASE ENTER A VALID OPTION
**************************** ")

food()

obj.commit()

def food():

print("what do you want to do?")

print("1. add new items")

print("2. update price")

print("3. delete items")

x=int(input("enter your choice: "))

if x==1:

fname=input("enter food name: ")

fprice=int(input("enter food price: "))

mycursor.execute("insert into food_items values({},'{}',


{}".format('null',fname,fprice))

elif x==2:

fid=int(input("enter food id: "))

fprice=int(input("enter new price: "))

mycursor.execute("update food_items set price={} where


food_id={}".format(fid,fprice))

elif x==3:

fid=int(input("enter food id: "))


mycursor.execute("delete from food_items where where
food_id={}".format(fid))

else:

print(" **************** PLEASE ENTER A VALID OPTION


**************************** ")

food()

obj.commit()

def classtype():

print("what do you want to do? ")

print("1. change the classtype name")

print("2. change the price of classtype")

x=int(input("enter your choice: "))

if x==1:

oname=input("enter old name: ")

nname=input("enter new name: ")

mycursor.execute("update classtype set'{}'='{}'".format(oname,nname))

def fooditems():

print(" ")

print(" ")

print(" THE AVAILABLE FOODS ARE: ")

print(" ")

print(" ")
mycursor.execute("select * from food_items")

x=mycursor.fetchall()

for i in x:

print(" FOOD ID: ",i[0])

print(" FOOD Name: ",i[1])

print(" PRICE: ",i[2])

print("_________________________________________________________
_________________________________")

def admin1():

print("************WHAT'S YOUR TODAYS GOAL?****************")

print("1. update details")

print("2. show details")

print("3. job approval")

x=int(input("select your choice: "))

while True:

if x==1:

print("1. classtype")

print("2. food")

print("3. luggage")

x1=int(input("enter your choice"))

if x1==1:
classtype()

elif x1==2:

food()

elif x1==3:

luggage()

else:

print(" ********************** PLEASE ENTER A VALID OPTION


******************************** ")

admin1()

elif x==2:

print("1. classtype")

print("2. food")

print("3. luggage")

print("4. records")

y=int(input("from which table: "))

if y==1:

mycursor.execute("select * from classtype")

else:

mycursor.execute("select * from customer_details")

z=mycursor.fetchall()

for i in z:
print(i)

print("**************** THESE ABOVE PEOPLE HAVE BOOKED


TICKET *****************************")

break

def admin():

while True:

sec=input("enter the password: ")

if sec=="admin":

admin1()

else:

print("************YOUR PASSWORD IS INCORRECT*********")

print("***********PLEASE TRY AGAIN*****************")

admin()

break

def record():

cid=int(input("enter your customer id: "))

mycursor.execute(" select * from customer_details where


cus_id={}".format(cid))

d=mycursor.fetchall()

print("YOUR DETAILS ARE HERE...........")

print("customer id: ",d[0])

print("name: ",d[1])
print("mobile number: ",d[2])

print("flight id: ",d[3])

print("flight name",d[4])

print("classtype: ",d[5])

print("departure place",d[6])

print("destination",d[7])

print("flight day: ",d[8])

print("flight time: ",d[9])

print("price of ticket: ",d[10])

print("date of booking ticket: ",d[11])

def ticketbooking():

cname=input("enter your name: ")

cmob=int(input("enter your mobileno: "))

if cmob==0000000000:

print(" MOBILE NUMBER CANT BE NULL ")

ticketbooking()

fid=int(input("enter flight id: "))

fcl=input("enter your class: ")

fname=input("enter your flight name")

dept=input("enter departure place: ")

dest=input("enter destination: ")

fday=input("enter flight day: ")


ftime=input("enter flight time: ")

fprice=input("enter ticket rate: ")

mycursor.execute("insert into customer_details values({},'{}',{},


{},'{}','{}','{}','{}','{}','{}',
{}".format('null',cname,cmob,fid,fname,fcl,dept,dest,fday,ftime,"curdate()"))

obj.commit()

def flightavailable():

print(" ")

print(" ")

print(" THE AVAILABLE FLIGHTS ARE: ")

print(" ")

print(" ")

mycursor.execute("select * from flight_details")

x=mycursor.fetchall()

for i in x:

print(" ")

print(" Flight ID: ",i[0])

print(" Flight Name: ",i[1])

print(" departure: ",i[2])

print(" Destination: ",i[3])

print(" Take off Day: ",i[4])

print(" Take off time : ",i[5])


print(" bussiness : ",i[6])

print(" middle : ",i[7])

print(" economic : ",i[8])

print("___________________________________________________________
_______________________________")

def user():

while True:

print("************** MAY I HELP YOU? *****************")

print("1. flight details")

print("2. food details")

print("3. book ticket")

print("4. my details")

print("5. exit")

x=int(input("enter your choice: "))

if x==1:

flightavailable()

elif x==2:

fooditems()

elif x==3:

ticketbooking()

elif x==4:
records()

else:

print("************ PLEASE CHOOSE A CORRECT OPTION


************")

break

def menu1():

print("1. admin")

print("2. user")

print("3. exit")

x=int(input("choose a option: "))

while True:

if x==1:

admin()

elif x==2:

user()

else:

print("************PLEASE CHOOSE A CORRECT


OPTION******************")

menu1()

break
print("****************** WELCOME TO PARGS AIRLINES
**********************")

print("************ MAKE YOUR JOURNEY SUCCESS WITH US!


*****************")

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy