KEMBAR78
Mini Project | PDF | Software Testing | Databases
100% found this document useful (1 vote)
25 views53 pages

Mini Project

The document outlines the development of a Flight Booking System aimed at automating and improving the airline reservation process, transitioning from manual methods to a user-friendly web-based application. Key features include flight search and booking, reservation management, user authentication, and administrative controls, supported by specific hardware and software requirements. The system is designed to enhance efficiency, accessibility, data management, and scalability while ensuring security and high availability.

Uploaded by

Janu Janu
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
100% found this document useful (1 vote)
25 views53 pages

Mini Project

The document outlines the development of a Flight Booking System aimed at automating and improving the airline reservation process, transitioning from manual methods to a user-friendly web-based application. Key features include flight search and booking, reservation management, user authentication, and administrative controls, supported by specific hardware and software requirements. The system is designed to enhance efficiency, accessibility, data management, and scalability while ensuring security and high availability.

Uploaded by

Janu Janu
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/ 53

Introduction

In today's fast-paced world, the aviation industry plays a pivotal role in connecting people and
places. The advent of technology has revolutionized the way airline reservations are managed,
transitioning from manual bookings to sophisticated computerized systems. This evolution has
not only streamlined operations but also enhanced the overall customer experience.

Historically, airline reservations were handled manually, which was time-consuming and prone
to errors. The introduction of the Airline Reservation System (ARS) in the 1960s marked a
significant shift, automating the process and improving efficiency. Over time, ARS evolved into
Computer Reservation Systems (CRS) and eventually into Global Distribution Systems (GDS),
enabling real-time tracking of flight schedules, availability, and pricing.

The primary objective of this mini project is to design and implement a Flight Booking System
that facilitates seamless booking, cancellation, and management of flight reservations. The
system aims to provide a user-friendly interface for customers and efficient tools for
administrators to manage flight operations.

The implementation of such a system requires careful consideration of both hardware and
software specifications to ensure scalability, reliability, and security. By leveraging modern
technologies and adhering to best practices in software development, the Flight Booking System
aims to meet the dynamic needs of the aviation industry and its customers.

Key features of the proposed system include:

●​ Flight Search and Booking: Allowing users to search for available flights based on
criteria such as origin, destination, and travel dates.​

●​ Reservation Management: Enabling customers to book, cancel, or modify their


reservations with ease.​

●​ User Authentication: Ensuring secure access for both customers and administrators
through a login system.​

●​ Administrative Controls: Providing administrators with tools to add, update, or remove


flight details and manage user information.
1.1 SYSTEM SPECIFICATION:

Software Requirements

●​ Operating System: Windows 10 or higher, Linux (Ubuntu 20.04 LTS), or macOS​

●​ Programming Language: Java (JDK 11 or higher)​

●​ Framework: Spring Boot for backend development​

●​ Frontend Technologies: HTML5, CSS3, JavaScript, and JSP for user interface​

●​ Database Management System: MySQL or PostgreSQL for data storage​

●​ Web Server: Apache Tomcat 9 or higher​

●​ Development Tools: Eclipse or IntelliJ IDEA for IDE, Git for version control​

●​ Browser Compatibility: Google Chrome, Mozilla Firefox, Microsoft Edge​

Hardware Requirements

●​ Processor: Intel Core i5 (8th Gen) or AMD Ryzen 5 equivalent​

●​ RAM: 8 GB minimum (16 GB recommended for optimal performance)​

●​ Storage: 256 GB SSD or higher​

●​ Display: 15.6-inch Full HD (1920x1080) display​

●​ Network: Stable internet connection with minimum 10 Mbps bandwidth​

Functional Requirements

●​ User Registration and Authentication: Secure sign-up and login functionalities for
users and administrators​
●​ Flight Search and Booking: Search flights based on criteria like origin, destination,
date, and class; book selected flights​

●​ Booking Management: View, modify, or cancel existing bookings​

●​ Payment Integration: Secure payment processing through integrated gateways​

●​ Admin Panel: Manage flights, schedules, and user information​

Non-Functional Requirements

●​ Performance: System should handle up to 500 concurrent users without performance


degradation​

●​ Scalability: Ability to scale horizontally to accommodate increased load​

●​ Security: Implement SSL encryption, secure password storage, and protection against
common vulnerabilities like SQL injection and XSS​

●​ Usability: Intuitive user interface with responsive design for various devices​

●​ Availability: System uptime of 99.9% with minimal downtime.

Functional Specifications

●​ User Registration and Authentication: Users can create accounts and securely log in to
access personalized features.​

●​ Flight Search and Booking: Provides real-time search capabilities based on various
parameters like origin, destination, date, and class, allowing users to book flights
accordingly.​

●​ Payment Integration: Supports multiple payment gateways to facilitate secure


transactions.​

●​ Booking Management: Users can view, modify, or cancel their bookings as needed.​
●​ Administrative Control: Administrators have access to manage flight schedules,
pricing, and user data.​

Non-Functional Specifications

●​ Performance: The system is optimized for quick response times, ensuring that search
queries and booking transactions are processed efficiently.​

●​ Scalability: Designed to handle an increasing number of users and transactions without


compromising performance.​

●​ Security: Implements robust security measures, including data encryption and secure
authentication protocols, to protect user information and transactions.​

●​ Availability: Ensures high availability with minimal downtime, providing users with
consistent access to services.​

●​ Usability: Features an intuitive and user-friendly interface, facilitating easy navigation


and interaction for users with varying technical expertise.​

●​ Maintainability: The system's modular design allows for easy updates and maintenance,
ensuring long-term sustainability.

\
1.2 HARDWARE CONFIGURATION:
The hardware configuration is pivotal to ensure the smooth operation and scalability of the Flight
Booking System. Depending on the deployment scale—be it a standalone application for
academic purposes or a more extensive web-based system—the hardware requirements can vary.
Below is a comprehensive overview:

Standalone System (For Academic or Small-Scale Deployment)

For a basic implementation, such as a desktop application developed for educational purposes,
the following hardware specifications are recommended:

●​ Processor: Intel Pentium III 630 MHz or higher​

●​ RAM: 128 MB minimum​

●​ Hard Disk: 20 GB​

●​ Monitor: 15” Color Monitor​

●​ Keyboard: Standard 122 Keys​

●​ Printer: Dot Matrix Printer (16 Pin)​

These configurations are based on standard requirements for similar systems and ensure that the
application runs smoothly without performance bottlenecks.

Web-Based or Enterprise-Level System

For a more robust, web-based deployment catering to multiple concurrent users, the hardware
requirements are more demanding:

●​ Application Server:​

○​ CPU: 16-core, 2.5 GHz or higher​

○​ RAM: 64 GB or higher​
○​ Storage: 2 TB SSD​

○​ Network: 1 Gbps​

●​ Database Server:​

○​ CPU: 32-core, 2.5 GHz or higher​

○​ RAM: 128 GB or higher​

○​ Storage: 10 TB SSD​

○​ Network: 1 Gbps​

●​ Web Server:​

○​ CPU: 8-core, 2.5 GHz or higher​

○​ RAM: 32 GB or higher​

○​ Storage: 1 TB SSD​

○​ Network: 1 Gbps​

●​ Load Balancer:​

○​ CPU: 4-core, 2.5 GHz or higher​

○​ RAM: 16 GB or higher​

○​ Storage: 500 GB SSD​

○​ Network: 1 Gbps​

These specifications are designed to handle high volumes of transactions, ensuring reliability,
scalability, and security for enterprise-level applications.

Networking and Peripheral Devices


For both standalone and web-based systems, the following networking and peripheral devices are
recommended:

●​ Network Switches/Routers: Managed switches with support for VLANs and QoS​

●​ Uninterruptible Power Supply (UPS): To protect against power outages and ensure
data integrity​

●​ Backup Solutions: External hard drives or cloud-based backup services​

●​ Printers: For ticket printing, a high-speed thermal printer is advisable.

Minimum Hardware Requirements

●​ Processor: Intel Pentium III 630 MHz or higher​

●​ RAM: 128 MB minimum​

●​ Hard Disk: 20 GB​

●​ Monitor: 15” Color Monitor​

●​ Keyboard: Standard 122 Keys​

●​ Printer: Dot Matrix Printer (16 Pin)


1.3 SOFTWARE SPECIFICATION:
The software specification outlines the essential components and requirements necessary for the
development and operation of the Flight Booking System. This includes the selection of
appropriate technologies, tools, and frameworks to ensure the system's functionality, scalability,
and user-friendliness.

Programming Languages and Frameworks

●​ Backend Development: Java (JDK 11 or higher) utilizing the Spring Boot framework for
creating robust and scalable RESTful APIs.​

●​ Frontend Development: HTML5, CSS3, JavaScript, and JSP for building interactive
and responsive user interfaces.​

Database Management System

●​ Database: MySQL or PostgreSQL for efficient data storage and retrieval.​

●​ Object-Relational Mapping (ORM): Hibernate for seamless interaction between the


application and the database.​

Development Tools

●​ Integrated Development Environment (IDE): Eclipse or IntelliJ IDEA for code


development and debugging.​

●​ Version Control: Git for tracking changes and collaborating with team members.​

●​ Build Tools: Maven or Gradle for project build and dependency management.​

Web and Application Server:


●​ Web Server: Apache Tomcat 9 or higher for deploying and managing web applications.​

Operating System

●​ Supported Platforms: Windows 10 or higher, Linux (Ubuntu 20.04 LTS), or macOS for
development and deployment environments.​

Browser Compatibility

●​ Supported Browsers: Google Chrome, Mozilla Firefox, Microsoft Edge to ensure broad
user accessibility.​

Additional Libraries and APIs

●​ Security: Spring Security for implementing authentication and authorization


mechanisms.​

●​ Payment Integration: APIs such as PayPal or Stripe for handling secure online
transactions.​

●​ Logging: Log4j or SLF4J for application logging and monitoring.​

These software specifications are designed to provide a solid foundation for developing a reliable
and efficient Flight Booking System.
2.SYSTEM STUDY:
The system study is a critical initial phase in the Software Development Life Cycle (SDLC),
focusing on understanding and analyzing the current system to identify areas of improvement
and to define the requirements for the new system. This phase ensures that the developed system
aligns with user needs and organizational goals.

Preliminary System Study

This initial investigation involves gathering basic information about the existing flight booking
processes. The objective is to understand the current system's operations, identify its strengths
and weaknesses, and determine the feasibility of developing a new system. Activities in this
phase include:

●​ Problem Identification: Recognizing issues such as manual booking errors, limited


accessibility, or inefficient data management.​

●​ Objective Definition: Establishing clear goals for the new system, like automating
bookings, enhancing user experience, and improving data accuracy.​

●​ Constraint Analysis: Identifying limitations related to budget, technology, or regulatory


compliance.​

The outcome is a System Proposal that outlines the findings and recommendations for the new
system.

Detailed System Study

Building upon the preliminary study, this phase delves deeper into the system's requirements and
functionalities. Key activities include:

●​ Requirements Gathering: Collecting detailed information from stakeholders through


interviews, surveys, and observations to understand user needs and expectations.​

●​ Process Analysis: Examining current workflows to identify inefficiencies and areas for
automation.​
●​ Data Analysis: Assessing the types of data handled, data flow, and storage requirements.​

●​ Feasibility Study: Evaluating the technical, economic, and operational feasibility of the
proposed system.​

This comprehensive analysis results in a detailed requirement specification document, serving as


a blueprint for the system's design and development.

2.1 Existing System

The traditional airline reservation system primarily operates on manual or semi-automated


processes. This system involves several steps, including manual entry of passenger details, flight
scheduling, seat allocation, and ticket issuance. Such processes are often time-consuming and
prone to human errors.

Limitations of the Existing System

1.​ Time-Consuming Processes: Manual booking procedures can take up to three hours to
complete a single reservation, leading to inefficiencies and customer dissatisfaction. ​

2.​ Error-Prone Operations: The reliance on human input increases the likelihood of errors
in booking details, which can result in issues like double bookings or incorrect passenger
information.​

3.​ Limited Accessibility: Bookings are often restricted to business hours and specific
locations, limiting customer convenience and flexibility.​

4.​ Inefficient Data Management: Storing and retrieving booking information manually
makes data management cumbersome and increases the risk of data loss or misplacement.​

5.​ High Operational Costs: The need for extensive human resources to manage bookings
and customer inquiries leads to increased operational expenses.
2.2 DRAWBACKS:

Traditional airline reservation systems often rely on manual or semi-automated processes,


leading to several inefficiencies:

●​ Manual Bookings: Reservations are made through physical counters or phone calls,
which can be time-consuming and prone to errors.​

●​ Limited Accessibility: Customers have restricted access to booking services, often


confined to business hours and specific locations.​

●​ Data Management Issues: Storing and retrieving booking information manually


increases the risk of data loss and inconsistencies.​

●​ Lack of Real-Time Updates: Flight schedules and seat availability are not updated in
real-time, leading to potential overbookings or misinformation.​

Proposed System

The proposed Flight Booking System aims to overcome these challenges by introducing a
centralized, automated platform with the following features:

●​ Online Booking Interface: A user-friendly web interface that allows customers to search
for flights, make reservations, and manage bookings at their convenience.​

●​ Real-Time Data Updates: Integration with airline databases ensures up-to-date


information on flight schedules and seat availability.​

●​ Secure Payment Processing: Incorporation of secure payment gateways to facilitate


online transactions safely.​

●​ Administrative Dashboard: Tools for administrators to manage flights, monitor


bookings, and generate reports.​

●​ Scalability: Designed to handle increasing user loads and accommodate future


enhancements.​

Feasibility Study
Before development, a feasibility study assesses the project's viability:

●​ Technical Feasibility: The required technologies are readily available and suitable for
the project's needs.​

●​ Operational Feasibility: The system aligns with user expectations and can be integrated
into existing workflows with minimal disruption.​

●​ Economic Feasibility: The benefits of automation and improved customer satisfaction


outweigh the development and maintenance costs.​

●​ Legal Feasibility: The system complies with data protection regulations and industry
standards.​

Requirement Gathering

Engaging with stakeholders, including airline staff and customers, helps identify key
requirements:

●​ Functional Requirements:​

○​ User registration and authentication.​

○​ Flight search based on criteria like date, destination, and class.​

○​ Booking and payment processing.​

○​ Booking history and cancellation options.​

○​ Administrative controls for managing flights and monitoring system usage.​

●​ Non-Functional Requirements:​

○​ System availability of 99.9%.​

○​ Response time of less than 2 seconds for search queries.​


○​ Compliance with security standards to protect user data.​

PROPOSED SYSTEM:
The proposed Flight Booking System is a comprehensive, web-based application designed to
automate and streamline the process of booking, managing, and canceling flight reservations. It
addresses the limitations of manual systems by providing a user-friendly interface and robust
backend functionalities.

Key Features:

●​ User Registration and Authentication: Secure login system for users to create accounts
and access personalized services.​

●​ Flight Search and Booking: Allows users to search for available flights based on criteria
such as destination, date, and class, and proceed with bookings.​

●​ Real-Time Seat Availability: Displays up-to-date information on seat availability to


prevent overbooking.​

●​ Booking Management: Users can view, modify, or cancel their bookings as needed.​

●​ Administrative Controls: Admins can add, update, or remove flight details, manage user
accounts, and generate reports.sites.google.com​

Advantages Over Existing System

●​ Efficiency: Automates the booking process, reducing time and manual errors.​

●​ Accessibility: Users can book flights anytime and from anywhere with internet access.​
●​ Data Management: Centralized database ensures consistent and reliable data storage and
retrieval.​

●​ Scalability: Designed to accommodate increasing numbers of users and flights without


performance degradation.​

By implementing this proposed system, airlines can enhance customer satisfaction, improve
operational efficiency, and maintain accurate records of all transactions.

FEATURES:

1. User Registration and Authentication

●​ Secure sign-up and login functionalities for both customers and administrators.​

●​ User profile management, including password recovery and profile updates.​

2. Flight Search and Booking

●​ Advanced search filters allow users to find flights based on departure/arrival cities, dates,
airlines, and class preferences.​

●​ Real-time display of flight availability, schedules, and pricing.​

●​ Option to select preferred seats during the booking process.​

3. Reservation Management

●​ Users can view, modify, or cancel their reservations.​


●​ Real-time updates on seat availability and confirmation status.​

4. Payment Integration

●​ Secure payment gateways enabling users to make online payments for their reservations.​

●​ Multiple payment options, such as credit cards or digital wallets, enhancing user
convenience.​

5. Email and SMS Notifications

●​ Automated notifications for booking confirmations, cancellations, and flight status


updates.​

●​ Reminders for upcoming flights and check-in alerts.​

6. Administrative Dashboard

●​ Admins can manage flight schedules, user accounts, and reservations.​

●​ Access to analytics and reporting tools for monitoring system performance and user
activity.​

7. Reporting and Analytics

●​ Generation of reports on booking trends, revenue, and other relevant metrics.​

●​ Analytics tools to help administrators make informed decisions to improve the system's
efficiency.​

8. Security Measures
●​ Implementation of encryption protocols to ensure the security of user data and financial
transactions.​

●​ Regular updates and monitoring to protect against potential security threats.​

9. Mobile Responsiveness

Responsive design ensuring seamless user experience across devices, including smartphones and
tablets.​

10. Multi-Language and Multi-Currency Support

Capabilities to display prices in different currencies and provide language options for a global
audience
3.SYSTEM DESIGN AND DEVELOPMENT:

The design and development of the Flight Booking System involve a structured approach to
ensure scalability, maintainability, and user satisfaction. This section outlines the architectural
design, database schema, and development methodologies employed in building the system.

1. System Architecture

The system adopts a three-tier architecture comprising:

●​ Presentation Layer: The user interface developed using HTML, CSS, and JavaScript
frameworks like React or Angular. This layer facilitates user interactions such as
searching for flights, booking tickets, and managing reservations.​

●​ Application Layer: The business logic implemented using server-side technologies like
Node.js, Django, or Spring Boot. It processes user requests, applies business rules, and
communicates between the presentation and data layers.​

●​ Data Layer: A relational database management system (RDBMS) like MySQL or


PostgreSQL stores all system data, including user information, flight details, bookings,
and transactions.

2. Development Methodology

The development follows the Agile methodology, promoting iterative development and
continuous feedback. Key practices include:

●​ Sprint Planning: Defining short development cycles with specific goals.​

●​ Daily Stand-ups: Regular team meetings to discuss progress and obstacles.​

●​ Continuous Integration/Continuous Deployment (CI/CD): Automating the integration


and deployment processes to ensure rapid delivery and testing.​
3. Security Considerations

Security is paramount in handling sensitive user data and payment information. Measures
implemented include:

●​ Authentication and Authorization: Implementing secure login mechanisms and


role-based access controls.​

●​ Data Encryption: Using SSL/TLS protocols to encrypt data in transit and hashing
algorithms for storing passwords.​

●​ Input Validation: Sanitizing user inputs to prevent SQL injection and cross-site scripting
(XSS) attacks.​

4. Testing and Quality Assurance

Comprehensive testing ensures system reliability and performance:

●​ Unit Testing: Testing individual components for expected functionality.​

●​ Integration Testing: Ensuring that different modules interact correctly.​

●​ User Acceptance Testing (UAT): Validating the system with real users to ensure it meets
requirements.​

●​ Performance Testing: Assessing system responsiveness under various load conditions.

3.1 FILE DESIGN:

File design is a critical aspect of software development, focusing on how data is stored,
organized, and accessed within the system. In the context of the Flight Booking System, effective
file design ensures data integrity, security, and efficient retrieval, which are essential for seamless
operations.

1. Purpose of File Design


The primary objectives of file design in this system include:

●​ Data Organization: Structuring data to reflect real-world entities like flights, users, and
bookings.​

●​ Efficient Access: Ensuring quick retrieval and update of data to support real-time
operations.​

●​ Data Integrity: Maintaining consistency and accuracy across all data files.​

●​ Security: Protecting sensitive information through appropriate access controls and


encryption.​

2. Types of Files

The system utilizes various files, each serving specific functions:

●​ Master Files: Contain static or infrequently changing data.​

○​ Flights Master File: Details of all available flights, including flight numbers,
routes, schedules, and aircraft information.​

○​ Users Master File: Information about registered users, such as personal details
and account credentials.​

●​ Transaction Files: Record dynamic data resulting from daily operations.​

○​ Bookings File: Logs of all flight bookings, including user IDs, flight IDs, booking
dates, and statuses.​

○​ Payments File: Records of payment transactions, encompassing payment


methods, amounts, and transaction IDs.​

●​ Log Files: Track system activities for auditing and debugging purposes.​

○​ Access Logs: Entries of user logins, logouts, and access times.​

○​ Error Logs: Documentation of system errors and exceptions encountered during


operations.​
3. File Structure and Format

The system employs a relational database structure, with tables representing different entities.
Each table corresponds to a file in the database, and relationships are established through keys.

●​ Flights Table:​

○​ Fields: FlightID (Primary Key), AirlineName, Origin, Destination,


DepartureTime, ArrivalTime, AircraftType.​

●​ Users Table:​

○​ Fields: UserID (Primary Key), FullName, Email, PasswordHash, ContactNumber,


Address.​

●​ Bookings Table:​

○​ Fields: BookingID (Primary Key), UserID (Foreign Key), FlightID (Foreign


Key), BookingDate, SeatNumber, Status.​

●​ Payments Table:​

○​ Fields: PaymentID (Primary Key), BookingID (Foreign Key), PaymentDate,


Amount, PaymentMethod, TransactionStatus.​

4. Access Methods

Efficient data access is achieved through:

●​ Indexing: Creating indexes on frequently queried fields like FlightID and UserID to
speed up search operations.​

●​ Stored Procedures: Utilizing predefined SQL procedures for common operations like
booking a flight or processing payments.​

●​ Views: Implementing database views to present data in specific formats without altering
the underlying tables.​

5. Security Measures
To safeguard data:

●​ Authentication and Authorization: Ensuring only authorized users can access or


modify data.​

●​ Encryption: Storing sensitive information like passwords in encrypted formats.​

●​ Regular Backups: Maintaining backups of all files to prevent data loss.

3.1 INPUT DESIGN

Input design is a critical component of system development, focusing on how data is entered into
the system. Effective input design ensures data accuracy, security, and user satisfaction, which
are essential for the seamless operation of the Flight Booking System.

1. Objectives of Input Design

The primary goals of input design in the Flight Booking System include:

●​ Accuracy: Ensuring that the data entered is correct and valid.​

●​ Efficiency: Facilitating quick and easy data entry processes.​

●​ User-Friendliness: Designing intuitive interfaces that guide users through data entry.​

●​ Security: Protecting sensitive information during data entry.​

2. Types of Inputs

The system requires various types of inputs from users and administrators:

●​ User Registration: Collecting personal details such as name, email, contact number, and
password.​

●​ Flight Search Criteria: Inputs like departure and arrival locations, travel dates, and
preferred class.​

●​ Booking Details: Passenger information, seat selection, and payment details.​


●​ Administrative Inputs: Flight schedules, aircraft details, and pricing information.​

3. Input Methods and Controls

To enhance data integrity and user experience, the system employs various input methods and
controls:

●​ Text Fields: For entering names, email addresses, and other textual data.​

●​ Dropdown Menus: For selecting options like departure cities, destinations, and seat
classes.​

●​ Radio Buttons and Checkboxes: For selecting preferences such as meal options or
additional services.​

●​ Date Pickers: For choosing travel dates, ensuring correct date formats.​

●​ Validation Controls: Implementing real-time validation to prompt users in case of


incorrect or missing data.​

4. User Interface Considerations

The input interfaces are designed with the following considerations:

●​ Consistency: Uniform design elements across all input forms.​

●​ Clarity: Clear labels and instructions for each input field.​

●​ Feedback: Immediate feedback on input errors or successful data entry.​

●​ Accessibility: Ensuring that forms are accessible to users with disabilities.​

5. Security Measures

To protect user data during input:

●​ Secure Connections: Using HTTPS protocols to encrypt data transmission.​


●​ Input Sanitization: Preventing injection attacks by sanitizing user inputs.​

●​ Authentication: Verifying user identities before allowing access to sensitive input forms.​

3.3 OUTPUT DESIGN:

Output design is a critical component of system development, focusing on how information is


presented to users after processing. Effective output design ensures that the information is
accurate, timely, and presented in a user-friendly manner, facilitating informed decision-making
and enhancing user satisfaction.

1. Objectives of Output Design

The primary goals of output design in the Flight Booking System include:

●​ Clarity: Ensuring that the output is easily understandable by the intended users.​

●​ Relevance: Providing information that is pertinent to the user's needs.​

●​ Timeliness: Delivering information promptly to support decision-making processes.​

●​ Accessibility: Making outputs available in formats that are convenient for users, such as
on-screen displays, printed reports, or downloadable files.​

2. Types of Outputs

The system generates various types of outputs to cater to different user requirements:

●​ External Outputs: Information intended for users outside the organization, such as:​

○​ Booking Confirmations: Details of flight bookings sent to customers via email or


SMS.​

○​ E-Tickets: Electronic tickets provided to passengers for travel.​

●​ Internal Outputs: Information used within the organization for operational purposes,
including:​

○​ Flight Schedules: Timetables for departures and arrivals used by staff.​


○​ Passenger Manifests: Lists of passengers for each flight.​

●​ Operational Outputs: Outputs that support day-to-day operations, such as:​

○​ Check-In Reports: Information on passengers who have checked in.​

○​ Boarding Passes: Documents issued to passengers for boarding.​

●​ Interactive Outputs: Real-time information displayed on user interfaces, including:​

○​ Search Results: Available flights based on user queries.​

○​ Booking Status: Current status of a user's booking.​

●​ Turnaround Outputs: Documents that are returned to the system after user input, such
as:​

○​ Feedback Forms: Customer feedback submitted for service improvement.​

3. Design Considerations

Effective output design involves several key considerations:

●​ Format and Layout: Organizing information in a logical and aesthetically pleasing


manner to enhance readability.​

●​ Content Accuracy: Ensuring that all output data is correct and up-to-date.​

●​ Consistency: Maintaining uniformity in design elements across different outputs to


provide a cohesive user experience.​

●​ Security: Protecting sensitive information in outputs, especially when transmitted


electronically or printed.​

4. Output Delivery Methods

The system employs various methods to deliver outputs to users:


●​ On-Screen Displays: Real-time information presented on user interfaces for immediate
access.​

●​ Email Notifications: Automated emails sent to users containing booking confirmations,


e-tickets, and other relevant information.​

●​ Printed Documents: Hard copies of tickets, boarding passes, and reports generated as
needed.​

●​ Downloadable Files: Options for users to download documents in formats like PDF for
personal records.​


3.4 DATABASE DESIGN:

A well-structured database is the backbone of any robust flight booking system. It ensures
efficient data management, quick retrieval, and seamless integration of various system
components. The database design encompasses the identification of entities, their attributes,
relationships, and the normalization process to eliminate data redundancy.

1. Key Entities and Their Attributes

The primary entities in the flight booking system include:

●​ User:Attributes: UserID (Primary Key), FullName, Email, PasswordHash,


ContactNumber, Address.​

●​ Flight:​

○​ Attributes: FlightID (Primary Key), AirlineName, Origin, Destination,


DepartureTime, ArrivalTime, AircraftType, SeatCapacity.​

●​ Booking:​

○​ Attributes: BookingID (Primary Key), UserID (Foreign Key), FlightID (Foreign


Key), BookingDate, SeatNumber, Status.​

●​ Payment:​
○​ Attributes: PaymentID (Primary Key), BookingID (Foreign Key), PaymentDate,
Amount, PaymentMethod, TransactionStatus.​

●​ Airport:​

○​ Attributes: AirportID (Primary Key), AirportName, City, Country, IATACode.​

●​ Aircraft:​

○​ Attributes: AircraftID (Primary Key), AircraftType, SeatCapacity, Manufacturer.​

2. Entity-Relationship (ER) Diagram

The ER diagram visually represents the relationships between entities:

●​ A User can have multiple Bookings.​

●​ A Booking is associated with one Flight.​

●​ A Flight operates between two Airports (Origin and Destination).​

●​ A Flight utilizes one Aircraft.​

●​ Each Booking has one corresponding Payment.​

This structured representation ensures clarity in data relationships and aids in efficient database
normalization.

3. Normalization

To eliminate data redundancy and ensure data integrity, the database is normalized up to the
Third Normal Form (3NF):

●​ First Normal Form (1NF): Eliminate duplicate columns from the same table.​

●​ Second Normal Form (2NF): Remove subsets of data that apply to multiple rows and
place them in separate tables.​

●​ Third Normal Form (3NF): Eliminate fields that do not depend on the primary key.​
This normalization process ensures efficient data storage and retrieval.

4. Indexes and Constraints

●​ Primary Keys: Unique identifiers for each table (e.g., UserID, FlightID).​

●​ Foreign Keys: Establish relationships between tables (e.g., UserID in Booking table
referencing User table).​

●​ Indexes: Created on frequently queried fields like FlightID, BookingDate to speed up


search operations.​

●​ Constraints: Ensure data validity (e.g., NOT NULL, UNIQUE).​

5. Security Considerations

●​ Authentication and Authorization: Implement role-based access controls to restrict


data access.​

●​ Data Encryption: Encrypt sensitive data like passwords and payment details.​

●​ Backup and Recovery: Regular backups and disaster recovery plans to prevent data loss.​

4. SYSTEM DEVELOPMENT:
System development is the structured process of creating and maintaining information systems to
meet specific organizational needs. In the context of the Flight Booking System, it encompasses
the entire journey from initial concept to the deployment and maintenance of the application.
This process is guided by the System Development Life Cycle (SDLC), which ensures that the
system is developed systematically and efficiently.

1. Planning

The planning phase involves identifying the objectives of the Flight Booking System, assessing
feasibility, and allocating resources. Key activities include:

●​ Requirement Gathering: Engaging with stakeholders to understand their needs.​


●​ Feasibility Study: Analyzing technical, economic, and operational feasibility.​

●​ Project Scheduling: Defining timelines, milestones, and resource allocation.​

2. Analysis

In this phase, detailed analysis of the system requirements is conducted to ensure a clear
understanding of the functionalities needed. Activities include:

●​ System Requirements Specification (SRS): Documenting functional and non-functional


requirements.​

●​ Process Modeling: Creating data flow diagrams and use case diagrams to visualize
system processes.​

3. Design

The design phase translates requirements into a blueprint for building the system. It includes:

●​ Architectural Design: Defining the overall system architecture, including client-server


models.​

●​ Database Design: Designing the database schema to store flight, user, and booking
information.​

●​ Interface Design: Creating user interface layouts for ease of use.​

4. Development

This phase involves actual coding and development of the system components as per the design
specifications. Tasks include:

●​ Frontend Development: Building user interfaces using technologies like HTML, CSS,
and JavaScript.​

●​ Backend Development: Implementing server-side logic using programming languages


and frameworks.​
●​ Database Integration: Connecting the application with the database for data storage and
retrieval.​

5. Testing

Testing ensures that the system functions correctly and meets the specified requirements. Types
of testing include:

●​ Unit Testing: Testing individual components for functionality.​

●​ Integration Testing: Ensuring that different modules work together seamlessly.​

●​ System Testing: Validating the complete and integrated system.​

●​ User Acceptance Testing (UAT): Confirming that the system meets user expectations.​

6. Implementation

In this phase, the system is deployed in the live environment. Activities include:

●​ Deployment: Installing the system on user machines or servers.​

●​ Training: Educating users on how to operate the system effectively.​

●​ Documentation: Providing user manuals and technical documentation.​

7. Maintenance

Post-deployment, the system requires ongoing maintenance to ensure its continued effectiveness.
This includes:

●​ Bug Fixes: Addressing any issues that arise during system use.​

●​ Updates: Implementing enhancements or new features as needed.​

●​ Performance Monitoring: Regularly assessing system performance and making


necessary adjustments.
4.1DESCRIPTION OF MODULES:

The Flight Booking System is structured into several interconnected modules, each
responsible for specific functionalities. This modular approach ensures scalability,
maintainability, and efficient management of the system.

1. User Authentication Module

This module manages user registration and login functionalities. It ensures secure access to the
system by validating user credentials and maintaining session management.

●​ Features:​

○​ Registration: Allows new users to create an account by providing necessary


details.​

○​ Login: Authenticates existing users using their credentials.​

○​ Password Management: Facilitates password reset and change functionalities.​

2. Flight Search Module

Enables users to search for available flights based on specific criteria such as origin, destination,
travel dates, and class.

●​ Features:​

○​ Search Filters: Users can filter flights by date, time, airline, and price range.​

○​ Flight Details: Displays comprehensive information about each flight, including


flight number, departure and arrival times, duration, and fare.​

3. Reservation Module

Handles the booking process, allowing users to reserve seats on selected flights.

●​ Features:​

○​ Seat Selection: Users can choose their preferred seats based on availability.​
○​ Passenger Information: Collects necessary details for each traveler.​

○​ Booking Confirmation: Generates a unique booking reference number upon


successful reservation.​

4. Payment Module

Manages the financial transactions associated with flight bookings.

●​ Features:​

○​ Payment Gateway Integration: Supports various payment methods such as


credit/debit cards, net banking, and digital wallets.​

○​ Transaction Security: Ensures secure processing of payments using encryption


protocols.​

○​ Receipt Generation: Provides users with a detailed payment receipt


post-transaction.​

5. Ticket Management Module

Allows users to view, download, and manage their booked ticket.

●​ Features:​

○​ E-Ticket Generation: Creates electronic tickets that can be emailed or


downloaded.​

○​ Booking History: Displays a user's past and upcoming bookings.​

○​ Cancellation and Refund: Facilitates ticket cancellations and processes refunds


as per the airline's policy.​

6. Admin Module

Provides administrative functionalities to manage the overall system operations.


●​ Features:​

○​ Flight Management: Admins can add, update, or remove flight schedules.​

○​ User Management: Monitors user activities and handles user-related issues.​

○​ Report Generation: Generates analytical reports on bookings, revenue, and


system usage.

4.2 TESTING:

Testing is a critical phase in the Software Development Life Cycle (SDLC) that ensures the
developed system meets the specified requirements and functions correctly. For the Flight
Booking System, a comprehensive testing strategy was employed to identify and rectify defects,
ensuring a robust and reliable application.

1. Testing Objectives

The primary objectives of testing the Flight Booking System include:

●​ Verification of Functionality: Ensure all features, such as flight search, booking,


payment processing, and ticket generation, work as intended.​

●​ Validation of Requirements: Confirm that the system meets all specified user and
business requirements.​

●​ Identification of Defects: Detect and fix any errors or bugs in the system before
deployment.​

●​ Performance Assessment: Evaluate the system's performance under various conditions


to ensure stability and responsiveness.​

2. Testing Types Employed

A combination of testing methods was utilized to thoroughly assess the system:

a. Unit Testing
●​ Purpose: Test individual components or modules of the system in isolation.​

●​ Approach: Developers tested functions like user authentication, flight search algorithms,
and payment calculations to ensure they operate correctly.​

b. Integration Testing

●​ Purpose: Evaluate the interaction between integrated modules.​

●​ Approach: Test cases were designed to assess the communication between modules,
such as the interaction between the booking module and the payment gateway.​

c. System Testing

●​ Purpose: Assess the complete and integrated system's compliance with the specified
requirements.​

●​ Approach: End-to-end scenarios were tested, including searching for flights, booking
tickets, making payments, and generating e-tickets.​

d. User Acceptance Testing (UAT)

●​ Purpose: Validate the system's functionality and usability from the end-user's
perspective.​

●​ Approach: Selected users tested the system to ensure it meets their expectations and is
user-friendly.​

3. Testing Techniques

Two primary testing techniques were applied:

a. Black Box Testing

●​ Focus: Examines the system's functionality without considering internal code structures.​

●​ Application: Test cases were created based on input-output specifications, such as


entering search criteria and verifying the displayed flight options.​
b. White Box Testing

●​ Focus: Involves testing internal structures or workings of an application.​

●​ Application: Developers tested specific code paths, loops, and conditions within modules
to ensure logical correctness.​

4. Test Case Design

Test cases were meticulously designed to cover various scenarios:

●​ Valid Inputs: Ensuring the system behaves correctly with expected inputs.​

●​ Invalid Inputs: Checking system responses to unexpected or erroneous inputs.​

●​ Boundary Conditions: Testing the system's behavior at the edge of input domains.​

●​ Performance Scenarios: Assessing system performance under load, such as multiple


simultaneous bookings.​

5. Defect Tracking and Resolution

All identified defects were logged, categorized based on severity, and assigned to developers for
resolution. Post-fix, regression testing was conducted to ensure that fixes did not introduce new
issues.

6. Testing Tools and Environment

●​ Tools Used: Depending on the technologies employed, tools like Selenium for automated
testing, JUnit for unit testing, and Postman for API testing were utilized.​

●​ Environment: A controlled testing environment replicating the production setup was


established to ensure accurate testing results.​
4.2 IMPLEMENTATION:

The Implementation phase is pivotal in transitioning the Flight Booking System from design to
a functional application. It involves setting up the environment, coding, integrating modules, and
deploying the system for end-users.

1. System Architecture

The system adopts a three-tier architecture comprising:

●​ Presentation Layer: User interfaces developed using HTML, CSS, and JavaScript for
intuitive interaction.​

●​ Business Logic Layer: Server-side scripting using languages like PHP or Java to process
user requests and enforce business rules.​

●​ Data Access Layer: Interaction with the database using SQL queries to retrieve and
manipulate data.​

2. Technology Stack

●​ Frontend: HTML, CSS, JavaScript​

●​ Backend: PHP, Java, or Python​

●​ Database: MySQL or PostgreSQL​

●​ Web Server: Apache or Nginx​

●​ Development Tools: IDE like Visual Studio Code or Eclipse​

3. Module Integration

Each module—User Authentication, Flight Search, Reservation, Payment Processing, Ticket


Management, and Admin Panel—was developed and tested individually before integration.
Integration ensured seamless communication between modules, such as passing user data from
the authentication module to the reservation module.

4. Database Implementation
The database schema was implemented based on the design specifications, creating tables for
users, flights, bookings, payments, and tickets. Proper indexing and relationships were
established to optimize query performance and maintain data integrity.

5. Security Measures

To safeguard user data and transactions:

●​ Input Validation: Ensured all user inputs are validated to prevent SQL injection and
cross-site scripting attacks.​

●​ Password Hashing: User passwords are stored using hashing algorithms like bcrypt.​

●​ Secure Transactions: Payment processes are secured using HTTPS protocols and, if
applicable, integrated with trusted payment gateways.​

6. Deployment

Post-development, the system was deployed on a web server. Necessary configurations were
made to ensure the system is accessible to end-users, and performance monitoring tools were set
up to track system health.

7. User Training and Documentation

Comprehensive user manuals and technical documentation were prepared to assist users and
administrators in navigating and managing the system effectively.
CONCLUSION:

The development of the Flight Booking System has successfully transformed the traditional,
manual reservation process into a streamlined, automated platform. By integrating key
functionalities such as user authentication, flight search, booking, payment processing, and ticket
management, the system enhances efficiency and user experience.

Through this project, valuable insights were gained into system design, database management,
and the implementation of secure, user-friendly interfaces. The modular architecture ensures
scalability and ease of maintenance, laying a solid foundation for future enhancements.

Overall, the Flight Booking System stands as a testament to the effective application of software
development principles, delivering a practical solution to modernize airline reservation
processes.

SCOPE FOR FUTURE ENHANCEMENT:

As the aviation and travel industries continue to evolve, there are numerous opportunities to
enhance the Flight Booking System to meet emerging trends and user expectations.
Implementing these enhancements can lead to improved user experience, operational efficiency,
and competitiveness.

1. Artificial Intelligence (AI) and Machine Learning Integration

●​ Personalized Recommendations: Utilize AI to analyze user behavior and preferences,


offering tailored flight suggestions and promotions.​

●​ Dynamic Pricing Models: Implement machine learning algorithms to adjust pricing


based on demand, booking time, and other factors, optimizing revenue.​

●​ Predictive Analytics: Forecast travel trends and customer needs to proactively offer
relevant services.​

2. Voice-Activated and Chatbot Interfaces


●​ Voice Booking: Integrate voice recognition technology to allow users to search and book
flights using voice commands, enhancing accessibility.​

●​ AI-Powered Chatbots: Deploy chatbots for 24/7 customer support, handling inquiries,
bookings, and issue resolution efficiently.​

3. Mobile-First and Cross-Platform Optimization

●​ Responsive Design: Ensure the system is fully functional and user-friendly across
various devices, including smartphones and tablets.​

●​ Mobile Applications: Develop dedicated mobile apps with features like push
notifications for flight updates and easy access to booking information.​

4. Blockchain Technology for Enhanced Security

●​ Secure Transactions: Implement blockchain to ensure transparent and tamper-proof


transaction records, enhancing trust.​

●​ Digital Identity Verification: Use blockchain for secure and efficient passenger identity
management.​

5. Biometric Authentication and Digital Credentials

●​ Facial Recognition: Integrate biometric systems for seamless check-in and boarding
processes, reducing wait times.​

●​ Digital Travel Credentials: Adopt digital IDs that store passenger information securely,
facilitating contactless travel experiences.​

6. Sustainability Features

●​ Carbon Footprint Tracking: Provide information on the environmental impact of


flights, allowing users to make eco-conscious choices.​
●​ Green Travel Options: Offer alternatives like carbon offset programs or highlight
airlines with sustainable practices.​

7. Integration with Ancillary Services

●​ Comprehensive Travel Planning: Allow users to book hotels, car rentals, and other
services within the same platform for a unified experience.​

●​ Loyalty Programs: Integrate with frequent flyer and rewards programs to offer
personalized deals and incentives.​

8. Advanced Analytics and Reporting

●​ User Behavior Analysis: Monitor and analyze user interactions to continuously improve
system usability and offerings.​

●​ Operational Insights: Provide administrators with detailed reports on bookings,


cancellations, and revenue to inform strategic decisions.​

By embracing these future enhancements, the Flight Booking System can significantly improve
its functionality, user satisfaction, and adaptability to the ever-changing landscape of the travel
industry.
BIBLIOGRAPHY:

1.​ Barua, B., & Kaiser, M. S. (2024). A Next-Generation Approach to Airline


Reservations: Integrating Cloud Microservices with AI and Blockchain for Enhanced
Operational Performance. arXiv. https://arxiv.org/abs/2411.06538​

2.​ Barua, B., & Kaiser, M. S. (2024). Enhancing Resilience and Scalability in Travel
Booking Systems: A Microservices Approach to Fault Tolerance, Load Balancing, and
Service Discovery. arXiv. https://arxiv.org/abs/2410.19701​

3.​ Barua, B., & Kaiser, M. S. (2024). Optimizing Airline Reservation Systems with
Edge-Enabled Microservices: A Framework for Real-Time Data Processing and
Enhanced User Responsiveness. arXiv. https://arxiv.org/abs/2411.12650​

4.​ Saren, M. (2021). Airline Reservation System Project Report. Arka Jain University.
https://arkajainuniversity.ac.in/naac/Criteria%201/1.3.4/1_3_4_DOCUMENTS/MCA/AJ
U210785.pdf​

5.​ Talwar, S. (n.d.). Airline Reservation System Project Documentation. Scribd.


https://www.scribd.com/doc/69609160/Airline-Reservation-System-Project-Documentati
on​

6.​ AltexSoft. (2024). Flight Booking Process: Airline Reservation, Ticketing, and More.
https://www.altexsoft.com/blog/flight-booking-process-structure-steps-and-key-systems/​

7.​ Grafiati. (n.d.). Bibliographies: 'Airlines Reservation Systems'.


https://www.grafiati.com/en/literature-selections/airlines-reservation-systems/​

8.​ Academia.edu. (n.d.). Online Airline Reservation System Project Report.


https://www.academia.edu/121903814/Online_airline_reservation_system_project_report​

9.​ Acharya, K. (2024). Airline Reservation System Project Report. ResearchGate.


https://www.researchgate.net/publication/382087083_AIRLINE_RESERVATION_SYST
EM_PROJECT_REPORT​

10.​Pardeep Singh. (2015). Design and Implementation of an Online Flight Reservation


System. Scribd.
https://www.scribd.com/document/310328470/Airline-Reservation-System-Project-Repor
t-1-docx​
11.​Magcaba, A. (n.d.). Online Flight Booking System. Scribd.
https://www.scribd.com/document/623888806/ONLINE-FLIGHT-BOOKING-SYSTEM​

12.​Yu, J. (2004). Web-Based Airline Ticket Booking System. UNT Digital Library.
https://digital.library.unt.edu/ark:/67531/metadc4556/m2/1/high_res_d/problieu.pdf​

13.​Barua, B., & Kaiser, M. S. (2024). Microservices-Based Framework for Predictive


Analytics and Real-time Performance Enhancement in Travel Reservation Systems.
arXiv. https://arxiv.org/abs/2412.15616​

14.​Shukla, N., Kolbeinsson, A., Otwell, K., Marla, L., & Yellepeddi, K. (2019). Dynamic
Pricing for Airline Ancillaries with Customer Context. arXiv.
https://arxiv.org/abs/1902.02236​

15.​Barua, B., & Kaiser, M. S. (2024). Blockchain-Based Trust and Transparency in Airline
Reservation Systems using Microservices Architecture. arXiv.
https://arxiv.org/abs/2410.14518​


APPENDICES:
A. DATA FLOW DIAGRAM

A Data Flow Diagram (DFD) for a flight booking mini project would visually represent the
movement of data as a user interacts with the system. Here's a simplified DFD:

Context Level DFD (Level 0):

●​ External Entities:
●​ Customer
●​ Airline System
●​ Processes:
●​ "Book Flight"
●​ "Check Flight Availability"
●​ "Manage Reservations"
●​ "Payment"

Level 1 DFD (Detailed Breakdown):

●​ Processes:
●​ "Search Flights":
●​ Input: Customer input (origin, destination, date)
●​ Output: Flight availability list
●​ "Select Flight":
●​ Input: Flight list, passenger details
●​ Output: Confirmation of selected flight
●​ "Confirm Booking":
●​ Input: Flight details, passenger details, payment information
●​ Output: Reservation confirmation, booking ID
●​ "Check Flight Status":
●​ Input: Booking ID, Flight details
●​ Output: Flight status (delayed, canceled, etc.)
B TABLE STRUCTURE:

1.PASSENGERS

field datatype description

passenger INT Unique identifier for each


passenger

Firstname VARCHAR(50) Passenger’s first name

Lastname VARCHAR(50) Passenger’s last name

Email VARCHAR(100) Contact email address

Phone VARCHAR(15) Contact phone number

PassportNumber VARCHAR(20) Passport number

2.AIRPORTS

field datatype description

AirportID INT (PK) Unique identifier foe each


aiport

name VARCHAR(100) Airport name

city VARCHAR(50) City where the airport is


located

country VARCHAR(50) Country of the airport

IATAcode CHAR(3) Standard IATA code


3.FLIGHTS

field datatype description

FlightID INT (PK) Unique identifier for each


flight

Flightnumber VARCHAR(10) Airline flight number

Departure time DATETIME Scheduled departure time

Arrival time DATETIME Scheduled arrival time

originID INT(FK) References airports

DestinationID INT(FK) References airports

AircraftID INT(FK) References aircrafts

4.AIRCRAFTS

field datatype description

AircraftID INT(PK) Unique identifier for each


aircraft

Model VARCHAR(50) Aircraft model

Capacity INT Seating capacity

5.RESERVATIONS

field datatype description

ReservationID INT(PK) Unique reservation identifier

PassengerID INT(FK) References passengers

FlightID INT(FK) References flights

Seatnumber VARCHAR(5) Assigned seat number

Bookingdate DATETIME Data and time of booking

Status VARCHAR(20) Booking status


6.PAYMENTS
field datatype description

PaymentID INT(PK) Unique payment identifier

ReservationID INT(FK) References reservations

Amount DECIMAL(10.2) Payment amount

PaymentDate DATETIME Date and time of payment

PaymentMethod VARCHAR(20) Method of payment eg:credit


card.

7.TICKETS

field datatype description

TicketID INT(PK) Unique ticket identifier

ReservationID INT(FK) References reservations

Issuedate DATETIME Date and time ticket was


issued

Ticketdate VARCHAR(20) Unique ticket number

C.SAMPLE CODING:

import sqlite3

# Connect to SQLite database (or create it if it doesn't exist)


conn = sqlite3.connect('flight_booking.db')
cursor = conn.cursor()

# Create Passengers table


cursor.execute('''
CREATE TABLE IF NOT EXISTS Passengers (
PassengerID INTEGER PRIMARY KEY AUTOINCREMENT,
FirstName TEXT NOT NULL,
LastName TEXT NOT NULL,
Email TEXT UNIQUE NOT NULL,
Phone TEXT,
PassportNumber TEXT UNIQUE
)
''')

# Create Flights table


cursor.execute('''
CREATE TABLE IF NOT EXISTS Flights (
FlightID INTEGER PRIMARY KEY AUTOINCREMENT,
FlightNumber TEXT NOT NULL,
DepartureTime TEXT NOT NULL,
ArrivalTime TEXT NOT NULL,
Origin TEXT NOT NULL,
Destination TEXT NOT NULL,
AircraftModel TEXT NOT NULL,
Capacity INTEGER NOT NULL
)
''')

# Create Reservations table


cursor.execute('''
CREATE TABLE IF NOT EXISTS Reservations (
ReservationID INTEGER PRIMARY KEY AUTOINCREMENT,
PassengerID INTEGER NOT NULL,
FlightID INTEGER NOT NULL,
SeatNumber TEXT NOT NULL,
BookingDate TEXT NOT NULL,
Status TEXT NOT NULL,
FOREIGN KEY (PassengerID) REFERENCES Passengers(PassengerID),
FOREIGN KEY (FlightID) REFERENCES Flights(FlightID)
)
''')

# Create Payments table


cursor.execute('''
CREATE TABLE IF NOT EXISTS Payments (
PaymentID INTEGER PRIMARY KEY AUTOINCREMENT,
ReservationID INTEGER NOT NULL,
Amount REAL NOT NULL,
PaymentDate TEXT NOT NULL,
PaymentMethod TEXT NOT NULL,
FOREIGN KEY (ReservationID) REFERENCES Reservations(ReservationID)
)
''')

conn.commit()
conn.close()

import sqlite3
from datetime import datetime

# Function to add a new passenger


def add_passenger(first_name, last_name, email, phone, passport_number):
conn = sqlite3.connect('flight_booking.db')
cursor = conn.cursor()
cursor.execute('''
INSERT INTO Passengers (FirstName, LastName, Email, Phone, PassportNumber)
VALUES (?, ?, ?, ?, ?)
''', (first_name, last_name, email, phone, passport_number))
conn.commit()
conn.close()
print("Passenger added successfully.")

# Function to add a new flight


def add_flight(flight_number, departure_time, arrival_time, origin, destination, aircraft_model,
capacity):
conn = sqlite3.connect('flight_booking.db')
cursor = conn.cursor()
cursor.execute('''
INSERT INTO Flights (FlightNumber, DepartureTime, ArrivalTime, Origin, Destination,
AircraftModel, Capacity)
VALUES (?, ?, ?, ?, ?, ?, ?)
''', (flight_number, departure_time, arrival_time, origin, destination, aircraft_model, capacity))
conn.commit()
conn.close()
print("Flight added successfully.")
# Function to make a reservation
def make_reservation(passenger_id, flight_id, seat_number):
conn = sqlite3.connect('flight_booking.db')
cursor = conn.cursor()
booking_date = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
status = "Confirmed"
cursor.execute('''
INSERT INTO Reservations (PassengerID, FlightID, SeatNumber, BookingDate, Status)
VALUES (?, ?, ?, ?, ?)
''', (passenger_id, flight_id, seat_number, booking_date, status))
conn.commit()
conn.close()
print("Reservation made successfully.")

# Function to process a payment


def process_payment(reservation_id, amount, payment_method):
conn = sqlite3.connect('flight_booking.db')
cursor = conn.cursor()
payment_date = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
cursor.execute('''
INSERT INTO Payments (ReservationID, Amount, PaymentDate, PaymentMethod)
VALUES (?, ?, ?, ?)
''', (reservation_id, amount, payment_date, payment_method))
conn.commit()
conn.close()
print("Payment processed successfully.")

D.SAMPLE INPUT:

1. Passenger Information
plaintext
CopyEdit
First Name : Alice
Last Name : Johnson
Email : alice.johnson@example.com
Phone : +91-9876543210
Passport Number : M7894561

🛫 2. Flight Information
plaintext
CopyEdit
Flight Number : AI202
Departure Time : 2025-06-15 10:30:00
Arrival Time : 2025-06-15 14:45:00
Origin : New Delhi
Destination : Mumbai
Aircraft Model : Airbus A320
Capacity : 180

📄 3. Reservation Details
plaintext
CopyEdit
Passenger ID : 1
Flight ID :1
Seat Number : 14B
Booking Date : 2025-06-01 16:25:00
Status : Confirmed

💳 4. Payment Information
plaintext
CopyEdit
Reservation ID : 1
Amount : 3500.00
Payment Date : 2025-06-01 16:30:00
Payment Method : Credit Card

E.SAMPLE OUTPUT:

========================================
Flight Booking Confirmation
========================================

Passenger Name : Alice Johnson


Passport Number : M7894561
Email : alice.johnson@example.com
Phone Number : +91-9876543210

----------------------------------------
Flight Number : AI202
Route : New Delhi → Mumbai
Departure Time : 2025-06-15 10:30:00
Arrival Time : 2025-06-15 14:45:00
Aircraft Model : Airbus A320
Seat Number : 14B

----------------------------------------
Reservation ID : 1
Booking Date : 2025-06-01 16:25:00
Booking Status : Confirmed

----------------------------------------
Payment ID :1
Amount Paid : ₹3500.00
Payment Method : Credit Card
Payment Date : 2025-06-01 16:30:00

========================================
Thank you for booking with us!
========================================

SAMPLE OUTPUT:

You might also like