0% found this document useful (0 votes)
181 views52 pages

Bhargav Palav Project

This document is a project report for a Crime Management System. It includes an introduction describing the background and objectives of the system, which is to help police manage crime records and complaints online. It then covers sections on system analysis, design, existing systems, and methodology. The system will allow users to file complaints, and police can access criminal records and manage cases through the software. The goal is to make the complaint process easier and help police work more efficiently.

Uploaded by

Bhargav Palav
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)
181 views52 pages

Bhargav Palav Project

This document is a project report for a Crime Management System. It includes an introduction describing the background and objectives of the system, which is to help police manage crime records and complaints online. It then covers sections on system analysis, design, existing systems, and methodology. The system will allow users to file complaints, and police can access criminal records and manage cases through the software. The goal is to make the complaint process easier and help police work more efficiently.

Uploaded by

Bhargav Palav
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/ 52

UNIVERSITY OF MUMBAI

MAHARSHI DAYANAND COLLEGE OF ARTS, SCIENCE &


COMMERCE, PAREL, MUMBAI-12.

DEPARTMENT OF COMPUTER SCIENCE

PROJECT REPORT
ON

Crime Management System

SUBMITTED BY

Bhargav Hemant Palav

Year: 2022-23

DEPARTMENT OF COMPUTER SCIENCE

GUIDED BY

DR. MRS.PALLAVI MIRAJKAR


1
Acknowledgement

I would like to express my profound gratitude to


Mrs.Pallavi Mirajkar Head of the department of
computer sciencefor their contributions to the
completion of my project titled “Crime Management
System”. I would like to express my special thanks to
our mentor Ms. Nivedita tiwari for the time and efforts
she provided throughout the year. Your useful advice
and suggestions were really helpful to me during the
project’s completion. In this aspect, I am eternally
grateful to you. I would like to acknowledge that this
project was completed.

2
Table Of Contents

Chapter No – 1 Introduction

• Background
• Objective
• Purpose And Scope
• Organization And Report

Chapter No – 2 System Analysis

• Existing System
• Proposed System
• Requirement Analysis
• Hardware Analysis
• Justification Of Selection Of Technology

Chapter No – 3 System Design

• Requirments Specification
• Software And Hardware Requirments
• Conceptual Models
• Data Flow Diagrams
• ER Diagram
• Object Oriented Diagram

Chapter No – 4 Analysis

3
• Study Of Current System
• Advantage & Drawbacks Of Hotel Management System

Chapter No -5
• Conclusion
• Reference

ABSTRACT

4
The “Criminal Management System” is a software for online complaint and
computerized management of crime records.Here in this software a person who
wishes to file a complaint or report an incident must start the software and
report whatever he as seen on the crime site.This complaint will be received by
Police Cyber Employees and they can send a message regarding status of the
complaint to the user who files the complaint and Police will reach at the crime
scene to investigate it. Police can use this software to manage different crimes
and some of the works which is done in police station manually. Police gets their
login password from admin directly. Some of the modules like news, safety tips,
missing persons and most wanted criminals can be viewed through the website
with logging in. So this website helps police to find out the problems in the society
without them actually coming to the police station.

Introduction

The project has been developed keeping in view of the computing


technology in mind.The specification have been normalized to eliminate all
the anomalies that may arise due to the database transactions that are
executed by the actual administration and users.The user interfaces are
browser specific to give distributed accessibility for the overall system..The
basic constructs of the tablespaces,clusters and ridexes have been exploited
to provide higher consistency and reliability for the data storage.

Background
The crime management system can help in storing the records related to the
criminals, cases, complaint record, case history and so on. This can allow a person
to enter or delete the records if necessary. All these records can be maintained in
a single database. Security is maintained so as to ensure that only the authorized
users will have access to the system. This application will be one of the useful
projects that the police can rely on. This website can help in getting the
information of the criminals of many years back. It can also help in minimizing
most of the work of the police. The features that can be included in this software
are as follows:

5
➢ Criminal record: This website can contain the details related to the
criminals in the particular case.
➢ Complaint registration: The details of the complaints that are registered
can also be stored through this website.
➢ Police database management: The details of the police in the particular
police station can be maintained through this software.

To run Criminal Management System in the background, I will show you the
easiest and the only way to run the software.First we have to setup Python on
“Microsoft Visual Code”.After doing the setup and setting admin username and
password , we have to install “My SQL” and “Workbench”. After that importing
the files in My SQL and Workbench the setup is finally completed.Now import the
files in database and the software will start after that without any flaws.

Objective
The main objective of the Criminal Management System is to manage the details
of criminal, crimes , the most wanted in police departments . It manages all the
information about criminals, what they have done , the crimes their whole
information.The project is totally built at administrative level so it is very
secure.The main objective of the project is to make an software to reduce the
works of physical data and the loads of file in the police department and it will be
easy to manage the crimes , criminals and information of the people and what
crimes they have done and search the records rather the searching the files by
using this software.
Purpose and Scope
The main purpose of the project is to file complaint of the crime happening in our
vision in day to day life as it will be easier to manage crime directly through the
software rather than visiting the police station. Our old belief that visiting police
station is very bad in the society will come to an end by this project and it will
become scope for more women’s to file the crime without any hesitation and the
police will directly reach the crime scene.The main Purpose of this project is to

6
report more number of crimes to the police so that they will work on it to make
the society crime free from the people who are making it dangerous to live.

Advantages of Purposed System


➢ Fast reporting of crimes.
➢ Online complaint portal for citizens.
➢ Prompt actions against criminals.
➢ Helps in law and order.
➢ No data redundancy.
➢ Quick data and information processing.
➢ Marinating criminal records.

Applicability

Crime Management System Software

In many cases, the Crime Management System will have exposure for the
people who want to register or file FIR or case. It functions as a welcome sign
for the person using the app . A fully featured Crime Management System will
give them the power to file a case against the criminals in an easy to use and
intuitive format. Providing these gives you a great opportunity to the victims..
This is where having a complete Crime Management System comes in handy.
By leveraging all of the data across your entire system, you’ll be able to victims
to use the software with a more complete picture of the police Case filing.

Police Station Crime Report Writing Solution

From a victim perspective, your Crime Report Writing Solution is the brains
of the operation. Any question a victim has about any aspect of your
software, they are going to come to the Police station to get answered. It’s
immediately obvious how having a Crime Management system that ties in
with all of your other systems is crucial to an efficient workflow.

7
Rather than having to call different departments or switch between different
software programs to get answers for victims and help them achieve their
goals, your staff will be able to quickly access everything from one location.
Whether your victim wants to file a complaint of crime or any other problems
it can all be handled from one software package.

Crime Reporting and Analytics Solutions


Here is where ending the data silos really shines and unlocks huge
potential for growth. In the age of big data, analytics can provide
actionable insights into your day to day operation that no human would
have ever picked up on. They cannot do any of this, however, without
access.When your systems are spread out over several software platforms
– and from multiple vendors, our crime Management system package
doesn’t have a complete picture of software. Worse, you could have
multiple applications with duplicate data that is not in sync. CRIME
management software eliminates these data silos that result in an
incomplete picture of your business and removes the potential to miss key
patterns due to a lack of robust data.

Methodology
The Project Criminal Management is excuted in the following way-

• Data Gathering
• Entering the details and reporting it in the. software.
• The admin receiving all the details reported crime.
• The Police Force working to solve the crime.

The working of the software shown as below:

8
• Data Gathering

The victim coming to the police station or by other means to register or file
the complaint against the criminal ,what he has done and other
information.

• Entering the details and reporting it to the software

The details are now entered in the software all the information of criminal,
the case id ,the officer in charge ,and other details of the criminal ,the
record is saved in the database.

• The Admin receiving all the details of the reported crime

The admin will now receive all the details of the reported crime and it will
be saved in the database till the crime is solved or the case will be closed
the members in the crime acts will come forward or the police will find
more criminals of the crime the database gets updated or added more.

• The police force working on to solve the case

The police department now will work to solve the case my getting clues of
the crime.

Organization Of Reports
• Admin panel
It is used for admins only
➢ Admin Login
Admin can login in login panel using username and password

9
• Add Police Officer
Admin can add or hire officers according to Case need
• Add Cases
Admin can add Cases.

Crime management panel :-

New Criminal form

Admin add the details of the Criminal

Crime
Admin can view what crime the Criminal has done

All Criminals

Admin can see the details of the criminals

Details of crime

Admin can view the details of Crime

Arrest Date

Admin can see the Arrest Date of criminals

Update status

Admin can update the status of the Criminals

Address and Occupation Details

Admin can see the address and Occupation Details of criminal

Most wanted

Admin can see the whether the Criminal is most wanted or not

10
Search

Admin can search the Criminal records according to the needs

Logout

Admin can logout

System Analysis:-

Requirment Analysis:-

Hardware Requirments:-
• Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz 3.20 GHz
• 2.00 GB RAM

System Requirments:-

▪ Python (Microsoft Visual Studio)


▪ Mysql B
▪ Windows 10

Justification and selection of technology :-


Python :-
It is used for:
• Python Applications
• Web Development
• Game Development
• Machine Learning and Artificial
Intelligence

11
• Data Science and Data
Visualization
• Desktop GUI
• Web Scraping Applications
• Business Applications
• Audio and Video Applications
• CAD Applications
• Embedded Applications
Introduction to Python

Python is free and simple to learn. Its primary features are that it is high-
level, dynamically typed and interpreted. This makes debugging of errors easy
and encourages the rapid development of application prototypes, marking itself
as the language to code with. Python was developed in 1989 by Guido Van
Rossum and emphasizes on the DRY (Don’t Repeat Yourself) principle
and readability.

With that out of the way, let’s jump straight into the Python Applications. :)

Python Applications
Python supports cross-platform operating systems which makes building
applications with it all the more convenient. Some of the globally known

12
applications such as YouTube, BitTorrent, DropBox, etc. use Python to achieve
their functionality.

1. Web Development
Python can be used to make web-applications at a rapid rate. Why is that? It is
because of the frameworks Python uses to create these applications. There
is common-backend logic that goes into making these frameworks and a number
of libraries that can help integrate protocols such as HTTPS, FTP, SSL etc. and even
help in the processing of JSON, XML, E-Mail and so much more.

Some of the most well-known frameworks are Django, Flask, Pyramid. Why use
a framework? The security, scalability, convenience that they provide is
commendable if we compare it to starting the development of a website from
scratch.

2. Game Development
Python is also used in the development of interactive games. There are libraries
such as PySoy which is a 3D game engine supporting Python 3, PyGame which
provides functionality and a library for game development. Games such as
Civilization-IV, Disney’s Toontown Online, Vega Strike etc. have been built using
Python.

13
3. Machine Learning and Artificial Intelligence
Machine Learning and Artificial Intelligence are the talks of the town as they yield
the most promising careers for the future. We make the computer learn based on
past experiences through the data stored or better yet, create algorithms which
makes the computer learn by itself. The programming language that mostly
everyone chooses? It’s Python. Why? Support for these domains with
the libraries that exist already such as Pandas, Scikit-Learn, NumPy and so many
more.

Learn the algorithm, use the library and you have your solution to the problem.
It is that simple. But if you want to go the hardcore way, you can design your own
code which yields a better solution, which still is much easier when we compare
it to other languages.

4. Data Science and Data Visualization


Data is money if you know how to extract relevant information which can help
you take calculated risks and increase profits. You study the data you have,
perform operations and extract the information required. Libraries such as
Pandas, NumPy help you in extracting information.

14
You can even visualize the data libraries such as Matplotlib, Seaborn, which are
helpful in plotting graphs and much more. This is what Python offers you to
become a Data Scientist.

5. Desktop GUI
We use Python to program desktop applications. It provides the Tkinter library
that can be used to develop user interfaces. There are some other useful toolkits
such as the wxWidgets, Kivy, PYQT that can be used to create applications on
several platforms.

You can start out with creating simple applications such as Calculators, To-Do
apps and go ahead and create much more complicated applications.

15
6. Web Scraping Applications
Python is a savior when it comes to pull a large amount of data from websites
which can then be helpful in various real-world processes such as price
comparison, job listings, research and development and much more Python
has BeautifulSoup which we use to pull such data. Here’s a full-fledged guide to
learn Web scraping with Python.

7. Business Applications
Business Applications are different than our normal applications covering
domains such as e-commerce, ERP and many more. They require applications
which are scalable, extensible and easily readable and Python provides us with
all these features. Platforms such as Tryton is available to develop such business
applications.

8. Audio and Video Applications


We use Python to develop applications that can multi-task and also output
media. Video and audio applications such as TimPlayer, Cplay have been
developed using Python libraries. They provide better stability and
performance in comparison to other media players.

16
9. CAD Applications
Computer-Aided Designing is quite challenging to make as many things have to
be taken care of. Objects and their representation, functions are just the tip of
the iceberg when it comes to something like this. Python makes this simple too
and the most well-known application for CAD is Fandango.

10. Embedded Applications


Python is based on C which means that it can be used to create Embedded
C software for embedded applications. This helps us to perform higher-level
applications on smaller devices which can compute Python.

The most well-known embedded application could be the Raspberry Pi which


uses Python for its computing. We can also use it as a computer or like a simple
embedded board to perform high-level computations.

17
• Python : The Crime Management System Project is developed in python
with some or more basic to advanced python extension. As Python is
widely used and easy to learn langauge with not some complex code it’s
easier to update the software or fix the bugs occuring in the software.

Justification of technology – My SQL

• MySQL is a relational database management system


• MySQL is open-source
• MySQL is free
• MySQL is ideal for both small and large applications
• MySQL is very fast, reliable, scalable, and easy to use
• MySQL is cross-platform
• MySQL is compliant with the ANSI SQL standard
• MySQL was first released in 1995
• MySQL is developed, distributed, and supported by Oracle Corporation
• MySQL is named after co-founder Monty Widenius's
daughter: My

Uses of Mysql:-

• Huge websites like Facebook, Twitter, Airbnb, Booking.com, Uber,


GitHub, YouTube, etc.
• Content Management Systems like WordPress, Drupal, Joomla!, Contao,
etc.
• A very large number of web developers around the world

• My SQL : The data in My DataSQL are stored in tables.A table is collection


of related data and it consists of columns and rows.Databases are useful
for sorting information categorily.Hence the files are imported and the
data is categorily stored in related data fields

System Design
18
Requriment Specification:

Python
Python is a high-level, general-purpose programming language. Its design
philosophy emphasizes code readability with the use of significant indentation.
Python is dynamically-typed and garbage-collected. It supports multiple ,
including structured (particularly procedural), objectoriented and functional
programming. It is often described as a "batteries included" language due to its
comprehensive standard library. Guido van Rossum began working on Python in
the late 1980s as a successor to the ABC programming language and first released
it in 1991 as Python 0.9.0. Python 2.0 was released in 2000 and introduced new
features such as list comprehensions, cycle-detecting garbage
collection, reference counting, and Unicode support. Python 3.0, released in
2008, was a major revision that is not completely backward-compatible with
earlier versions. Python 2 was discontinued with version 2.7.18 in 2020. Python
consistently ranks as one of the most popular programming languages.

Microsoft Visual Studio


Visual Studio is an integrated development environment (IDE) from Microsoft. It
is used to develop computer programs, as well as websites, web apps, web
services and mobile apps. Visual Studio uses Microsoft software development
platforms such as Windows API, Windows Forms, Windows Presentation
Foundation, Windows Store and Microsoft Silverlight. It can produce both native
code and managedcode.VisualStudioincludesa supporting IntelliSense (the code
completion component) as well as code refactoring. The integrated debugger
works both as a source-level debugger and a machine-level debugger. Other built-
in tools include a code profiler, designer for building GUI applications, web
designer, class designer, and database schema designer. It accepts plug-ins that
expand the functionality at almost every level—including adding support
for source control systems (like Subversion and Git) and adding new toolsets like
editors and visual designers for domain-specific languages or toolsets for other
aspects of the software development lifecycle (like the Azure DevOps client:
Team Explorer).Visual Studio supports 36 different programming languages and
19
allows the code editor and debugger to support (to varying degrees) nearly any
programming language, provided a language-specific service exists. Built-in
languagesinclude C,[5] C++, C++/CLI, , C#, F#,[6] JavaScript, TypeScript, XML, XSL
T, HTML, and CSS. Support for other languages such as Python Ruby, Node.js,
and M among others is available via plug-ins. Java (and J#) were supported in the
past.The most basic edition of Visual Studio, the Community edition, is available
free of charge. The slogan for Visual Studio Community edition is "Free, fully-
featured IDE for students, open-source and individual developers".As of
November 8, 2021, Visual Studio 2022 is a current production-ready version, and
older versions such as 2013 and 2015 are on Extended Support, and 2017 and
2019 on Mainstream Support.

MySQL

MySQL is an open-source relational database management


system (RDBMS).[5][6] Its name is a combination of "My", the name of co-
founder Michael Widenius's daughter My,[7] and "SQL", the abbreviation for
Structured Query Language. A relational database organizes data into one or
more data tables in which data may be related to each other; these relations
help structure the data. SQL is a language programmers use to create, modify
and extract data from the relational database, as well as control user access
to the database. In addition to relational databases and SQL, an RDBMS like
MySQL works with an operating system to implement a relational database
in a computer's storage system, manages users, allows for network access
and facilitates testing database integrity and creation of backups.MySQL is
free and open-source software under the terms of the GNU General Public
License,andisalsoavailableunderavarietyof proprietary licenses. MySQL was
owned and sponsored by the Swedish company MySQL AB, which was bought
by Sun Microsystems (now Oracle Corporation).[8] In 2010, when Oracle
acquired Sun, Widenius forked the open-source MySQL project to create
MariaDB

20
Conceptual Models:-

• Data flow Diagram


• ER Diagram
• Flow Chart

Data Flow Diagram For Crime Management System

What is a data flow diagram?


A data flow diagram shows the way information flows through a process
or system. It includes data inputs and outputs, data stores, and the
various subprocesses the data moves through. DFDs are built using
standardized symbols and notation to describe various entities and their
relationships.
Data flow diagrams visually represent systems and processes that would
be hard to describe in just words. You can use these diagrams to map
out an existing system and make it better or to plan out a new system
for implementation. Visualizing each element makes it easy to identify
inefficiencies and produce the best possible system.

21
Data Flow Diagram For Admin.

Data Flow Diagram For User

22
ER Diagram For Crime Management System
What is a ER Diagram
An entity relationship diagram (ERD), also known as an entity relationship model,
is a graphical representation that depicts relationships among people, objects,
places, concepts or events within an information technology (IT) system. An ERD
uses data modeling techniques that can help define business processes and serve
as the foundation for a relational database.
ER Diagram for Crime Management System

23
ER Diagram For Admin Login

24
Flow Chart for Crime Management System

What is a flow Chart?

A flowchart is a diagram that depicts a process, system or computer


algorithm. They are widely used in multiple fields to document, study,
plan, improve and communicate often complex processes in clear, easy-
25
to-understand diagrams. Flowcharts, sometimes spelled as flow charts,
use rectangles, ovals, diamonds and potentially numerous other shapes
to define the type of step, along with connecting arrows to define flow
and sequence. They can range from simple, hand-drawn charts to
comprehensive computer-drawn diagrams depicting multiple steps and
routes. If we consider all the various forms of flowcharts, they are one
of the most common diagrams on the planet, used by both technical
and non-technical people in numerous fields. Flowcharts are sometimes
called by more specialized names such as Process Flowchart, Process
Map, Functional Flowchart, Business Process Mapping, Business Process
Modeling and Notation (BPMN), or Process Flow Diagram (PFD). They
are related to other popular diagrams, such as Data Flow Diagrams
(DFDs) and Unified Modeling Language (UML) Activity Diagrams.

Flow Chart For Crime Management System

26
Analysis
Study Of Current System
Current System of Crime Management is fully based on paperwork.
Police Officers has to manage all records of criminals and on paper.
Problem and Weakness Of Current System-Paperwork is a tedious job.
There can be delay and the problem of human error in writing and
providing resources.

HISTORY

Criminal Management Systems are able to automate the process of Crime. It


is useful for authorities which keep track of all the crimes and criminals
registered. The authority can file a complaint without writing it physically on
papers or registers The following steps that give detailed information of the
need for electronic managements are:
Performance

27
During the past several decades, the records are supposed to be manually
handled for all activities. Themanual handling of records is time consuming
andhighly prone to error. To improve the performance of
the Crime Management Software, the computerized system had to be
undertaken.

Efficiency

The basic need of this software is efficiency. The software should be efficient so
that whatever the usersubmits any detail the application is updated
immediately and automatically. These records will be usefulfor others instantly.

Control

The complete control of the electronic system is under the hands of authorized
persons who have thepassword to access the system and illegal access is not
permitted. Control is entirely in the hands of theadministrator and the other
members have the right to see the records not to change any transaction entry.
Security

Security is the main criteria for electronic hotel management systems. Since
illegal access may corrupt thedatabase and ensure protection of the stored data.

ADVANTAGE OF CRIME MANAGEMENT SYSTEM

• User can keep the records of all things of the criminal his entire
biodata , kind of crime committed.
• It saves users time in searching the records of the criminal
• The system is useful as we can delete ,update or search records
with ease rather than searching it physically which takes time .
• It saves organization resources and expenses.
• This system is effective and saves time and of users.
• It is less time consuming and provides maximum accuracy.

28
• DRAWBACKS OF Crime MANAGEMENT SYSTEM

• The software process usually requires a admin identity.

• It requires a reliable internet connection

29
Display page of the software

Some Pictures of the software while development

30
Code for The project

from tkinter import*

from tkinter import ttk

from PIL import Image,ImageTk

import mysql.connector

from tkinter import messagebox

class Criminal:

def __init__(self,root):

self.root=root

self.root.geometry("1530x790폭")

self.root.title('CRIMINAL MANAGENET SYSTEM SOFTWARE')

# Variables

31
self.var_case_id=StringVar()

self.var_criminal_no=StringVar()

self.var_name=StringVar()

self.var_nickname=StringVar()

self.var_arrest_date=StringVar()

self.var_date_of_crime=StringVar()

self.var_address=StringVar()

self.var_age=StringVar()

self.var_occupation=StringVar()

self.var_birthMark=StringVar()

self.var_crime_type=StringVar()

self.var_father_name=StringVar()

self.var_gender=StringVar()

self.var_wanted=StringVar()

lbl_title=Label(self.root,text="CRIMINAL MANAGENET SYSTEM SOFTWARE",font=("times new roman",40,"bold"),bg="black",fg="gold")

lbl_title.place(x=0,y=0,width=1530,height=70)

# logo

img_logo=Image.open('images/ncrlogo.png')

img_logo=img_logo.resize((60,60),Image.ANTIALIAS)

self.photo_logo=ImageTk.PhotoImage(img_logo)

self.logo=Label(self.root,image=self.photo_logo)

self.logo.place(x=100,y=5,width=60,height=60)

# Image Frame

32
img_frame=Frame(self.root,bd=2,relief=RIDGE,bg='white')

img_frame.place(x=0,y=65,width=1530,height=130)

# 1st

img1=Image.open('images/police3.jpg')

img1=img1.resize((540,160),Image.ANTIALIAS)

self.photo1=ImageTk.PhotoImage(img1)

self.img_1=Label(img_frame,image=self.photo1)

self.img_1.place(x=0,y=0,width=540,height=160)

# # 2st

img_2=Image.open('images/police2.jpg')

img_2=img_2.resize((540,160),Image.ANTIALIAS)

self.photo2=ImageTk.PhotoImage(img_2)

self.img_2=Label(img_frame,image=self.photo2)

self.img_2.place(x=540,y=0,width=540,height=160)

# # 3st

img_3=Image.open('images/police3.jpg')

img_3=img_3.resize((540,160),Image.ANTIALIAS)

self.photo3=ImageTk.PhotoImage(img_3)

self.img_3=Label(img_frame,image=self.photo3)

self.img_3.place(x=1000,y=0,width=540,height=160)

33
# Main Frame

Main_frame=Frame(self.root,bd=2,relief=RIDGE,bg='white')

Main_frame.place(x=10,y=200,width=1500,height=560)

# upper Frame

upper_frame=LabelFrame(Main_frame,bd=2,relief=RIDGE,bg='white',text='Criminal Information',font=('times new


roman',11,'bold'),fg='red')

upper_frame.place(x=10,y=10,width=1480,height=270)

# Labels and Entry fields

caseid=Label(upper_frame,text='Case ID:',font=('arial',11,'bold'),bg='white')

caseid.grid(row=0,column=0,padx=2,sticky=W)

caseentry=ttk.Entry(upper_frame,textvariable=self.var_case_id,width=22,font=("arial",11,"bold"))

caseentry.grid(row=0,column=1,padx=2,pady=10, sticky=W)

# Criminal NO

lbl_criminal_no=Label(upper_frame,font=("arial",12,"bold"),text="Criminal NO:",bg="white")

lbl_criminal_no.grid(row=0,column=2,sticky=W,padx=2,pady=7)

txt_criminal_no=ttk.Entry(upper_frame,textvariable=self.var_criminal_no,width=22,font=("arial",11,"bold"))

txt_criminal_no.grid(row=0,column=3,padx=2,pady=7)

# Criminal Name

lbl_Name=Label(upper_frame,font=("arial",12,"bold"),text="Criminal Name:",bg="white")

lbl_Name.grid(row=1,column=0,sticky=W,padx=2,pady=7)

txt_Name=ttk.Entry(upper_frame,textvariable=self.var_name,width=22,font=("arial",11,"bold"))

txt_Name.grid(row=1,column=1,sticky=W,padx=2,pady=7)

34
# NickName

lbl_nickname=Label(upper_frame,font=("arial",12,"bold"),text="NickName:",bg="white")

lbl_nickname.grid(row=1,column=2,sticky=W,padx=2,pady=7)

txt_nickname=ttk.Entry(upper_frame,textvariable=self.var_nickname,width=22,font=("arial",11,"bold"))

txt_nickname.grid(row=1,column=3,padx=2,pady=7)

# Arrest Date

lbl_arrestDate=Label(upper_frame,font=("arial",12,"bold"),text="Arrest Date:",bg="white")

lbl_arrestDate.grid(row=2,column=0,sticky=W,padx=2,pady=7)

txt_arrestDate=ttk.Entry(upper_frame,textvariable=self.var_arrest_date,width=22,font=("arial",11,"bold"))

txt_arrestDate.grid(row=2,column=1,padx=2,pady=7)

# Date of Crime

lbl_dateOfCrime=Label(upper_frame,font=("arial",12,"bold"),text="Date of Crime:",bg="white")

lbl_dateOfCrime.grid(row=2,column=2,sticky=W,padx=2,pady=7)

txt_dateOfCrime=ttk.Entry(upper_frame,textvariable=self.var_date_of_crime,width=22,font=("arial",11,"bold"))

txt_dateOfCrime.grid(row=2,column=3,sticky=W,padx=2,pady=7)

# Address

lbl_address=Label(upper_frame,font=("arial",12,"bold"),text="Address:",bg="white")

lbl_address.grid(row=3,column=0,sticky=W,padx=2,pady=7)

txt_address=ttk.Entry(upper_frame,textvariable=self.var_address,width=22,font=("arial",11,"bold"))

txt_address.grid(row=3,column=1,padx=2,pady=7)

35
# Age

lbl_age=Label(upper_frame,font=("arial",12,"bold"),text="Age:",bg="white")

lbl_age.grid(row=3,column=2,sticky=W,padx=2,pady=7)

txt_age=ttk.Entry(upper_frame,textvariable=self.var_age,width=22,font=("arial",11,"bold"))

txt_age.grid(row=3,column=3,padx=2,pady=7)

# occupution

lbl_occupution=Label(upper_frame,font=("arial",12,"bold"),text="Occupation:",bg="white")

lbl_occupution.grid(row=4,column=0,sticky=W,padx=2,pady=7)

txt_occupution=ttk.Entry(upper_frame,textvariable=self.var_occupation,width=22,font=("arial",11,"bold"))

txt_occupution.grid(row=4,column=1,padx=2,pady=7)

# birthMark

lbl_birthMark=Label(upper_frame,font=("arial",12,"bold"),text="Birth Mark:",bg="white")

lbl_birthMark.grid(row=4,column=2,sticky=W,padx=2,pady=7)

txt_birthmark=ttk.Entry(upper_frame,textvariable=self.var_birthMark,width=22,font=("arial",11,"bold"))

txt_birthmark.grid(row=4,column=3,sticky=W,padx=2,pady=7)

# Crime Type

lbl_crimeType=Label(upper_frame,font=("arial",12,"bold"),text="Crime Type:",bg="white")

lbl_crimeType.grid(row=0,column=4,sticky=W,padx=2,pady=7)

txt_crimeType=ttk.Entry(upper_frame,textvariable=self.var_crime_type,width=22,font=("arial",11,"bold"))

txt_crimeType.grid(row=0,column=5,padx=2,pady=7)

# # Father Name

36
lbl_fatherName=Label(upper_frame,font=("arial",12,"bold"),text="Father Name:",bg="white")

lbl_fatherName.grid(row=1,column=4,sticky=W,padx=2,pady=7)

txt_fatherName=ttk.Entry(upper_frame,textvariable=self.var_father_name,width=22,font=("arial",11,"bold"))

txt_fatherName.grid(row=1,column=5,padx=2,pady=7)

#Radio Frame

radio_frame_gender=Frame(upper_frame,bd=2,relief=RIDGE,bg='white')

radio_frame_gender.place(x=730,y=90,width=190,height=30)

lbl_gender=Label(upper_frame,font=("arial",12,"bold"),text="Gender:",bg="white")

lbl_gender.grid(row=2,column=4,sticky=W,padx=2,pady=7)

male=Radiobutton(radio_frame_gender,variable=self.var_gender,text='Male',value='male',font=('arial',9,'bold'),bg='white')

male.grid(row=2,column=5,pady=2,padx=5,sticky=W)

self.var_gender.set('male')

female=Radiobutton(radio_frame_gender,variable=self.var_gender,text='Female',value='female',font=('arial',9,'bold'),bg='white')

female.grid(row=2,column=6,pady=2,padx=5,sticky=W)

# Most wantes

lbl_wanted=Label(upper_frame,font=("arial",12,"bold"),text="Most Wanted:",bg="white")

lbl_wanted.grid(row=3,column=4,sticky=W,padx=2,pady=7)

radio_frame_wanted=Frame(upper_frame,bd=2,relief=RIDGE,bg='white')

radio_frame_wanted.place(x=730,y=130,width=190,height=30)

yes=Radiobutton(radio_frame_wanted,variable=self.var_wanted,text='Yes',value='yes',font=('arial',9,'bold'),bg='white')

37
yes.grid(row=2,column=5,pady=2,padx=5,sticky=W)

self.var_wanted.set('yes')

no=Radiobutton(radio_frame_wanted,variable=self.var_wanted,text='No',value='no',font=('arial',9,'bold'),bg='white')

no.grid(row=2,column=6,pady=2,padx=5,sticky=W)

# backgound image

img_crime=Image.open('images/backgound.jpg')

img_crime=img_crime.resize((470,245),Image.ANTIALIAS)

self.photocrime=ImageTk.PhotoImage(img_crime)

self.img_crime=Label(upper_frame,image=self.photocrime)

self.img_crime.place(x=1000,y=0,width=470,height=245)

# Button Frame

button_frame=Frame(upper_frame,bd=2,relief=RIDGE,bg='white')

button_frame.place(x=5,y=200,width=620,height=45)

btn_add=Button(button_frame,text="Record Save",command=self.add_data,font=("arial",13,"bold"),width=14,bg='blue',fg='white')

btn_add.grid(row=0,column=0,padx=3,pady=5)

btn_update=Button(button_frame,text="Update",command=self.update_data,font=("arial",13,"bold"),width=14,bg='blue',fg='white')

btn_update.grid(row=0,column=1,padx=1,pady=5)

btn_delete=Button(button_frame,text="Delete",command=self.delete_data,font=("arial",13,"bold"),width=14,bg='blue',fg='white')

btn_delete.grid(row=0,column=2,padx=1,pady=5)

btn_clear=Button(button_frame,text="Clear",command=self.reset_data,font=("arial",13,"bold"),width=14,bg='blue',fg='white')

btn_clear.grid(row=0,column=3,padx=1,pady=5)

38
# down Frame

down_frame=LabelFrame(Main_frame,bd=2,relief=RIDGE,bg='white',text='Criminal Information Table',font=('times new


roman',11,'bold'),fg='red')

down_frame.place(x=10,y=280,width=1480,height=270)

# Search Frame

search_frame=LabelFrame(down_frame,bd=2,relief=RIDGE,bg='white',text='Search Criminal Record',font=('times new


roman',11,'bold'),fg='red')

search_frame.place(x=0,y=0,width=1470,height=60)

search_by=Label(search_frame,font=("arial",11,"bold"),text="Search By:",fg="white",bg="red")

search_by.grid(row=0,column=0,sticky=W,padx=5)

# search

self.var_com_search=StringVar()

com_txt_search=ttk.Combobox(search_frame,textvariable=self.var_com_search,state="readonly",

font=("arial",12,"bold"),width=18)

com_txt_search['value']=("Select Option","Case_id","Criminal_no")

com_txt_search.current(0)

com_txt_search.grid(row=0,column=1,sticky=W,padx=5)

self.var_search=StringVar()

txt_search=ttk.Entry(search_frame,textvariable=self.var_search,width=22,font=("arial",11,"bold"))

txt_search.grid(row=0,column=2,padx=5)

btn__search=Button(search_frame,text="Search",command=self.serach_data,font=("arial",11,"bold"),width=14,bg="blue",fg="white")

btn__search.grid(row=0,column=3,padx=5)

39
btn_ShowAll=Button(search_frame,text="Show All",command=self.fetch_data,font=("arial",11,"bold"),width=14,bg="blue",fg="white")

btn_ShowAll.grid(row=0,column=4,padx=5)

stayhome=Label(search_frame,text="NATIONAL CRIME AGENCY",font=("times new roman",30,"bold"),fg="crimson",bg="white")

stayhome.place(x=780,y=0,width=600,height=30)

# img_logo_mask=Image.open(r"images�backgound.jpg")

# img_logo_mask=img_logo_mask.resize((50,50),Image.ANTIALIAS)

# self.photoimg_logo_mask=ImageTk.PhotoImage(img_logo_mask)

# self.logo=Label(search_frame,image=self.photoimg_logo_mask)

# self.logo.place(x=900,y=0,width=50,height=30)

# ============= Criminal table========================

# Table Frame

table_frame=Frame(down_frame,bd=3,relief=RIDGE)

table_frame.place(x=0,y=60,width=1470,height=170)

scroll_x=ttk.Scrollbar(table_frame,orient=HORIZONTAL)

scroll_y=ttk.Scrollbar(table_frame,orient=VERTICAL)

self.criminal_table=ttk.Treeview(table_frame,column=("1","2","3","4","5","6","7","8","9","10","11","12","13","14"),xscrollcommand=scroll_x.se
t,yscrollcommand=scroll_y.set)

scroll_x.pack(side=BOTTOM,fill=X)

scroll_y.pack(side=RIGHT,fill=Y)

scroll_x.config(command=self.criminal_table.xview)

scroll_y.config(command=self.criminal_table.yview)

40
self.criminal_table.heading('1',text='CaseId')

self.criminal_table.heading("2",text="CrimeNo")

self.criminal_table.heading("3",text="Criminal Name")

self.criminal_table.heading("4",text="NickName")

self.criminal_table.heading("5",text="ArrestDate")

self.criminal_table.heading("6",text="CrimeOfDate")

self.criminal_table.heading("7",text="Address")

self.criminal_table.heading("8",text="Age")

self.criminal_table.heading("9",text="Occupation")

self.criminal_table.heading("10",text="Birth Mark")

self.criminal_table.heading("11",text="Crime Type")

self.criminal_table.heading("12",text="Father Name")

self.criminal_table.heading("13",text="Gender")

self.criminal_table.heading("14",text="Wanted")

self.criminal_table['show']='headings'

self.criminal_table.column("1",width=100)

self.criminal_table.column("2",width=100)

self.criminal_table.column("3",width=100)

self.criminal_table.column("4",width=100)

self.criminal_table.column("5",width=100)

self.criminal_table.column("6",width=100)

self.criminal_table.column("7",width=100)

self.criminal_table.column("8",width=100)

self.criminal_table.column("9",width=100)

self.criminal_table.column("10",width=100)

self.criminal_table.column("11",width=100)

41
self.criminal_table.column("12",width=100)

self.criminal_table.column("13",width=100)

self.criminal_table.column("14",width=100)

self.criminal_table.pack(fill=BOTH,expand=1)

self.criminal_table.bind("<ButtonRelease>",self.get_cursor)

self.fetch_data()

# *************Function Declarations*******************

def add_data(self):

if self.var_criminal_no.get()=="" or self.var_nickname.get()=="":

messagebox.showerror('Error','All Fields are required')

else:

try:

conn=mysql.connector.connect(host='localhost',username='root',password='Test@123',database='management')

my_cursor=conn.cursor()

my_cursor.execute('insert into criminal values(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)',(

self.var_case_id.get(),

self.var_criminal_no.get(),

self.var_name.get(),

self.var_nickname.get(),

self.var_arrest_date.get(),

self.var_date_of_crime.get(),

self.var_address.get(),

self.var_age.get(),

42
self.var_occupation.get(),

self.var_birthMark.get(),

self.var_crime_type.get(),

self.var_father_name.get(),

self.var_gender.get(),

self.var_wanted.get()

))

conn.commit()

self.fetch_data()

conn.close()

messagebox.showinfo('Success','Criminal record has been added!',parent=self.root)

except Exception as es:

messagebox.showerror('Error',f'Due To:{str(es)}',parent=self.root)

# fetch Data

def fetch_data(self):

conn=mysql.connector.connect(host='localhost',username='root',password='Test@123',database='management')

my_cursor=conn.cursor()

my_cursor.execute('select * from criminal')

data=my_cursor.fetchall()

if len(data)!=0:

self.criminal_table.delete(*self.criminal_table.get_children())

for i in data:

self.criminal_table.insert("",END,values=i)

conn.commit()

conn.close()

43
# Get Cursor

def get_cursor(self,event=""):

cursor_row=self.criminal_table.focus()

content=self.criminal_table.item(cursor_row)

data=content['values']

self.var_case_id.set(data[0])

self.var_criminal_no.set(data[1])

self.var_name.set(data[2])

self.var_nickname.set(data[3])

self.var_arrest_date.set(data[4])

self.var_date_of_crime.set(data[5])

self.var_address.set(data[6])

self.var_age.set(data[7])

self.var_occupation.set(data[8])

self.var_birthMark.set(data[9])

self.var_crime_type.set(data[10])

self.var_father_name.set(data[11])

self.var_gender.set(data[12])

self.var_wanted.set(data[13])

def update_data(self):

if self.var_criminal_no.get()=="" or self.var_nickname.get()=="":

messagebox.showerror('Error','All Fields are required')

else:

try:

update=messagebox.askyesno('Update','Are sure update this criminal record')

44
if update>0:

conn=mysql.connector.connect(host='localhost',username='root',password='Test@123',database='management')

my_cursor=conn.cursor()

my_cursor.execute('update criminal set


Criminal_no=%s,Criminal_name=%s,Nick_name=%s,arrest_date=%s,dateOfcrime=%s,address=%s,age=%s,occupation=%s,BirthMark=%s,crimeT
ype=%s,fatherName=%s,gender=%s,wanted=%s where Case_id=%s',(

self.var_criminal_no.get(),

self.var_name.get(),

self.var_nickname.get(),

self.var_arrest_date.get(),

self.var_date_of_crime.get(),

self.var_address.get(),

self.var_age.get(),

self.var_occupation.get(),

self.var_birthMark.get(),

self.var_crime_type.get(),

self.var_father_name.get(),

self.var_gender.get(),

self.var_wanted.get(),

self.var_case_id.get(),

))

45
else:

if not update:

return

conn.commit()

self.fetch_data()

conn.close()

messagebox.showinfo('success','Criminal record successfully updated',parent=self.root)

except Exception as es:

messagebox.showerror('Error',f'Due To:{str(es)}',parent=self.root)

# Delete

def delete_data(self):

if self.var_case_id.get()=="":

messagebox.showerror('Error',"All fields are required")

else:

try:

Delete=messagebox.askyesno('Delele','Are you sure delete this criminal',parent=self.root)

if Delete>0:

conn=mysql.connector.connect(host='localhost',username='root',password='Test@123',database='management')

my_cursor=conn.cursor()

sql='delete from criminal where Case_id=%s'

value=(self.var_case_id.get(),)

my_cursor.execute(sql,value)

else:

if not Delete:

return

conn.commit()

self.fetch_data()

conn.close()

46
messagebox.showinfo('Delete','Criminal record Successfully Deleted',parent=self.root)

except Exception as es:

messagebox.showerror('Error',f'Due To:{str(es)}',parent=self.root)

# reset

def reset_data(self):

self.var_case_id.set("")

self.var_criminal_no.set("")

self.var_name.set("")

self.var_nickname.set("")

self.var_arrest_date.set("")

self.var_date_of_crime.set("")

self.var_address.set("")

self.var_age.set("")

# self.var_occupationcomb.set("Select ID Proof")

self.var_occupation.set("")

self.var_birthMark.set("")

self.var_crime_type.set("")

self.var_father_name.set("")

self.var_gender.set("")

self.var_wanted.set("")

# search

def serach_data(self):

if self.var_com_search.get()=='' or self.var_search.get()=='':

messagebox.showerror('Error','Please select option')

else:

try:

47
conn=mysql.connector.connect(host='localhost',username='root',password='Test@123',database='management')

my_cursor=conn.cursor()

my_cursor.execute('select * from criminal where ' 닚�(self.var_com_search.get())�" LIKE'%"닚�(self.var_search.get()�"%'"))

rows=my_cursor.fetchall()

if len(rows)!=0:

self.criminal_table.delete(*self.criminal_table.get_children())

for i in rows:

self.criminal_table.insert("",END,values=i)

conn.commit

conn.close()

except Exception as es:

messagebox.showerror('Error',f'Due To:{str(es)}',parent=self.root)

if __name__=="__main__":

root=Tk()

obj=Criminal(root)

root.mainloop()

Database code for the project

-- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64)

--

-- Host: localhost Database: management

48
-- ------------------------------------------------------

-- Server version 8.0.20

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;

/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;

/*!50503 SET NAMES utf8 */;

/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;

/*!40103 SET TIME_ZONE='+00:00' */;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;

/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;

/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--

-- Table structure for table `criminal`

--

DROP TABLE IF EXISTS `criminal`;

/*!40101 SET @saved_cs_client = @@character_set_client */;

/*!50503 SET character_set_client = utf8mb4 */;

CREATE TABLE `criminal` (

`Case_id` varchar(45) NOT NULL,

`Criminal_no` varchar(45) DEFAULT NULL,

`Criminal_name` varchar(45) DEFAULT NULL,

`Nick_name` varchar(45) DEFAULT NULL,

`arrest_date` varchar(45) DEFAULT NULL,

`dateOfcrime` varchar(45) DEFAULT NULL,

`address` varchar(45) DEFAULT NULL,

49
`age` varchar(45) DEFAULT NULL,

`occupation` varchar(45) DEFAULT NULL,

`BirthMark` varchar(45) DEFAULT NULL,

`crimeType` varchar(45) DEFAULT NULL,

`fatherName` varchar(45) DEFAULT NULL,

`gender` varchar(45) DEFAULT NULL,

`wanted` varchar(45) DEFAULT NULL,

PRIMARY KEY (`Case_id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

/*!40101 SET character_set_client = @saved_cs_client */;

--

-- Dumping data for table `criminal`

--

LOCK TABLES `criminal` WRITE;

/*!40000 ALTER TABLE `criminal` DISABLE KEYS */;

INSERT INTO `criminal` VALUES


('1','101','Osama','laden','02/05/2011','01/12/1998','SA','50','Terrorism','TIll','terrorist','Bin','male','yes'),('2','102','Omid','Nino','02/05/2005','01
/12/2004','Iran','25','Kindanapping','Till','mail fruad','Rishan','male','yes');

/*!40000 ALTER TABLE `criminal` ENABLE KEYS */;

UNLOCK TABLES;

/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;

/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;

/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;

/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

50
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

Conclusion
Active campaigning of Crime Management System is the need of hour, the target
systems being important. Crime Management System is developed to make it
easily accessible and available anywhere at the user's convenience. The service
has to be expanded with more government institutions becoming issuing
members. Cyber security and privacy measures are of utmost importance; this
can be seen from its far reaching impact on all the other crucial elements involved
in acceptance and actual use of this technology. The Crime Management System
is still at a nascent stage, simply because of lack of awareness among the
population in regards to this service. Publicizing its advantages is key to creating
awareness and drawing subscribers or user. Although this may be considered
utopian when it comes to a developing country, unfettered internet access across
the country is a potent step towards expanding user base of a number of
government services, including India

Further Updates

We tend to deploy this project with several updates such as fingerprint of the
criminal, Also we will be rolling this app with the prison management feature so
we can know that in which cell criminal is being held , and which officer is
responsible for all his court dates. Last but not the least bugs fixing updates will
be rolling out in every quarter of the year

51
References
• Martin C. Brown-Python: The Complete Reference Forth Edition

• SQL: Learn SQL (using MySQL) in One Day and Learn It Well. SQL for
Beginners with Hands-on Project. (Learn Coding Fast with Hands-On
Project)
• Sharpe John Microsoft Visual C# Step by Step

• Google

• YouTube Channel :Code With Kiran

52

You might also like