Project Report CB

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 34

Crime Report System Introduction

CHAPTER 1
INTRODUCTION

Crime reporting system is a system used to report crimes. This project is mainly useful for police
Departments. This system will help to manage all the activities in a police Department using
computers. Currently all the works are done manually. By computerizing all the activities inside a
police Department can be managed easily and effectively.

The police Department in the Country are, today, virtually unconnected islands. Thanks to
telephones and wireless and especially thanks to mobile telephones, there is a voice connectivity
between the police Department and senior police officers, but that is about all Now there is a system
under which one police department can talk to another directly, there the crime records can be
accessed and share data by a Department House Officer, except the manual records relating to that
police Department.

The goal of the system are to facilitate collection, storage, retrieval, analysis and sharing of data and
information at the police department and between the police department and the Head Quarters ,and
to provide a online platform for the victims or the complainer to file complaint .

1.1 DBMS
A database management system (DBMS) is system software for creating and
managingdatabase. The DBMS provides user and programmers with a systematic way to
create,retrieve, update and manage data. A DBMS generally manipulates the data itself, the data
format, field names, record structure and file structure. It also defines rules to validate and
manipulate this data.

A DBMS relieves users of framing programs for data maintenance. Fourth-generation query
languages, such as SQL, are used along with the DBMS package to interact with a database.

Dept of CSE, Dr. TTIT, KGF 1 2020-21


Crime Report System Introduction

Some other DBMS examples include:


 MySQL
 SQL Server
 Oracle
 Dbase
 FoxPro
A database management system receives instruction from a database administrator (DBA)
and accordingly instructs the system to make the necessary changes. These commands can be to
load, retrieve or modify existing data from the system.

A DBMS always provides data independence. Any change in storage mechanism and
formats are performed without modifying the entire application. There are four main types of
database organization:

Fig 1.1: DBMS

1.2 MYSQL
MySQL is an Oracle-backed open source relational database management system
(RDBMS)based on Structured Query Language (SQL). MySQL runs on virtually all platforms,
including Linux, UNIX and Windows. Although it can be used in a wide range of applications,
MySQL is most often associated with web applications and online publishing.

MySQL is an important component of an open source enterprise stack called LAMP. LAMP


is a web development platform that uses Linux as the operating system, Apache as the web server.

Dept of CSE, Dr. TTIT, KGF 2020-21


2
Crime Report System Introduction

MySQL has the relational database management system and PHP as the object-oriented scripting
language. (Sometimes Perl or Python is used instead of PHP.)

Originally conceived by the Swedish company MySQL AB, MySQL was acquired by Sun
Microsystems in 2008 and then by Oracle when it bought Sun in 2010. Developers can use

MySQL under the GNU General Public License (GPL), but enterprises must obtain a
commercial license from Oracle.

Today, MySQL is the RDBMS behind many of the top websites in the world and countless
corporate and consumer-facing web-based applications, including Facebook, Twitter and
YouTube.

Fig 1.2: MYSQL


1.3 HTML

HTML is the standard markup language for creating Web pages. Hypertext Markup
Language (HTML) is the standard markup language for documents designed to be displayed in
a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS)
and scripting languages such as JavaScript.

Dept of CSE, Dr. TTIT, KGF 2020-21


3
Crime Report System Introduction

Web browsers receive HTML documents from a web server or from local storage and render the
documents into multimedia web pages. HTML describes the structure of a web
page semantically and originally included cues for the appearance of the document.
 HTML stands for Hyper Text Markup Language
 HTML describes the structure of a Web page
 HTML consists of a series of elements
 HTML elements tell the browser how to display the content
 HTML elements are represented by tags
 HTML tags label pieces of content such as "heading", "paragraph", "table", and so on
 Browsers do not display the HTML tags, but use them to render the content of the page

Table 1.1: HTML TAGS


1.4 PHP
PHP: Hypertext Pre processor (or simply PHP) is a general-purpose programming
language originally designed for web development. It was originally created by ledorf in 1994 the
PHP reference implementation is now produced by The PHP Group.
Dept of CSE, Dr. TTIT, KGF 2020-21
4
Crime Report System Introduction

PHP code may be executed with a command line interface (CLI), embedded into HTML code, or
used in combination with various web template systems, web content management systems,
and web frameworks. PHP code is usually processed by a PHP interpreter implemented as
a module in a web server or as a Common Gateway Interface (CGI) executable.

The web server outputs the results of the interpreted and executed PHP code, which may be any
type of data, such as generated HTML code or binary image data. PHP can be used for many
programming tasks outside of the web context, such as standalone graphical applications and
robotic drone control.

The standard PHP interpreter, powered by the Zend Engine, is free software released under
the PHP License. PHP has been widely ported and can be deployed on most web servers on almost
every operating system and platform, free of charge.

The PHP language evolved without a written formal specification or standard until 2014, with the
original implementation acting as the de facto standard which other implementations aimed to
follow. Since 2014, work has gone on to create a formal PHP specification.
 PHP can generate dynamic page content
 PHP can create, open, read, write, delete, and close files on the server
 PHP can collect form data
 PHP can send and receive cookies
 PHP can add, delete, modify data in your database
 PHP can be used to control user-access
 PHP can encrypt data

PHP is a server side scripting language that is embedded in HTML. It is used to manage
dynamic content, databases, session tracking, even build entire e-commerce sites. It is integrated
with a number of popular databases, including MySQL, PostgreSQL, Oracle, Sybase, Informix,
and Microsoft SQL Server.

Dept of CSE, Dr. TTIT, KGF 2020-21


5
Crime Report System Introduction

PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4 added
support for Java and distributed object architectures (COM and CORBA), making n-tier
development a possibility for the first time.
 PHP is forgiving: PHP language tries to be as forgiving as possible.
 PHP Syntax is C-Like.

1.5 XAMPP
XAMPP is open source software developed by Apache friends. XAMPP software package
contains Apache distributions for Apache server, MariaDB, PHP, and Perl. And it is basically a
local host or a local server.

This local server works on your own desktop or laptop computer. The use of XAMPP is to
test the clients or your website before uploading it to the remote web server. This XAMPP server
software gives you the suitable environment for testing MYSQL, PHP, Apache and Perl projects
on the local computer.

The XAMPP installation process is very simple and fast. Once XAMPP is installed on your
local computer it acts as a local server or localhost. You can test the websites before uploading it
to the remote web server. This XAMPP server software gives you a suitable environment for
testing MYSQL, PHP, Apache and Perl applications on a local computer.  

XAMPP's ease of deployment means a WAMP or LAMP stack can be installed quickly and


simply on an operating system by a developer. With the advantage of common add-in applications
such as WordPress and Joomla! can also be installed with similar ease using Bitnami.

Dept of CSE, Dr. TTIT, KGF 2020-21


6
Crime Report System Introduction

Fig 1.3: XAMPP

Dept of CSE, Dr. TTIT, KGF 2020-21


7
Food Ordering System Requirements Specification

CHAPTER 2
REQUIREMENTS SPECIFICATION

2.1 HARDWARE REQUIREMENTS:

 Minimum 350MB Hard Disk space for installation


 4GB HD space required for a typical live system with 1000-2000 events
 Recommended minimum CPU - Pentium 4, 3.2GHz
 Recommended 1GB RAM for a Central Server with 3 Node
 1024*768 Resolution color monitor

2.2 SOFTWARE REQUIREMENTS:

 Operating System: Windows


 Backend: MYSQL
 Coding Language: PHP
 Frontend: HTML
 XAMPP web server

All the types of software automatically configured inside operating system after installation it has
PHP, MYSQL, Apache and operating system base configuration file.

Dept of CSE, Dr. TTIT, KGF 2020-21


8
Crime Report Management Implementation

CHAPTER 3
DESIGN

3.1 ENTITY RELATIONSHIP DIAGRAM:


An Entity relationship diagram shows the relationships of entity sets stored in databases. An
entity in this context is an object, a component of data. An entity set is a collection of similar
entities. These entities can have attributes that define its properties
.
An entity relationship diagram is a snapshot of data structure .An entity relationship diagram
shows entities (tables) in a database and relationships between tables within that database. For a
good database design it is essential to have an entity relationship diagram.

There are three basic elements in entity relationship diagram


 Entities are the things for which we want to store information. An entity is a person, place,
thing or event.
 Attributes are the data we want to collect for an entity.
 Relationships describe the relations between the entities.
An entity-relationship diagram (ERD) is a data modeling technique that graphically illustrates
an information system’s entities and the relationships between those entities. An entity-
relationship diagram is a conceptual and representational model of data used to represent the entity
framework infrastructure.

The elements of an entity-relationship diagram are:


 Entities
 Relationships
 Attributes
Steps involved in creating an entity-relationship diagram include:
 Identifying and defining the entities
 Determining all interactions between the entities
 Analyzing the nature of interactions/determining the cardinality of the relationship
 Creating the entity-relationship diagram

Dept of CSE, Dr. TTIT, KGF 2020-21


9
Crime Report Management Implementation

Crime Report System entities and their attributes:


 Complaint entity: Attributes of complaint are c_id, a_no, location, type_crime, d_o_c,
description, inc_status, pol_status, p_id.
 head entity: Attributes of head are h_id, h_pass.
 Police entity: Attributes of police are p_name, p-id, spec, location, p_pass
 User entity: Attributes of user are u_name, u_id, u_pass, u_address,a_no,gen,mob.
 Update_case entity: Attributes of update_case are c_id, d_o_u,case_update.

Description of Crime Report System Database:


 The operator first logs into the system by entering username and password.
 Each entity contains primary key and unique keys.
 There is a one-to-one and one-to-many relationship available between complaint, head
office, police, user details.
 Depending on the work the user/operator select the screens from main menu screen.
 Keeps track of the progress of cases , case status , case updates.
 Keeps check on the status of the all crimes that are posted.

Dept of CSE, Dr. TTIT, KGF 2020-21


10
Crime Report Management Implementation

ER DIAGRAM

USER-ID

RESULT
VALIDATE

PASSWORD

NAME

MAINTAI AUTHORIZE
ADMIN N D

USER writes complain

U ID

U_name
U_NAM C_id
E
ADDRES
S description
DO
B GENDE
R

Dept of CSE, Dr. TTIT, KGF 11 2020-21


Crime Report Management Implementation

3.2 SCHEMA DIAGRAM

Admin

Name Password

Maintain

Name c_id

User

U_id u_name DOB Gender Address

Validate

U_id Result

Complain

U_name c_id description

Dept of CSE, Dr. TTIT, KGF 2020-21


12
Crime Report Management Implementation

3.3 TABLES:
A table is a collection of related data held in a structured format within a database. It
consists of columns, and rows. In relational databases, and flat file databases, a table is a set of
data elements (values) using a model of vertical columns (identifiable by name) and
horizontal rows, the cell being the unit where a row and column intersect. A table has a specified
number of columns, but can have any number of rows. 
Each row in a table is identified by one or more values appearing in a particular column
subset. The columns subset which uniquely identifies a row is called the primary key.
"Table" is another term for "relation"; although there is the difference in that a table is
usually a multistep (bag) of rows where a relation is a set and does not allow duplicates. Besides
the actual data rows, tables generally have associated with them some metadata, such
as constraints on the table or on the values within particular columns.
The data in a table does not have to be physically stored in the database. Views also function
as relational tables, but their data are calculated at query time.
A table can be considered as a convenient representation of a relation. A table is perceived
atwo-dimensional structure composed of rows and columns .The order of rows and columns is
immaterial to the DBMS.
The description of all the tables are given below

MYSQL> desc Complain;

Dept of CSE, Dr. TTIT, KGF 2020-21


Crime Report Management Implementation

13

Dept of CSE, Dr. TTIT, KGF 2020-21


Crime Report Management Implementation

Table 1.2: Complain


MYSQL> desc Head;
Table 1.3: Head
MYSQL> desc police;

Table 1.4: Police


MYSQL> desc User ;

Table 1.5:User
MYSQL> desc update_case;

Dept of CSE, Dr. TTIT, KGF 2020-21


Crime Report Management Implementation

Table 1.6: Update_case

CHAPTER 4
14
IMPLEMENTATION
4.1 DESCRIPTION:
Implementation is the stage in the project where the theoretical design is turned into a
working system and giving confidence on the new system for the users that it will work efficiently
and effectively. It involves careful planning, investigation of the current system and its constraints
on implementation, design of methods to achieve the change over, an evaluation of change over
methods. Apart from planning major task of preparing the implementation are education and
training of users. The implementation process begins with preparing a plan for the implementation
of the system. According to this plan, the activities are to be carried out, discussions made
regarding the equipment and resources and the additional equipment has to be acquired to
implement the new system. In network backup system no additional resources are needed.

Implementation is the final and the most important phase. the most critical stage in
achieving a successful new system is giving the users confidence that the new system will work
and be effective. The system can be implemented only after thorough testing is done and if it is
found to be working according to the specification. This method also offers the greatest security
since the old system can take over if the errors are found or inability to handle certain type of
transactions while using the new system.

The system should have a login. A login box should appear when the system is invoked. The
system is also useful which also keeps track of Account details of buyers. The real of World Wide
Web have spread across millions of household, so naturally, Internet has become by far the best
platform for real estate marketing today.

4.1.1. USER TRAINING:


After the system is implemented successfully, training of the users is one of the most
important subtasks of the developer. For this purpose user manuals are prepared and handled over
to the user to operate the developed system. Both the hardware and software securities are made to

Dept of CSE, Dr. TTIT, KGF 2020-21

15
1 1 1
Crime Report Management Implementation

run developed systems successfully in future. In order to put new application system into use, the
following activities were taken care of:
 Preparation of user and system documentation
 Conducting user training with demo and hands on
 Test run for some period to ensure smooth switching over the system.
The users are trained to use the newly developed functions. User manuals describing the
procedure for using the functions listed on menu are circulated to all the users. It is confirmed that
the system is implemented up to users need and expectations.

4.1.2. SECURITY AND MAINTENANCE


Maintenance involves the software industry captive, typing up system resources. It means
restoring something to its original condition. Maintenance follows conversion to the extent that
changes are necessary to maintain satisfactory operation relative to change in the users
environment. Maintenance often includes minor enhancement or correction to problems that
surface in the systems operation. Maintenance is also done base on fixing the problems reported,
changing the interface with other software or hardware enhancing the software.

Any system developed should be secured an protected against possible hazards. Security
measures are provided to prevent unauthorized access of the database at various levels. An
uninterrupted power supply should be so that the power failure or voltage fluctuations will not
erase the data in the files.

Password protection and simple procedures to prevent the unauthorized access are provided
to the users. The system allows the user to enter the system only through proper username and
password.

4.2 CODING:
LOGIN PAGE CODE:
<html>
<head>
<title>Official Login</title>

Dept of CSE, Dr. TTIT, KGF 2020-21

1
Crime Report Management Implementation

<link rel="stylesheet" type="text/css"


href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
16
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-
awesome/4.4.0/css/font-awesome.min.css">
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic"
rel="stylesheet" type="text/css">
1
<link rel="stylesheet" type="text/css" href="official_login.css">
</head>
<body>

<nav class="navbar navbar-default navbar-fixed-top">


<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="home.php"><b>Crime Portal</b></a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="official_login.php">Official Login</a></li>
</ul>
</div>
</div>
</nav>

Dept of CSE, Dr. TTIT, KGF 2020-21


Crime Report Management Implementation

<div class="container">
<hr> <br><br> <br><br> <br><br> <br><br> <br><br>
<div class="row text-center"> 17

<div class="col-md-4 col-sm-12 hero-feature">


<div class="thumbnail">
<div class="caption">
<h3>Police Login</h3>
<p>
<a href="policelogin.php" class="btn btn-primary">Police Login</a>
</p>
</div>
</div>
</div>

<div class="col-md-4 col-sm-12 hero-feature">


<div class="thumbnail">
<div class="caption">
<h3>Incharge Login</h3>
<p>
<a href="inchargelogin.php" class="btn btn-primary">Incharge Login</a>
</p>
</div>
</div>
</div>

<div class="col-md-4 col-sm-12 hero-feature">


<div class="thumbnail">
<div class="caption">
<h3>HQ Login</h3>
<p>
<a href="headlogin.php" class="btn btn-primary">HQ Login</a>

Dept of CSE, Dr. TTIT, KGF 2020-21


Crime Report Management Implementation

</p>
</div>
</div> 18
</div>

</div>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script type="text/javascript"
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>

OFFICIAL LOGIN CODE:


<!DOCTYPE html>
<html>
<head>
<title>Official Login</title>
<link rel="stylesheet" type="text/css"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-
awesome/4.4.0/css/font-awesome.min.css">
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic"
rel="stylesheet" type="text/css">

<link rel="stylesheet" type="text/css" href="official_login.css">


</head>
<body>

<nav class="navbar navbar-default navbar-fixed-top">


<div class="container">
<div class="navbar-header">

Dept of CSE, Dr. TTIT, KGF 2020-21

19
Crime Report Management Implementation

<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"


aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="home.php"><b>Crime Portal</b></a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="official_login.php">Official Login</a></li>
</ul>
</div>
</div>
</nav>

<div class="container">
<hr> <br><br> <br><br> <br><br> <br><br> <br><br>
<div class="row text-center">

<div class="col-md-4 col-sm-12 hero-feature">


<div class="thumbnail">
<div class="caption">
<h3>Police Login</h3>
<p>
<a href="policelogin.php" class="btn btn-primary">Police Login</a>
</p>
</div>
</div>
</div>

Dept of CSE, Dr. TTIT, KGF 20 2020-21


Crime Report Management Implementation

<div class="col-md-4 col-sm-12 hero-feature">


<div class="thumbnail">
<div class="caption">
<h3>Incharge Login</h3>
<p>
<a href="inchargelogin.php" class="btn btn-primary">Incharge Login</a>
</p>
</div>
</div>
</div>

<div class="col-md-4 col-sm-12 hero-feature">


<div class="thumbnail">
<div class="caption">
<h3>HQ Login</h3>
<p>
<a href="headlogin.php" class="btn btn-primary">HQ Login</a>
</p>
</div>
</div>
</div>

</div>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script type="text/javascript"
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>

COMPLAIN PAGE
<!DOCTYPE html>

Dept of CSE, Dr. TTIT, KGF 21 2020-21


Crime Report Management Implementation

<html>
<head>

<?php
session_start();
if(!isset($_SESSION['x']))
header("location:headlogin.php");
$conn=mysqli_connect("localhost","root","","crime_portal");
if(!$conn)
{
die("could not connect".mysqli_error());
}
mysqli_select_db("crime_portal",$conn);

$c_id=$_SESSION['cid'];

$query="select c_id,description,inc_status,pol_status,location from complaint where c_id='$c_id'";


$result=mysqli_query($conn,$query);
$res2=mysqli_query($conn,"select d_o_u,case_update from update_case where c_id='$c_id'");
?>
<title>Case Details</title>
<link rel="stylesheet" type="text/css"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-
awesome/4.4.0/css/font-awesome.min.css">
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic"
rel="stylesheet" type="text/css">

</head>
<body >
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">

Dept of CSE, Dr. TTIT, KGF 22 2020-21


Crime Report Management Implementation

<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="home.php"><b>Crime Portal</b></a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li ><a href="headHome.php">View Complaints</a></li>
<li class="active" ><a href="head_case_details.php">Complaints Details</a></li>
<li><a href="h_logout.php">Logout &nbsp <i class="fa fa-sign-out" aria-
hidden="true"></i></a></li>
</ul>
</div>
</div>
</nav>
<div style="padding:50px; margin-top:10px;">
<table class="table table-bordered">
<thead class="thead-dark" style="background-color: black; color: white;">
<tr>
<th scope="col">Complain Id</th>
<th scope="col">Description</th>
<th scope="col">Police Status</th>
<th scope="col">Case Status</th>
<th scope="col">Location of Crime</th>
</tr>
</thead>
<?php

Dept of CSE, Dr. TTIT, KGF 23 2020-21


Crime Report Management Implementation

while($rows=mysqli_fetch_assoc($result)){
?>
<tbody style="background-color: white; color: black;">
<tr>
<td><?php echo $rows['c_id']; ?></td>
<td><?php echo $rows['description']; ?></td>
<td><?php echo $rows['inc_status']; ?></td>
<td><?php echo $rows['pol_status']; ?></td>
<td><?php echo $rows['location']; ?></td>
</tr>
</tbody>
<?php
}
?>
</table>
</div>
<div style="padding:50px;">
<table class="table table-bordered">
<thead class="thead-dark" style="background-color: black; color: white;">
<tr>
<th scope="col">Date Of Update</th>
<th scope="col">Case Update</th>
</tr>
</thead>
<?php
while($rows1=mysqli_fetch_assoc($res2)){
?>
<tbody style="background-color: white; color: black;">
<tr>
<td><?php echo $rows1['d_o_u']; ?></td>
<td><?php echo $rows1['case_update']; ?></td>

Dept of CSE, Dr. TTIT, KGF 24 2020-21


Crime Report Management Implementation

</tr>
</tbody>
<?php
}
?>

</table>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script type="text/javascript"
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>

4.3 TRIGGERS
A trigger is a stored procedure in database which automatically invokes whenever a special event
in the database occurs. For example, a trigger can be invoked when a row is inserted into a specified
table or when certain table columns are being updated.

CREATE TRIGGER mus BEFORE INSERT


ON product FOR EACH ROW
INSERT INTO logs VALUES (null, NEW.productid, ‘inserted’, NOW());

CREATE TRIGGER mus BEFORE UPDATE


ON product FOR EACH ROW
INSERT INTO logs VALUES (null, NEW.productid, ‘updated’, NOW());

CREATE TRIGGER mus BEFORE DELETE


ON product FOR EACH ROW
INSERT INTO logs VALUES (null, OLD.productid, ‘deleted’, NOW());

Dept of CSE, Dr. TTIT, KGF 25 2020-21


Crime Report Management Implementation

Fig 1.4: TRIGGERS

4.4 STORED PROCEDURE


A stored procedure is a set of Structured Query Language (SQL) statements with an
assigned name, which are stored in a relational database management system as a group, so it can
be reused and shared by multiple programs.

Stored procedures can access or modify data in a database, but it is not tied to a specific
database or object, which offers a number of advantages.

A stored procedure provides an important layer of security between the user interface and


the database. It supports security through data access controls because end users may enter or
change data, but do not write procedures. A stored procedure preserves data integrity because
information is entered in a consistent manner. It improves productivity because statements in a
stored procedure only must be written once.

Stored procedure in SQL


Stored procedures in SQL Server can accept input parameters and return multiple values of
output parameters; in SQL Server, stored procedures program statements to perform operations in
the database and return a status value to a calling procedure or batch.

User-defined procedures are created in a user-defined database or in all system databases,


except for when a read-only (resource database) is used.  They are developed in Transact-SQL (T-

Dept of CSE, Dr. TTIT, KGF 2020-21


26
Crime Report Management Implementation

SQL) or a reference to Microsoft. Temporary procedures are stored in tempdb, and there are two
types of temporary procedures: local and global. Local procedures are only visible to the current
user connection, while global procedures are visible to any user after they are created. They appear
in the SYS schema of each system, as well as in a user-

defined database.

Fig 1.5: STORED PROCEDURES

Dept of CSE, Dr. TTIT, KGF 27 2020-21


Crime Report Management Snapshots of output

CHAPTER 5
SNAPSHOTS OF OUTPUT
Login page

Complaint page

Dept of CSE, Dr. TTIT, KGF 28 2020-21


Crime Report Management Snapshots of output

OFFICIAL Login page

Police login page

Dept of CSE, Dr. TTIT, KGF 29 2020-21


Crime Report Management Snapshots of output

Incharge login

HQ Login

Dept of CSE, Dr. TTIT, KGF 2020-21


30
Crime Report Management Snapshots of output

Complaint status page

Dept of CSE, Dr. TTIT, KGF 31 2020-21


Crime Report Management Bibliography

CHAPTER 6
CONCLUSION

To conclude the description about the project: The project developed using PHP and
MYSQL and the analysis of the existing system, with flexibility for future enhancement. This
application makes works easy and faster than current application, all the data will be saved in the
database. So the administrator can view all the data on time. This will stores all the records
permanently and also gives the raises and deviations in the status of the restaurant in the markets.

Any cancellation of orders are also updated, all the expenses per day will updated in the
database daily. Also keeps the record of food items prepared and the sales of food and also the
record of balance food. The tasks that now are carried out manually will be able to do with the
system in more easy way. That will reduce the damages that can happen to the data unexpectedly.
The calculations that are done manually will able to be done through the system to get more
accurate results.

We had improved the efficiency of the whole management system, thus overcome the
drawbacks of the existing offline system by applying online record keeping system with the
support of this designated web application

Dept of CSE, Dr. TTIT, KGF 32 2020-21


Crime Report Management Bibliography

BIBLIOGRAPHY

Web sites:

www.google.co.in
www.wikipedia.com.
www.project- management -basics.com
en.wikipedia.org/wiki/PHP
www.apache.org/
en.wikipedia.org/wiki/XAMPP

Dept of CSE, Dr. TTIT, KGF 33 2020-21

You might also like