[go: up one dir, main page]

0% found this document useful (0 votes)
60 views47 pages

Dbmsfinal

Uploaded by

shashreya39
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)
60 views47 pages

Dbmsfinal

Uploaded by

shashreya39
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/ 47

Visvesvaraya Technological University

“Jnana Sangama”, Belagavi – 590 018.

A DBMS MINI PROJECT ON


"CRIMINAL RECORDS MANAGEMENT SYSTEM”
Submitted in partial fulfilment of requirement for the V semester.

Bachelor of Engineering in Artificial Intelligence and


Machine Learning
Submitted by
MANJUNATHA M K – 1CK21AI019
NARAYANASWAMY J – 1CK21AI023

Under the Guidance of


Prof. Vanitha L B
Asst Professor, Dept. of AIML
CBIT- Kolar

C BYREGOWDA INSTITUTE OF TECHNOLOGY


An ISO 9001:2015 Certified Institute

Department of Artificial Intelligence and Machine Learning


Srinivaspur Road, Kolar-563101
2023 – 24
C. BYREGOWDA INSTITUTE OF TECHNOLOGY
An ISO 9001:2015 Certified Institute
Department of Artificial Intelligence and Machine Learning
(Srinivaspur Road, Kolar (T&D) Kolar – 563101)

CERTIFICATE
This is Certified that the DBMS mini project work entitled with “CRIMINAL RECORDS
MANAGEMENT SYSTEM” is a bonafide work carried out by NARAYANASWAMY J
bearing the university seat number 1CK21AI023 and MANJUNATHA M K bearing the
university seat number 1CK21AI019, submitted in partial fulfilment for Bachelor of
Engineering in Artificial Intelligence and Machine Learning of the Visvesvaraya Technological
University, Belagavi. During the academic year 2023-2024. It is certified that all
corrections/suggestions indicated for the internal assessment have been incorporated in the
DBMS mini project report. The mini project report has been approved as it satisfies the
academic requirements in respect of DBMS mini project work prescribed for the V semester
Bachelor of Engineering Degree.

______________________ _______________________
Signature of Guide Signature of HOD
Prof. Vanitha L B Dr. DEEPIKA LOKESH
Asst. Professor Professor & HOD
Dept. of AIML, CBIT, Kolar Dept. of AIML, CBIT, Kolar

Name of Examiners Signature of Examiners

1._________________ ____________________

2._________________ ____________________
ABSTRACT

The “Criminal Record Management System” is a comprehensive web-based application


developed using HTML, CSS, PHP, JavaScript, and MySQL. This system is designed to efficiently
manage criminal records, providing a streamlined interface for admins to store, retrieve, and analyze
criminal data. Leveraging the power of a relational database management system (DBMS), it
ensures data integrity, security, and consistency, while its user-friendly interface facilitates ease of
use.

The system encompasses various features including the ability to record personal details of
criminals, crime details, and case status. It also allows for taking printout of case details. The use of
PHP and JavaScript ensures dynamic and interactive web pages, enhancing the user experience. The
back-end, powered by MySQL, provides robust and efficient management of data. Overall, the
“Criminal Record Management System” serves as a valuable tool for law enforcement, contributing
to effective and informed record management.

i
ACKNOWLEDGEMENT

The completion of any work is a showcase of constant dedication and cooperation of many
people who lent their hands which went seen or unseen.

We are grateful to our Institution and Management, C. BYREGOWDA INSTITUTE OF


TECHNOLOGY with its ideals and inspirations for having provided us with the facilities,
which has made this, project a success.

We would like to thank our beloved Principal Dr. S N CHANDRASHEKARA, CBIT for
his kind disposition for completing this undertaking successfully.

We express our heart full gratitude to Dr. DEEPIKA LOKESH, Professor and HOD,
Department of Artificial Intelligence and Machine Learning, CBIT, for giving us guidance,
valuable advice and support.

We extend our gratitude to our guide Prof. VANITHA L B, Asst. Professor, Department
of Artificial Intelligence and Machine Learning, CBIT for her valuable advice, support and
constructive suggestions.

We also thank to all our professors and the entire department of Artificial Intelligence
and Machine Learning, for their co-operation and suggestions.

The report would be incomplete if we do not thank our parents and friends for their
continuous encouragement and moral support.

[MANJUNATHA M K] - [1CK21AI019]

[NARAYANASWAMY J]-[1CK21AI023]

ii
TABLE OF CONTENTS

Abstract i
Acknowledgement ii
Table of contents iii
List of Figures v

CHAPTER NO CHAPTER NAME PAGE NO

Chapter 1 INTRODUCTION TO DBMS 1


1.1 Introduction 1
1.2 Applications of DBMS 1
1.3 Introduction to SQL 2
1.4 Basic Operations of SQL 4

Chapter 2 CRIMINAL RECORDS MANAGEMENT 5


SYSTEM
2.1 Introduction 5
2.2 Objective 5
2.3 Scope of Project 5
2.4 Methodology/Procedure 6
2.5 Project Framework 6
2.6 System Analysis 6

Chapter 3 LITERATURE SURVEY 7


3.1 Existing System 7
3.2 Proposed System 7

Chapter 4 HARDWARE AND SOFTWARE 8


REQUIREMENTS
4.1 Hardware requirements 8
4.2 Software requirements 8

Chapter 5 DESIGN PHASE 9


5.1 Use case diagram 9
5.2 Entity relationship diagram 10

Chapter 6 IMPLEMENTATION 12
6.1 Platform 12
6.2 Language 12
iii
6.3 Tables 13
6.4 Implementation of code 13
6.4.1 Front end 13
6.4.2 Back end 26

Chapter 7 CONCLUSION AND FEATURE 34


ENHANCEMENTS
7.1 Conclusion 34
7.2 Feature enhancements 34

REFERENCES 35

APPENDIX A ACRONYMS AND SYNNONYMS 36


APPENDIX B SNAP SHOTS 37

iv
LIST OF FIGURES:
FIGURE NO. FIGURE NAME PAGE NO.
Fig 5.1 Use case Diagram 9

Fig 5.2 ER Diagram 11

Fig 6.1 Tables of the Project 13

Fig B1 Login page 37

Fig B2 Home page 37

Fig B3 Add staff 38

Fig B4 View staff 38

Fig B5 View cases 39

Fig B6 Case details 39

Fig B7 Add new case 40

Fig B8 Manage cases 40

v
Criminal Records Management System Introduction to DBMS

CHAPTER 1

INTRODUCTION TO DBMS
A database is simply an organized collection of related data, typically stored on disk, and
accessible by possibly many concurrent users. Databases are generally separated into
application areas. For example, one database may contain Human Resource (employee and
payroll) data; another may contain sales data; another may contain accounting data; and soon.
Databases are managed by a DBMS.

1.1 Introduction
A Database Management System (DBMS) is a set of programs that manages any number
of databases. DBMS stands for Database Management System. We can break it like this DBMS
is Database and Management System. Database is a collection of data and Management System
is a set of programs to store and retrieve those data. Based on this we can define DBMS like
this, DBMS is a collection of inter-related data and set of programs to store & access those data
in an easy and effective manner. Database systems are basically developed for large amounts of
data. When dealing with huge amounts of data, there are two things that require optimization,
Storage of data and retrieval of data.

1.2 Applications of DBMS


Applications where we use Database Management Systems are:

● Telecom: There is a database to keeps track of the information regarding calls made,
network usage, customer details etc. Without the database systems it is hard to
maintain that huge amount of data that keeps updating every millisecond.
● Industry: Where it is a manufacturing unit, warehouse or distribution center, each
one needs a database to keep the records of the ins and outs. For example,
distribution centers should keep track of the product units that are supplied into the
center as well as the products that got delivered out from the distribution center on
each day; this is where DBMS comes into picture.

● Education sector: Database systems are frequently used in schools and colleges to

1
Criminal Records Management System Introduction to DBMS

● store and retrieve the data regarding student details, staff details, course details,
exam details, payroll data, attendance details, fees details etc. There is a hell lot
amount of inter-related data that needs to be stored and retrieved in an efficient
manner.
● Online shopping: You must be aware of the online shopping websites such as
Amazon, Flipkart etc. These sites store the production formation, your addresses and
preferences, credit details and provide you the relevant list of products based on your
query. All this involves a Database management system.

1.3 Introduction to SQL


Structure Query Language (SQL) is a programming language used for storing and
managing data in RDBMS. SQL was the first commercial language introduced for
E.FCodd's Relational model. Today almost all RDBMS (MySql, Oracle, Infomix, Sybase,
MS Access) uses SQL as the standard database language. SQL isused to perform all type of
data operations in RDBMS.

SQL Command

SQL defines following data languages to manipulate data of RDBMS.

DDL: Data Definition Language

All DDL commands are auto-committed. That means it saves all the changes
permanently in the database.
Command Description

Create To create new table or database

Alter For alteration

Truncate Delete data from table

Drop to drop a table

Rename To rename a table

DML: Data Manipulation Language

Dept of AIML, CBIT, Kolar. 2 2023-24


Criminal Records Management System Introduction to DBMS

DML commands are not auto committed. It means changes are not permanent to
database, they can be rolled back.

Command Description

Insert To insert anew row

To update existing row


update

delete To delete a row

merge merging two rows or two tables

TCL: Transaction Control Language

These commands are to keep a check on other commands and their effect on the
database. These commands can annul changes made by other commands by rolling back to
the original state. It can also make changes permanent.

Command Description

commit To permanently save

rollback To undo change

Save point To save temporarily

DCL: Data Control Language


Data control language provides command to grant and take back authority.

Command Description

grant grant permission of right.


revoke takeback permission.

DQL: Data Query

Dept of AIML, CBIT, Kolar. 3 2023-24


Criminal Records Management System Introduction to DBMS

Language Command Description

Select Retrieve records from one or more tables.

Aggregate Functions

Count, Sum, Avg, Min, Max are aggregate functions used in DBMS.

1.4 Basic Operations of SQL

Union

UNION is used to combine the results of two or more Select statements. However, It
will eliminate duplicate rows from its result set. In case of union, the number of columns
and datatype must be same in both the tables.

Intersect

Intersect operation is used to combine two SELECT statements, but it only returns
the records which are common from both SELECT statements. In the case of Intersect the
number of columns and datatype must be same. MySQL does not support INTERSECT
operators.

Minus

The minus operation combines result of two Select statements and return only those
result which belongs to first set of result. MySQL does not support INTERSECT operators.

Dept of AIML, CBIT, Kolar. 4 2023-24


Criminal Records Management System Criminal Records Management System

CHAPTER 2
CRIMINAL RECORDS MANAGEMENT SYSTEM
2.1 Introduction:
Data is unprocessed information which is a known fact that can be recorded and specifies
implicit meaning. A database is the collection of related data organized in a way that data can be
easily accessed, managed, and updated. Database is a place where related piece of information is
stored, and various operations can be performed on it. Database can be recorded manually or
computerized. The size and complexity of database is variable database is designed, built and
populated for specific purpose.

The “Criminal Record Management System” is an innovative web-based application that


provides a centralized platform for storing, retrieving, and managing crucial data related to
criminal records. The system aims to replace traditional paper-based record-keeping, thereby
reducing manual effort, minimizing errors, and improving efficiency. With its robust database
design and user-friendly interface, it ensures seamless access to accurate and up-to-date
information, thereby aiding in swift decision-making and effective law enforcement.

2.2 Objectives

The objectives of Criminal records management system are as follows:


1. Digitization of Records
2. Efficient Record Management
3. Powerful Search Capabilities
4. User-Friendly Interface
5. Crime Prevention
6. Fast Access to Records
7. Online Interface

2.3 Scope of the project

• The scope of a criminal record management system project typically includes the
following aspects:
• Maximizing User Services: Providing a comprehensive range of services to users,
including law enforcement and other stakeholders.
• Elimination of Redundancies: Removing duplicate and inconsistent record-keeping
practices to streamline processes.
• Quick Response: Ensuring the system allows for faster response times in accessing and
updating records.
• Maintenance of Criminal Details: Facilitating the maintenance and update of detailed
records of criminals.

5
Criminal Records Management System Criminal Records Management System

• Error Reduction: Aiming to minimize errors and reduce reliance on paperwork through
automation.

• Report Generation: Enabling the generation of various reports as required for analysis and
decision-making.
• Transparency: Introducing transparency in the workings of law enforcement agencies.
• System Analysis and Design: Including user-friendliness with various controls, ensuring no
risk of data mismanagement, and providing high levels of security with different levels of
authentication.
2.4 Methodology or Procedure

The methodology for developing a criminal record management system typically involves
several stages, starting with a system analysis to understand the requirements and workflows of
law enforcement agencies. This is followed by system design, where the structure of the database
and user interface are planned out, often using tools like Entity Relationship Diagrams and Data
Flow Diagrams to map out the system architecture. The next phase is implementation, where the
system is actually built, coded, and set up. Finally, the system undergoes testing to ensure all
functions work as intended and that data integrity and security measures are effective.

2.5 Project Framework

The project framework for a criminal record management system (CRMS) is structured
around a multi-tiered architecture that encompasses various stages of crime record processing. It
typically includes the record entry, Crime Investigation for evidence gathering and suspect
tracking, Prosecution for legal proceedings, and Adjudication for final verdicts and record updates.
The framework is designed to facilitate the flow of information between these stages, ensuring a
cohesive and efficient process. Entity Relationship diagrams are often employed to visualize and
refine the system’s design, providing clarity and consistency across the project’s development
lifecycle.

2.6 System analysis

The system analysis for a criminal record management system project involves a thorough
examination of the existing processes and identification of areas for improvement. It includes:

• Data Collection: Gathering detailed information about current record-keeping methods,


including interviews with law enforcement personnel and observations of their daily
routines.
• Requirement Analysis: Identifying the specific needs of the system’s users, such as the
ability to quickly access and update records, generate reports, and maintain data security.
• Process Analysis: Understanding the flow of information within the current system and
pinpointing bottlenecks or inefficiencies that could be addressed with the new system.

Dept of AIML, CBIT, Kolar. 6 2023-24


CHAPTER 3
LITERATURE SURVEY

3.1 Existing system

The existing system for criminal record management typically involves manual operations,
such as submitting complaints, taking action against crimes, and checking status updates. This
system is heavily reliant on paperwork, which can lead to errors in data entry and cross-
verification, potentially compromising the system’s authentication.

3.2 Proposed system

The proposed system aims to enhance the efficiency and effectiveness of crime record
management. It is envisioned as a computerized, real-time system that would replace manual
processes with automated ones. The proposed system would feature a centralized database for
storing information about crimes and criminals, robust data security measures, and user-friendly
interfaces for law enforcement agencies. It would facilitate online reporting, centralized data
handling, thus improving the overall crime management operations.

7
CHAPTER 4
HARDWARE AND SOFTWARE REQUIREMENTS
In the development of any software application, we require some particular system
configuration of software and hardware components. This configuration helps in achieving the
proper execution.

The various requirements that are essential for this project are specified over here. These
requirements have to be fulfilled for the success of the project. The purpose, scope along with
hardware and software requirements helps proper execution.

1.1 Hardware requirements:

• Processor: Minimum 1.3 GHz; recommended 2 GHz or faster for better


performance1.

• RAM: Minimum 2 GB; 4 GB or more is preferable for smooth operation2.

• Storage: Sufficient space for the operating system, software, and database, with
additional space for future records.

• Backup Storage: External storage for regular backups of the database to prevent
data loss.

1.2 Software requirements:

• Operating System: Windows (2000, Vista, 7, 8, or later versions)3.

• Database: MySQL for robust data management3.

• Server: Apache HTTP Server for hosting the application4.

• Programming Languages: HTML, CSS, JavaScript, jQuery for the user interface;
PHP for server-side scripting3.

• IDE/Workbench: Tools like XAMPP (Windows, Apache, MySQL, PHP) stack,


DAMPP for development and maintenance.

8
Criminal Records Management System Design Phase

CHAPTER 5
DESIGN PHASE
Design is the creation of a plan or convention for the construction of an object or a system
(as in architectural blueprints, engineering drawings, business processes, circuit diagrams and
sewing patterns).Design has different connotations in different fields (see design disciplines
below). In some cases, the direct construction of an object (as in pottery, engineering,
management, cowboy coding and graphic design) is also considered to be design.

A specification of an object, manifested by an agent, intended to accomplish goals, in a


particular environment, using a set of primitive components, satisfying a set of requirements,
subject to constraints. Another definition for design is a roadmap or a strategic approach for
someone to achieve a unique expectation. It defines the specifications, plans, parameters, costs,
activities, processes and how and what to do within legal, political, social, environmental, safety
and economic constraints in achieving that objective.

5.1 Use case diagram:


In this diagram there are three actor, first admin can login system, add/view staff, view cases
and logout. Second NCO can login system, view cases, add new cases and logout. Third CID can
view assigned cases to them and then logout.

Fig 5.1: Use case diagram

9
Criminal Records Management System Design Phase

5.2 Entity Relationship Diagram:

Definition of ER Diagram:
An Entity relationship describes inter-related things of interest in a specific domain of
knowledge. An ER model is composed of entity types and specifies relationships that can exist
between instances of those entity types. In software engineering an ER model is commonly
formed to represent things that a business needs to remember in order to perform business
processes. Consequently, the ER model becomes an abstract data model that defines a data or
information structure that can be implemented in a database, typically a relation database.

In this Crime Record Management System Admin will be able to login and be able to add
staff, view staff and also can view cases and able to logout of the website. NCO will be able to
add new cases and also can view the cases and able to logout of the website and assign the case to
the specific CID, while the CID will be able to manage the investigation details of the cases
assigned to them and able to logout.

Dept of AIML, CBIT, Kolar. 10 2023-24


Criminal Records Management System Design Phase

Fig 5.2: ER Diagram

Dept of AIML, CBIT, Kolar. 11 2023-24


Criminal Records Management Systems Implementation

CHAPTER 6
IMPLEMENTATION
The implementation is the process of assuring that the information system operation and then
allowing users take over its operations for use and evaluation. Implementation includes the
following activities:
• Obtaining and installing the system Hardware.
• Providing user access to the system.
• Creating and updating the database.
• Training the users in the new system.

6.1 Platform
Window 10 is a personal computer operating system developed by Microsoft, a version of
Windows NT. Development of 10 occurred as early as 8.1 under the codename "Blackcomb".
Windows 10 is available in six different editions, of which the Home Premium, Professional, and
Ultimate editions are available for retail sale to consumers. The advantages of windows 10 are:
● Improved performance.
● Enhanced searching capabilities.
● Location aware printing.
● Virtual hard disk support.
● Expanded security.
● Get better security built in.
● Hassle-free backups.
● Have all your files instantly at hand.
6.2 Language
PHP is a widely used, general-purpose scripting language that was originally designed for
web development, to produce dynamic web pages. It can be embedded into HTML and generally
runs and on a web server, which needs to be configured to process PHP code and create web page
content from it. It can be deployed on most web servers and on almost on every operating system
and platform free of charge. PHP is installed on over 20 million websites and 1 million web
servers.

12
Criminal Records Management Systems Implementation

PHP was originally created by Rasmus Lerdorf in 1994 and has been in continuous
development ever since. The main implementation of PHP is now produced by the PHP group and
serves as the de facto standard for PHP as there is no formal specification. PHP is free software
released under the PHP License, which is incompatible with the GNU General public license
(GPL) because of restrictions on the use of the term PHP.

6.3 Tables
In this mini project, we are using five tables in the database. They are:

Fig 6.1: Tables of the project

6.4 IMPLEMENTATION OF CODE


6.4.1 FRONT END
Index.php
<!DOCTYPE html>

<html lang="">

<?php

session_start();

include('header.php');

include('dbconnect.php');

if(isset($_SESSION['staffid']

if($_SESSION['role']=='Admin'){

Dept of AIML, CBIT, Kolar. 13 2023-24


Criminal Records Management Systems Implementation

header("Location: admin/");

elseif($_SESSION['role']=='CID'){

header("Location: cid/");

elseif($_SESSION['role']=='NCO'){

header("Location: officer/");

?>

<div class="col-md-3"></div>

<div class="col-md-6">

<div class="panel panel-success">

<div class="panel-heading">

<h3 class="panel-title">Please Login Here</h3>

</div>

<div class="panel-body">

<form class="form-horizontal" action="logincheck.php" method="post"


role="form" >

<div class="form-group">

<label class="control-label col-sm-2" for="un">Username:</label>

<div class="col-sm-10">

<input type="text" class="form-control" name="username" id="un" placeholder="Enter


Username" autofocus="" required=""

</div>

Dept of AIML, CBIT, Kolar. 14 2023-24


Criminal Records Management Systems Implementation

</div>

<div class="form-group">

<label class="control-label col-sm-2" for="pwd">Password:</label>

<div class="col-sm-10">

<input type="password" class="form-control" name="pwd" id="pwd"


placeholder="Enter password" required="">

</div>

</div>

<div class="form-group">

<div class="col-sm-offset-2 col-sm-10">

<button type="submit" name="login" class="btnbtn-default">Login

<span class="glyphiconglyphicon-check" ></span>

</button>

</div>

</div>

<div class="form-group">

<div class="col-sm-offset-2 col-sm-10">

<?php

if(isset($_SESSION['error'])){

echo "

<span class='alert alert-danger text-center mt-10'>

".$_SESSION['error']."

</span>

unset($_SESSION['error']);

Dept of AIML, CBIT, Kolar. 15 2023-24


Criminal Records Management Systems Implementation

?>

</div>

</div>

</form>

</div>

</div>

</div>

<div class="col-md-3">

</div>

<script type="text/javascript" src="assets/js/jquery-3.1.1.min.js"></script>

<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>

</body>

</html>

Login.php

<!DOCTYPE html>

<html lang="">

<?php

session_start();

include('header.php');

include('dbconnect.php');

if(isset($_SESSION['staffid'])){

if($_SESSION['role']=='Admin'){

Dept of AIML, CBIT, Kolar. 16 2023-24


Criminal Records Management Systems Implementation

header("Location: admin/");

elseif($_SESSION['role']=='CID'){

header("Location: cid/");

elseif($_SESSION['role']=='NCO'){

header("Location: officer/");

?>

<div class="col-md-3"></div>

<div class="col-md-6">

<div class="panel panel-success">

<div class="panel-heading">

<h3 class="panel-title">Please Login Here</h3>

</div>

<div class="panel-body">

<form class="form-horizontal" action="logincheck.php" method="post"


role="form" >

<div class="form-group">

<label class="control-label col-sm-2" for="un">Staff Number:</label>

<div class="col-sm-10">

<input type="text" class="form-control" name="username" id="un"


placeholder="Enter Username" autofocus="" required="">

</div>

Dept of AIML, CBIT, Kolar. 17 2023-24


Criminal Records Management Systems Implementation

</div>

<div class="form-group">

<label class="control-label col-sm-2" for="pwd">Password:</label>

<div class="col-sm-10">

<input type="password" class="form-control" name="pwd" id="pwd"


placeholder="Enter password" required="">

</div>

</div>

<div class="form-group">

<div class="col-sm-offset-2 col-sm-10">

<button type="submit" name="login" class="btnbtn-default">Login

<span class="glyphiconglyphicon-check" ></span>

</button>

</div>

</div>

<div class="form-group">

<div class="col-sm-offset-2 col-sm-10">

<?php

if(isset($_SESSION['error'])){

echo "

<span class='alert alert-danger text-center mt-10'>

".$_SESSION['error']."

</span>

";

Dept of AIML, CBIT, Kolar. 18 2023-24


Criminal Records Management Systems Implementation

unset($_SESSION['error']);

?>

</div>

</div>

</form>

</div>

</div>

</div>

<div class="col-md-3">

</div>

<script type="text/javascript" src="assets/js/jquery-3.1.1.min.js"></script>

<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>

</body>

</html>

Addcase.php
<?php
include('header.php');
include('dbconnect.php');
?>
<div class="container-fluid">
<?php include('menubar.php')?>
<?php // include('menubar1.php');
//$trans_id= uniqid();
$caseid=$_GET['caseid'];

Dept of AIML, CBIT, Kolar. 19 2023-24


Criminal Records Management Systems Implementation

$staffid=$_GET['id'];
$crime=$_GET['crimetype'];
?>
<div class="container-fluid">
<div class="col-md-2"></div>
<div class="col-md-8">
<ul class="list-group" id="myinfo" >
<li class="list-group-item" id="mylist"></li>
</ul>
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">Details of
Action</h3>
</div>
<div class="panel-body">
<div class="container-fluid">
<form class="form-horizontal" id="addaction"
role="form">
<div class="form-row">
<div class="col-md-6">
<div class="form-group">
<label for="">Case Number:</label>
<input type="hidden" name="staffid"
value="<?php echo $staffid?>">
<input type="text" readonly="" class="form-
control" name="caseid" value="<?php echo $caseid?>">
</div>
</div>
<div class="col-md-6">
<div class="form-group">

Dept of AIML, CBIT, Kolar. 20 2023-24


Criminal Records Management Systems Implementation

<label for="">Crime Type:</label>


<input type="text" class="form-control"
readonly="" name="crime" value="<?php echo $crime?>">
</div>
</div>
</div>
<div class="form-row">
<div class="col-md-6">
<div class="form-group">
<label for="">Diary of Action:</label>
<textarea name="statement" class="form-
control"></textarea>
<input type="hidden" name="staffid"
value="<?php echo $staffid?>">
<input type="hidden" name="caseid"
value="<?php echo $caseid?>">
</div>
</div>
</div>
<div class="form-group">
<button type="submit" name="save_union" class="btnbtn-
success form-control">Save
<span class="glyphiconglyphicon-arrow-right" aria-
hidden="true"></span>
</button>
</div>
</form>
</div>
</div>
</div>
</div>

Dept of AIML, CBIT, Kolar. 21 2023-24


Criminal Records Management Systems Implementation

<div class="col-md-2"></div>
</div>
<?php include('scripts.php'); ?>
<script type="text/javascript">
$(document).on('submit', '#addaction', function(event) {
event.preventDefault();
// This removes the error messages from the page
$(".list-group-item").remove();
var formData = $(this).serialize();
$.ajax({
url: 'save_action.php',
type: 'post',
data: formData,
dataType: 'JSON',
success: function(response){
if(response.error){
var len = response[0].length;
for(var i=0; i<len; i++){
$('#myinfo').append('<li class="list-
group-item alert alert-danger"> ' + response[0][i] + '</li>');
}
}
else{
Swal.fire({
position: 'top-end',
icon: 'success',
title: 'Your Case Saved',
showConfirmButton: false,
timer: 3000

Dept of AIML, CBIT, Kolar. 22 2023-24


Criminal Records Management Systems Implementation

});
$('input[name=statement]').val('');
setTimeout( function(){
window.location='addcompl.php';
}, 900);
}
}
});
});
</script>
</body>
</html>

Viewcase.php
<?php
//require_once('session_login.php');
include('dbconnect.php');
include('header.php');
?>
<br />
<div class="container-fluid">
<?php include('menubar.php');?>
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="panel panel-success">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">
Case List

Dept of AIML, CBIT, Kolar. 23 2023-24


Criminal Records Management Systems Implementation

</h3>
</div>
<div id="trans-table">
<table id="myTable-trans" class="table table-bordered table-hover" cellspacing="0"
width="100%">
<thead>
<tr>
<th>S/N</th>
<th>Case Number</th>
<th><center>Crime Type</center></th>
<th><center>Time Reported</center></th>
<th><center>NCO</center></th>
<th><center>CID</center></th>
<th><center>Investigation Status</center></th>
<th><center>Action</center></th>
</tr>
</thead>
<tbody>
<?php
// The serial number variable
$sn=0;
$query=mysqli_query($dbcon,"select * from case_table");
while($row = mysqli_fetch_array($query)){
$id = $row['case_id'];
$status=$row['status'];
$sn++;
?>
<tr>
<td><?php echo $sn;?></td>

Dept of AIML, CBIT, Kolar. 24 2023-24


Criminal Records Management Systems Implementation

<td><?php echo $row['case_id'];?></td>


<td><?php echo $row['case_type'];?></td>
<td><?php echo $row['date_added']; ?></td>
<td><?php echo $row['staffid']; ?></td>
<td><?php echo $row['cid']; ?></td>
<td><?php echo $row['status']; ?></td>
<td class="empty" width="">
<a data-placement="left" title="Click to view" id="view<?php echo $id;?>"
href="casedetails.php<?php echo '?id='.$id; ?>&status=<?php echo $row['status'] ?>"
class="btnbtn-success">Details<i class="icon-pencil icon-large"></i></a>
<button type="button" data-toggle="modal" data-target="#<?php echo
$row['case_id'];?>" data-placement="left" title="Click to edit" class="btnbtn-success"><span
class="glyphiconglyphicon-pencil" aria-hidden="true"></span></button>
<button type="button" data-toggle="modal" data-target="#delete<?php echo
$row['case_id'];?>" data-placement="left" class="btnbtn-danger"><span
class="glyphiconglyphicon-trash" aria-hidden="true"></span></button>
<?php include('modal_delete_case.php');?>
<?php include('modal_edit_case.php'); ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-1"></div>
</div>
<?php include('scripts.php'); ?>
<script type="text/javascript">
$(document).ready(function() {

Dept of AIML, CBIT, Kolar. 25 2023-24


Criminal Records Management Systems Implementation

$('#myTable-trans').DataTable();
});
</script>
</body>
</html>

6.4.2 BACKEND
ghpolice.sql
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 30, 2021 at 04:33 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 8.0.8

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


START TRANSACTION;
SET time_zone = "+00:00";

/*!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 */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `ghpolice`

Dept of AIML, CBIT, Kolar. 26 2023-24


Criminal Records Management Systems Implementation

--

-- --------------------------------------------------------

--
-- Table structure for table `case_table`
--

CREATE TABLE `case_table` (


`case_id` varchar(20) NOT NULL,
`statement` varchar(200) NOT NULL,
`caseid` int(11) NOT NULL,
`date_added` datetime DEFAULT NULL,
`staffid` varchar(30) NOT NULL,
`case_type` varchar(50) NOT NULL,
`status` varchar(50) NOT NULL,
`cid` varchar(20) NOT NULL DEFAULT 'Not Yet',
`complete_date` date NOT NULL,
`diaryofaction` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `case_table`
--

INSERT INTO `case_table` (`case_id`, `statement`, `caseid`, `date_added`, `staffid`, `case_type`,


`status`, `cid`, `complete_date`, `diaryofaction`) VALUES
('210728101', '<p>HelLo,</p>\r\n\r\n<p>This CID Officer yahaya and this my findings so for in
the case</p>\r\n', 56, '2021-07-28 13:13:49', '333', 'Robbing', 'Completed', '005', '0000-00-00', '
This is case '),

Dept of AIML, CBIT, Kolar. 27 2023-24


Criminal Records Management Systems Implementation

('210728102', '', 57, '2021-07-28 13:14:53', '333', 'Assault', '', 'cid', '0000-00-00', 'Here is
anotehracse');

-- --------------------------------------------------------

--
-- Table structure for table `complainant`
--

CREATE TABLE `complainant` (


`case_id` varchar(20) NOT NULL,
`comp_name` varchar(100) NOT NULL,
`tel` varchar(10) NOT NULL,
`occupation` varchar(20) NOT NULL,
`region` varchar(50) NOT NULL,
`district` varchar(100) NOT NULL,
`loc` varchar(50) NOT NULL,
`addrs` varchar(100) NOT NULL,
`age` int(3) NOT NULL,
`gender` varchar(6) NOT NULL,
`date_added` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE
current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `complainant`

INSERT INTO `complainant` (`case_id`, `comp_name`, `tel`, `occupation`, `region`, `district`,


`loc`, `addrs`, `age`, `gender`, `date_added`) VALUES.

Dept of AIML, CBIT, Kolar. 28 2023-24


Criminal Records Management Systems Implementation

('210707101', 'Hanan Gundaadoo', '234567', '34567', 'Bono Region', 'Tain District', 'Sunyani',
'67788', 22, 'Male', '2021-07-07 10:56:23'),
('210713102', 'New Case', '345678', 'fae', 'Bono Region', 'Jaman South Municipal', 'wertyui', 'ddd',
33, 'Male', '2021-07-13 09:20:49'),
('210713103', 'asdfgh', '567890', 'dfghjk', 'Ahafo Region', 'Asunafo South District', 'ertyu', 'erty',
456, 'Female', '2021-07-13 09:27:48'),
('210728101', 'Yahaya Osman', '0509997797', 'Lecturer', 'Bono Region', 'Dormaa Central
Municipal', 'Sunyani', 'Hse No. 60/G, Kotokrom', 55, 'Male', '2021-07-28 13:12:57'),
('210728102', 'Yahaya Osman', '0509997797', 'Lecturer', 'Bono East Region', 'Pru West District',
'Sunyani', 'Hse No. 60/G, Kotokrom', 89, 'Male', '2021-07-28 13:14:41');

-- --------------------------------------------------------

--
-- Table structure for table `crime_type`
--

CREATE TABLE `crime_type` (


`id` int(11) NOT NULL,
`des` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `crime_type`
--

INSERT INTO `crime_type` (`id`, `des`) VALUES


(1, 'Domestic Violence'),
(2, 'Murder Case'),
(3, 'Assault'),
(4, 'Theft Case'),

Dept of AIML, CBIT, Kolar. 29 2023-24


Criminal Records Management Systems Implementation

(5, 'Defilement'),
(6, 'Robbing'),
(7, 'Fraud'),
(8, 'Others');

-- --------------------------------------------------------

--
-- Table structure for table `investigation`
--

CREATE TABLE `investigation` (


`case_id` varchar(20) NOT NULL,
`investigator` varchar(20) NOT NULL,
`statement2` text NOT NULL,
`assigned_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE
current_timestamp(),
`status2` varchar(100) NOT NULL,
`completed_date` varchar(20) NOT NULL,
`id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `investigation`

INSERT INTO `investigation` (`case_id`, `investigator`, `statement2`, `assigned_date`, `status2`,


`completed_date`, `id`) VALUES
('210707101', '005', '<p>thi is a cse</p>\r\n', '2021-07-07 11:03:58', 'Completed', '', 55);

-- --------------------------------------------------------

Dept of AIML, CBIT, Kolar. 30 2023-24


Criminal Records Management Systems Implementation

--
-- Table structure for table `userlogin`
--

CREATE TABLE `userlogin` (


`id` int(11) NOT NULL,
`staffid` varchar(20) NOT NULL,
`status` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`surname` varchar(50) NOT NULL,
`othernames` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `userlogin`
--

INSERT INTO `userlogin` (`id`, `staffid`, `status`, `password`, `surname`, `othernames`)


VALUES
(0, '005', 'CID', '8cb2237d0679ca88db6464eac60da96345513964', 'Osman ', 'Wumpini'),
(0, '1111', 'Admin', 'f865b53623b121fd34ee5426c792e5c33af8c227', 'Osman', 'Yahaya'),
(0, '112', 'NCO', '7c4a8d09ca3762af61e59520943dc26494f8941b', 'Danaa', 'Shafaw'),
(0, '113', 'CID', '7110eda4d09e062aa5e4a390b0a572ac0d2c0220', 'Kobi', 'Adjei'),
(0, '222', 'NCO', '7110eda4d09e062aa5e4a390b0a572ac0d2c0220', 'Yahaya', 'Eben'),
(0, '333', 'NCO', '7110eda4d09e062aa5e4a390b0a572ac0d2c0220', 'Staff', 'Staff'),
(0, '4444', 'NCO', '8cb2237d0679ca88db6464eac60da96345513964', 'Yahaya', 'Osman'),
(0, 'cid', 'CID', '7110eda4d09e062aa5e4a390b0a572ac0d2c0220', 'Staff ', 'Staff');

--

Dept of AIML, CBIT, Kolar. 31 2023-24


Criminal Records Management Systems Implementation

-- Indexes for dumped tables


--

--
-- Indexes for table `case_table`
--
ALTER TABLE `case_table`
ADD PRIMARY KEY (`caseid`);

--
-- Indexes for table `complainant`
--
ALTER TABLE `complainant`
ADD PRIMARY KEY (`case_id`);

--
-- Indexes for table `crime_type`
--
ALTER TABLE `crime_type`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `investigation`
--
ALTER TABLE `investigation`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `userlogin`

Dept of AIML, CBIT, Kolar. 32 2023-24


Criminal Records Management Systems Implementation

--
ALTER TABLE `userlogin`
ADD PRIMARY KEY (`staffid`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `case_table`
--
ALTER TABLE `case_table`
MODIFY `caseid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59;

--
-- AUTO_INCREMENT for table `crime_type`
--
ALTER TABLE `crime_type`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `investigation`

ALTER TABLE `investigation`


MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56;
COMMIT;

Dept of AIML, CBIT, Kolar. 33 2023-24


CHAPTER 7
CONCLUSION AND FEATURE ENHANCEMENTS
8.1 CONCLUSION:
This research has been presented an implementation of Online Crime Record Management
System, which is a centralized database that is used to store the case details record. The aim of this
work was to provide reliable web-based system. Using this application, we can retrieve history
with a single click. Thus, processing information will be faster. Technology is introducing new
innovations day by day, thus reducing the time required to do things. It guarantees accurate
maintenance of user details. It easily reduces the Search task and thus reduces the human effort
and increases accuracy speed.

8.2 FEATURE ENHANCEMENTS:

• Can add Officers photos.


• Mobile Application Support.
• Geospatial Analysis and Mapping.
• Can add Case detail images.
• Enhanced Security Measures.
• User Training and Support.

34
REFERENCES
[1] Alyaa Hisham, Aya Ahmed, Mariam Khaled, Nour Abdullatif, Sally Kassem (2021).
"Modelling of Crime Record Management System Using Unified Modeling
Language".
[2] Gali Pujitha, Saumya Shekhar, Samyuktha Murali, Sahana M (Year not specified).
“Criminal Report Management System” - SRM Institute of Science and Technology,
Chennai, Tamil Nadu, India.
[3] Ernest Onuiri, Awodele Oludele, Olaore Olufunmike A, Sowunmi Oluwawunmi O
(2015). “A REAL-TIME CRIME RECORDS MANAGEMENT SYSTEM FOR
NATIONAL SECURITY AGENCIES” - Rutgers, The State University of New
Jersey; Babcock University.
[4] Ishwarlal Hingorani, Rushabh Khara, Deepika Pomendkar, Nataasha Raul (2020).
“Police Complaint Management System using Blockchain Technology” - Sardar Patel
Institute of Technology.
[5] Book : Ramez Elmasri and Shamkant B Navanthe, “Fundamentals of Database
Systems” 7th Edition,2017, Pearson.
[6] Book : Ramakrishnan and Gehrke, “Database Management Systems” 3rd Edition,
2014, McGraw Hill.

35
APPENDIX A

ACRONYMS AND SYNONYMS

ER : Entity Relationship

SR : Software requirements

SQL : Structured Query Language

DBMS : Database Management System

PHP : Hypertext Preprocessor (earlier called, Personal Home Page)

36
APPENDIX B
SNAPSHOTS

Fig B1: Login Page

Fig B2: Home page

37
Criminal Records Management System Snapshots

Fig B3: Add staff

Fig B4: View staf

Dept of AIML, CBIT, Kolar. 38 2023-24


Criminal Records Management System Snapshots

Fig B5: View cases

Fig B6: Case details

Dept of AIML, CBIT, Kolar. 39 2023-24


Criminal Records Management System Snapshots

Fig B7: Add new Case

Fig B8: Manage cases

Dept of AIML, CBIT, Kolar. 40 2023-24

You might also like