0% found this document useful (0 votes)
6 views

cs-project-24-25

The document presents a report on the 'Industrial Gate Management System' project submitted by Chittilla Venkata Ravindra for the Computer Science practical examination. It outlines the project's objectives, system requirements, and the use of Python and MySQL for developing an automated gate pass management system aimed at improving efficiency and reducing paperwork. The report includes acknowledgments, an abstract, and detailed descriptions of the system's modules and coding.

Uploaded by

RAVINDRA VENKATA
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

cs-project-24-25

The document presents a report on the 'Industrial Gate Management System' project submitted by Chittilla Venkata Ravindra for the Computer Science practical examination. It outlines the project's objectives, system requirements, and the use of Python and MySQL for developing an automated gate pass management system aimed at improving efficiency and reducing paperwork. The report includes acknowledgments, an abstract, and detailed descriptions of the system's modules and coding.

Uploaded by

RAVINDRA VENKATA
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 39

Session 2024-25

KENDRIYA VIDYALAYA SANGATHAN


KENDRIYA VIDYALAYA No. 1,
KALPAKKAM, CHENNAI REGION
DEPARTMENT OF COMPUTER SCIENCE
Report on Investigatory Project:
Title: “Industrial Gate Management System”

Submitted by: Chittilla Venkata Ravindra


in partial fulfilment of the Computer Science practical
examination

Guided by: Shri Upendra Kesvani,


PGT, Computer Science
CERTIFICATE
This is to certify hereby that
the project entitled “Industrial
Gate Management System” is a
Bonafide report submitted by
Chittilla Venkata Ravindra
during the academic year 2024-
25 in partial fulfilment of the
Computer Science practical
examination conducted by CBSE,
New Delhi.

Internal External Principal


Examiner Examiner
ACKNOWLEDGEMENTS
I take this opportunity to express my deep sense of
gratitude to my Computer Science teacher, Shri
Upendra Kesvani, PGT Computer Science, for his
constant guidance and insightful comments during
the project work.

I would like to thank The Principal of our school,


Smt. Shyji K.N., for giving me all permissions and
freedom to use the resources of the school and
facilitating me in taking up this project.

I want to thank all the teachers of Kendriya


Vidyalaya No.1, Kalpakkam, for maintaining a
congenial environment.

I shall always cherish my association with them for


their constant encouragement and freedom of
thought and action that was rendered to me
throughout the project work.

I am also thankful to my parents and all my friends


for their constant help and encouragement for my
successful completion of project work.
CONTENTS

S.NO TITLE PAGE NO

1 ABSTRACT 1

2 INTRODUCTION 2

3 SYSTEM REQUIREMENTS 6

4 OBJECTIVE OF THE PROJECT 7

5 MODULES PURPOSESCODING 8

6 RESULTS 23

7 BIBLIOGRAPHY 35
1. ABSTRACT

The Project 'Industrial Gate Management System' is to record the details and various
activities of the user. It simplifies the task and reduces the paperwork. In this project, we are
reducing the paperwork which is done by giving the paper gate pass. We are providing the
electronic version of the paper gate pass. We provide appropriate training to the user which
suit their specific support has been provided at key points within the academic calendar.
Admin is monitoring all the user and system.

In this project, the only faculty is approving the user gate application if they want to
allow student then gate pass system is a pop-up on the guard system database. Training has
been provided timely basis and they got trained as the Gatepass System is new and rolled out
to their area of responsibility. At the moment we are in the very early stages, so it is dificult
to put a specific time on the training, but we will keep people informed as plans are
developed.

The system is very user-friendly and it is anticipated that functions of the system are
easily accessed by administrators, Faculties, students, and applicants.

1
2. INTRODUCTION

2.1 PYTHON:

Python is an interpreted, high-level, general-purpose programming language. Created


by Guido van Rossum and first released in 1991, Python's design philosophy emphasizes
code readability with its notable use of significant whitespace. Its language constructs and
object-oriented approach aim to help programmers write clear, logical code for small and
large-scale projects.

Python is dynamically typed and garbage-collected. It supports multiple programming


paradigms, including procedural, object-oriented, and functional programming. Python is
often described as a "batteries included" language due to its comprehensive standard library.

Python was conceived in the late 1980s as a successor to the ABC language. Python
2.0, released in 2000, introduced features like list comprehensions and a garbage collection
system capable of collecting reference cycles. Python 3.0, released in 2008, was a major
revision of the language that is not completely backward-compatible, and much Python 2
code does not run unmodified on Python 3.

Python Features:

Easy-to-learn − Python has few keywords, simple structure, and a clearly defined syntax.
This allows the student to pick up the language quickly.

Easy-to-read − Python code is more clearly defined and visible to the eyes.

Easy-to-maintain − Python's source code is fairly easy-to-maintain.

A broad standard library − Python's bulk of the library is very portable and cross- platform
compatible on UNIX, Windows, and Macintosh.

Interactive Mode − Python has support for an interactive mode which allows interactive
testing and debugging of snippets of code.

2
Portable − Python can run on a wide variety of hardware platforms and has the same
interface on all platforms.

Extendable − you can add low-level modules to the Python interpreter. These modules
enable programmers to add to or customize their tools to be more efficient.

Databases − Python provides interfaces to all major commercial databases.

GUI Programming − Python supports GUI applications that can be created and ported to
many system calls, libraries and windows systems, such as Windows MFC, Macintosh, and
the X Window system of Unix.

Scalable − Python provides a better structure and support for large programs than shell
scripting.

Python graphical user interfaces (GUIs)

Tkinter − Tkinter is the Python interface to the Tk GUI toolkit shipped with Python. We
would look this option in this chapter.

wxPython − This is an open-source Python interface for wxWindows

JPython − JPython is a Python port for Java which gives Python scripts seamless access to
Java class libraries on the local machine

3
2.2 OVERVIEW OF PYTHON MODULES:

Some Predefined Modules of Python:

Math These include trigonometric functions, representation functions,


logarithmic functions, angle conversion functions, etc. In addition, two
mathematical constants are also defined in this module.

Numpy Numpy is the core library for scientific computing in Python. It provides a
high-performance multidimensional array object, and tools for working
with these arrays.

Mysql Python needs a MySQL driver to access the MySQL database.

matplotlib Matplotlib is a visualization library in Python for 2D plots of arrays.


Matplotlib is a multi-platform data visualization library built on NumPy
arrays and designed to work with the broader SciPy stack.

csv Python provides a CSV module to handle CSV files. To read/write data,
you need to loop through rows of the CSV

datetime The datetime module supplies classes for manipulating dates and times in
both simple and complex ways.

random Functions in the random module depend on a pseudo-random number


generator function random(), which generates a random float number
between 0.0 and 1.0.

4
2.3 MYSQL:

MySQL is currently the most popular open source database software. It is a multiuser,
multithreaded database management system. MySQL is especially popular on the web. It is
one of the parts of the very popular LAMP platform. Linux, Apache, MySQL and PHP or
WIMP platform Windows, Apache, MySQL and PHP. MySQL AB was founded by Michael
Widenius (Monty), David Axmark and Allan Larsson in Sweden in year 1995.

MySQL is a relational database management system based on SQL – Structured


Query Language. The most common use for MySQL however, is for the purpose of a web
database. MYSQL has been used in this project to store the details of the vehicles in form of
a table.

Features of MySQL:

 Open Source & Free of Cost: It is Open Source and available at free of cost.

 Portability: Small enough in size to install and run it on any types of Hardware and OS like
Linux, MS Windows or Mac etc.

 Security: Its Databases are secured & protected with password.

 Connectivity: Various APIs are developed to connect it with many programming


languages.

 Query Language: It supports SQL (Structured Query Language) for handling database.

2.4 PYTHON WITH MYSQL CONNECTOR :

MySQL connector is a library that provides connectivity functionality to connect to a


database from within python. MySQL Connector/Python enables Python programs to access
MySQL databases

5
3. SYSTEM REQUIREMENTS

3.1 HARDWARE AND SOFTWARE REQUIREMENTS

I. PROCESSOR : Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz

II. RAM : 8.00 GB

III. Hard disk : 1TB

3.2 SOFTWARE REQUIREMENTS:

 Windows OS
 Python 3.11
 MY SQL 5.5

6
4. OBJECTIVES OF THE PROJECT

Objectives which will increase the effectiveness of Gate Pass Management System is as
follows:

The main objective is to implement an automated system that will be used to manage
Gate Pass for material, employees and visitors more accurately, with the aim of minimizing
human intervention by replacing the current manual process.

To improve the efficiency and accountability of security process by using an


automated system. To improve the data management by making the link with respective
departments and security desk.

To establish a system which will align with other automated systems to increase the
traceability and compliance of records, to the requirements of the organization.

7
5.MODULES PURPOSES AND CODING

5.1 MODULES USED:

 DATETIME
 MYSQL CONNECTOR

DATETIME:
In Python, date and time are not a data type of their own, but a module named
datetime can be imported to work with the date as well as time. Python Datetime module
comes built into Python, so there is no need to install it externally.
Python Datetime module supplies classes to work with date and time. These classes
provide a number of functions to deal with dates, times and time intervals. Date and datetime
are an object in Python, so when you manipulate them, you are actually manipulating objects
and not string or timestamps. Its a combination of date and time along with the attributes
year, month, day, hour, minute, second, microsecond, and tzinfo.

MYSQL CONNECTOR:

MySQL connector is a library that provides connectivity functionality to connect to a

database from within python. MySQL Connector/Python enables Python programs to

access MySQL databases

 In this article,we will be looking forward to how to connect MySQL databases


using

 MySQL Connector module of python is used to connect MySQL databases


with thePython programs,it does that using the Python Databases API
Specifiacation v2.0(PEP249).

8
5.2 SOURCE CODE :

import datetime

import mysql.connector as sq

def date_time():

return datetime.datetime.now()

def sql_emp(N,C,T,D):

data = sq.connect(host='localhost', user='MANOJ',


password='mysqlmanoj1234', database='employee')

cur = data.cursor()

#if data.is_connected():

#print('connected sucessfully')

q = "INSERT INTO employee(NAME,EMP_CODE,TIME,DEPARTMENT)


VALUES(%s,%s,%s,%s)"

val = (N,C,T,D)

cur.execute(q,val)

data.commit()

data.close()

def sql_update(Sr):

data =
sq.connect(host='localhost',user='MANOJ',password='mysqlmanoj1234',database='employee
')

9
cur = data.cursor()

print('WHAT DO YOU WANT TO CHANGE \n PRESS 1 FOR NAME \n PRESS 2


FOR CODE \n PRESS 3 FOR DEAPRTMENT \n PRESS 4 FOR LAST ENTERED DATA
TO CHANGE')

i = int(input('enter number'))

if i == 1:

n = input('ENTER NAME')

cur.execute(f"UPDATE employee SET NAME='{n}' WHERE NAME='{Sr}'")

data.commit()

elif i == 2:

n1 = int(input("enter code"))

cur.execute("UPDATE employee SET EMP_CODE={}


WHERE NAME={}".format(n1,Sr))

data.commit()

elif i == 3:

n2 = input("enter department")

cur.execute("UPDATE employee SET DEPARTMENT='{}'


WHERE NAME='{}'".format(n2,Sr))

data.commit()

elif i == 4:

n3 = input("enter name")

n4 = int(input("enter emp_code"))

10
n5 = input("enter department")

cur.execute("UPDATE employee SET


NAME={},EMP_CODE={},DEPARTMENT={} WHERE
NAME={}".format(n3,n4,n5,Sr))

data.commit()

data.close()

def sql_vehicle(VN,DN,T,M):

data = sq.connect(host='localhost', user='MANOJ',


password='mysqlmanoj1234', database='vehicle_entry')

cur = data.cursor()

q = "INSERT INTO
vehicle_entry(VEHICLE_NUMBER,DRIVER_NAME,TIME,MATERIAL)
VALUES(%s,%s,%s,%s)"

val = (VN,DN,T,M)

cur.execute(q,val)

data.commit()

data.close()

def sql_vehupdate(veh_Sr):

data = sq.connect(host='localhost', user='MANOJ',


password='mysqlmanoj1234', database='vehicle_entry')

cur = data.cursor()

print(

11
'WHAT DO YOU WANT TO CHANGE \n PRESS 1 FOR VEHICLE NUMBER'

' \n PRESS 2 FOR DRIVER NAME \n PRESS 3 FOR MATERIAL \n PRESS 4


FOR LAST ENTERED DATA TO CHANGE')

i = int(input('enter number'))

if i == 1:

n = input('ENTER VEHICLE NUMBER')

cur.execute("UPDATE vehicle_entry SET VEHICLE_NUMBER={}


WHERE VECHICLE_NUMBER={}".format(n,veh_Sr))

data.commit()

elif i == 2:

n1 = int(input("ENTER DRIVER NAME"))

cur.execute("UPDATE vehicle_entry SET DRIVER_NAME='{}'


WHERE VEHICLE_NUMBER={}".format(n1,veh_Sr))

data.commit()

elif i == 3:

n2 = input("enter material")

cur.execute("UPDATE vehicle_entry SET MATERIAL='{}'


WHERE VEHICLE_NUMBER={}".format(n2,veh_Sr))

data.commit()

elif i == 4:

n3 = input("enter vehicle number")

n4 = int(input("enter driver name"))

12
n5 = input("enter material")

cur.execute("UPDATE vehicle_entry SET


VEHICLE_NUMBER={},DRIVER_NAME='{}',MATERIAL='{}' WHERE
VEHICLE_NUMBER={}".format(n3, n4, n5,veh_Sr))

data.commit()

data.close()

def sql_visitor(N,T,MN,R):

data = sq.connect(host='localhost', user='MANOJ',


password='mysqlmanoj1234', database='visitor_entry')

cur = data.cursor()

q = "INSERT INTO visitor_entry(NAME,TIME,MOBILE_NUMBER,REASON)


VALUES(%s,%s,%s,%s)"

val = (N,T,MN,R)

cur.execute(q,val)

data.commit()

data.close()

def sql_residental(N,T,H):

data = sq.connect(host='localhost', user='MANOJ',


password='mysqlmanoj1234', database='residental_entry')

cur = data.cursor()

q = "INSERT INTO residental_entry(NAME,TIME,HOUSE_NUMBER)


VALUES(%s,%s,%s)"

13
val = (N,T,H)

cur.execute(q,val)

data.commit()

data.close()

def sql_residentalupdate(res_Sr):

data = sq.connect(host='localhost', user='MANOJ',


password='mysqlmanoj1234', database='residental_entry')

cur = data.cursor()

print(

'WHAT DO YOU WANT TO CHANGE \n PRESS 1 FOR NAME'

' \n PRESS 2 FOR HOUSE NUMBER \n PRESS 3 FOR LAST ENTERED DATA TO
CHANGE')

i = int(input("enter number"))

if i == 1:

n = input('ENTER NAME')

cur.execute("UPDATE residental_entry SET NAME='{}' WHERE


NAME='{}'".format(n,res_Sr))

data.commit()

elif i == 2:

n1 = eval(input("ENTER HOUSE NUMBER"))

cur.execute("UPDATE residental_entry SET HOUSE_NUMBER={} WHERE


NAME='{}'".format(n1, res_Sr))

14
data.commit()

elif i == 3:

n3 = input("enter NAME")

n4 = eval(input("enter HOUSE NUMBER"))

cur.execute(

"UPDATE residental_entry SET NAME={},HOUSE_NUMBER={} WHERE


RESIDENTAL_SERIAL_no={}".format(

n3,n4,res_Sr))

data.commit()

data.close()

def employee():

data =
sq.connect(host='localhost',user='MANOJ',password='mysqlmanoj1234',database='employee
')

cur = data.cursor()

cur.execute('select * from employee_entry')

dat = cur.fetchall()

for i in dat:

print(i)

print(" IF YOU WANT TO CHANGE ANY DATA ENTER Y/y")

rr = input('enter to change any

data') if rr == 'Y' or rr == 'y':

15
print('which employee data you want to change')

rr = int(input('enter employee code of the employee'))

change_emp(rr)

def change_emp(rr):

data = sq.connect(host='localhost', user='MANOJ',


password='mysqlmanoj1234', database='employee')

cur = data.cursor()

n1 = input('enter name of employee::')

n3 = input('enter department::')

n4 = int(input('enter employee code'))

cur.execute(f'UPDATE employee_entry set NAME = "{n1}",EMP_CODE


= {n4},DEPARTMENT = "{n3}" WHERE EMP_CODE = {rr}')

data.commit()

i = True

while i:

print('want to change more data entry')

print('or want to delete the data')

print('press Y/y to change or D/d to delete the data')

t = input('enter::')

if t == 'Y' or t == 'y':

na = input('enter name::')

16
change_emp(na)

elif t == 'D' or t == 'd':

n4 = int(input('enter emp code whose data you want to delete'))

cur.execute(f"delete from employee_entry where EMP_CODE = {n4}")

else:

i = False

def vechicle():

data =
sq.connect(host='localhost',user='MANOJ',password='mysqlmanoj1234',database='vehicle_e
ntry')

cur = data.cursor()

cur.execute('select * from vehicle_entry')

dat = cur.fetchall()

print('\n')

for i in dat:

print(i)

def residental():

data =
sq.connect(host='localhost',user='MANOJ',password='mysqlmanoj1234',database='residental
_entry')

cur = data.cursor()

cur.execute('select * from residental_entry')

17
dat = cur.fetchall()

for i in dat:

print(i)

def visitor():

data =
sq.connect(host='localhost',user='MANOJ',password='mysqlmanoj1234',database='visitor_en
try')

cur = data.cursor()

cur.execute('select * from visitor_entry')

dat = cur.fetchall()

for i in dat:

print(i)

print("|===========================INDUSTRIAL GATE
MANGEMENT SYSTEM============================|")

print('press one "1" or enter Y to enter data in the system::')

print('press one "2" or enter R to retrieve data from the system::')

i = input('enter 1/2 or Y/R::')

# CODE TO ENTER THE DATA INTO THE DATABASE

if (i == '1' or i == 'Y' or i=='y'):

print("ENTER [EMP] OR 1 FOR EMPLOYEE ENTRY")

print("ENTER [VEC] OR 2 FOR VEHICLE ENTRY")

print("ENTER [RES] OR 3 FOR RESIDENTAL ENTRY")


18
print("ENTER [VIS] OR 4 FOR VISITOR ENTRY")

i1 = input('enter your choice press 1,2,3,4=')

if (i1 == '1' or i1 == 'EMP'):

k = True

while k:

n = input('enter name of employee')

c = int(input('enter employee code of the employee'))

t = date_time()

d = input('enter department of the emplyee')

sql_emp(n,c,t,d)

print(f"DATA SUCCESSFULLY ENTERED OF EMPLOYEE NUMBER:\n


EMPLOYEE NAME{n}")

print("IF YOU WANT TO CHANGE LAST ENTERED DATA PRESS Y/y else
N/n=")

i2 = input('enter Y/y')

if i2 == 'y' or i2 == 'Y':

sql_update(n)

print('WANT TO ENTER EMPLOYEE DATA AGAIN PRESS Y/y')

K1 = input('enter y/Y else press any key')

if K1 == 'Y' or K1 == 'y':

k = True

19
else:

k = False

else:

pass

elif (i1 == '2' or i1 == 'VEH'):

vn = int(input('enter VEHICLE number'))

dn = input("enter driver name")

vt = date_time()

ma = input("enter material name")

sql_vechicle(vn,dn,vt,ma)

print(f"DATA SICCESSFULLY ENTERED OF VECHICLE SERIAL NUMBER:\


n vechicle number {vn}")

print("IF YOU WANT TO CHANGE LAST ENTERED DATA PRESS Y/y")

i3 = input('enter Y/y')

if i3 == 'Y' or i3 == 'y':

sql_vehupdate(vn)

elif (i1 == '3' or i1 == 'RES'):

rn = input("enter name of the person::")

rt = date_time()

hn = input("enter house number::")

sql_residental(rn,rt,hn)

20
print(f"DATA SUCCESSFULLY ENTERED OF REDANTIAL SERIAL NUMBER:\n
NAME: {rn}")

print("IF YOU WANT TO CHANGE LAST ENTERED DATA PRESS Y/y")

i4 = input('enter Y/y')

if (i4 == 'Y' or i4 == 'y'):

sql_residentalupdate(rn)

elif (i1 == '4' or i1 == 'VIS'):

vn = input('enter name of visitor::')

vt = date_time()

vm = int(input('enter mobile number of the visitor::'))

vr = input('enter reason to visit the area::')

sql_visitor(vn,vt,vm,vr)

print(f"DATA SUCCESSFULLY ENTERED OF VISITOR SERIAL NUMBER:\n


NAME:{vn}")

# CODE TO READ THE ENTERED DATA

elif (i == '2' or i == 'R' or i == 'r'):

print('SPECIFY WHICH DATABSE YOU WNAT TO

ACCESS') print(' ')

print("ENTER 1 TO RETRIEVE EMPLOYEE DATA")

print("ENTER 2 TO RETRIEVE VEHICLE DATA")

print("ENTER 3 TO RETRIEVE VISITOR DATA")

21
print("ENTER 4 TO RETRIEVE RESIDENTAL DATA")

r1 = input('enter number')

if r1 == '1':

employee()

elif r1 == '2':

vehicle()

elif r1 == '3':

visitor()

elif r1 == '4':

residental()

22
6.RESULTS

EMPLOYEE_ENTRY:

EMPLOYEE_ENTRY :

23
EMPLOYEE_ENTRY :

EMPLOYEE_ENTRY :

24
RETRIVING DATA FROM EMPLOYEE_ENTRY :

TABLE :

25
VEHICLE_ENTRY :

VEHICLE_ENTRY :

26
VEHICLE_ENTRY :

VEHICLE_ENTRY :

27
RETRIVING DATA FROM VEHICLE_ENTRY :

TABLE :

28
VISITOR_ENTRY :

VISITOR_ENTRY :

29
VISITOR_ENTRY :

VISIITOR_ENTRY :

30
RETRIVING DATA FROM VISITOR_ENTRY :

TABLE :

31
RESIDENTAL_ENTRY :

RESIDENTAL_ENTRY :

32
RESIDENTAL_ENTRY :

RESIDENTAL_ENTRY :

33
RETRIVING DATA FROM RESIDENTAL_ENTRY :

TABLE :

34
7.BIBILIOGRAPHY

 https://www.ssgopalganj.in

 https://www.w3schools.com/python

 https://www.wikipedia.org

 https://github.com

 https://www.tutorialspoint.com
 https://www.w3resource.com

 Computer science With Python - Class XI, XII By : Sumita Arora

35

You might also like