Dbmsfinal
Dbmsfinal
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
1._________________ ____________________
2._________________ ____________________
ABSTRACT
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 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 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
REFERENCES 35
iv
LIST OF FIGURES:
FIGURE NO. FIGURE NAME PAGE NO.
Fig 5.1 Use case Diagram 9
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.
● 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.
SQL Command
All DDL commands are auto-committed. That means it saves all the changes
permanently in the database.
Command Description
DML commands are not auto committed. It means changes are not permanent to
database, they can be rolled back.
Command Description
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
Command Description
Aggregate Functions
Count, Sum, Avg, Min, Max are aggregate functions used in DBMS.
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.
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.
2.2 Objectives
• 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.
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.
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:
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.
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.
• 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.
• Programming Languages: HTML, CSS, JavaScript, jQuery for the user interface;
PHP for server-side scripting3.
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.
9
Criminal Records Management System Design Phase
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.
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:
<html lang="">
<?php
session_start();
include('header.php');
include('dbconnect.php');
if(isset($_SESSION['staffid']
if($_SESSION['role']=='Admin'){
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-heading">
</div>
<div class="panel-body">
<div class="form-group">
<div class="col-sm-10">
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
</div>
</div>
<div class="form-group">
</button>
</div>
</div>
<div class="form-group">
<?php
if(isset($_SESSION['error'])){
echo "
".$_SESSION['error']."
</span>
unset($_SESSION['error']);
?>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-3">
</div>
</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'){
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-heading">
</div>
<div class="panel-body">
<div class="form-group">
<div class="col-sm-10">
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
</div>
</div>
<div class="form-group">
</button>
</div>
</div>
<div class="form-group">
<?php
if(isset($_SESSION['error'])){
echo "
".$_SESSION['error']."
</span>
";
unset($_SESSION['error']);
?>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-3">
</div>
</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'];
$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">
<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
});
$('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
</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>
$('#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
--
-- --------------------------------------------------------
--
-- Table structure for table `case_table`
--
--
-- Dumping data for table `case_table`
--
('210728102', '', 57, '2021-07-28 13:14:53', '333', 'Assault', '', 'cid', '0000-00-00', 'Here is
anotehracse');
-- --------------------------------------------------------
--
-- Table structure for table `complainant`
--
--
-- Dumping data for table `complainant`
('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`
--
--
-- Dumping data for table `crime_type`
--
(5, 'Defilement'),
(6, 'Robbing'),
(7, 'Fraud'),
(8, 'Others');
-- --------------------------------------------------------
--
-- Table structure for table `investigation`
--
--
-- Dumping data for table `investigation`
-- --------------------------------------------------------
--
-- Table structure for table `userlogin`
--
--
-- Dumping data for table `userlogin`
--
--
--
-- 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`
--
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`
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
ER : Entity Relationship
SR : Software requirements
36
APPENDIX B
SNAPSHOTS
37
Criminal Records Management System Snapshots