0% found this document useful (0 votes)
26 views23 pages

Flight Reservation Systems - Aaqil

Uploaded by

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

Flight Reservation Systems - Aaqil

Uploaded by

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

NARAYANA E-TECHNO SCHOOL

PALLAVARAM, CHENNAI

A PROJECT REPORT ON

AIRLINE RESERVATION SYSTEM

SUBMITTED TO: SUBMITTED BY:

MR .V VENKATAGIRI AAQIL SHERAZ


[DEPARTMENT OF COMPUTER SCIENCE] REG. NO: _______________
CERTIFICATE

This is to certify that AAQIL SHERAZ of class XII of


NARAYANA E-TECHNO SCHOOL has done his project
on AIRLINE RESERVATION SYSTEM under the
guidance of subject teacher MR. V VENKATAGIRI during
the academic year 2023-2024 in partial fulfilment of Computer
Science practical examination conducted by CBSE BOARD,
NEW DELHI.

INTERNAL EXAMINER EXTERNAL EXAMINER

PRINCIPAL
ACKNOWLEDGMENT

It is with pleasure that I acknowledge my sincere


gratitude to our teacher, MR. V VENKATAGIRI who
taught and undertook the responsibility of teaching the
subject computer science. I have been greatly benefited
from his classes.

I am especially indebted to our Principal


_____________________ who has always been a source of
encouragement and support and without whose inspiration
this project would not have been a successful I would like
to place on record heartfelt thanks to her.

Finally, I would like to express my sincere appreciation


for all the other students of my batch their friendship & the
fine times that we all shared together.

AAQIL SHERAZ
CLASS : XII
INDEX
S.No. Topic Page.No.
1. Abstract 5
2. Project Description 8
3. System Architecture 10
4. Database Design 11
5. Data Definitions 12
6. Input Data 13
7. System Logic 14
8. Pseudo Code 15
8. Source Code 16
9. Output 19
10. Conclusion 21
11. References 23
ABSTRACT
What is the need to choose Airplanes?
The airline industry has been a major factor in the
globalization of the world economy. It connects the
sellers and the buyers as well as transport goods
across countries. It also breaks the time and distance
barriers. In the past, air travel was considered a
luxury but it is now a basic necessity.

Airline reservation systems (ARS) are systems that


allow an airline to sell their inventory (airline seats).
It contains information on schedules and cost and
contains a database of reservations (passenger
records) and of tickets issued.

5
Advantages of Airplanes
1.Speed: Air travel is significantly faster than other
modes of transportation, making it ideal for long-
distance travel. Flights can cover vast distances in
a relatively short time.
2.Convenience: Airports are usually well-
connected, and flights operate on a regular
schedule, offering convenience and flexibility to
travelers.
3.Global Reach: Airlines provide access to
destinations worldwide, including remote and
international locations that may be difficult to
reach by other means.
4.Comfort: Many airlines offer a range of amenities
and seating options, allowing passengers to choose
the level of comfort and service they prefer.
5.Safety: Air travel is statistically one of the safest
modes of transportation, with rigorous safety
standards and regulations in place.
6.Time Savings: Air travel eliminates the need for
long hours on the road or at sea, saving valuable
time for travelers.

6
7.Accessibility: Airports are often located in or near
major cities and business centers, providing
convenient access to urban areas.
8.Business Travel: Airlines are crucial for business
travel, allowing professionals to attend meetings
and conferences worldwide.
9.Medical Emergencies: Air travel is essential for
transporting patients in medical emergencies to
receive specialized care.
10. Environmental Impact: Some flights,
especially on modern aircraft, have lower carbon
emissions per passenger-mile compared to certain
ground transportation options, making them a
more environmentally friendly choice.
11. Specialized Services: Airlines often offer
services such as cargo transport, which is essential
for global trade and logistics.
12. Entertainment and Connectivity: Many
airlines provide in-flight entertainment and
internet connectivity, enhancing the travel
experience.
13. Traveler Loyalty Programs: Frequent flier
programs and loyalty rewards make air travel more
appealing to regular travelers.

7
PROJECT
DESCRIPTION
We are doing a simple flight reservation system
where we will capture Customer details, Flight
details and Booking details.
We are creating the database tables for flight tickets
and customers.
Some of the basic master data for these tables are
inserted using scripts to enable the system to do
flight ticket reservations.
This project is about creating a database about the
Airline Reservation System.
The Airline reservation system facilitates the
passengers to enquire about the planes available on
the basis of source and destination, booking and
enquire about the status of the booked ticket, etc.
The aim of case study is to design and develop a
database maintaining the records of different flights,
flight status, and passengers. The record of a flight
includes its number, name, source, destination, and
days on which it is available, whereas record of
flight status includes dates for which tickets can be
booked, total number of seats available, and number
of seats already booked.

8
Passengers can book their tickets for the flight in
which seats are available. For this, passengers have
to provide the desired flight number and the date for
which ticket is to be booked. Before booking a ticket
for a passenger, the validity of flight number and
booking date is checked. Once the flight number and
booking date are validated, it is checked whether the
seat is available. If yes, the ticket is booked with
confirmed status and corresponding ticket ID is
stored along with other details of the passenger. The
ticket ID is searched and the corresponding record
is deleted. With this, the ticket with waiting status
also gets confirmed.

Other features of a flight reservation are not in scope


of this project.

9
SYSTEM
ARCHITECTURE

10
DATABASE DESIGN
ENTITIES:
● Customer
● Flight
RELATIONSHIPS:
● Ticket_cost
● Ticket_booking
ENTITY RELATIONSHIP DIAGRAM

11
DATA DEFINITIONS
Customer: Flight:
CUST_ID FLIGHT_NO

CUST_NAME FLIGHT_NAME

CUST_DOB FLIGHT_SOURCE

CUST_GENDER FLIGHT_DESTINATION

CUST_EMAIL
CUST_MOB_NO
CUST_CITY
CUST_STATE

Ticket_cost: Ticket_booking:

FLIGHT_NO FLIGHT_NO

CLASS_TYPE CUST_ID

TICKET_COST TRAVEL_DATE

CLASS_MAX_CAP PAYMENT_TX_ID

BOOKING_ID

12
INPUT DATA
Data collected while booking:
S.No. Attribute
1 Customer Name
2 Gender
3 Age
4 Mobile
5 Email
6 City
7 State
8 Pin code
9 Flight Name
10 Travel Date

13
SYSTEM LOGIC
We will get all details needed for the
reservation of a ticket. The system will search
if the customer is already available in the
database, if not we will insert a new customer
with input details.
To book a reservation, we will check if there is
a flight on that date and seats are available in
that flight. If available, we will push the user to
the payment gateway and on successful
payment, we will insert a row in the Booking
table and return the booking ID to the customer.

Apart from the functional requirements, we can


have database level constraints for NOT NULL
and UNIQUE to avoid inconsistency in data and
keeping data level constraints. Also keeping
Primary and Unique keys helps in faster retrieval
of the data due to Database level Indexing

14
PSEUDO CODE
● Insert the booking details – includes customer,
flight, booking details
● Check if customer name, pin, DOB are already
available, if not found create a new customer
row with input details
● Check for availability of flight, by flight_no,
date and class_type
● If ticket is available, push to payment gateway
for payment
● If payment is successful, save the
payment_trasaction_id
● Update the availability for that flight, date and
class_type to reduce the number of tickets
booked
● Return the booking_id to the customer.

15
SOURCE CODE
Creating Tables:
CREATE TABLE flight
(flight_no INT PRIMARY KEY,
flight_name VARCHAR(100) NOT NULL,
flight_source VARCHAR(50) NOT NULL,
flight_destination VARCHAR(50) NOT NULL);
CREATE TABLE ticket_cost
(flight_no INT,
class_type VARCHAR(100) NOT NULL,
ticket_cost INT NOT NULL,
class_max_cap INT(3) NOT NULL);
ALTER TABLE ticket_cost ADD CONSTRAINT FK_flight_ticket
FOREIGN KEY (flight_no) REFERENCES flight (flight_no);
CREATE TABLE customer (
cust_id INT PRIMARY KEY,
cust_name VARCHAR(30) NOT NULL,
cust_dob DATE NOT NULL,
cust_gender VARCHAR(1) NOT NULL,
cust_email VARCHAR(100) NOT NULL,
cust_mob_no INT(15) NOT NULL,
cust_city VARCHAR(100),
cust_state VARCHAR(100) NOT NULL,
cust_pin INT(10) NOT NULL);
CREATE TABLE ticket_booking
(flight_no INT,
cust_id INT,
travel_date DATE NOT NULL,
payment_tx_id VARCHAR(50) NOT NULL,
booking_id VARCHAR(50) NOT NULL);
ALTER TABLE ticket_booking ADD CONSTRAINT unique_booking
UNIQUE(flight_no, cust_id, travel_date);
ALTER TABLE ticket_booking ADD CONSTRAINT FK_flight
FOREIGN KEY (flight_no) REFERENCES flight (flight_no);
ALTER TABLE ticket_booking ADD CONSTRAINT FK_customer
FOREIGN KEY (cust_id) REFERENCES customer (cust_id);
16
Inserting Base Data:
Flight:
insert into flight values(1, 'SNF-NYK', 'San Francisco', 'New York');
insert into flight values(2, 'SND-SAJ', 'San Diego', 'San Jose');
insert into flight values(3, 'DAL-BST', 'Dallas', 'Boston');
insert into flight values(4, 'DNV-CHG', 'Denver', 'Chicago');
insert into flight values(5, 'SNF-SCR', 'San Francisco', 'Sacramento');
insert into flight values(6, 'SLO-PTL', 'San Luis Obispo', 'Portland');
insert into flight values(7,'IND-USA','India','United States of America');

Ticket_cost:
insert into ticket_cost values(1, 'ECONOMY', 1400,200);
insert into ticket_cost values(1, 'BUSINESS', 2400,50);
insert into ticket_cost values(1, 'FIRST', 3400,20);
insert into ticket_cost values(2, 'ECONOMY', 1600,200);
insert into ticket_cost values(2, 'BUSINESS', 2600,50);
insert into ticket_cost values(2, 'FIRST', 3600,20);
insert into ticket_cost values(3, 'ECONOMY', 1200,200);
insert into ticket_cost values(3, 'BUSINESS', 2200,50);
insert into ticket_cost values(3, 'FIRST', 3200,20);
insert into ticket_cost values(4, 'ECONOMY', 1900,200);
insert into ticket_cost values(4, 'BUSINESS', 2900,50);
insert into ticket_cost values(4, 'FIRST', 3900,20);
insert into ticket_cost values(5, 'ECONOMY', 1500,200);
insert into ticket_cost values(5, 'BUSINESS', 2500,50);
insert into ticket_cost values(5, 'FIRST', 3500,20);
insert into ticket_cost values(6, 'ECONOMY', 1300,200);
insert into ticket_cost values(6, 'BUSINESS', 2300,50);
insert into ticket_cost values(6, 'FIRST', 3300,20);
insert into ticket_cost values(7, 'ECONOMY', 1500,200);
insert into ticket_cost values(7, 'BUSINESS', 2800,50);
insert into ticket_cost values(7, 'FIRST', 4100,20);

17
Customer:
insert into customer values(1, 'John T', '1954/02/18', 'M',
'[email protected]',6549873210,'Englewood','New Jersey',564985);
insert into customer values(2, 'Donald T', '1946/06/14', 'M',
'[email protected]',65481557410,'Queens','New York',654784);
insert into customer values(3, 'Julia R', '1967/10/28', 'F',
'[email protected]',6565541680,'Georgia','Atlanta',265478);
insert into customer values(4, 'Tom C', '1962/07/03', 'M',
'[email protected]',6878948970,'Syracuse','New York',638784);
insert into customer values(5, 'Tom H', '1956/07/09', 'M',
'[email protected]',481258970,'Concord','California',498784);

Ticket_booking:
insert into ticket_booking values(1,1,'2024/01/02',’OK-43235345’,’PNR-
XNG67Y’);
insert into ticket_booking values(1,2,'2024/01/02',’OK-65489345’, ’PNR-
H58JUS’);
insert into ticket_booking values(1,3,'2024/01/02',’OK-21278345’, 'PNR-
XCF72Y’);
insert into ticket_booking values(2,1,'2024/01/04',’OK-98127634’, ’PNR-
YUI12H’);
insert into ticket_booking values(2,2,'2024/01/04',’OK-91265734’,’PNR-
WTX49Q’);
insert into ticket_booking values (2,5,'2024/01/04',’OK-78459621’,’PNR-
RTX409’);
insert into ticket_booking values (3,4,'2024/01/04',’OK-67198346’,’PNR-
GTX306’);
insert into ticket_booking values (3,2,'2024/01/04',’OK-61785346’,’PNR-
FER78C’);
insert into ticket_booking values (3,5,'2024/01/05',’OK-16485932’,’PNR-
GE7PG1’);

18
OUTPUT
Data from tables
Flight:
MyDB [csproject]> select * from flight;
+-----------+-------------+-----------------+--------------------------+
| flight_no | flight_name | flight_source | flight_destination |
+-----------+-------------+-----------------+--------------------------+
| 1 | SNF-NYK | San Francisco | New York |
| 2 | SND-SAJ | San Diego | San Jose |
| 3 | DAL-BST | Dallas | Boston |
| 4 | DNV-CHG | Denver | Chicago |
| 5 | SNF-SCR | San Francisco | Sacramento |
| 6 | SLO-PTL | San Luis Obispo | Portland |
| 7 | IND-USA | India | United States of America |
+-----------+-------------+-----------------+--------------------------+
7 rows in set (0.000 sec)

Ticket_cost:
MyDB [csproject]> select * from ticket_cost;
+-----------+------------+-------------+---------------+
| flight_no | class_type | ticket_cost | class_max_cap |
+-----------+------------+-------------+---------------+
| 1 | ECONOMY | 1400 | 200 |
| 1 | BUSINESS | 2400 | 50 |
| 1 | FIRST | 3400 | 20 |
| 2 | ECONOMY | 1600 | 200 |
| 2 | BUSINESS | 2600 | 50 |
| 2 | FIRST | 3600 | 20 |
| 3 | ECONOMY | 1200 | 200 |
| 3 | BUSINESS | 2200 | 50 |
| 3 | FIRST | 3200 | 20 |
| 4 | ECONOMY | 1900 | 200 |
| 4 | BUSINESS | 2900 | 50 |
| 4 | FIRST | 3900 | 20 |
| 5 | ECONOMY | 1500 | 200 |
| 5 | BUSINESS | 2500 | 50 |
| 5 | FIRST | 3500 | 20 |
| 6 | ECONOMY | 1300 | 200 |
| 6 | BUSINESS | 2300 | 50 |
| 6 | FIRST | 3300 | 20 |
| 7 | ECONOMY | 1500 | 200 |
| 7 | BUSINESS | 2800 | 50 |
| 7 | FIRST | 4100 | 20 |
+-----------+------------+-------------+---------------+
20 rows in set (0.001 sec)

19
Customer:
MariaDB [csproject]> select * from customer;
+---------+-----------+------------+-------------+--------------------+-------------+-----------+------------+----------+
| cust_id | cust_name | cust_dob | cust_gender | cust_email | cust_mob_no | cust_city | cust_state | cust_pin |
+---------+-----------+------------+-------------+--------------------+-------------+-----------+------------+----------+
| 1 | John T | 1954-02-18 | M | [email protected] | 2147483647 | Englewood | New Jersey | 564985 |
| 2 | Donald T | 1946-06-14 | M | [email protected] | 2147483647 | Queens | New York | 654784 |
| 3 | Julia R | 1967-10-28 | F | [email protected] | 2147483647 | Georgia | Atlanta | 265478 |
| 4 | Tom C | 1962-07-03 | M | [email protected] | 2147483647 | Syracuse | New York | 638784 |
| 5 | Tom H | 1956-07-09 | M | [email protected] | 481258970 | Concord | California | 498784 |
+---------+-----------+------------+-------------+--------------------+-------------+-----------+------------+----------+
5 rows in set (0.010 sec)

Ticket_booking:
MyDB [csproject]> select * from ticket_booking;
+-----------+---------+-------------+---------------+------------+
| flight_no | cust_id | travel_date | payment_tx_id | booking_id |
+-----------+---------+-------------+---------------+------------+
| 1 | 1 | 2024-01-02 | OK-43235345 | PNR-XNG67Y |
| 1 | 2 | 2024-01-02 | OK-65489345 | PNR-H58JUS |
| 1 | 3 | 2024-01-02 | OK-21278345 | PNR-XCF72Y |
| 2 | 1 | 2024-01-04 | OK-98127634 | PNR-YUI12H |
| 2 | 2 | 2024-01-04 | OK-91265734 | PNR-WTX49Q |
| 2 | 5 | 2024-01-04 | OK-78459621 | PNR-RTX409 |
| 3 | 4 | 2024-01-04 | OK-67198346 | PNR-GTX306 |
| 3 | 2 | 2024-01-04 | OK-61785346 | PNR-FER78C |
| 3 | 5 | 2024-01-05 | OK-16485932 | PNR-GE7PG1 |
+-----------+---------+-------------+---------------+------------+
9 rows in set (0.010 sec)

20
CONCLUSION
The need for managing information
electronically is growing rapidly with the
advancements in the technological field.
“AIRLINE RESERVATION SYSTEM” has
become a very basic requirement for the
growing population and travel industry.
With the growing demand, an online system is
needed and appropriate for the management of
airline tickets giving the flexibility to the
passengers to be able to purchase and manage
their flight tickets and travel. Merging this
system with the ever evolving payment
gateways enables users to complete the
transaction and have their flight tickets in their
hand at the comfort of their home.
This system is a good step in implementing
electronic based information management by
airlines. Thus, this application will be able to
help and improve the management to store the
various information of passengers, flights,
airports, travel routes, etc.

21
Finding solutions to real life problems was the
most important part of the project and this
provided me with experiences which will help
me in future. Some important things that I
learned include designing a good system
architecture and database design enabling me to
write efficient code. I improved on how to write
an easily readable, understandable as well as
time and memory efficient code.

22
REFERENCES
www.medium.com
www.javapoint.com
www.lucid.app
www.huasadata.com
www.altexsoft.com
www.wikipedia.com

23

You might also like