Crime
Crime
CHAPTER 1
INTRODUCTION
1.1 Overview
The Crime Record Database Management System seeks to solve these challenges by:
Replacing paper-based records with a digital database.
Allowing officers to register, update, and monitor FIRs through a secure portal.
Enabling real-time tracking of case status and associated individuals.
Providing an admin dashboard to manage officer activity and ensure system integrity.
Facilitating better communication, transparency, and accountability within the department.
1.3 Objectives
Key Objectives:
Security and Privacy: To ensure that only authorized personnel have access to sensitive
criminal records, and that all data is handled with confidentiality.
Key Features:
The CRDMS supports hierarchical access control, where different user roles (Admin,
Officer) have specific access rights. Administrators can manage officer records, reset
credentials, and monitor system usage, while Officers can file and manage FIRs. This
ensures that sensitive data is only accessible to users with the appropriate permissions.
Officers can digitally enter detailed FIRs including crime type, date, location, suspect
information, and a description of events. Each FIR can be linked to victims, accused
individuals, and witnesses. This digital filing process minimizes paperwork, avoids loss of
information, and provides a searchable archive of criminal cases.
The application includes a login system with encrypted passwords and user session
tracking. Every login activity is logged with timestamps, allowing administrators to
monitor officer usage patterns and ensure accountability.
The backend is powered by a normalized relational database (Oracle), which ensures that
data is stored efficiently without redundancy. Tables are interconnected using foreign keys
to maintain data integrity, and queries are optimized for fast performance and accuracy.
The user interface, built with HTML, CSS, JavaScript, and Bootstrap, is designed to be
user-friendly and responsive. Whether accessing from a desktop or mobile device, the
system offers easy navigation, form-based data entry, and real-time validation, making it
usable even by non-technical staff.
The system allows law enforcement personnel to file reports and update cases in real-time,
ensuring that the most current information is available for decision-making and
investigations. Search and filter options allow users to locate specific FIRs, victims, or
accused individuals quickly.
Every action performed in the system can be tracked, including data additions, edits, and
deletions. This ensures a complete audit trail, which is essential for transparency and legal
compliance.
This system is designed for deployment within police stations or law enforcement
agencies. It is intended for use by authenticated officers and admins, and it supports the
following key features:
Chapter 2
The back end of the Crime Record Database Management System (CRDMS) is
implemented using Python with the Flask web framework. Flask is a lightweight, flexible,
and efficient framework ideal for building secure web applications. It handles server-side
operations such as routing, user authentication, database interactions, and form handling.
In CRDMS, Python scripts handle operations like login validation for police officers and
administrators, FIR registration, data retrieval, and record updates. All these operations
interact with the Oracle Database using the OracleDB as cx_Oracle library, ensuring
smooth communication between the front end and the database.
The system ensures data validation and implements security measures such as password
hashing and session management to prevent unauthorized access. Flask’s modular
structure allows clear separation of concerns, making the codebase organized,
maintainable, and scalable for future enhancements.
The Entity-Relationship (ER) model for the Crime Record Database Management System
represents the key entities involved in crime management and their relationships. The main
goal is to capture comprehensive and relational data concerning crimes, officers, victims,
accused individuals, and FIRs.
Entities:
1. Officer
Officer_ID (PK)
Name
Badge_number
Rank
Station
Contact
2. Admin
Admin_ID (PK)
Username
Password
3. Victim
Victim_ID (PK)
Name
Age
Gender
Address
Contact
4. Accused
Accused_ID (PK)
Name
Age
Gender
Address
Criminal_Record (Yes/No)
6. FIR
FIR_ID (PK)
Date_Filed
Crime_Type
Description
Location
Officer_ID (FK)
Victim_ID (FK)
Accused_ID (FK)
Status (Pending/Closed)
Relationships:
An Officer can handle multiple FIRs.
Each FIR is filed against one or more Accused and involves one or more
victims.
An Admin can view, update, or delete records but does not file FIRs.
The conceptual schema is mapped to a logical schema, converting entities into relational
tables, and relationships into foreign keys.
Relational Schema:
FIR.Officer_ID → Officer.Officer_ID
FIR.Victim_ID → Victim.Victim_ID
FIR.Accused_ID → Accused.Accused_ID
ER Diagram
Flow Chart
ER Mapping
2.4 Normalization
Observation:
This structure follows 1NF because each field cannot be divided into multiple values, and
it is atomic.
It is already in 1NF.
All non-key attributes are fully functionally dependent on the entire primary key
(i.e., no partial dependency).
Victim Table
Officer Table
Officer_ID Officer_Name
1 Inspector Raj
2 Inspector Meena
Observation:
By splitting the table, we ensure no attribute is dependent on only a part of a composite
key.
It is in 2NF.
There is no transitive dependency (i.e., non-key attributes do not depend on other
non-key attributes).
Department Table:
Department_ID Department_Name
Observation:
Now, officer names do not determine department names. Instead, departments are stored
separately and linked via identifiers, avoiding transitive dependencies.
Final Result:
CHAPTER 3
FRONT END
The frontend is designed with user convenience in mind, prioritizing a straightforward and
intuitive layout that enables police officers and administrators to navigate easily between
different functionalities. Forms and data tables are organized logically to support efficient
workflows, such as filing new FIRs or updating case information. Additionally, the use of
semantic HTML5 elements enhances code readability and accessibility, contributing to a
more maintainable and scalable frontend codebase.
CSS (Cascading Style Sheets) is applied extensively throughout CRDMS to define the
visual style and enhance the usability of the system’s web pages. The project incorporates
Bootstrap, a popular CSS framework, to implement responsive design principles and
consistent styling across all pages. Bootstrap provides pre-defined classes and components
such as buttons, forms, navigation bars, and grids, which help maintain uniformity in look
and feel while reducing development time. By using Bootstrap alongside custom CSS, the
application achieves a clean, modern, and user-friendly interface that works smoothly
across different screen sizes and devices. The use of CSS ensures that the layout is well-
structured, readable, and visually appealing to users including police officers and
administrators.
Bootstrap’s responsive grid system plays a vital role in making the application mobile-
friendly, allowing the interface to adapt seamlessly to various screen sizes ranging from
desktop monitors to tablets and smartphones. This responsiveness is crucial for users who
may need to access the system remotely or while on patrol, ensuring continuous
availability of important crime data and case management tools.
Furthermore, CSS3 animations and transitions are used subtly to improve user experience
by providing visual feedback on interactive elements such as buttons and form inputs.
These enhancements make the interface feel more dynamic and engaging without
distracting from its core functionality.
The integration between the frontend and backend of the CRDMS is handled by the Flask
framework, which serves as the web application’s core server. Flask manages HTTP
requests submitted through HTML forms and URLs, processing these inputs via Python
functions that interact with the Oracle database using the cx_Oracle library. After
performing operations such as creating, updating, or retrieving crime records, Flask
dynamically renders updated HTML pages by injecting database results into templates
with Jinja2 syntax. This mechanism allows for smooth, real-time data exchange and
presentation, enabling users to efficiently perform tasks such as logging FIRs, tracking
accused or victim information, and reviewing case statuses. The combination of Flask,
HTML, CSS (Bootstrap), and Oracle ensures a reliable and effective communication
channel between the user interface and the underlying database.
Chapter 4
IMPLEMENTATION
4.1 SQLDeveloper
For managing and interacting with the backend database, Oracle SQL Developer was used
as the primary graphical interface. It provides a user-friendly environment to run SQL
queries, manage database objects, and perform administrative tasks efficiently. The project
utilized the latest version of Oracle Database Express Edition (Oracle XE), a lightweight,
free-to-use version of Oracle's enterprise-grade database. Oracle XE is ideal for
development and deployment of smaller-scale applications, offering powerful features like
PL/SQL support, data security, and fast transaction processing, all within a simplified
setup. Integration with SQL Developer enabled smooth testing, debugging, and
optimization of SQL commands in real-time.
name VARCHAR2(100),
location VARCHAR2(150) );
);
name VARCHAR2(100),
rank VARCHAR2(50),
contact VARCHAR2(15),
station_id NUMBER,
badge_number VARCHAR2(20),
);
name VARCHAR2(100),
contact VARCHAR2(15),
added_by_officer_id NUMBER,
);
name VARCHAR2(100),
status VARCHAR2(50),
added_by_officer_id NUMBER,
);
name VARCHAR2(100),
contact VARCHAR2(15) );
officer_id NUMBER,
victim_id NUMBER,
accused_id NUMBER,
crime_type VARCHAR2(100),
description CLOB,
status VARCHAR2(50),
last_modified TIMESTAMP,
fir_id NUMBER,
witness_id NUMBER,
officer_id NUMBER,
COMMIT;
BEGIN
:NEW.last_modified := SYSTIMESTAMP;
END;
INSERT INTO Officer (officer_id, username, password, name, rank, contact, station_id,
badge_number) VALUES
INSERT INTO Witness (witness_id, name, contact) VALUES (1, 'Eve Blue', '555-9999'),
INSERT INTO FIR_Witness (fir_id, witness_id) VALUES(1, 1), (1, 2), (2, 2);
The Flask Application forms the backbone of the CRDMS project, acting as the bridge
between the front-end user interface and the back-end Oracle database. Flask, a
lightweight and powerful Python-based micro web framework, was chosen for its
simplicity, flexibility, and ease of integration with other tools and databases.
CHAPTER 5
SNAPSHOTS
CHAPTER 6
CONCLUSION
Key features like officer login tracking, witness-FIR mapping, and role-based access
control ensure data integrity and traceability, which are critical in sensitive environments
like law enforcement. Furthermore, the use of SQL triggers and constraints enforces
business logic at the database level, ensuring that data remains consistent and valid even
in complex transactional scenarios.
The CRDMS not only offers a solid backend foundation but is also easily extendable to
support future integrations such as real-time analytics, AI-based crime pattern detection,
and mobile accessibility. This ensures its long-term relevance and adaptability in a fast-
evolving technological landscape.
In conclusion, the CRDMS serves as a powerful testament to the role of computer science
and database systems in building safer, smarter communities by enabling data-driven
policing, improving accountability, and ensuring swift justice delivery. This project not
only fulfills academic goals but also lays the groundwork for building more intelligent
public service platforms in the future.