Professional Documents
Culture Documents
Computer Science
(Python And SQL Project)
Parking Management System
Session: 2023-24
Teacher: ________________
Examiner: _______________
Principal: _______________
2|Page
Acknowledgement
I, Divyansh Raj Kureel of class XII comm., would like to
express my sincere gratitude to my computer science
teacher Mr. Priyanshu Gautam, for his vital support,
guidance and encouragement – without which this project
would not have come forth.
I would also like to express my gratitude to my school
Bhonwal Convent School for letting me use the school
laboratory.
3|Page
Index
4|Page
Introduction
5|Page
Objectives
A Parking Management System (PMS) aims to efficiently
and effectively manage parking spaces, enhance the
overall parking experience, and optimize the use of
available resources. The specific objectives of a Parking
Management System may include:
1. Optimizing Space Utilization:
- Ensure efficient use of available parking spaces.
- Minimize congestion and maximize the number of
vehicles that can be accommodated.
2. Improving Accessibility:
- Enhance accessibility for all users, including individuals
with disabilities.
- Implement features such as reserved parking for people
with special needs.
3. Enhancing User Experience:
- Provide a seamless and user-friendly experience for
both parking operators and vehicle owners.
- Reduce the time and effort required for users to find
parking spaces.
6|Page
Software and Hardware Requirement
SOFTWARE SPECIFICATION:
Operating System: Windows 10
Platform: Python IDLE 3.9
Database: MySQL
HARDWARE SPECIFICATION:
Processor: Dual Core & Above
Hard Disk: 40GB
RAM: 1024MB
7|Page
Limitations Of Project
• There is a greater construction cost per space (but this
maybe offset by the chance for lesser land costs per
space and the system manufacturers say that the
operating and maintenance cost will be lower as
compared to a conventional ramped parking
structure).
• Use of redundant systems will result in a greater cost.
• It may be a bit confusing for unfamiliar users.
• It is not recommended for high peak hour volume
facilities.
• There may be a fear of breakdown (How do I get my
car out?).
• There is an uncertain building department review and
approval process.
• It requires a maintenance contract with the supplier.
8|Page
Python . My SQL Connectivity
While designing real-life applications, the data inputted by
the user along with the generated output are displayed
but not stored, since all the program execution takes place
inside the RAM, which is a temporary memory, and as
soon as we close the form, its contents get erased. They
can't be retrieved since they are not getting saved on a
hard disk. Thus, when the application is executed the
second time, it requires a new set of inputs from the user.
This limitation can be overcome by sending the output
generated and saving the input fetched from the user in a
database created at the back-end of the application. The
input is fetched from the user using Python Interface. This
is termed as the Front-end Interface of the application.
9|Page
Why Python is used?
10 | P a g e
Flow Chart
Open MySQL
Create Database
Exit IDLE
11 | P a g e
Database Creation
1. Create a database in MySQL named ‘parking’:
( ‘create database if not exists parking‘ )
12 | P a g e
Setting the connection between Python and Database
Syntax:
Import mysql.connector as driver
mydb=daicon.connect(host="localhost",user="Danny",password="
Divyansh.12",database='parking')
13 | P a g e
SOURCE
CODE
14 | P a g e
Source Code Of Project
import os
import platform
mycursor=mydb.cursor()
def Add_Record():
L=[]
L.append(id1)
L.append(pname1)
L.append(Level1)
L.append(freespace1)
L.append(vehicleno1)
L.append(nod1)
if nod1==1:
Payment1=20
elif nod1==2:
Payment1=40
elif nod1==3:
Payment1=60
elif nod1==4:
Payment1=80
15 | P a g e
elif nod1==5:
Payment1=100
elif nod1==6:
Payment1=6969
L.append(Payment1)
stud=(L)
values(%s,%s,%s,%s,%s,%s,%s)'
mycursor.execute(sql,stud)
mydb.commit()
def Rec_View():
print("4. All")
if ch==1:
rl=(s,)
mycursor.execute(sql,rl)
res=mycursor.fetchall()
elif ch==2:
rl=(s,)
mycursor.execute(sql,rl)
16 | P a g e
res=mycursor.fetchall()
elif ch==3:
rl=(s,)
mycursor.execute(sql,rl)
res=mycursor.fetchall()
elif ch==4:
mycursor.execute(sql)
res=mycursor.fetchall()
for x in res:
print(x)
def Vehicle_Detail():
L=[]
L.append(vid1)
L.append(vnm1)
L.append(dateofpur1)
vdt=(L)
mycursor.execute(sql,vdt)
mydb.commit()
def Vehicle_View():
17 | P a g e
vid1=int(input("Enter the vehicle number of the vehicle whose details is to be viewed : "))
rl=(vid1,)
mycursor.execute(sql,rl)
res=mycursor.fetchall()
for x in res:
print(x)
print('Task compelted')
def remove():
rl=(vid1,)
mycursor.execute(sql,rl)
mydb.commit()
def Menu():
if(input_dt== 1):
Add_Record()
elif (input_dt==2):
Rec_View()
18 | P a g e
elif (input_dt==3):
Vehicle_Detail()
elif (input_dt==4):
remove()
elif (input_dt==5):
Vehicle_View()
else:
Menu()
def runAgain():
while(runAgn.lower()=='y'):
if(platform.system()=='Windows'):
print(os.system('cls'))
else:
print(os.system('clear'))
Menu()
runAgain()
19 | P a g e
OUTPUT
20 | P a g e
Output Screening
21 | P a g e
22 | P a g e
Future Enhancement Of Project
The smart parking industry continues to evolve as an increasing number
of cities struggle with traffic congestion and inadequate parking
availability. While the deployment of sensor technologies continues to be
core to the development of smart parking, a wide variety of other
technology innovations are also enabling more adaptable systems —
including cameras, wireless communications, data analytics, induction
loops, smart parking meters, and advanced algorithms.
The future of the smart parking market is expected to be significantly
influenced by the arrival of automated vehicles (AVs). Several cities
around the world are already beginning to trial self-parking vehicles,
specialized AV parking lots, and robotic parking valets .
23 | P a g e
Testing
Testing is a crucial phase in the software development life cycle that
involves evaluating a system or application to identify errors, ensure it
meets specified requirements, and verify its functionality. Two
fundamental approaches to testing are black box testing and white box
testing.
Black Box Testing:
Definition:
Black box testing focuses on the external behavior of the software
without examining its internal code structure. Testers are concerned with
input and output, and the internal logic of the system is not considered.
Key Points:
1. No Knowledge of Internal Implementation:
- Testers perform black box testing without any knowledge of the
internal code, structure, or implementation details of the system.
2. User's Perspective:
- Test cases are designed based on the system's specifications and
requirements, considering how users interact with the software.
3. Test Inputs and Expected Outputs:
- Testers provide inputs to the system and observe the outputs. The
focus is on validating whether the system behaves as expected.
4. Functional and Non-functional Testing:
- Both functional and non-functional aspects of the system can be
tested using black box testing. Functional testing checks specific
24 | P a g e
functionalities, while non-functional testing assesses aspects like
performance or usability.
5. Types of Black Box Testing:
- Functional Testing: Validates that the software functions according to
the specified requirements.
- Non-functional Testing: Evaluates aspects such as performance,
usability, and security.
6. Advantages:
- Testers do not need to know the internal details of the code.
- Test cases are designed from the user's perspective, ensuring that the
system meets user requirements.
7. Disadvantages:
- Limited coverage of code paths, as internal logic is not considered.
- It may not uncover implementation-specific errors.
White Box Testing:
Definition:
White box testing, also known as structural or glass box testing, involves
examining the internal code structure, logic, and implementation details
of the software.
Key Points:
1. Knowledge of Internal Code:
- Testers have knowledge of the internal code, data structures, and
algorithms used in the system.
2. Code Coverage:
25 | P a g e
- The goal is to achieve high code coverage by testing various code paths,
branches, and statements within the software.
3. Test Based on Code Structure:
- Test cases are designed based on the internal code structure, with the
aim of ensuring that all code paths are executed and behave as expected.
4. Code Optimization and Security:
- White box testing can help identify areas for code optimization and
security vulnerabilities by examining the internal workings of the
application.
5. Types of White Box Testing:
-Unit Testing: Tests individual units or components of the code.
- Integration Testing: Evaluates the interaction between different
components.
- System Testing: Assesses the overall system behavior.
- Code Review and Static Analysis: Analyzes the code without executing
it.
6. Advantages:
- Comprehensive testing of internal logic and code paths.
- Identifies issues related to code optimization, security, and
implementation.
7. Disadvantages:
- Requires knowledge of the internal code, which may not be feasible
in all cases.
- Testing all possible code paths can be time-consuming.
26 | P a g e
Summary:
- Black Box Testing: Focuses on external behavior, requires no knowledge
of internal code, and validates against specified requirements.
- White Box Testing: Examines internal code structure, requires
knowledge of internal implementation, and aims for high code coverage
to ensure comprehensive testing.
Both black box and white box testing are essential for a robust testing
strategy. They complement each other, addressing different aspects of
software quality and helping ensure that the software meets both
functional and structural requirements.
27 | P a g e
Bibliography
• www.google.com
• https://pythontrends.wordpress.com
• BOOK – Python by Sumita Arora
28 | P a g e