Airline Management System Final Report
Database Systems
Airline Management System
Final Project Report
Submitted by:
Muhammad Hammad Latif
Submitted to:
Prof. Irfan Hameed Dr
1|P age
Airline Management System Final Report
What Our Project does?
Our project, the Airline Management System, is a comprehensive solution designed to optimize and
automate various aspects of airline operations. It simplifies essential tasks such as flight
reservations, scheduling, payment processing, and maintenance management. The system
incorporates key components, including passengers, reservations, flights, aircraft, airports, pilots,
crew members, maintenance activities, and technicians, fostering seamless coordination across
different operational areas. It empowers users to book tickets, manage flight schedules, handle
payments, and oversee aircraft maintenance with ease, reducing manual intervention and
enhancing accuracy. Additionally, it offers advanced query features, providing real-time insights into
flight statuses, maintenance records, and customer information. By integrating a powerful database
with an intuitive interface, the Airline Management System enhances operational productivity and
delivers a superior experience for both staff and customers.
Entities Identification and attributes:
Customer: CustomerID (PK), Name, Email, Phone
Booking: BookingID (PK), BookingDate, SeatNumber, FlightID (FK), CustomerID (FK)
Flight: FlightID (PK), FlightNumber, DepartureTime, ArrivalTime, AircraftID (FK), DepartureAirportID
(FK), ArrivalAirportID (FK), ScheduleID (FK)
Aircraft: AircraftID (PK), Model, Capacity, Age
Schedule: ScheduleID (PK), DayOfWeek, StartTime, EndTime
Airport: AirportID (PK), Name, City, Country, Code
Pilot: PilotID (PK), Name, LicenseNumber, Experience
Crew: CrewID (PK), Name, Role, Experience
Maintenance: MaintenanceID (PK), maintenance_Date, Description, AircraftID (FK), TechnicianID
(FK)
Technician: TechnicianID (PK), Name, Certification
Payment: PaymentID (PK), Amount, PaymentDate, BookingID (FK), CustomerID (FK)
2|P age
Airline Management System Final Report
Relationships and cardinalities:
Relationship Type Cardinality
Customer - Booking Binary 1:N
Booking - Flight Binary N:1
Flight - Aircraft Binary 1:1
Flight - Schedule Binary 1:1
Flight -Airport Binary N:2
Aircraft -Maintenance Binary 1:N
Maintenance -Technician Binary N:M
Flight -Pilot Binary 1:N
Flight -Crew Binary 1:N
Booking -Payment Binary 1:1
Flight -Pilot -Crew Ternary 1:N:N
Flight -Aircraft -Maintenance Ternary 1:1:N
Flight -Schedule -Airport Ternary 1:1:2
Booking -Customer -Payment Ternary 1:1:1
Flight -Booking -Customer Ternary N:N:1
Binary Relationships
1. Customer - Booking (1:N)
o One Customer can have many Bookings, but each Booking belongs to one
Customer.
3|P age
Airline Management System Final Report
2. Booking - Flight (N:1)
o Many Bookings can be for one Flight, but each Booking is tied to a single Flight.
3. Flight - Aircraft (1:1)
o One Flight is operated by one Aircraft, and each Aircraft operates one Flight at a
time.
4. Flight - Schedule (1:1)
o One Flight has exactly one Schedule, and each Schedule is for a single Flight.
5. Flight - Airport (N:2)
o Each Flight involves two Airports (departure and arrival). Multiple Flights can share
the same Airports.
6. Aircraft - Maintenance (1:N)
o One Aircraft can have multiple Maintenance operations over time, but each
Maintenance operation is for one Aircraft.
7. Maintenance - Technician (N:M)
o Many Technicians can work on many Maintenance operations.
4|P age
Airline Management System Final Report
8. Flight - Pilot (1:N)
o One Flight can have multiple Pilots assigned (e.g., Captain and Co-Pilots), but each
Pilot is tied to one Flight at a time.
9. Flight - Crew (1:N)
o One Flight can have many Crew Members, but each Crew Member works on one
Flight at a time.
10. Booking - Payment (1:1)
o Each Booking corresponds to one Payment, and one Payment is for one Booking.
Ternary Relationships
1. Flight -Pilot -Crew (1:N:N)
o A Flight is assigned to one Pilot and multiple Crew Members.
5|P age
Airline Management System Final Report
2. Flight -Aircraft -Maintenance (1:1:N)
o A Flight uses one Aircraft that may require multiple Maintenance tasks.
3. Flight -Schedule -Airport (1:1:2)
o A Flight has a Schedule and involves two Airports (departure and arrival).
4. Booking -Customer -Payment (1:1:1)
o A Customer makes one Booking that corresponds to one Payment.
5. Flight -Booking -Customer (N:N:1)
o Many Customers can make many Bookings for one Flight.
6|P age
Airline Management System Final Report
Relational Schema:
https://dbdiagram.io/d/675f5ed5e763df1f00023048
ER Diagram:
7|P age
Airline Management System Final Report
Normalization:
First Normal Form (1NF)
1. Ensured all attributes contain atomic values (no multi-valued or composite attributes).
2. Eliminated repeating groups.
3. Ensured each row is uniquely identifiable by a primary key.
For example:
• In the Customer table, I ensured attributes like Phone and Email only have single values.
Second Normal Form (2NF)
1. Identified tables with composite keys and removed partial dependencies.
2. Created new tables to ensure all non-key attributes depend on the entire primary key.
For example:
• In the Booking table, attributes like BookingDate and SeatNumber depend entirely on the
primary key BookingID, avoiding partial dependencies.
Third Normal Form (3NF)
1. Removed transitive dependencies, ensuring non-key attributes depend only on the primary
key.
2. Reorganized data to create new tables when necessary.
For example:
8|P age
Airline Management System Final Report
• In the Payment table, attributes like PaymentDate and Amount directly depend on the
primary key PaymentID, ensuring no indirect dependencies.
Final Normalized Tables
• Customer, Booking, Flight, Aircraft, Schedule, Airport, Pilot, Crew, Maintenance, Technician,
and Payment tables are all in 3NF.
• Relationships like 1:N, N:M, and ternary relationships were mapped to foreign keys for
efficient data referencing.
Customer
Attribute Description
CustomerID Primary key
Name Full name of the customer
Email Email address
Phone Phone number
Address Address of the customer
Gender Gender (M/F)
DOB Date of birth
Booking
Attribute Description
BookingID Primary key
CustomerID Foreign key from Customer table
FlightID Foreign key from Flight table
PaymentID Foreign key from Payment table
BookingDate Date of booking
9|P age
Airline Management System Final Report
BookingStatus Status of booking (e.g., Confirmed, Cancelled)
SeatNumber Seat number for the flight
Flight
Attribute Description
FlightID Primary key
AircraftID Foreign key from Aircraft table
ScheduleID Foreign key from Schedule table
DepartureAirportID Foreign key from Airport table
ArrivalAirportID Foreign key from Airport table
Duration Flight duration (in hours:minutes:seconds)
Aircraft
Attribute Description
AircraftID Primary key
Model Aircraft model
Capacity Passenger capacity of the aircraft
Manufacturer Manufacturer name
MaintenanceStatus Current maintenance status
Airport
Attribute Description
AirportID Primary key
Name Name of the airport
City City where the airport is located
Country Country of the airport
Code IATA code of the airport
10 | P a g e
Airline Management System Final Report
Schedule
Attribute Description
ScheduleID Primary key
FlightDate Date of the flight
DepartureTime Scheduled departure time
ArrivalTime Scheduled arrival time
Pilot
Attribute Description
PilotID Primary key
Name Name of the pilot
LicenseNumber License number of the pilot
ExperienceYears Years of experience
Crew
Attribute Description
CrewID Primary key
Name Name of the crew member
Role Role of the crew member (e.g., attendant)
ExperienceYears Years of experience
Maintenance
Attribute Description
MaintenanceID Primary key
AircraftID Foreign key from Aircraft table
TechnicianID Foreign key from Technician table
MaintenanceDate Date of maintenance
11 | P a g e
Airline Management System Final Report
MaintenanceType Type of maintenance (e.g., repair, inspection)
Technician
Attribute Description
TechnicianID Primary key
Name Name of the technician
Specialization Specialization (e.g., engine repair)
ExperienceYears Years of experience
Payment
Attribute Description
PaymentID Primary key
BookingID Foreign key from Booking table
PaymentDate Date of payment
Amount Payment amount
PaymentMethod Payment method (e.g., credit card)
PaymentStatus Status of payment
This final design ensures all tables are in 3NF with no redundant data and no anomalies.
12 | P a g e
Airline Management System Final Report
Database creation:
Tables creation:
1.Airport Table
2.Aircraft Table
3.Customer Table
13 | P a g e
Airline Management System Final Report
4.Flight Table
5.Booking Table
6.Payment Table
14 | P a g e
Airline Management System Final Report
7.Schedule Table
8.Pilot Table
9.Crew Table
15 | P a g e
Airline Management System Final Report
10.Technician Table
11.Maintenance Table
Sample Data Insertion (5 rows per table):
1.Customer Table
16 | P a g e
Airline Management System Final Report
2.Booking Table
3.Payment Table
4.Flight Table
5.Aircraft Table
17 | P a g e
Airline Management System Final Report
6.Airport Table
7.Schedule Table
8. Pilot Table
9.Crew Table
10.Maintenance Table
18 | P a g e
Airline Management System Final Report
11.Technician Table
Triggers:
o Trigger to update PaymentID in Booking after a payment is made
o Trigger to ensure seat numbers are unique for a flight
19 | P a g e
Airline Management System Final Report
o Trigger to change the maintenance status of an aircraft to "Operational" after a
maintenance record is deleted
o Trigger to prevent deleting a customer who has bookings
o Trigger to update MaintenanceStatus after a new maintenance record is added
20 | P a g e
Airline Management System Final Report
o Prevent overlapping seat reservations on the same flight
o Automatically update BookingStatus when payment is completed
o Prevent double payment for the same booking
21 | P a g e
Airline Management System Final Report
Views:
o View for Customer Booking Details with Payment Information
o View for Flight Schedule with Aircraft and Crew Information
22 | P a g e
Airline Management System Final Report
Roles:
There are many roles for our Airline management system but we’ll discuss some of them here
o Create Admin Role
o Grant all necessary privileges for an admin
o Table-level privileges for managing all tables
o Create the flight operations manager role
23 | P a g e
Airline Management System Final Report
Size Estimation:
To estimate the size for 100 rows per table, we can calculate as follows:
1. Bytes per row is already provided for each table.
2. For 100 rows, the size (in bytes) = Bytes per row×100\text{Bytes per row} \times 100.
3. Convert the size from bytes to kilobytes (KB) by dividing by 1024.
Let’s compute:
Table Bytes per Row 100 Rows (Bytes) Size (KB)
Airport 214 214×100=21400 21400/1024≈20.90
Aircraft 212 212×100=21200 21200/1024≈20.70
Customer 474 474×100=47400 47400/1024≈46.29
Flight 44 44×100=4400 4400/1024≈4.30
Booking 45 45×100=4500 4500/1024≈4.39
Payment 66 66×100=6600 6600/1024≈ 6.45
Schedule 24 24×100=2400 2400/1024≈ 2.34
Pilot 162 162×100=16200 16200/1024≈ 15.82
Crew 158 158×100=15800 15800/1024≈ 15.43
24 | P a g e
Airline Management System Final Report
Table Bytes per Row 100 Rows (Bytes) Size (KB)
Technician 219 219×100=21900 21900/1024≈ 21.38
Maintenance 320 320×100=32000 32000/1024≈ 31.25
Total Size:
To find the total size, sum up all the sizes in KB:
20.90+20.70+46.29+4.30+4.39+6.45+2.34+15.82+15.43+21.38+31.25=189.25 KB20.90 + 20.70 +
46.29 + 4.30 + 4.39 + 6.45 + 2.34 + 15.82 + 15.43 + 21.38 + 31.25 = 189.25 KB
Result:
The total estimated size for 100 rows per table is approximately 189.25 KB.
25 | P a g e