Flight Booking System with PyQt5 GUI and MySQL
Flight Booking Management Project
Table of Contents
- Installation
- Introduction
- Components of the Database Design
- Payment
- Flights
- Cancellation
- Company
- Initial Account Info
- Full Account Info
- Indivo, Nistara, MetAirways, Picejet
- Customer Choice Flight
- Customer
- Entity Relationship Diagram
- Relational Model
- Normalization
- Learning from the Project
- Challenges Faced
- Conclusion
- Contributing
- To Do
- Video Demo
š¦ Installation
Installation
To install and set up the Flight Booking Management System project, please follow these steps:
Requirements: Make sure you have Python installed on your machine. You can check if Python is installed by running
python --version
in your command prompt or terminal. Additionally, ensure that you have MySQL Workbench or a compatible MySQL client installed.Download Dependencies: The project’s required Python packages and libraries are listed in the
requirements.txt
file. You can install these dependencies by running the following command in your command prompt or terminal:pip install -r requirements.txt
This will automatically download and install all the necessary packages.
SQL Database Setup: I have provided a detailed markdown file that includes the necessary commands to create the database and tables. Open the file and execute each statement one by one in your MySQL Workbench or preferred MySQL client. The database name used in the script is
dbms_project
. The file for the SQL database setup can be found hereConfigure MySQL Connection: Open the Python file of the project and locate the section where the MySQL connection details are specified. Update the values for the root username and password, as well as the localhost information, to match your MySQL configuration.
Run the Application: You are now ready to run the Flight Booking Management System. Execute the Python file in your preferred Python environment by running the following command:
python main.py
The application will start, and you can begin exploring its features.
By following these steps, you will have successfully installed and set up the Flight Booking Management System on your local machine. Enjoy using the application to manage flight bookings!
:pencil: Introduction
Welcome to the Flight Booking Management System! This project was developed as part of my DBMS course, combining my knowledge of Python-SQL connectivity and the PyQt5 GUI library to create a user-friendly and visually appealing application. The system allows users to create accounts, log in, and confirm their identity through OTP verification (with occasional help from Twilio, if it's in the mood!). Once logged in, users can easily access and view flight details, including arrival and departure times and locations, presented in a well-organized table format. While the payment and cancellation functionalities are currently in prototype stage, they demonstrate the system's potential for future expansion. Through this project, I have gained valuable experience in working with MySQL and improving my understanding of Python-SQL connectivity, enhancing my skills in database management and application development.
:cloud: Components of the Database Design
Description of all entities along with their attributes here along with the primary keys for each entity.
Description of all relationships among various entities along with the specification of the cardinality and participation for all relationships (present in ERD and Relational Schema).
:cloud: Payment
:cloud: Flights
:cloud: Cancellation
:cloud: Company
:cloud: Initial Account Info
:cloud: Full Account Info
:cloud: Indivo, Nistara, MetAirways, Picejet
Seperate relations for each of these companies with same attributes.
:cloud: Customer Choice Flight
:cloud: Customer
:cloud: Entity Relationship Diagram
Note - needs to be updated to latest version.
:cloud: Relational Model
Note - needs to be updated to latest version.
:cloud: Normalization
:cloud: Learning from the Project
Through the development of the Flight Booking Management System, several key learning points were obtained:
- Understanding the Ticket Management/Booking system and its overall process.
- Gaining insight into the integration of front-end (GUI) and back-end (Database) components.
- Efficient retrieval and modification of data based on user preferences.
- Clearer understanding of database management systems, including concepts such as normalization, weak entities, SQL commands, relationship cardinalities, and attribute constraints.
- Exposure to new errors and problems not encountered in weekly labs, leading to enhanced problem-solving skills and a better grasp of MySQL.
- Learning the PyQt5 + Qt Designer interface, enabling the creation of seamless UI screens (screenshots of respective screens shown above).
- Integration of front-end with back-end, extracting user data through GUI elements (text boxes, interactive buttons), and merging them into the respective database relations.
These aspects of the project have contributed to an expanded knowledge base and improved skills in building user-friendly interfaces and effectively managing data within a database system.
:cloud: Challenges Faced
During the development of the Flight Booking Management System, the following challenges were encountered:
- Integrating the front end with the back end proved to be a complex task, requiring meticulous attention to detail.
- OTP verification occasionally failed, requiring thorough debugging and refinement of the implementation.
- Data loss and modification issues arose during the merging process to the back end, necessitating rigorous testing and validation procedures.
- Connectivity issues with the MySQL Connector library posed obstacles, requiring extensive research and troubleshooting.
- Some relations within the database fetched incorrect tuples, demanding careful examination and rectification.
- Adding certain values resulted in unexpected program crashes due to primary key errors.
- Ensuring the normalization of tables proved challenging and required meticulous design and restructuring of the database schema.
- Certain buttons in the graphical user interface did not function as intended, and labels were not displayed correctly on their respective screens.
- Importing the appropriate libraries for the project required attention to detail and resolution of any library-related issues.
Overcoming these challenges contributed to the development of a more robust and functional Flight Booking Management System.
:cloud: Conclusion
In conclusion, the Flight Booking Management System has been successfully implemented, providing customers with a convenient platform for booking flights according to their requirements. Throughout the development process, valuable lessons and accomplishments have been gained, including:
- Acquiring knowledge and experience in integrating the front end (PyQt5) with the back end (Database), resulting in a seamless user interface.
- Enhancing coding skills in Python and effectively applying concepts learned in the DBMS course to develop robust functionalities within the project.
- Deepening understanding of MySQL queries and their implementation, leading to improved database management skills.
- Recognizing the significance of various applications that play a crucial role in our day-to-day lives and comprehending the intricate workings of both front-end and back-end components.
- This project has provided an opportunity for growth and improvement in both technical and problem-solving abilities, setting a solid foundation for future endeavors.
Overall, the Flight Booking Management System has served as a valuable project, not only in terms of learning and implementing key concepts but also in delivering a practical solution for flight ticket booking needs.
Contributing
See the contributing guide for detailed instructions on how to get started with our project.
If you’re looking for a way to contribute, you can scan through our existing issues for something to work on. When ready, check out Getting Started with Contributing for detailed instructions.
Click on these badges to see how you might be able to help:
Simple terms:
Fork
this repository- Create a
branch
Commit
your changesPush
yourcommits
to thebranch
- Submit a
pull request
To Do
- Refine UI more
- PyQt5 Editor
- Do Bug testing for all screens.
In Progress
- Showing user, which file to run as main file - portraying user flow.
Done ā
- Improve README guides, contributing guides, etc. Transfer information from the initial profile account table and final profile account table to the Customer Table.
- If SQL fetches no data, print no data near table pop up.
- Create a Rollable screen in which you display a Summary of Customer Details as well as Flight details and give buttons to modify both before proceeding to Payments Page.
- Try adding unique key constraint or primary key to Username in initial_info_account and full_info_account without getting errors of duplicate entry.
- If user enters string pincode, program crashes, handle that.
- Add a Video demo in the form of Gif Link for viewers to easily see the working.
- Admin Mode.
Video Demo
The entire project demo can be seen here (except Admin Screens which was incorporated later, this can be found in the gifs down below) - https://youtu.be/ZBlwj9LVAVs
Welcome Screen
Login Screen
Create Account Screen
Flight Details + Customer Update Information Screen
Flight Chosen Screen
Summary Payment Screen
Cancellation Screen
Admin Screen
Skills Utilized:
- Qt Creator
- PyQt5
- Graphical User Interface (GUI)
- Qt
- Database Management System (DBMS)
- Python (Programming Language)
- Git
- SQL
This project provided hands-on experience in developing a complete flight booking management system, integrating a database management system, and creating a user-friendly GUI. It showcases proficiency in Python programming, MySQL connectivity, data management, and GUI development using PyQt5.