IP Project - PARKING MANAGEMENT - 1-HOSUR
IP Project - PARKING MANAGEMENT - 1-HOSUR
A PROJECT REPORT
ON
SUBMITTED BY:
1
Parking Database Management System March 2021
CERTIFICATE
Signature of Principal
Name:
Place: Hosur
Date: ……………..
2
Parking Database Management System March 2021
ACKNOWLEDGEMENT
I would like to thank the institution for giving the opportunity to encase and display our
talent through this project.
I would like to thank my Informatics Practices teacher Mr. K. SATISH KUMAR RAJU
for having the patience to guide me at every step in the project.
I am also grateful to the CBSE BOARD for challenging and giving us this project in
which we all were so engrossed.
I would also like to thank my team, who helped me in getting the right information for
this project.
3
Parking Database Management System March 2021
TABLE OF CONTENTS
1. Abstract 5
2. System requirements 6
3. Python Introduction 7
4. My SQL Introduction 9
5. Database design 10
6. Coding 11
7. Output Screens 26
8. Bibliography 31
4
Parking Database Management System March 2021
ABSTRACT
By using this software, we can store all details of vehicles in a database using python
interface. Here, we can insert new vehicle details, updating existing vehicle details using
vehicle number, deleting existing vehicle details using vehicle number, creating new
database, creating new table(s). We can also search for specific record of a vehicle using
its vehicle number.
5
Parking Database Management System March 2021
SYSTEM REQUIREMENTS
Hardware Components
1. VGA Monitor
2. Qwerty keyboard
3. 2GB RAM
5. Graphics card
Software Components
1. Windows 7
6
Parking Database Management System March 2021
Python Introduction
It is widely used general purpose, high level and Object-Oriented Programming
Language. Developed by Guido van Rossum in February 1991.
It is used for:
Software development, web development (server-side), system scripting,
Mathematics.
Features of Python
1. Easy to use : Due to simple syntax rule
6. Free & Open Source : Can be downloaded freely and source code can be modify
for improvement.
Shortcomings of Python
1. Lesser libraries : as compared to other programming languages like
c++,java,.net
2. Slow language : as it is interpreted languages, it executes the program
slowly.
3. Weak on Type-binding : It will not pin point on use of a single variable for
different data types.
7
Parking Database Management System March 2021
Objects and Classes - An object is a software bundle of variables and related methods.
Objects are key to understanding object-oriented technology. Real-world objects share
two characteristics: They all have state and behavior.
Software objects are modeled after real-world objects in that they too have state and
behavior Classes can also define class variables. A class variable contains information
that is shared by all instances of the class. A class can also declare class methods. You
can invoke a class method directly from the class, whereas you must invoke instance
methods on a particular instance.
Abstraction - Hiding the Unnecessary details from the user and providing only the
required details, is called Data Abstraction.
Inheritance - Inheritance is the process by which objects of one class acquire the
property of objects of another class. Each subclass inherits state. However, subclasses
are not limited to the states and behaviors provided to them by their superclass.
Subclasses can add variables and methods to the ones they inherit from the superclass.
It supports the concept of hierarchical classification it also provides the use of
reusability.
Polymorphism - This means the ability to take more than one form. An operation may
exhibit different behaviour in different instances. The behaviour depends upon the
types of data used in the operation. It plays an important role in allowing objects having
different internal structures to share external interface.
8
Parking Database Management System March 2021
MYSQL Introduction
Features of mysql:
9
Parking Database Management System March 2021
DATABASE DESIGN
1. ratecard
2. vehtrans
1. ratecard Table
2. vehtrans Table
10
Parking Database Management System March 2021
CODING
import pymysql
import datetime
def db_create():
#conn=pymysql.connect(host='localhost',user='root',password='ma
nager')
#a=conn.cursor()
return db_name
conn.commit()
def tab_create():
11
Parking Database Management System March 2021
#conn=pymysql.connect(host='localhost',user='root',password='ma
nager',db=db_name)
#a=conn.cursor()
ans='YES'
if tbl == 1:
12
Parking Database Management System March 2021
elif tbl == 2:
conn.commit()
def rate_card():
print(sql)
acon.execute(sql)
13
Parking Database Management System March 2021
conn.commit()
def search():
def print_table(Query):
acon.execute(Query)
dt1=acon.fetchall()
print('\n')
print(col, end="\t")
print(end='\n')
for i in dt1:
for j in i:
print(j, end="\t")
14
Parking Database Management System March 2021
print()
print('\n')
def cprint(Query,Cnt):
print(Query.center(Cnt))
def lprint(Query,Cnt):
x=' '
print(Cnt*x+Query)
def validate(date_text):
try:
datetime.datetime.strptime(str(date_text), '%Y%m%d')
except ValueError:
15
Parking Database Management System March 2021
a=0
while a != 5:
cprint('PARKING MANAGEMENT',100)
lprint('1. WELCOME',30)
lprint('2. ADMIN',30)
lprint('4. REPORTS',30)
lprint('5. LOGOUT',30)
db_name = 'Parking_Management'
tab_name='VehTrans'
rate_card='RateCard'
conn=pymysql.connect(host='localhost',user='root',password='man
ager', db=db_name)
acon=conn.cursor()
if a == 1:
if a1 == 1:
continue
if a == 2:
username='parkadmin'
passwd='****'
z1=input('ENTER USERNAME:')
ch1=0
while ch1 != 1:
cprint("ADMIN MENU",30)
lprint("1. HOME",10)
lprint("5. LOGOUT",10)
17
Parking Database Management System March 2021
if ch1==1:
continue
elif ch1==2:
db_create()
elif ch1==3:
tab_create()
elif ch1==4:
acon.execute(sql)
conn.commit()
elif ch1==5:
break
18
Parking Database Management System March 2021
else:
print("INVALID CHOICE")
if ch1 == 5:
break
else:
continue
#conn=pymysql.connect(host='localhost',user='root',password='ma
nager',db='Parking_Management')
#acon=conn.cursor()
elif a == 3:
#db_name = 'Parking_Management'
#tab_name='VehTrans'
19
Parking Database Management System March 2021
#rate_card='RateCard'
#conn=pymysql.connect(host='localhost',user='root',password='ma
nager', db=db_name)
#acon=conn.cursor()
a3=0
while a3 != 1:
lprint('1. HOME',10)
lprint('5. LOGOUT',10)
if a3==1:
continue
elif a3==2:
20
Parking Database Management System March 2021
validate(a23)
conn.commit()
elif a3==3:
validate(a32)
tab = acon.fetchall()
for i in tab:
sno = i[0]
21
Parking Database Management System March 2021
veh = i[1]
conn.commit()
acon.execute("SELECT (((Exit_Date-
Entry_Date)*2400)+(Exit_Time-Entry_Time)) FROM
"+tab_name+" WHERE SNo = "+str(sno))
abc = acon.fetchall()
for i in abc:
calc = i[0]
ghi=acon.fetchall()
for i in ghi:
rt = i[0]
conn.commit()
22
Parking Database Management System March 2021
elif a3==4:
totalspace=300
spaceleft=300-acon.rowcount
elif a3==5:
break
else:
print("INVALID CHOICE")
if a3==5:
break
elif a == 4:
a4=0
while a4 != 1:
cprint("REPORTS MENU",30)
23
Parking Database Management System March 2021
lprint('1. HOME',10)
lprint('5. LOGOUT',10)
if a4 == 1:
continue
elif a4 == 2:
elif a4 == 3:
search()
elif a4 == 4:
elif a4 == 5:
break
24
Parking Database Management System March 2021
else:
print("INVALID CHOICE")
if a4==5:
break
elif a == 5:
break
25
Parking Database Management System March 2021
OUTPUT SCREEN
26
Parking Database Management System March 2021
27
Parking Database Management System March 2021
28
Parking Database Management System March 2021
Screen-7: Search(Successful)
1
29
Parking Database Management System March 2021
Screen-12:Exit Screen
30
Parking Database Management System March 2021
Bibliography:
www.google.com
www.python.org.
www.geeksforgeeks.org
www.stackoveflow.com
31