Cs Prac
Cs Prac
PROJECT FILE
GRADE-XII
[2024-2025]
ACKNOWLEDGEMENT
I wish to express my deep
sense of gratitude and
indebtedness to our
learned teacher Mrs
Shammi, CCA School for
her invaluable help,
advice, and guidance in
the preparation of this
project.
I am also greatly indebted
to our principal Mrs Nirmala
Yadav and school
authorities for providing me
with the facilities and
requisite laboratory
conditions for making this
practical file.
I also extend my thanks to
several teachers, my
classmates and friends who
helped me to complete this
project file successfully.
CERTIFICATE
This is to certify that Simran,
namrata, arpita, students of
Class XII, CCA School have
completed the project file
during the academic year
2024-25 towards partial
fulfilment of credit for the
Computer Science practical
evaluation of CBSE SSCE-2024
and submitted satisfactory
report, as compiled in the
following pages, under my
supervision.
Software Requirements
• Operating System: Windows,
macOS, or Linux
• Python: Version 3.7 or higher
• MySQL Server: Version 5.7 or higher
• MySQL Connector for Python: mysql-
connectorpython
Installation Instructions
1. Install Python:
o Download Python from the official Python website and
follow the installation instructions.
2. Install MySQL Server:
o Download MySQL Community Server from the official
MySQL website.
o Install and configure it, ensuring you note down the root
username and password.
3. Install MySQL Connector: o Open a terminal or command prompt and
enter:
“pip install mysql-connector-python”
4. Database Setup:
o Run the SQL commands in your MySQL environment to
create the database and tables. See the Database and Table
Descriptions section below.
5. Run the Program:
o Save the Python code to a .py file.
Database and Table
Descriptions
Database: Airways management
The database contains three tables: users, flights, and
bookings.
Tables
1. users
id: INT, Primary Key, Auto Increment
username: VARCHAR(50), Unique, NOT NULL
password: VARCHAR(255), NOT NULL
2. flights flight_id: INT, Primary Key, Auto Increment
flight_name: VARCHAR(100), NOT NULL source:
VARCHAR(50) odestination: VARCHAR(50)
departure_time: VARCHAR(20) arrival_time:
VARCHAR(20) seats_available: INT
bookings o booking_id: INT, Primary Key, Auto
Increment o user_id: INT, Foreign Key (users.id) o
flight_id: INT, Foreign Key (flights.flight_id) o
seat_count: INT
Libraries/Modules
• mysql.connector: Allows Python to
connect and interact with a MySQL
database.
• hashlib: Provides hashing algorithms (used
to hash passwords in the login function).
Functions
Function Name Purpose
Establishes and returns a
connect_to_database()= connection to the MySQL
database.
Hashes a password using
hash_password() SHA-256 for secure storage
and validation.
Authenticates a user by
login_user() verifying the hashed
password and username.
Adds a new flight record to
add_flight()
the flights table.
Updates flight information
update_flight()
for a specific flight ID.
Deletes a flight record from
delete_flight()
the flights table.
Displays all flights in the
view_flights()
flights table.
Books a flight for a user,
updates available seats,
book_flight()
and logs the booking in the
bookings table.
Lists all bookings for a
view_bookings()
specific user.
Cancels a booking and
cancel_booking() updates the available seats
for the flight.
If id not been made a new
Sign_user()
can be formed
It logout your id and if you
Logout() need to use again log in
again
Shortcomings/Limitations
• No User Role Differentiation: The system doesn’t
distinguish between administrators and regular
users. Adding user roles could help separate flight
management from bookings.
MODULES
1. User Authentication:
• Simple login functionality.
2 Flight Management:
• Add, update, delete flight details
(Admin only).
• View available flights.
3. Reservation System:
• Book a flight.
• View or cancel bookings
MYSQL SOURCE CODE
PYTHON SOURCE
CODE
OUTPUT
BIBLIOGRAPHY
https://github.com/akash-singh8/Airways-Management-System
https://www.scribd.com/document/396672238/Computer-investigatory-project-class-12-
FLIGHTBOOKLING
https://www.slideshare.net/slideshow/airline-management-system/210443393
https://www.w3schools.com/python/
COMPUTER SCIENCE
PROJECT FILE
GRADE-XII
[2024-2025]