0% found this document useful (0 votes)
47 views18 pages

Parking System Management

This document is a project file for a parking system management project done by Ritika for her 12th grade computer science certificate from CBSE. It includes an introduction to the parking management system project, the system and hardware requirements, the Python source code to add, view, update and delete parking and vehicle records from a MySQL database, sample outputs, and references used in the project.

Uploaded by

ritikadogra465
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)
47 views18 pages

Parking System Management

This document is a project file for a parking system management project done by Ritika for her 12th grade computer science certificate from CBSE. It includes an introduction to the parking management system project, the system and hardware requirements, the Python source code to add, view, update and delete parking and vehicle records from a MySQL database, sample outputs, and references used in the project.

Uploaded by

ritikadogra465
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
You are on page 1/ 18

PARKING SYSTEM

MANAGEMENT
PROJECT FILE

CBSE- Central Board Of Secondary


education
2023-24

COMPUTER SCIENCE (083)

By- ritika (roll no 22)(xii a)

Mother marys school, sahakarita marg, mayur vihar


phase 1, delhi 110091
Certificate
Certified that the workcontained in the
project titled “PARKING SYSTEM
MANAGEMENT” by “RITIKA”, has been
carried out under my supervision and
that this work has not been submitted
elsewhere for a CBSE 12th certificate

Mrs. Nidhi Arora


ACKNOWLEDGEMENT
I would like to thank Ms. Poornima Joshi, principal
of MOTHER MARYS SCHOOL. I am deeply indebted to
my mentor Ms. Nidhi Arora.
I further thank to all the staff members of MOTHER
MARYS SCHOOL.
My heartfelt thank to CBSE.
I also express my deepest thank to my parents.
Finally, I would like to wind up by paying heartfelt
thanks to all my near and dear ones.

-RITIKA
CONTENTS
1. INTRODUCTION OF THE
PROJECT
2. SYSTEM REQUIREMENTS OF
THE PROJECT
3. ADVANTAGES OF THE PROJECT
4. SOURCE CODE
5. OUTPUT OF THE CODE
6. REFERENCES
Introduction
This is a project based on Parking Management.
The programhelps us to enter, display or alter the
details of vehicles in parkingrecords.Moreover &
most importantly the program helps us The
programalso helps us to know the present status of
a parking detail,vehicle detail etc.It includes various
function programs to do the above
mentionedtasks.Data file handling has been
effectively used in the program.The database is a
collection of interrelated data to serve
multipleapplications. That is database programs
create files ofinformation. So we see that files are
worked with most, inside theprogram.DBMSThe
software required for the management of data is
called asDBMS. It has 3 models
• Relation model
• Hierarchical model
• Network model

RELATIONAL MODEL It’s based on the concept on


relation.
Relation is the table that consists of rows and
columns. The rows
of the table are called tuple and the columns of the
table arecalled attribute. Numbers of rows in the
table is called ascardinality. Number of columns in
the table is called as degree.HIERARCHICAL
MODEL: In this type of model, we have
multiplerecords for each record. A particular
record has one parentrecord. No chide record can
exist without parent record. In this,the records are
organized in tree (like structureNETWORK MODEL:-
In this, the data is represented by collectionof
records and relationship is represented by (ink or
association.CHARACTERISTICS OF DB MS: -

• It reduces the redundancy


• Reduction of data in inconsistency
• Data sharing
• Data standardization

DIFFERENT TYPES OF FILES: -BASED ON


ACCESS:-
• Sequential file
• Serial file
• Random (direct access) file

BASED ON STORAGE:-
• Text File
• Binary File
• CSV File
System requirements
SOFTWARE SPECIFICATION: -
Operating System: Windows
7Platform: Python IDLE 3.7

Database: MySQL

Language: Python

HARDWARE SPECIFICATION: -
Processor: Dual Core & Above
Hard Disk: 40GB
RAM: 1024MB

Note: For Python-MySQL connectivity,


following data have been used:-

Host- localhost, user- root, password- root,


database- school
SOURCE CODE
import os
import platform
import mysql.connector
mydb=mysql.connector.connect(host=”localhost”,
user=”root”, password=”root”, database=”parking”)
mycursor=mydb.cursor()
def Add_Record():
L=[]
id1=int(input(“Enter the parking number:”))
L.append(id1)
pname1=input(“Enter the parking name:”)
L.append(pname1)
level1=input(“Enter level of parking:”)
L.append(level1)
freespace1=input(“Is there any freespace or not:
YES/NO”)
L.append(freespace1)
vehicleno1=input(“Enter the Vehicle number:”)
L.append(vehicleno1)
nod1= int(input(“Enter total number of days for
parking:”))
L.append(nod1)
if nod1==1:
Payment1=20
elif nod1==2:
Payment1=40
elif nod1==3:
Payment1=60
elif nod1==4:
Payment1=80
elif nod1==5:
Payment1=100
elif nod1==6:
Payment1=120
L.append(Payment1)
stud=(L)
sql=’insert into
parkmaster12(pid,pnm,level,freespace,vehicleno,no
d,payment)
values(%s,%s,%s,%s,%s,%s,%s)’
mycursor.execute(sql,stud)
mydb.commit()
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”
mycursor.execute(sql,rl)
res=mycursor.fetchall()
elif ch==2:
s=input(“Enter Parking Name:”)
rl=(s,)
sql=”select*from parkmaster12 where pnm=%s”
mycursor.execute(sql,rl)
res=mycursor.fetchall()
elif ch==3:
s=int(input(“Enter Level of Parking:”))
rl=(s,)
sql=”select*from parkmaster12 where level=%s”
mycursor.execute(sql,rl)
res=mycursor.fetchall()
elif ch==4:
sql=”select*from parkmaster12”
mycursor.execute(Sql)
res=mycursor.fetchall()
print(“Details about Parking are as follows:”)
print(“(Parking Id,
ParkingName,Level,FreeSpace(Y/N),Vehicle No, 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:”))
L.append(vid1)
vnm1=input(“Enter Vehicle Name/Model
Name:”)
L.append(vnm1)
dateofpur1=input(“Enter Year-Month-date of
purchase:”)
L.append(dateofpur1)
vdt=(L)
sql=”insert into vehicle(pid,vnm,dateofpur)
values(%s,%s,%s)”
mycursor.execute(sql,vdt)
mydb.commit()
def Vehicle_View():
vid1=int(input(“Enter the vehicle number of the
vehicle whose details is to be viewed:”))
sql=’selectparkmaster12.pid,parkmaster12.pnm,park
master12.vehicleno,vehicle.vnm from parkmaster12
INNER JOIN vehicle ON
parkmaster12.pid=vehicle.pid and vehicle.pid=%s’
rl=(vid1,)
print(“The following are the details you wanted:”)
mycursor.execute(sql,rl)
res=mycursor.fetchall()
for x in res:
print(x)
print(‘Task completed’)
def remove():
vid1=int(input(“Enter the vehicle number of the
vehicle to be deleted:”))
rl=(vid1,)
sql=”Delete from vehicle where pid=%s”
mycursor.execute(sql,rl)
mydb.commit()
print(‘Removed as per the command’)
def Menu():
print(“Enter 1: To Add Parking Detail”)
print(“Enter 2: To View Parking Detail”)
print(“Enter 3: To Add Vehicle Detail”)
print(“Enter 4: To Remove Vehicle Record”)
print(“Enter 5: 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):
Rec_View()
elif (input_dt==3):
Vehicle_Detail()
elif (input_dt==4):
remove()
elif (input_dt==5):
Vehicle_View()
else:
print(“Enter correct choice….”)
Menu()
def runAgain():
runAgn=input(“\n Want to run again (y/n):”)
while(runAgn.lower()==’y’):
if (platform.system()==’Windows’):
print(os.system(‘cls’))
else:
print(os.system(‘clear’))
Menu()
OUTPUT OF THE CODE
REFERENCES
1. COMPUTER SCIENCE CLASS 12 BY
PREETI ARORA
2. LearnPython.org
3. Code Academy
4. pythontrends.wordpress.com

You might also like