0% found this document useful (0 votes)
9 views29 pages

Class 12 Computer Science Project

The document is a project report on a Parking Slot Management System created by S. Nitin for the XII CBSE curriculum. It outlines the project's objectives, implementation using Python and MySQL, and includes sections on the system's functionality, code, and hardware/software requirements. The conclusion emphasizes the project's effectiveness in simplifying parking management and enhancing user experience.

Uploaded by

Sai Yogesh
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)
9 views29 pages

Class 12 Computer Science Project

The document is a project report on a Parking Slot Management System created by S. Nitin for the XII CBSE curriculum. It outlines the project's objectives, implementation using Python and MySQL, and includes sections on the system's functionality, code, and hardware/software requirements. The conclusion emphasizes the project's effectiveness in simplifying parking management and enhancing user experience.

Uploaded by

Sai Yogesh
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

PARKING SLOT MANAGEMENT SYSTEM

A PROJECT REPORT IN COMPUTER SCIENCE SUBMITTED IN


FULFILMENT OF THE REQUIRMENT FOR THE COMPLITION OF

XII - CBSE
2025-2026
BY

S. NITIN
ROLL NO: 12CBSE0092

UNDER THE SUPERVISIONOF


Mrs. Grace
PGT COMPUTER

NEW BALDWIN INTERNATIONAL SENIOR SECONDARY SCHOOL


BANASWADI
BENGALURU
ACKNOWLEDGMENT

I would like to express my sincere gratitude to all those who helped


me complete this project successfully.

Primarily, I would like to thank my guide HOD Mrs. Grace, the


Computer lecturer, for her constant support, valuable guidance, and
prompt interventions throughout the process of this project.

My gratitude goes to our beloved MANAGEMENT and PRINCIPAL


for providing all the necessary support and facilities needed for the
completion of this project.

A word of gratitude to all my colleagues who either directly or


indirectly helped me complete this task successfully.

Signature:

Name: S. Nitin
CERTIFICATE

This is to certificate that S. NITIN of class XII CBSE has successfully


completed the project on the topic: PARKING SLOT
MANAGEMENT SYSTEM
During the academic session 2025-26
He has prepared the project under my guidance and as per the norms by
the CBSE Board

Signature of Signature of Signature of


Subject Teacher External Examiner Principal

_________________ _________________ _________________


INDEX

SL. NO. DESCRIPTION PAGE NO.

1. INTRODUCTION 1.

2. OBJECTIVE 2.

3. PYTHON CODE 3-12.

4. SQL CODE 13-15.

5. OUTPUT 16-21.

6. HARDWARE AND SOFTWARE 21.

7. CONCLUSION 22.
INTRODUCTION:
In our everyday lives, parking systems have become increasingly
important. We need parking spaces in our homes, offices, malls, hospitals
and other places that we visit. In the recent years, we have seen an
evolution of technology and part of it is the improvement of parking
management systems. Parking Management Systems are not only
convenient but flexible when it comes to controlling the flow of vehicles in
a parking area.

Because parking management systems are organised in a structured


manner, it is very easy to manage as well as control and regulate. Parking
management systems are also user-friendly, and the parking staff won’t
have any difficulties handling the system.

With its technologically advanced security features, parking management


systems can give you upgraded security, safety and privacy. Parking
management systems prevent unauthorised access to your parking lots, as
a result, car owners will have increased confidence that their cars are well
protected. There are less chances for vehicle vandalism.

Another advantage that you obtain from having an effective parking


management system is the cost. Because it runs on low manpower, you
save more money. Parking management systems also help you save more
time, and vehicles move at a faster speed which lessens the cost of wasted
fuel. Another feature of parking management system is that you can
control the lights, ventilation and other services that require electricity. If
that area has little to no vehicle traffic, you may easily switch it off to
conserve electricity.

1
OBJECTIVE:

This is a project based on Parking Lot Management. The program is Menu


driven which helps us to do the following things:
1. Enter Parking details
[Link] Parking details
[Link] parking details
[Link] Vehicle details
[Link] Vehicle details
[Link] Vehicle details
[Link] Vehicle Details
It includes various function programs to do the above mentioned tasks. We
have combined both Mysql and Python. We imported the Mysql connector
module.
Python is an interpreted, high-level and general-purpose programming
language. It is often used as a support language for software developers, for
build control and management, testing, and in many other ways.
MySQL is an open-source relational database management system. The
database is a collection of interrelated data to serve multiple applications.
MySQL creates a database for storing and manipulating data, defining the
relationship of each table. Clients can make requests by typing specific SQL
statements on MySQL

2
PYTHON CODE:

import [Link]
mydb=[Link](host="localhost",user="root",password="ro
ot",database='parking')
mycursor=[Link]()

def Add_Record():
L = []

id1 = int(input("Enter the parking number : "))


[Link](id1)

vehicletype = input("Enter vehicle type (Car/Bike): ").lower()


[Link](vehicletype)

pname1 = input("Enter the Parking Name: ")


[Link](pname1)

level1 = input("Enter level of parking : ")


[Link](level1)

3
freespace1 = input("Is there any freespace or not : YES/NO ").upper()
[Link](freespace1)

entrydate1 = input("Enter date of entry (YYYY-MM-DD): ")


[Link](entrydate1)

entrytime1 = input("Enter time of entry (HH:MM): ")


[Link](entrytime1)

nod1 = int(input("Enter total number of days for parking: "))


[Link](nod1)

if vehicletype == "bike":
rate_per_day = 20
elif vehicletype == "car":
rate_per_day = 50
else:
print("Invalid vehicle type entered! Please enter either Car or Bike.")
return

Payment1 = nod1 * rate_per_day

4
damage = input("Any damage to vehicle? (YES/NO): ").upper()
if damage == "YES":
damage_charge = int(input("Enter damage charge amount: "))
else:
damage_charge = 0

Payment1 += damage_charge

[Link](damage_charge)
[Link](Payment1)

stud = tuple(L)
sql = '''
INSERT INTO parkmaster12
(pid, vehicletype, pnm, level, freespace, entrydate, entrytime, nod,
damagecharge, payment)
VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)
'''
[Link](sql, stud)
[Link]()
print("Record added successfully.")

5
def Rec_View():
print("Select the search criteria : ")
print("1. Parking Number")
print("2. Parking Name")
print("3. Level No")
print("4. All")
ch=int(input("Enter the choice : "))
if ch==1:
s=int(input("Enter Parking no : "))
rl=(s,)
sql="select * from parkmaster12 where pid=%s"
[Link](sql,rl)
res=[Link]()
print("Details about Parking are as follows : ")
print("(Parking Id, ParkingName, VehicleType, Level,
FreeSpace(Y/N), Date of Entry, Time of Entry, No of days for parking,
Payment)")
for x in res:
print(x)

if ch==2:
s=input("Enter Parking Name : ")
rl=(s,)
6
sql="select * from parkmaster12 where pnm=%s"
[Link](sql,rl)
res=[Link]()
print("Details about Parking are as follows : ")
print("(Parking Id,ParkingName,Level,FreeSpace(Y/N),Date of
Entry,Time of Entry,No of days for parking,Payment)")
for x in res:
print(x)

if ch==3:
s=int(input("Enter Level of Parking : "))
rl=(s,)
sql="select * from parkmaster12 where level=%s"
[Link](sql,rl)
res=[Link]()
print("Details about Parking are as follows : ")
print("(Parking Id,ParkingName,Level,FreeSpace(Y/N),Date of
Entry,Time of Entry,No of days for parking,Payment)")
for x in res:
print(x)

if ch==4:
7
sql=("select * from parkmaster12")
[Link](sql)
res=[Link]()
print("Details about Parking are as follows : ")
print("(Parking Id,ParkingName,Level,FreeSpace(Y/N),Date of
Entry,Time of Entry,No of days for parking,Payment)")
for x in res:
print(x)
print('Task completed')

def Vehicle_Detail():
L=[]
vid1=int(input("Enter Vehicle No : "))
[Link](vid1)
vnm1=input("Enter Vehicle Name/Model Name : ")
[Link](vnm1)
dateofpur1=input("Enter Year-Month-date of purchase : ")
[Link](dateofpur1)
phoneno1=input("Enter your Phone Number: ")
[Link](phoneno1)
vdt=(L)
sql='insert into vehicle(vid,vnm,dateofpur,phoneno)
values(%s,%s,%s,%s)'
8
[Link](sql,vdt)
[Link]()
print("Details recorded")

def Vehicle_View():
vid1=int(input("Enter the vehicle number of the vehicle whose details is
to be viewed : "))
sql=("select * from vehicle where vid=%s")
rl=(vid1,)
[Link](sql,rl)
res=[Link]()
for x in res:
print("Following are the details you wanted:")
print(res)
print("Task completed")
break
else:
print("Sorry!Record not Found")

def Update():
vid=input("Enter the vehicle number of the vehicle to be updated : ")
phoneno=input("Enter new Phone Number:")

9
vnm=input("Enter new Vehicle name:")
sql=("Update vehicle set phoneno=%s,vnm=%s where vid=%s")
[Link](sql,(phoneno,vnm,vid))
[Link]()
print("Records are updated as per command")

def Vehicle_remove():
vid1=int(input("Enter the vehicle number of the vehicle to be deleted :
"))
rl=(vid1,)
sql=("Delete from vehicle where vid=%s")
[Link](sql,rl)
[Link]()
print('Removed as per the command')

def parking_remove():
pid=int(input("Enter the parking number of the vehicle to be deleted :
"))
rl=(pid,)
sql=("Delete from parkmaster12 where pid=%s")
[Link](sql,rl)
[Link]()
print('Removed as per the command')
10
def Menu():
print("Enter 1 : To Add Parking Detail")
print("Enter 2 : To Remove Parking Record")
print("Enter 3 : To View Parking Detail ")
print("Enter 4 : To Add Vehicle Detail ")
print("Enter 5 : To Update Vehicle Record")
print("Enter 6 : To Remove Vehicle Record")
print("Enter 7 : To see the details of Vehicle")
input_dt = int(input("Please Select An Above Option: "))
if(input_dt== 1):
Add_Record()
elif (input_dt==2):
parking_remove()
elif (input_dt==3):
Rec_View()
elif (input_dt==4):
Vehicle_Detail()
elif (input_dt==5):
Update()
elif (input_dt==6):
Vehicle_remove()

11
elif (input_dt==7):
Vehicle_View()
else:
print("Enter correct choice....")
Menu()

def run_again():
while True:
print("\nDo you want to go back to the main menu or exit?")
print("1. Yes, take me back to the menu")
print("2. No, exit the program")
choice = input("Enter your choice (1/2): ")

if choice == "1":
Menu()
elif choice == "2":
print("Program Terminating. Have a nice day!")
break
else:
print("Invalid choice! Please enter 1 or 2.")

run_again()

12
SQL CODE:

CREATE DATABASE IF NOT EXISTS parking;


USE parking;

CREATE TABLE IF NOT EXISTS vehicle (


vid INT PRIMARY KEY,
vnm VARCHAR(100) NOT NULL,
date_of_purchase DATE,
phone_no VARCHAR(20)
);

CREATE TABLE IF NOT EXISTS parking_slot (


slot_id INT PRIMARY KEY AUTO_INCREMENT,
slot_code VARCHAR(20) UNIQUE NOT NULL,
level VARCHAR(20),
size ENUM('small','medium','large') DEFAULT 'medium',
is_active BOOLEAN DEFAULT TRUE
);

CREATE TABLE IF NOT EXISTS parking_session (

13
session_id INT PRIMARY KEY AUTO_INCREMENT,
pid INT,
vid INT,
entry_time DATETIME DEFAULT CURRENT_TIMESTAMP,
exit_time DATETIME NULL,
rate_per_hour DECIMAL(8,2) DEFAULT 10.00,
total_hours DECIMAL(8,2) DEFAULT 0,
payment DECIMAL(10,2) DEFAULT 0,
status ENUM('occupied','vacant','completed') DEFAULT 'occupied',
CONSTRAINT fk_slot FOREIGN KEY (pid) REFERENCES
parking_slot(slot_id)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT fk_vehicle FOREIGN KEY (vid) REFERENCES
vehicle(vid)
ON DELETE SET NULL ON UPDATE CASCADE
);

CREATE TABLE IF NOT EXISTS damage_report (


report_id INT PRIMARY KEY AUTO_INCREMENT,
session_id INT,
vehicle_id INT,
slot_id INT,
damage_description TEXT,
14
date_reported DATETIME DEFAULT CURRENT_TIMESTAMP,
reported_by VARCHAR(100),
severity ENUM('minor', 'moderate', 'major') DEFAULT 'minor',
status ENUM('open', 'under_investigation', 'resolved') DEFAULT
'open',
estimated_cost DECIMAL(10,2) DEFAULT 0,
resolution_note TEXT,
FOREIGN KEY (session_id) REFERENCES
parking_session(session_id)
ON DELETE SET NULL ON UPDATE CASCADE,
FOREIGN KEY (vehicle_id) REFERENCES vehicle(vid)
ON DELETE SET NULL ON UPDATE CASCADE,
FOREIGN KEY (slot_id) REFERENCES parking_slot(slot_id)
ON DELETE SET NULL ON UPDATE CASCADE
);

SELECT * FROM vehicle;


ALTER TABLE parkmaster12
DROP COLUMN damage_charge;

15
OUTPUT:

MYSQL TABLE:

16
PYTHON OUTPUT:

To Add Parking Record:

17
To Remove Parking Record:

To View Parking Detail:

18
To Add Vehicle Detail:

To Update Vehicle Detail:

19
To Remove Vehicle Record:

20
To See the Details of Vehicle:

SOFTWARE AND HARDWARE


REQUIREMENTS:

SOFTWARE SPECIFICATION: -
Platform: Python IDLE 3.7 & Above
Database: MySQL
Language: Python

HARDWARE SPECIFICATION: -
Operating System: Windows 7 & Above
Processor: Dual Core & Above
Hard Disk: 40GB
RAM: 1024MB
21
CONCLUSION:

Looking back at the whole journey of developing the parking


management system, it's clear how technology can solve real everyday
headaches. With cities getting more crowded and both commercial and
residential spaces needing better organization, finding a convenient and
reliable way to manage parking has become really important. This project
tackled those issues head-on by building a system where adding, updating,
or removing parking and vehicle records is simple, fast, and paper-free.
No more manual logs or confusing paperwork everything just clicks with a
few inputs.

The project made use of Python for its straightforward logic and MySQL
for secure, flexible data storage. All the main features like checking
available slots, entering vehicle details, removing old data, and calculating
parking charges, were brought together under a single, easy-to-understand
menu. This not only saves time for the people operating the system but
also means less waiting and confusion for drivers looking for spaces. And
on top of the convenience, features like real-time tracking and data
accuracy make the whole experience more reliable and trustworthy.
Vehicles are safer, records are instantly accessible, and there's much less
chance of mistakes.

Overall, this project isn’t just about writing code or designing databases;
it’s about showing how digital tools can genuinely make our daily
environment easier to navigate. It stands as a practical example of how
applying tech skills can lead to real-world impact, helping both the people
who park and the organizations that manage parking spaces.

22
BIBLIOGRAPHY:

• Sumita Arora, Computer Science with Python—Textbook for Class


XII.
• W3Schools, Python MySQL, guide to integrating Python and
MySQL.
• ROSA P - Selected bibliography on parking management. United
States Department of Transportation.

23
24

You might also like