Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

PARKING MANAGEMENT

SYSTEM:

This Photo by Unknown Author is licensed under CC BY-SA

DONE BY:
1:) P.KAMALNAYAK
2:) P.RAHUL
INDEX:

1.) INTRODUCTION

2.) PROJECT OVERVIEW

3.) OBJECTIVES OF THE MANAGEMENT SYSTEM

4.) SCOPE OF THE PROJECT

5.) SOFTWARE AND HARDWARE REQUIREMENTS

6.) CONCLUSION

7.) BIBILOGRAPHY

INTRODUCTION:
A Parking management system or PMS, is a computer essential
system software for modern maintenance of all types of vehicles that are used
by our people.
Under complete supervision the vehicle is safeguarded and by the information
provided by the customer the record has been created in such a way, that
includes the date, time, vehicle number, colour of the vehicle, company the
vehicle belongs to, model, etc…of the vehicle.
And Name, phone number, address, etc…of the customer.
PROJECT OVERVIEW:

Parking management system is based on the general requirements of any


place.
It uses structured query language as backend and python programming language
as the frontend.
This, project provides secure access to the database to all authorised users of the
system.
This work is handled by both user and service provider module. A Customer
willing to park the vehicle can setup his/her details with this project. His / Her
basic requirements can be fulfilled.
The main purpose of the project is to make the Customer user friendly with
the proceedings…

OBJECTIVES OF THE MANAGEMENT SYSTEM:

>Helps parking centres in making their business more efficient.


>Complete automation of the parking place.
>Provide accurate information of the modification of the record.
>Provide efficient and reliable structure that can handle large
number of customer data.
>Secure maintenance of the vehicle.
>24*7 keeps on working.
Scope of the project:

>The Parking management system is able to provide much facilities


to the Customers and in-charge staff. This is a very well-structured project so
that it can retrieve very old records by just a few clicks …
>It can be further expanded by adding new tables and updating new
records as to implement them in the technological world.
>It may be taken too modern such that it doesn’t even require an in-
charge staff.
Direct Customer interaction with application and payment of bill…

SOFTWARE AND HARDWARE REQUIREMENTS:

Python-VERSION-3.8 OR 3.9
Mysql-VERSION-8.0
Spyder-VERSION-5.2 OR 5
Pandas(Library)-3.8 OR 3.9

Modern operating system


X86 64-bit CPU(Intel/AMD architecture)
4 GB RAM
5 GB free disk space
RECOMMENDED REQUIREMENTS:

>Intel Core i5(sixth generation or newer)


>16GB RAM
>500 GB Internal storage drive
>14’’LCD monitor, resolution of 1600*900 or better..

Python-VERSION- 3.9
Mysql-VERSION-8.0
Spyder-VERSION-5.2
Pandas(Library)-3.9

CONCLUSION:
This software has its advantages and disadvantages but it can help
with the record storage system.
We don’t have to worry about the misplacing of the records which is a great
clash while storing the records in separate files.
BIBILOGRAPHY:

1:) NCERT TEXTBOOK


2:) https://www.google.com/
3:) https://w3schools.com/python/
4:) https://stackoverflow.com/python/
5:) https://tutorialspoint.com/python/
6:) Computer Science with Python(Class-11 & 12)- Sumita Arora

DATABASES:
mysql> show databases;

+--------------------+

| Database |

+--------------------+

| airlines |

| information_schema |

| mysql |

| nayaks |

| parking__system |

| parking_sys |

| parking_system |

| performance_schema |

| sys |

| world |

+--------------------+
10 rows in set (0.01 sec)

mysql> use parking_sys;

Database changed

mysql> show tables;

+-----------------------+

| Tables_in_parking_sys |

+-----------------------+

| login |

| parking_space |

| parking_type |

| transaction |

+-----------------------+

4 rows in set (0.00 sec)

mysql> desc login;

+-------+-------------+------+-----+---------+----------------+

| Field | Type | Null | Key | Default | Extra |

+-------+-------------+------+-----+---------+----------------+

| id | int | NO | PRI | NULL | auto_increment |

| name | varchar(30) | NO | | NULL | |

| pwd | varchar(30) | NO | | NULL | |

+-------+-------------+------+-----+---------+----------------+

3 rows in set (0.01 sec)

mysql> select*from login;

+----+-------+---------+

| id | name | pwd |

+----+-------+---------+

| 1 | kamal | nayak |

| 2 | rahul | kishore |

+----+-------+---------+

2 rows in set (0.00 sec)

mysql> desc parking_type;

+-------+-------------+------+-----+---------+----------------+

| Field | Type | Null | Key | Default | Extra |

+-------+-------------+------+-----+---------+----------------+

| id | int | NO | PRI | NULL | auto_increment |


| name | varchar(30) | YES | | NULL | |

| price | float(7,2) | YES | | NULL | |

+-------+-------------+------+-----+---------+----------------+

3 rows in set (0.00 sec)

mysql> select*from parking_type;

+----+-------------+--------+

| id | name | price |

+----+-------------+--------+

| 1 | TWO WHEELER | 30.00 |

| 2 | CAR | 50.00 |

| 3 | BUS | 250.00 |

| 4 | TRUCK | 350.00 |

| 5 | TROLLY | 450.00 |

+----+-------------+--------+

5 rows in set (0.01 sec)

mysql> desc parking_space;

+---------+-------------+------+-----+---------+----------------+

| Field | Type | Null | Key | Default | Extra |

+---------+-------------+------+-----+---------+----------------+

| id | int | NO | PRI | NULL | auto_increment |

| type_id | int | YES | | NULL | |

| status | varchar(30) | YES | | NULL | |

+---------+-------------+------+-----+---------+----------------+

3 rows in set (0.00 sec)

mysql> select*from parking_space;

+----+---------+--------+

| id | type_id | status |

+----+---------+--------+

| 1| 1 | open |

| 2| 2 | open |

| 3| 3 | open |

| 4| 4 | open |

| 5| 5 | open |

| 6| 1 | open |

| 7| 1 | open |

| 8| 1 | open |
| 9| 1 | open |

| 10 | 1 | open |

+----+---------+--------+

10 rows in set (0.00 sec)

mysql> desc transaction;

+------------+-------------+------+-----+---------+----------------+

| Field | Type | Null | Key | Default | Extra |

+------------+-------------+------+-----+---------+----------------+

| id | int | NO | PRI | NULL | auto_increment |

| vehicle_id | varchar(30) | YES | | NULL | |

| parking_id | int | YES | | NULL | |

| entry_date | date | YES | | NULL | |

| exit_date | date | YES | | NULL | |

| amount | float(10,2) | YES | | NULL | |

+------------+-------------+------+-----+---------+----------------+

6 rows in set (0.00 sec)

mysql> select*from transaction;

+----+---------------+------------+------------+------------+--------+

| id | vehicle_id | parking_id | entry_date | exit_date | amount |

+----+---------------+------------+------------+------------+--------+

| 1 | tn18az84-3333 | 1 | 2022-12-20 | 2023-01-03 | 30.00 |

| 2 | tn23aa99-9999 | 1 | 2022-12-23 | 2023-01-09 | 30.00 |

+----+---------------+------------+------------+------------+--------+

2 rows in set (0.00 sec)

SOURCE CODE:
import mysql.connector

import time

from datetime import date

global conn,cursor

conn = mysql.connector.connect(

host='localhost', database='parking_sys', user='root', password='thenayaks')

cursor = conn.cursor()
def clear():

for _ in range(65):

print()

def introduction():

msg = '''

PARKING MANAGEMENT SYSTEM

WELCOME TO OUR "PARKING_SYS" A SOFTWARE DEVELOPED BY KAMAL NAYAK AND RAHUL

STUDYING CLASS 12 AT SPRINGDAYS SENIOR SECONDARY SCHOOL, VELLORE.

HERE WE PROVIDE THE NECESSARY REQUIREMENTS IN ORDER TO PARK A VEHICLE

FIRST OF ALL I NEED TO THANK MY COMPUTER SCIENCE MAM MISS.PRITHI FOR PROVIDING

THE PROPER GUIDENCE AND LEADING ME AND MY FRIENDS WHO ALL HELPED ME IN THIS
PROJECT AND I ALSO WANT

TO THANK TUTORIALS POINT, W3SCHOOLS, STACKOVERFLOW, ETC.....

LETS START.........

FIRST OF ALL PARKING MANAGEMENT IS VERY COMMON PROBLEM IN CITIES AND ESPECIALLY
WHERE EVERYONE NEEDS

TO GO FOR EXAMPLE PUBLIC PLACES SUCH AS THEATRE, MALL, RAILWAY STATION,


AIRPORT,ETC...

THIS OFTEN LEADS TO LOSS OF THE VEHICLE IF IT IS NOT PARKED AT THE RIGHT PLACE,

IN ORDER TO OVERCOME THE PROBLEM OUR PROJECT PLAYS A MAJOR ROLE..

IT CONSISTS OF VARIOUS PARTS SUCH AS VEHICLE LOGIN,SLOT ALLOTMENT,PARKING STATUS,

VEHICLE STATUS,MODIFY RECORD, DELETE VEHICLE RECORD,


MONEY COLLECTED, PARKING TYPE, ETC..........

CUSTOMERS CAN FILL THEIR NEEDS BY USING THIS PROJECT..

THANKYOU FOR PATIENTLY READING THE INTRODUCTION...

\n\n\n\n'''

for x in msg:

print(x, end='')

time.sleep(0.002)

wait = input('Press any key to continue.....')

def made_by():

msg = '''

Parking Management system made by : NAYAK & RAHUL

Roll No : 11 & 14

School Name : SPRINGDAYS SENIOR SECONDARY SCHOOL(CBSE)

Session : 2022-23

Thanks for evaluating my Project.

\n\n\n

'''

for x in msg:

print(x, end='')

time.sleep(0.002)

wait = input('Press any key to continue.....')

def display_parking_type_records():

cursor.execute('select * from parking_type;')

records = cursor.fetchall()
for row in records:

print(row)

def login():

while True:

clear()

uname = input('Enter your id :')

upass=input('Enter your password:')

cursor.execute('select * from login where name="{}"and pwd="{}"'.format(uname,upass))

cursor.fetchall()

rows = cursor.rowcount

if rows!=1:

print('Invalid Login details..... Try again')

else:

print('You are eligible for operating this system............')

print('\n\n\n')

print('Press any key to continue...............')

break

def add_parking_type_record():

clear()

name = input('Enter Parking Type( 1. Two wheelar 2. Car 3. Bus 4. Truck 5. Trolly ) : ')

price = input('Enter Parking Price per day : ')

sql = 'insert into parking_type(name,price) values("{}",{});'.format(name,price)

cursor.execute(sql)

print('\n\n New Parking Type added....')

cursor.execute('select max(id) from parking_type')

no = cursor.fetchone()

print(' New Parking Type ID is : {} \n\n\n'.format(no[0]))

wait= input('\n\n\nPress any key to continue............')

def add_parking_slot_record():

clear()

parking_type_id = input(
'Enter Parking Type( 1. Two wheelar 2. Car 3. Bus 4. Truck 5. Trolly ) :')

status = input('Enter current Status ( Open/Full ) :')

sql = 'insert into parking_space(type_id,status) values \

("{}","{}");'.format(parking_type_id,status)

cursor.execute(sql)

print('\n\n New Parking Space Record added....')

cursor.execute('select max(id) from parking_space;')

no = cursor.fetchone()

print(' Your Parking ID is : {} \n\n\n'.format(no[0]))

display_parking_type_records()

wait = input('\n\n\nPress any key to continue............')

def modify_parking_type_record():

clear()

print(' MODIFY PARKING TYPE SCREEN ')

print('-'*100)

print('1. Parking Type Name \n')

print('2. Parking Price \n')

choice = int(input('Enter your choice :'))

field=''

if choice==1:

field='name'

if choice==2:

field='price'

park_id = input('Enter Parking Type ID :')

value = input('Enter new values :')

sql = 'update parking_type set '+ field +' = "' + value +'" where id ='+ park_id +';'

cursor.execute(sql)

print('Record updated successfully................')

display_parking_type_records()

wait = input('\n\n\nPress any key to continue............')


def modify_parking_space_record():

clear()

print(' M O D I F Y P A R K I N G S P A C E R E C O R D ')

print('-'*100)

print('1. Parking Type ID(1-Two Wheelar, 2: Car 3.Bus etc ): ')

print('2. status \n')

choice = int(input('Enter your choice :'))

field = ''

if choice == 1:

field = 'type_id'

if choice ==2:

field = 'status'

print('\n\n\n')

crime_id = input('Enter Parking Space ID :')

value = input('Enter new values :')

sql = 'update parking_space set ' + field + \

' = "' + value + '" where id =' + crime_id + ';'

cursor.execute(sql)

print('Record updated successfully................')

wait = input('\n\n\nPress any key to continue............')

def add_new_vehicle():

clear()

print('Vehicle Login Screen ')

print('-'*100)

vehicle_id = input('Enter Vehicle Number :' )

parking_id = input('Enter parking ID :')

entry_date = date.today()

sql = 'insert into transaction(vehicle_id,parking_id,entry_date) values \

("{}","{}","{}");'.format(vehicle_id,parking_id,entry_date)

cursor.execute(sql)

cursor.execute('update parking_space set status ="full" where id ={}'.format(parking_id))

print('\n\n\n Record added successfully.................')

wait= input('\n\n\nPress any key to continue.....')


def remove_vehicle():

clear()

print('Vehicle Logout Screen')

print('-'*100)

vehicle_id = input('Enter vehicle No :')

exit_date = date.today()

sql = 'select parking_id,price,entry_date from transaction tr,parking_space ps, parking_type pt \

where tr.parking_id = ps.id and ps.type_id = pt.id and \

vehicle_id ="'+vehicle_id+'" and exit_date is NULL;'

cursor.execute(sql)

record = cursor.fetchone()

days = (exit_date-record[2]).days

if days ==0:

days = days+1

amount = record[1]*days

clear()

print('Logout Details ')

print('-'*100)

print('Parking ID : {}'.format(record[0]))

print('Vehicle ID : {}'.format(vehicle_id))

print('Parking Date : {}'.format(record[2]))

print('Current Date : {}'.format(exit_date))

print('Amount Payable : {}'.format(amount))

wait = input('press any key to continue......')

# update transaction and parking space tables

sql1 = 'update transaction set exit_date ="{}" , amount ={} where vehicle_id ="{}" \

and exit_date is NULL;'.format(exit_date,amount, vehicle_id)

sql2 = 'update parking_space set status ="open" where id = {}'.format(record[0])

cursor.execute(sql1)

cursor.execute(sql2)

wait = input('Vehicle Out from our System Successfully.......\n Press any key to continue....')

def search_menu():
clear()

print(' S E A R C H P A R K I N G M E N U ')

print('1. Parking ID \n')

print('2. Vehicle Parked \n')

print('3. Free Space \n')

choice = int(input('Enter your choice :'))

field = ''

if choice == 1:

field = 'id'

if choice == 2:

field = 'vehicle No'

if choice == 3:

field = 'status'

value = input('Enter value to search :')

if choice == 1 or choice==3:

sql = 'select ps.id,name,price, status \

from parking_space ps , parking_type pt where ps.id = pt.id AND ps.id ={}'.format(value)

else:

sql = 'select id,vehicle_id,parking_id,entry_date from transaction where exit_date is NULL;'

cursor.execute(sql)

results = cursor.fetchall()

records = cursor.rowcount

for row in results:

print(row)

if records < 1:

print('Record not found \n\n\n ')

wait = input('\n\n\nPress any key to continue......')

def parking_status(status):

clear()

print('Parking Status :',status)

print('-'*100)

sql ="select * from parking_space where status ='{}'".format(status)

cursor.execute(sql)
records = cursor.fetchall()

for row in records:

print(row)

wait =input('\n\n\nPress any key to continue.....')

def vehicle_status_report():

clear()

print('Vehicle Status - Currently Parked')

print('-'*100)

sql='select * from transaction where exit_date is NULL;'

cursor.execute(sql)

records = cursor.fetchall()

for row in records:

print(row)

wait =input('\n\n\nPress any key to continue.....')

def money_collected():

clear()

start_date = input('Enter start Date(yyyy-mm-dd): ')

end_date = input('Enter End Date(yyyy-mm-dd): ')

sql = "select sum(amount) from transaction where \

entry_date ='{}' and exit_date ='{}'".format(start_date,end_date)

cursor.execute(sql)

result = cursor.fetchone()

clear()

print('Total money Collected from {} to {}'.format(start_date,end_date))

print('-'*100)

print(result[0])

wait =input('\n\n\nPress any key to continue.....')

def report_menu():

while True:

clear()

print(' P A R K I N G R E P O R T S ')

print('-'*100)
print('1. Parking Types \n')

print('2. Free Space \n')

print('3. Ocupied Space \n')

print('4. Vehicle Status \n')

print('5. Money Collected \n')

print('6. Exit \n')

choice = int(input('Enter your choice :'))

field = ''

if choice == 1:

display_parking_type_records()

if choice == 2:

parking_status("open")

if choice == 3:

parking_status("full")

if choice == 4:

vehicle_status_report()

if choice == 5:

money_collected()

if choice ==6:

break

def main_menu():

clear()

login()

clear()

introduction()

while True:

clear()

print(' P A R K I N G M A N A G E M E N T S Y S T E M')

print('*'*100)

print("\n1. Add New Parking Type")

print("\n2. Add New Parking Slot")


print('\n3. Modify Parking Type Record')

print('\n4. Modify Parking Slot Record')

print('\n5. Vehicle Login ')

print('\n6. Vehicle Logout')

print('\n7. Search menu')

print('\n8. Report menu')

print('\n9. Close application')

print('\n\n')

choice = int(input('Enter your choice ...: '))

if choice == 1:

add_parking_type_record()

if choice == 2:

add_parking_slot_record()

if choice == 3:

modify_parking_type_record()

if choice == 4:

modify_parking_space_record()

if choice == 5:

add_new_vehicle()

if choice == 6:

remove_vehicle()

if choice == 7:

search_menu()

if choice == 8:

report_menu()

if choice == 9:

break
made_by()

if __name__ == "__main__":

main_menu()

OUTPUT:
Enter your id :KAMAL

Enter your password:NAYAK

You are eligible for operating this system............

Press any key to continue...............

PARKING MANAGEMENT SYSTEM

WELCOME TO OUR "PARKING_SYS" A SOFTWARE DEVELOPED BY KAMAL NAYAK AND RAHUL

STUDYING CLASS 12 AT SPRINGDAYS SENIOR SECONDARY SCHOOL, VELLORE.

HERE WE PROVIDE THE NECESSARY REQUIREMENTS IN ORDER TO PARK A VEHICLE

FIRST OF ALL I NEED TO THANK MY COMPUTER SCIENCE MAM MISS.PRITHI FOR PROVIDING

THE PROPER GUIDENCE AND LEADING ME AND MY FRIENDS WHO ALL HELPED ME IN THIS PROJECT AND I ALSO
WANT

TO THANK TUTORIALS POINT, W3SCHOOLS, STACKOVERFLOW, ETC.....

LETS START.........

FIRST OF ALL PARKING MANAGEMENT IS VERY COMMON PROBLEM IN CITIES AND ESPECIALLY WHERE
EVERYONE NEEDS
TO GO FOR EXAMPLE PUBLIC PLACES SUCH AS THEATRE, MALL, RAILWAY STATION, AIRPORT,ETC...

THIS OFTEN LEADS TO LOSS OF THE VEHICLE IF IT IS NOT PARKED AT THE RIGHT PLACE,

IN ORDER TO OVERCOME THE PROBLEM OUR PROJECT PLAYS A MAJOR ROLE..

IT CONSISTS OF VARIOUS PARTS SUCH AS VEHICLE LOGIN,SLOT ALLOTMENT,PARKING STATUS,

VEHICLE STATUS,MODIFY RECORD, DELETE VEHICLE RECORD,

MONEY COLLECTED, PARKING TYPE, ETC..........

CUSTOMERS CAN FILL THEIR NEEDS BY USING THIS PROJECT..

THANKYOU FOR PATIENTLY READING THE INTRODUCTION...

Press any key to continue.....

PARKING MANAGEMENT SYSTEM

****************************************************************************************************

1. Add New Parking Type

2. Add New Parking Slot

3. Modify Parking Type Record

4. Modify Parking Slot Record

5. Vehicle Login

6. Vehicle Logout

7. Search menu
8. Report menu

9. Close application

Enter your choice ...: 9

Parking Management system made by : NAYAK & RAHUL

Roll No : 11 & 14

School Name : SPRINGDAYS SENIOR SECONDARY SCHOOL(CBSE)

Session : 2022-23

Thanks for evaluating my Project.

You might also like