0% found this document useful (0 votes)
12 views24 pages

Test Report

The Travel Agency Management System is a Python-based GUI application designed to automate and streamline the travel booking process for customers, featuring an SQL database for secure data management. It addresses issues faced by traditional travel agencies, such as data redundancy and booking errors, by providing a centralized platform for users to explore packages and make bookings. Key functionalities include package selection, booking confirmations, and real-time data storage, enhancing efficiency and customer service in travel agency operations.
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)
12 views24 pages

Test Report

The Travel Agency Management System is a Python-based GUI application designed to automate and streamline the travel booking process for customers, featuring an SQL database for secure data management. It addresses issues faced by traditional travel agencies, such as data redundancy and booking errors, by providing a centralized platform for users to explore packages and make bookings. Key functionalities include package selection, booking confirmations, and real-time data storage, enhancing efficiency and customer service in travel agency operations.
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/ 24

Report On

Travel Agency Management System

Submitted in partial fulfillment of the requirements of the Course project in


Semester IV of Second Year Computer Engineering

by
Chetan Khachane (Roll No. 07)
Dnyanesh Khandare (Roll No. 08)
Niharika Khopkar (Roll No. 10)
Kashyap Kulai (Roll No. 17)

Supervisor
Prof. Smita Jawale

University of Mumbai

Vidyavardhini's College of Engineering & Technology

Department of Computer Engineering

(2024-25)
Vidyavardhini's College of Engineering & Technology

Department of Computer Engineering

CERTIFICATE

This is to certify that the project entitled “Travel Agency Management” is a bonafide work of
"Chetan Khachane(Roll No. 06), Dnyanesh Khandare(Roll No. 08), Niharika Khopkar(Roll No.
10), Kashyap Kulai(Roll No. 17)" submitted to the University of Mumbai in partial fulfillment of
the requirement for the Course project in semester IV of Second Year Computer Engineering.

Supervisor​ ​ ​ ​ ​ ​ ​

Prof. Smita Jawale


Guide

2

Abstract

The Travel Agency Management System is a GUI-based solution designed to simplify and
automate the travel booking process for customers. This system allows users to explore travel
packages, make bookings, and receive instant confirmation through a user-friendly graphical
interface. Developed using Python and integrated with an SQL database, the application ensures
secure storage and efficient handling of booking records. Key features include package selection,
customer detail entry, booking confirmation via message boxes, and real-time data insertion into
the database. By combining an interactive interface with reliable backend connectivity, the
system enhances the overall efficiency of travel agencies, reduces manual work, and improves
customer service through seamless and accurate data management.

3
Index

Contents Pg. No

1 Problem Statement 5
2 Block Diagram, its description and working(ER diagram) 6
3 Code 11
4 Result 18
5 Conclusion 23
6 Reference 24

4
1 Problem Statement

In many traditional travel agencies, the process of managing travel bookings, customer
information, and package details is still handled manually or through fragmented systems. This
often results in data redundancy, booking errors, delayed confirmations, and inefficient
record-keeping. Customers expect quick, accurate, and reliable services, which can be difficult to
achieve without an integrated system in place. Moreover, the absence of real-time data storage
and confirmation adds to operational delays and reduces overall service quality. To address these
challenges, there is a need for a centralized, user-friendly application that can automate the
booking process, provide instant confirmation to users, and store all relevant information
securely in a connected database. This project proposes the development of a Python-based GUI
application with SQL database integration, aimed at improving the efficiency, accuracy, and
reliability of travel agency operations.

5
2 Block Diagram

2.1 Explanation of the Entities and Relationships:

●​ USERS:​

○​ Likely stores information about the customers.


○​ Key Attributes: user_id (Primary Key), name, email.
○​ Relationship: Has many (o{) BOOKINGS. A user can make multiple
bookings.
●​ DESTINATIONS:​

○​ Holds details about the travel destinations offered.


○​ Key Attributes: destination_id (Primary Key), name, country.
○​ Relationship: Is offered in many (o{) BOOKINGS. A destination can be
booked multiple times.
●​ BOOKINGS:​

○​ Represents individual trip bookings made by users for specific destinations.


○​ Key Attributes: booking_id (Primary Key), customer_name,
customer_email, destination_id (Foreign Key referencing
DESTINATIONS), user_id (Foreign Key referencing USERS).
○​ Relationships:
■​ Belongs to one (||--o{) USERS. Each booking is made by one user.
■​ Involves one (||--o{) DESTINATIONS. Each booking is for one
destination.
■​ Generates many (o{) PDF_DOCUMENTS. One booking can have
one corresponding PDF document.
●​ PDF_DOCUMENTS:​

○​ Stores information about the generated PDF booking confirmations.


○​ Key Attributes: pdf_id (Primary Key), booking_id (Foreign Key
referencing BOOKINGS), pdf_file_path, file_name.
○​ Relationship: Belongs to one (||--o{) BOOKINGS. Each PDF document is
associated with one booking.

6
2.2 Diagram:

2.3 Module Description

1. Main Application Module (main.py)


●​ Purpose: Serves as the core of the system, integrating GUI components and
coordinating all modules.

7
●​ Description: Built using Python's tkinter library, this module manages the user
interface where users can enter travel booking details. It collects user inputs and
triggers database actions on confirmation.
●​ Location: travel-agency-management-system/main.py
●​ Key Functionality: It launches the main booking interface, captures user input,
and sends booking data to the database.

2. Database Configuration Module (database.py)


●​ Purpose: Handles connection setup and queries to the backend database.
●​ Description: C This module connects the GUI application with a database using
mysql.connector or sqlite3, depending on the chosen DBMS. It manages insert and
retrieve operations related to bookings.
●​ Location: travel-agency-management-system/database.py
●​ Key Functionality: It establishes the connection to the database and executes
queries to insert or fetch travel booking details.

3. GUI Components Module (gui_components.py)


●​ Purpose: P3. GUI Components Module (gui_components.py)
●​ Description: Responsible for creating modular GUI components like labels, entry
fields, and buttons using tkinter for consistent UI across different screens.
●​ Location: travel-agency-management-system/gui_components.py
●​ Key Functionality: It generates GUI elements and layouts to ensure a
user-friendly booking experience.

4. Message Box Notification Module (messagebox.py)


●​ Purpose:Displays alerts and confirmation dialogs during the booking process.
●​ Description: Utilizes tkinter.messagebox to notify users about successful
bookings or errors while interacting with the application.
●​ Location: Embedded in main.py
●​ Key Functionality: It shows confirmation or error messages after data validation
and booking actions.

5. Database Schema File (travel_agency.sql)


●​ Purpose: Structures the database to store all relevant travel and customer data.
●​ Description: Defines SQL queries to create tables for customer information, travel
bookings, and other necessary entities.

8
●​ Location: travel-agency-management-system/database/travel_agency.sql
●​ Key Functionality: It provides the database structure by defining tables and fields
required for booking records.

6. Supporting Files Module (README.md, requirements.txt)


●​ Purpose: Manages documentation and dependencies required to run the project.

●​ Description: Includes a list of necessary Python packages in requirements.txt and


instructions on setting up and executing the project in README.md.​
Location: travel-agency-management-system/​
Key Functionality: It helps developers install dependencies and understand the
setup process for the system.

2.4 Brief description of software & hardware used and its programming
Software Used:

●​ Python with Tkinter: This powerful combination provides the visual interface of your
application. Tkinter, being a standard Python library, offers a straightforward way to
create windows, buttons, text fields, and other interactive elements. Your Python scripts
manage how users interact with these elements, capturing their input and displaying
information retrieved from the database.
●​ SQL Database (e.g., SQLite, MySQL, PostgreSQL): Serving as the robust backbone
for data storage, SQL ensures that all your project's information is organized, persistent,
and easily accessible. Whether it's user credentials, specific records, or any other crucial
data, the SQL database efficiently stores and manages it all, allowing for structured
querying and retrieval.
●​ In essence, your project cleverly uses Python's Tkinter to build a user-friendly
window into your data, while SQL diligently manages that data behind the scenes,
ensuring everything is organized and readily available. This setup allows for a clear
separation between how users see and interact with the application (the Tkinter frontend)
and how the underlying information is securely stored and managed (the SQL database).

Hardware Used:
●​ Server Hardware: A standard computer or cloud server (e.g., AWS EC2) with:
○​ Processor: Multi-core CPU (e.g., Intel i5 or equivalent) for running Node.js and
database queries.
○​ Memory: Minimum 4GB RAM to handle server processes and database
operations.
○​ Storage: SSD or HDD (minimum 20GB) to store the application files, database,

9
and logs.
●​ Client Hardware: User devices (e.g., laptops, desktops, or mobiles) with:
○​ Processor: Basic CPU (e.g., Intel i3 or equivalent) for running a web browser.
○​ Memory: Minimum 2GB RAM for smooth browser performance.
○​ Internet: Broadband connection for accessing the web application.
●​ Development Hardware: Developer machine with similar specs to the server for coding,
testing, and running a local database.

10
3 Code

Python Code:
import tkinter as tk
from tkinter import ttk, messagebox, filedialog
import mysql.connector
from fpdf import FPDF
import os

# Database connection
connection = mysql.connector.connect(
host='localhost',
user='root',
password='123456@24DN',
database='travel_agency'
)
cursor = connection.cursor(buffered=True)

class TravelApp:
def __init__(self, root):
self.root = root
self.root.title("Travel Agency Management")
self.root.geometry("600x450")
self.root.configure(bg="#f0f8ff")

self.booking_id = None # Initialize booking_id to None


self.create_home_page()

def create_home_page(self):
self.clear_frame()
tk.Label(self.root, text="Welcome to Travel Agency", font=("Arial", 18, "bold"),
bg="#f0f8ff").pack(pady=20)

tk.Button(self.root, text="View Destinations", command=self.show_destinations,


width=20, bg="#4682B4", fg="white").pack(pady=5)
tk.Button(self.root, text="Book a Trip", command=self.show_booking_page,
width=20, bg="#4682B4", fg="white").pack(pady=5)
tk.Button(self.root, text="Exit", command=self.root.quit, width=20,
bg="#DC143C", fg="white").pack(pady=20)

11
def show_destinations(self):
self.clear_frame()
tk.Label(self.root, text="Available Destinations", font=("Arial", 14),
bg="#f0f8ff").pack(pady=10)

# Search Bar
self.search_var = tk.StringVar()
search_entry = tk.Entry(self.root, textvariable=self.search_var, width=40)
search_entry.pack(pady=10)
search_entry.bind("<KeyRelease>", self.filter_destinations)

self.destination_list = tk.Listbox(self.root, height=10, width=50)


self.destination_list.pack(pady=10)

self.load_destinations()

tk.Button(self.root, text="Back", command=self.create_home_page, bg="#4682B4",


fg="white").pack(pady=5)

def load_destinations(self):
self.destination_list.delete(0, tk.END) # Clear the listbox
cursor.execute("SELECT name, country FROM destinations")
self.destinations = cursor.fetchall()

for dest in self.destinations:


self.destination_list.insert(tk.END, f"{dest[0]} - {dest[1]}")

def filter_destinations(self, event=None):


query = self.search_var.get().lower()
filtered = [dest for dest in self.destinations if query in dest[0].lower() or query in
dest[1].lower()]
self.destination_list.delete(0, tk.END)
for dest in filtered:
self.destination_list.insert(tk.END, f"{dest[0]} - {dest[1]}")

def show_booking_page(self):
self.clear_frame()
tk.Label(self.root, text="Book a Trip", font=("Arial", 14),
bg="#f0f8ff").pack(pady=10)

12
tk.Label(self.root, text="Name:").pack()
self.name_entry = tk.Entry(self.root, width=40)
self.name_entry.pack()

tk.Label(self.root, text="Email:").pack()
self.email_entry = tk.Entry(self.root, width=40)
self.email_entry.pack()

tk.Label(self.root, text="Select Destination:").pack()


self.destination_var = tk.StringVar()
self.destination_dropdown = ttk.Combobox(self.root,
textvariable=self.destination_var, width=37)
self.destination_dropdown.pack()

cursor.execute("SELECT name FROM destinations")


self.destination_dropdown['values'] = [row[0] for row in cursor.fetchall()]

tk.Button(self.root, text="Book Now", command=self.book_trip, bg="#32CD32",


fg="white").pack(pady=10)
self.generate_pdf_button = tk.Button(self.root, text="Generate PDF",
command=self.generate_pdf, bg="#FFD700", fg="black", state=tk.DISABLED)
self.generate_pdf_button.pack(pady=10)
tk.Button(self.root, text="Back", command=self.create_home_page, bg="#4682B4",
fg="white").pack()

def book_trip(self):
name = self.name_entry.get()
email = self.email_entry.get()
destination_name = self.destination_var.get()

if not name or not email or not destination_name:


messagebox.showwarning("Input Error", "Please fill all fields!")
return

# Store user in users table


try:
cursor.execute("INSERT INTO users (name, email) VALUES (%s, %s) ON
DUPLICATE KEY UPDATE name = VALUES(name)", (name, email))
connection.commit()
except mysql.connector.Error as err:
print("Error:", err)

cursor.execute("SELECT destination_id FROM destinations WHERE name = %s",

13
(destination_name,))
destination_id = cursor.fetchone()

if destination_id:
cursor.execute("INSERT INTO bookings (customer_name, customer_email,
destination_id) VALUES (%s, %s, %s)",
(name, email, destination_id[0]))
connection.commit()

self.booking_id = cursor.lastrowid # Store booking ID after booking


self.generate_pdf_button.config(state=tk.NORMAL) # Enable the "Generate
PDF" button
messagebox.showinfo("Success", f"Booking Confirmed for {destination_name}")
else:
messagebox.showerror("Error", "Destination not found!")

def generate_pdf(self):
if not self.booking_id:
messagebox.showerror("Error", "Booking has not been made yet!")
return

name = self.name_entry.get()
email = self.email_entry.get()
destination = self.destination_var.get()

pdf = FPDF()
pdf.add_page()
pdf.set_font("Arial", size=16)
pdf.cell(200, 10, "Booking Confirmation", ln=True, align='C')
pdf.ln(10)
pdf.set_font("Arial", size=12)
pdf.cell(200, 10, f"Name: {name}", ln=True)
pdf.cell(200, 10, f"Email: {email}", ln=True)
pdf.cell(200, 10, f"Destination: {destination}", ln=True)
pdf.ln(10)
pdf.cell(200, 10, "Thank you for booking with us!", ln=True)

# Ask user where to save the PDF


file_path = filedialog.asksaveasfilename(defaultextension=".pdf", filetypes=[("PDF

14
files", "*.pdf")])
if file_path:
pdf.output(file_path)

# Insert the PDF path into the pdf_documents table


cursor.execute("INSERT INTO pdf_documents (booking_id, pdf_file_path,
file_name) VALUES (%s, %s, %s)",
(self.booking_id, file_path, os.path.basename(file_path)))
connection.commit()

def clear_frame(self):
for widget in self.root.winfo_children():
widget.destroy()

if __name__ == "__main__":
root = tk.Tk()
app = TravelApp(root)
root.mainloop()

# Cleanup database connections


cursor.close()
connection.close()

DATABASE CODE:-

CREATE DATABASE IF NOT EXISTS travel_agency;


USE travel_agency;

-- Users Table
CREATE TABLE IF NOT EXISTS users (
user_id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL
);

-- Destinations Table
CREATE TABLE IF NOT EXISTS destinations (

15
destination_id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description TEXT NULL,
country VARCHAR(255) NOT NULL
);

-- Bookings Table
CREATE TABLE IF NOT EXISTS bookings (
booking_id INT AUTO_INCREMENT PRIMARY KEY,
customer_name VARCHAR(255) NOT NULL,
customer_email VARCHAR(255) NOT NULL,
destination_id INT,
FOREIGN KEY(destination_id) REFERENCES destinations(destination_id) ON DELETE
CASCADE
);

-- PDF Documents Table (Store PDF paths for bookings)


CREATE TABLE IF NOT EXISTS pdf_documents (
pdf_id INT AUTO_INCREMENT PRIMARY KEY,
booking_id INT NOT NULL,
pdf_file_path VARCHAR(255) NOT NULL,
file_name VARCHAR(255) NOT NULL,
FOREIGN KEY(booking_id) REFERENCES bookings(booking_id) ON DELETE CASCADE
);

-- Insert Sample Data for Destinations


INSERT INTO destinations (name, country)
VALUES
('Paris', 'France'),
('Tokyo', 'Japan'),
('New York', 'USA'),
('London', 'UK'),
('Rome', 'Italy'),
('Sydney', 'Australia'),
('Dubai', 'UAE'),
('Barcelona', 'Spain'),
('Berlin', 'Germany'),
('Amsterdam', 'Netherlands'),
('Cape Town', 'South Africa'),
('Rio de Janeiro', 'Brazil'),
('Bangkok', 'Thailand'),
('Istanbul', 'Turkey'),
('Moscow', 'Russia'),
('Mexico City', 'Mexico'),

16
('Cairo', 'Egypt'),
('Los Angeles', 'USA'),
('Buenos Aires', 'Argentina'),
('Vancouver', 'Canada'),
('Singapore', 'Singapore'),
('Hong Kong', 'China'),
('Vienna', 'Austria'),
('Toronto', 'Canada'),
('Athens', 'Greece'),
('Seoul', 'South Korea'),
('Lisbon', 'Portugal'),
('Hanoi', 'Vietnam'),
('Mumbai', 'India'),
('Zurich', 'Switzerland'),
('Prague', 'Czech Republic'),
('Stockholm', 'Sweden'),
('Edinburgh', 'Scotland');

17
4 Results:

18
19
20
21
22
5 Conclusion

Conclusion:

The Travel Agency Management System, developed as a GUI-based Python application with
SQL database integration, successfully delivers a streamlined solution for managing travel
bookings. By combining an intuitive interface with efficient backend data handling, the system
allows users to book travel packages and instantly receive confirmation through a message box.
All booking data is securely stored in the database, allowing easy access for record tracking and
future reference. The modular architecture—comprising GUI components, database connectivity,
and functional logic—demonstrates a practical implementation of core DBMS concepts in a
user-centric application.

The use of Python for the frontend and logic, along with structured SQL queries for persistent
storage, ensures smooth interaction between the user interface and the underlying data. The
project not only simplifies the booking process for end-users but also serves as an educational
example of integrating GUI frameworks with database systems in Python. Its simple yet effective
design offers opportunities for scaling—such as adding user login systems, payment gateways, or
travel package filters in future versions.

In conclusion, this project fulfills its objective of providing a functional and accessible travel
booking platform while highlighting the importance of GUI-database integration. It reflects a
strong understanding of software and database development practices and lays the groundwork
for further enhancements in real-world travel management systems.

23
6 References

For book/article,
1."Database System Concepts" by Silberschatz, Korth, and Sudarshan; "Designing
Data-Intensive Applications" by Martin Kleppmann.
2.E. Brown, Learning JavaScript: JavaScript Essentials for Modern Application Development,
O'Reilly Media, 3rd Edition, ISBN 978-1491914915, 2016.
3.B. Forta, SQL in 10 Minutes, Sams Teach Yourself, Sams Publishing, 5th Edition, ISBN
978-0672336072, 2012.

For web references,


1. https://app.diagrams.net/
2. https://stackoverflow.com/

24

You might also like