A comprehensive flight booking and management system built with Python and MySQL. This console-based application provides a complete solution for managing airline tickets, destinations, and customer bookings with separate user and admin interfaces.
- Features
- Tech Stack
- Database Schema
- Installation
- Usage
- Project Structure
- User Features
- Admin Features
- Screenshots
- Contributing
- License
- User Portal: Customer registration, login, flight booking, and ticket management
- Admin Portal: Flight management, pricing control, and customer data oversight
- Multi-passenger booking support
- Three travel classes: Economy, Business, First Class
- Age-based pricing (Adult, Child, Infant)
- Domestic and International flight options
- Real-time availability checking
- Secure user authentication
- Profile management and updates
- Complete booking history
- Flight cancellation capabilities
- Language: Python 3.x
- Database: MySQL
- Libraries:
mysql-connector-python- Database connectivityrandom- User ID generation
The system uses 4 main tables:
User_Id (INT, PRIMARY KEY)
User_Name (VARCHAR)
User_Age (INT)
User_Email (VARCHAR, UNIQUE)
User_Pwd (VARCHAR, UNIQUE)
User_Phone (VARCHAR, UNIQUE)Admin_Id (INT, PRIMARY KEY)
Admin_Name (VARCHAR)
Admin_Age (INT)
Admin_Email (VARCHAR, UNIQUE)
Admin_Pwd (VARCHAR, UNIQUE)Flight_Code (INT, PRIMARY KEY)
Airline (VARCHAR)
FROM_ (VARCHAR)
TO_ (VARCHAR)
Type_Of_Flight (VARCHAR) -- Domestic/International
Airport (VARCHAR)Flight_Code (INT, PRIMARY KEY)
Adult (INT)
Child (INT)
Infant (VARCHAR) -- "ON LAP"Customer_Id (INT)
Customer_Name (VARCHAR)
Customer_Age (INT)
Customer_Phone (VARCHAR)
Airline (VARCHAR)
FROM_ (VARCHAR)
TO_ (VARCHAR)
Travel_Class (VARCHAR)
Type_Of_Flight (VARCHAR)
Airport (VARCHAR)
Date (VARCHAR)
Time (VARCHAR)
Ticket_Price (INT)- Python 3.6 or higher
- MySQL Server 5.7 or higher
- pip (Python package installer)
-
Clone or Download the Repository
cd "ATMS (AIR TICKET MANAGEMENT SYSTEM)"
-
Install Required Python Packages
pip install mysql-connector-python
-
Configure MySQL Database
Update the database credentials in
Main Program.py:mycon = mysql.connector.connect( host = 'localhost', user = 'root', password = 'YOUR_PASSWORD', # Change this database = 'ATMS' )
-
Create Database and Tables
Run the SQL script to set up the database:
mysql -u root -p < "SQL CODE FOR CREATING SAMPLE DATABASE & TABLES.txt"
Or manually execute the SQL commands in MySQL Workbench/Command Line.
-
Verify Database Setup
mysql -u root -p
USE ATMS; SHOW TABLES;
You should see:
Admins,Customers,Destinations,Ticket_Price,Users
python "Main Program.py"Option 1: Press 1 at the main menu
Sample User Credentials (from database):
Email: guruji@gmail.com
Password: #7777
Option 2: Create a new account by selecting option 1 when prompted
Option 1: Press 2 at the main menu
Sample Admin Credentials (from database):
Email: gaurav23@gmail.com
Password: #2323
ATMS (AIR TICKET MANAGEMENT SYSTEM)/
โ
โโโ Main Program.py # Main application file
โโโ SQL CODE FOR CREATING SAMPLE DATABASE & TABLES.txt # Database setup script
โ
โโโ Admin Table.py # Admin table creation utility
โโโ Destinations.py # Destinations table creation utility
โโโ Ticket_Price.py # Ticket price table creation utility
โโโ User & Customer Table.py # User/Customer table creation utility
โ
โโโ ADMINS TABLE.png # Database schema screenshot
โโโ DESTINATIONS TABLE.png # Database schema screenshot
โโโ TICKET PRICE TABLE.png # Database schema screenshot
โ
โโโ ATMS PROJECT.docx # Project documentation (Word)
โโโ ATMS PROJECT.pdf # Project documentation (PDF)
โโโ FINAL PROJECT along with SYNOPSIS.pdf # Complete project with synopsis
โโโ Synopsis.pdf # Project synopsis
โ
โโโ README.md # This file
- โ Create Account: Register with unique email, phone, and password
- โ Login: Secure authentication system
- โ View Profile: Check account details
- โ Update Profile: Modify name, age, email, phone, and password
- ๐ Browse Flights: View all available flights
- All flights
- Domestic flights only
- International flights only
- ๐ซ Book Tickets:
- Select origin and destination
- Choose travel class (Economy/Business/First)
- Select date and time
- Multi-passenger booking
- Automatic age-based pricing
- ๐ View Bookings: Check all tickets booked using your phone number
- โ Cancel Flights:
- Cancel all bookings
- Cancel specific passenger tickets
| Category | Age Range | Base Price |
|---|---|---|
| Adult | 12+ years | Full price |
| Child | 3-11 years | Reduced price |
| Infant | 0-2 years | Free (On Lap) |
Class Multipliers:
- Economy: 1x base price
- Business: 5x base price
- First Class: 10x base price
- ๐ View Flights: Browse all/domestic/international flights
- โ๏ธ Update Flights: Modify airline, route, type, and airport details
- โ Add Destinations: Add new flight routes
- ๐๏ธ Delete Destinations: Remove flight routes
- ๐ฐ View Ticket Prices: Check pricing for all flights
- ๐ Update Prices: Modify adult and child ticket prices
- โ Add Price Entries: Add pricing for new flights
- ๐๏ธ Delete Price Entries: Remove pricing records
- ๐ Customer Details: View all booking records
- ๐ฅ User Details: Access registered user information
The project includes visual documentation of database tables:
ADMINS TABLE.png- Admin table structureDESTINATIONS TABLE.png- Flight destinationsTICKET PRICE TABLE.png- Pricing information
| Code | Airline | From | To | Airport |
|---|---|---|---|---|
| 1 | SpiceJet | Delhi | Mumbai | Safdarjung Airport |
| 3 | IndiGo | Delhi | Chennai | Delhi Airport |
| 6 | GoAir | Bengaluru | Delhi | Kempegowda International Airport |
| Code | Airline | From | To | Airport |
|---|---|---|---|---|
| 2 | Air India | Delhi | New York | Indira Gandhi International Airport |
| 4 | Emirates | Mumbai | Dubai | Mumbai International Airport |
| 5 | Thai Airways | Mumbai | Bangkok | Chhatrapati Shivaji Maharaj International Airport |
- โ Unique email validation (prevents duplicate accounts)
- โ Unique password enforcement
- โ Unique phone number verification
- โ Secure login authentication
- โ Role-based access control (User vs Admin)
The project includes helper scripts for database initialization:
Admin Table.py: Creates and populates the Admins tableDestinations.py: Creates and populates flight destinationsTicket_Price.py: Creates and populates ticket pricingUser & Customer Table.py: Creates user and customer tables
- Console-based interface (no GUI)
- Passwords stored in plain text (not recommended for production)
- No email verification system
- No payment gateway integration
- Limited search and filter options
- No seat selection feature
- GUI implementation (Tkinter/PyQt)
- Password hashing and encryption
- Email notification system
- Payment gateway integration
- Advanced search filters
- Seat selection and management
- Booking confirmation via email/SMS
- Multi-language support
- Report generation (PDF invoices)
- Data analytics dashboard
This is an academic project. If you'd like to use or extend it:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is created for educational purposes as a 12th grade Computer Science project.
For issues or questions related to this project, please refer to the documentation files:
ATMS PROJECT.pdf- Complete project documentationSynopsis.pdf- Project overview and synopsisFINAL PROJECT along with SYNOPSIS.pdf- Comprehensive project report
Made with โค๏ธ using Python & MySQL
Air Ticket Management System - Making Flight Booking Simple