Objective 1
Objective 1
1
7. Compliance: Ensuring compliance with regulatory
requirements and maintaining accurate records for auditing
purposes.
8. Scalability: Designing systems that can handle fluctuations
in demand, including peak travel periods and special events.
2
14. Customization: Offering personalized booking experiences
based on customer preferences and past travel behavior.
3
MODULES USED
Python Modules
1. Tkinter: For the graphical user interface (GUI).
2. mysql-connector-python: For connecting Python to the
MySQL database.
4
Check seat availability.
Update database records for new reservations.
search.py:
This file contains functionality to search for flights.
Search flights based on criteria like date, destination, and
price.
Display search results.
utils.py:
This file contains utility functions.
Helper functions for formatting, validations, etc.
Common functions used across multiple modules.
MySQL Commands:
Set Up MySQL Database
Create a new MySQL database.
Modify database. py with your MySQL credentials.
Run the Application:
Ensure all files are in the same directory.
Run main.py
5
SCOPE
Functional Scope
1. User Management:
• User registration, login, and logout functionalities.
• Profile management (updating personal details,
changing passwords).
• Role-based access control (admin and regular users).
2. Flight Management:
• Add, update, and delete flight details (flight number, route,
schedule, pricing).
• Manage seat availability.
• Special services management (e.g., meals, extra baggage).
3. Reservation Management:
• Search for available flights based on criteria (destination,
date, price).
• Book tickets and receive booking confirmations.
• Modify or cancel reservations.
• View booking history and details.
4. Reporting and Analytics:
• Generate reports on bookings, cancellations, and user
activity.
• Analyze trends and performance metrics.
Technical Scope
1. Database Management:
• MySQL for database operations.
• Design and manage tables for users, flights,
reservations, payments, and notifications.
• Backup and recovery procedures.
2. User Interface:
• Tkinter for designing the GUI.
6
• User-friendly interfaces for booking, viewing, and
managing reservations.
• Responsive design considerations (for potential future
web or mobile interface adaptations).
3. Security:
• User authentication and authorization.
• Data encryption for sensitive information.
• Compliance with data protection regulations.
4. Integration:
• Integration with external systems like payment
gateways.
• Potential for future integration with airline APIs for
real-time flight data.
5. Scalability and Performance:
• Efficient handling of multiple concurrent users and
transactions.
• Load balancing and optimization techniques for
performance enhancement.
Operational Scope
1. Customer Support:
• Features for customer support such as a help desk and
FAQs.
• Support ticketing system for issue resolution.
2. Marketing and Promotion:
• Implement promotional offers and loyalty programs.
• Marketing tools for user engagement and campaign
management.
3. Legal and Compliance:
• Compliance with aviation and data protection laws.
7
• Maintain audit logs and records for regulatory
requirements.
4. Training and Documentation:
• Training materials and documentation for users and
administrators.
• User manuals and technical documentation.
Future Scope
1. Mobile Application:
• Potential development of a mobile app for iOS and
Android.
2. Advanced Features:
• AI-driven recommendations for flights and travel
packages.
• Machine learning for predictive analytics on pricing
and user behavior.
3. Multi-language Support:
• Offer multi-language support for a global user base.
4. Expanded Services:
• Additional travel services like hotel bookings, car
rentals, and tour packages.
5. Enhanced Customer Experience:
• Chatbots for 24/7 customer service.
• Virtual tours and augmented reality features for
destination previews.
8
SYSTEM REQUIREMENTS
SOFTWARE REQUIREMENTS:
Python version; Idle (python 3.12 64-bit) - for executing the
program
Operating system: Window 11
Microsoft word for Document
Language: Python and SQL
Frontend: Python version 3.10
Backend: SQL workbench
HARDWARE REQUIREMENTS:
Processor: Dual-core processor
RAM : 8GB of ram
Storage : 100MB of storage
Monitor : 15” Color Monitor
KEYBOARD
MOUSE
9
SOURCE CODE
from tkinter import *
from tkinter import messagebox, ttk
from tkinter.ttk import Combobox
import mysql.connector
def fetch_data(tree):
try:
10
cur.execute("SELECT * FROM display")
rows = cur.fetchall()
for i in tree.get_children():
tree.delete(i)
def fun9():
root = Tk()
root.title("Flight Details")
root.geometry("1200x800") # Enlarged window size
11
for col in columns:
tree.heading(col, text=col)
tree.pack(fill=BOTH, expand=True)
root.mainloop()
def fun5():
rootp.destroy()
root = Tk()
root.title('Flight Search And Booking')
root.geometry("1200x800") # Enlarged window size
12
w.grid(row=1, column=1)
13
w3 = Combobox(root, height=5, width=30, values=["Sunday",
"Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday"])
w3.grid(row=5, column=1)
def fun():
a, b, c, d, f, g, s = w.get(), w1.get(), e.get(), w2.get(),
w3.get(), w4.get(), m.get()
if any(field == '' for field in [a, b, c, d, f, g, s]):
messagebox.showerror("Oops", "You can't leave any
field empty")
14
else:
if d == 'Economic' and a != b:
cur.execute("INSERT INTO economic2 (boarding,
destination, adno_number, day, time, date) VALUES (%s, %s,
%s, %s, %s, %s)", (a, b, c, f, g, s))
con.commit()
messagebox.showinfo("Congrats", "Your seat has been
reserved")
cur.execute(f"select * from economic2 where
adno_number='{c}'")
messagebox.showinfo("records",cur.fetchall())
messagebox.showinfo("fare", "The total fare is
RS26000 ")
elif d == 'BusinessClass' and a != b:
cur.execute("INSERT INTO common2 (boarding,
destination, adno_number, day, time, date) VALUES (%s, %s,
%s, %s, %s, %s)", (a, b, c, f, g, s))
con.commit()
messagebox.showinfo("Congrats", "Your seat has been
reserved")
con.commit()
15
cur.execute(f"select * from common2 where
adno_number='{c}'")
messagebox.showinfo("records",cur.fetchall())
messagebox.showinfo("fare", "The total fare is
RS26000 ")
else:
messagebox.showerror("Error", "You can't choose the
same city")
root.mainloop()
def fun8():
rootp.destroy()
root2 = Tk()
root2.title("Welcome, Customer To our Cancellation System")
root2.geometry("1200x800")
def fun2():
16
b, c, d, s = w2.get(), w3.get(), e.get(), m.get()
if any(field == '' for field in [b, c, d, s]):
messagebox.showerror("Oops", "You can't leave any
field empty")
else:
if b.lower() == "economic":
cur.execute("DELETE FROM economic2 WHERE
adno_number=%s AND boarding=%s AND date=%s", (d, c, s))
con.commit()
messagebox.showinfo("Cancellation Confirmation",
"Your reservation is cancelled")
elif b.lower() == "businessclass":
cur.execute("DELETE FROM common2 WHERE
adno_number=%s AND boarding=%s AND date=%s", (d, c, s))
con.commit()
messagebox.showinfo("Cancellation Confirmation",
"Your reservation is cancelled")
17
w2.grid(row=2, column=1)
18
root2.mainloop()
def exit_program():
if messagebox.askokcancel("Quit", "Do you want to quit?"):
rootp.destroy()
rootp.mainloop()
OUTPUT SCREEN
19
This is the window, i.e., the Graphical User Interface (GUI)
which gets opened on executing the source code:
After selecting the details when we click the button search ,we
get this messagebox:
20
In the main window,if we choose book flights(business class)
and when we enter required details:
21
In the main window,if we choose book flights(Economic
Class)and enter the details:
22
In the main window,if we choose cancel flight and enter the
details:
23
When , we click cancel reservation:
When the user books the flight ,the details will be saved in
mysql as a table and when we cancel flight ,the particular detail
will be deleted:
24
Here,you can see the booking from India to London at
Monday(2024-03-29) in the first table,but after cancellation ,the
particular details is deleted.
SQL code(tables):
25
CONCLUSION
Building an air ticket reservation system using Python, MySQL,
and Tkinter offers a robust and scalable solution for managing
flight bookings, user accounts, and related operations. This
project demonstrates the integration of a user-friendly graphical
interface with a powerful relational database, ensuring a
seamless experience for both administrators and customers.
26
Key Achievements:
1. Functional Completeness:
- The system supports core functionalities such as user
registration and login, flight management, booking reservations,
and payment processing.
- Real-time notifications and alerts keep users informed about
their bookings and flight statuses.
2. Technical Robustness:
- Using MySQL for the backend ensures reliable data storage
and management, supporting complex queries and transactions.
- Tkinter provides a straightforward yet effective way to create
a graphical user interface, making the system accessible to users
with varying technical expertise.
3. Operational Efficiency: - The system improves operational
efficiency by automating booking processes, managing seat
inventories, and handling user accounts.
- Reporting and analytics features provide valuable insights
into user behavior, sales trends, and system performance.
Future Prospects:
The foundation laid by this project opens up several avenues for
future development and enhancement:
1. Mobile Application: Extending the functionality to mobile
platforms (iOS and Android) can increase accessibility and
convenience for users.
2. Advanced Features: Implementing AI-driven
recommendations and machine learning for predictive analytics
can enhance user experience and operational efficiency.
3. Integration with External APIs: Integrating with airline APIs
for real-time flight data and payment gateways for seamless
27
transactions can significantly improve the system’s
functionality.
4. Multi-language Support: Adding support for multiple
languages can broaden the user base, catering to a global
audience.
Final Thoughts
This project exemplifies how Python, MySQL, and Tkinter can
be leveraged to create a comprehensive air ticket reservation
system. By combining the simplicity of Tkinter with the robust
capabilities of MySQL, the system not only meets current
requirements but also provides a scalable platform for future
enhancements. The structured approach to development ensures
maintainability and ease of use, making it a valuable tool for
both small and large-scale implementations in the airline
industry.
BIBLIOGRAPHY
Bibliography:
1. Help from internet:
https://docs.python.org/3/library/tkinter.html
https://youtu.be/TuLxsvK4svQ?si=TbVSGBBAkHlbgkiM
https://chat.openai.com/
https://realpython.com/tutorials/projects/
2. Help from books:
NCERT Reader(Sumita Arora).
28
29