ABSTRACT: The institution is the Police. The proposed system applies to Police Institutions all across the country and specifically looks into the subject of Crime Records Management. It is well understood that Crime Prevention, Detection and Conviction of criminals depend on a highly responsive backbone of Information Management. Initially, the system will be implemented across Cities and Towns and later on, be interlinked so that a Police detective can access information across all records in the state thus helping speedy and successful completion to cases. The first event in the Crime cycle starts with the reporting of a case, usually in the form of a First Information Report (FIR). The FIR is a detailed document that captures the nature of the crime, the location details, the sequence of details, information on victims. The First Information Report (FIR) is the key to a successful criminal investigation. It contains the date and time of giving the information, police station where it is recorded, place, date and time where the offence has taken place, the names of the persons who have committed the offence, probable provisions under the Indian Penal Code or any other enactment under which the offences are punishable, the information in detail, name and address of the informant and the action taken. Categorisation of Crime is a very important starting
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
ABSTRACT:
The institution is the Police. The proposed system applies to Police Institutions all
across the country and specifically looks into the subject of Crime Records
Management. It is well understood that Crime Prevention, Detection and Conviction
of criminals depend on a highly responsive backbone of Information Management.
Initially, the system will be implemented across Cities and Towns and later on, be
interlinked so that a Police detective can access information across all records in the
state thus helping speedy and successful completion to cases. The first event in the
Crime cycle starts with the reporting of a case, usually in the form of a First
Information Report (FIR). The FIR is a detailed document that captures the nature of
the crime, the location details, the sequence of details, information on victims. The
First Information Report (FIR) is the key to a successful criminal investigation. It
contains the date and time of giving the information, police station where it is
recorded, place, date and time where the offence has taken place, the names of the
persons who have committed the offence, probable provisions under the Indian
Penal Code or any other enactment under which the offences are punishable, the
information in detail, name and address of the informant and the action taken.
Categorisation of Crime is a very important starting point. For each major
classification of Crime, it would be essential to give atleast two levels of sub-
categorisations. An Investigation is assigned to an Investigating Officer who will
supervise all activities of collecting evidence, questioning of suspects and other
people related to the crime. The Investigating officer will have the authority for
making arrests. The solution requirement involves constructing the basic recording
system for the Crime System. This involves capturing details of the organizational
structure, district/zone details, Police station details and other important entities.
CHAPTER-1
1. INTRODUCTION
1.1 About Crime Record Management System
It is proposed to centralize Information Management in Crime for the purposes of fast
and efficient sharing of critical information across all Police Stations across the territory. The
object of the FIR is to set the criminal law in motion, whereas for the investigator it is to
gather information regarding the offence so as to take appropriate action to book the
offender. This involves capturing details of the organizational structure, district/zone details,
Police station details and other important entities. There is a need to create a
comprehensive categorization for the entities of Crime, Modus-operandi, Motive and
Suspects. There is also a need to create appropriate classification for types of evidence.
Thereafter, the FIR becomes the central entity around which additional information in terms
of evidence, suspects, etc would be added. The filing of FIRs would be carried out on the
Web and updated to the specific District Server. Crime-related querying generated from one
district server can query other district servers in the State. For example, a Modus operandi
query across the whole state would translate into a service request by the District server to
other district server and the compiled information would be routed back to the originating
query. The significant class entities are identified and carried out the class modeling.
Detailed design of Classes, Database objects and other solution components are also carried
out.
1.2 About Visual C++
Microsoft Visual C++ allows you to create many different types of applications. This guide
addresses creating and using Console Applications. A console application is a program that
runs inside a DOS window. Visual Studio 6.0 was a legend step were, we knows, there are
still lots of(maybe the most) applications, not recompiled and always under activity. For
example, today 6.0 is still the primary version in China.
CHAPTER-2
2. BACKGROUND AND CONCEPT
2.1 About Visual C++:
A C++ compiler design for implementation under windows is known as visual C++.
Fig 2-1 : C++ Implementation Environments
The Microsoft Corporation has introduced a Windows based C++ development Environment
named as Microsoft Visual C++ (MSVC).This development environment integrates a set
tools that enable a programmer to create and run C++ programs with ease and style.
Microsoft call this integrated development environment as visual workbench.
2.1.1 History of Visual C++:
Prior to Visual C++, Microsoft C Version 6 existed on 8 floppies, did not support C++ but did
support OS/2. It could be executed using either 16-bit Windows or OS/2. The editor was
called Programmer's Workbench. There were versions of Microsoft C prior to version 6.
Visual C++ was first named Microsoft C/C++ Compiler 7.0 and was shipped on floppy disks.
Then Visual C++ came with the following version: Visual C++ 1.0 for Windows NT, then
Visual C++ for Win16 (v1.5 and now v1.52c) and then, with a Win32s inter-period, there was
the great new product named Visual C++ 2.0 and the Win32 and 32bits era. Visual C++ 1.0
was shipped for free when buying a book at MS Press named, Visual C++ Step by Step. The
success of the Visual C++ product, appeared with the version 2.2 and the content of a great
documentation. The Windows help was progressively canceled, and the way developer
should learned about SDK and Visual Studio was included in MVB files, covered in Visual C++
4.x. At this time, the MSDN documentation was completely integrated with the IDE. It was
C++ Implementation
MS-DOS Environment Windows Environment
Conventional C++ Visual C++
running extremely fast and everything was on a CD Rom... The compiler was becoming
better and better, when Visual C++2.x era was ended. The episode of pre-compiled headers
bug was finished, and the total time of compilation was shorter and shorter. Projects
Settings were very well designed and the IDE (as always) was getting more and more
comfortable.
Version 5.0 appears and the brand name Visual Studio was written, in bold, upper to the
Visual C++ product name.
Visual Studio 6.0 was a legend step were, we knows, there are still lots of applications, not
recompiled and always under activity. For example, today 6.0 is still the primary version in
China.
Microsoft C/C++ 7.0
Visual C++ 1.0
Visual C++ 1.5
Visual C++ 2.0
Visual C++ 2.1
Visual C++ 2.2
Visual C++ 4.0
Visual C++ 4.1
Visual C++ 4.2
Visual C++ 5.0
Visual C++ 6.0
Visual C++ .NET 2002 (Version 7.0)
Visual C++ .NET 2003 (Version 7.1)
Visual C++ 2005 (Version 8.0)
In 2006-2007, Visual C++ compiler will merge the C++ STL with a .NET compatible runtime
library called STL.NET. It will embrace Managed C++ and fully compliant C++ library. Visual
C++ is, in 2007, the best compiler product that Microsoft has shipped.
In 2007, Visual Studio Team has published a Virtual machine that contains the STL/CLR alias
STL.NET named library. Check out from the next release of the STL evolution.
In 2007, ATL Server has been promoted under codeplex.com portal: check
www.codeplex.com/atlserver
2.1.2 What's New in Visual C++ Version 6.0
Microsoft® Visual C++ version 6.0 provides many new features, described below.
Compiler
assume Keyword
Better Inlining Control
Dependencies Now Stored in a Text File
Dependency (.dep) File Generation
New and Improved Warnings
Placement Form of Operator Delete
Pragma Warning
Run-Time Error Checks
Throughput Improvements
Debugger
AfxDump Stack for Diagnosing Field-Installed Applications
MFC provides support for the latest Internet Explorer 4.0 common controls in classes such
as CComboBoxEx, CDateTimeCtrl, CIPAddressCtrl, and CMonthCalCtrl. You can access these
controls from the Controls toolbar in the Dialog editor. In addition to these new control
classes, new functionality was added to most of the existing MFC common control classes.
These modifications include flat toolbars, image list support for several control types (such
as header, toolbar, and status bar controls), and new attributes. These new properties are
also supported in the Dialog editor controls.
2.3.2 MFC Classes — New or Updated
Class Control Status Description
CComboBoxEx Extended
combo box
New Extends the combo box control by
providing support for image lists.
CDateTimeCtrl Date and
time picker
New Supports either an extended edit
control, or a simple calendar interface
control, that allows a user to choose a
specific date or time value.
CHeaderCtrl Header Updated Supports drag-and-drop operations and
bitmaps in a header control.
CHtmlView No New Supports a control for Web browsing
within an application. The control
supports Dynamic HTML in MFC.
CHttpServer No Updated Includes a new function for writing data
to the server.
CHttpServerContext No Updated Includes new functions that provide
control over the size of chunks written
to the HTTP server.
CImageList Image list Updated Supports images used by other controls,
for example, in header controls and list
controls.
CInternetSession No Updated Supports setting cookies for a specified
URL, returning cookies for a specified
URL and all its parent URLs, and
retrieving the variable specifying the
length of the cookie stored in the buffer.
CIPAddressCtrl Address New Supports an edit box for manipulating an
Internet Protocol (IP) address.
CListCtrl List Updated Supports the grouping of items using
working areas. Also supports virtual list
views.
CMenu No Updated Supports assigning or retrieving a
default menu item on a specified menu,
and retrieving information about a menu
item.
CMonthCalCtrl Month
calendar
New Supports a simple calendar interface
control that allows a user to select a
date.
COleClientItem No Updated Contains a new function that retrieves a
handle to an icon associated with the
server of a particular CLSID.
COleDBRecordView No New Provides MFC OLE DB support for form
views.
COleDocObjectItem No New Supports active document containment.
COleDateTime No Updated Supports converting time information
stored in the object to a Win32-
compatible SYSTEMTIME structure.
CProgressCtrl Progress Updated Supports smooth and vertical styles for
progress controls.
CPropertySheet No Updated Supports property sheets with stacked
or scrolling tabs.
CPropertySheetEx No New Supports the Wizard97 style of property
sheets, available with Windows 98 and
Windows NT 5.0.
CPropertyPageEx No New Supports the Wizard97 style of property
pages, available with Windows 98 and
Windows NT 5.0.
CReBar No New Supports a toolbar that can contain
additional child windows in the form of
controls.
CRebarCtrl Rebar New Implements the internal control of the
CRebar object.
CSliderCtrl Slider Updated Supports ToolTips in a slider control and
additional slider control styles.
CSpinButtonCtrl Spin button Updated Supports 32-bit ranges in a spin button
control.
CStatusBar No Updated Supports ToolTips, icons, and
background color in a status bar.
CStatusBarCtrl Status bar Updated Implements the internal control of the
CStatusBar object.
CString No Updated Supports enhanced string finding,
replacing, removing, inserting, deleting,
and formatting.
CTabCtrl Tab Updated Supports new styles for tab focus and
appearance. Also supports inserting new
tabs into an existing tab control.
CTime No Updated Supports converting time information
stored in the object to a Win32-
compatible SYSTEMTIME structure.
CToolBar No Updated Supports Internet Explorer 4.0 flat and
transparent toolbar styles.
CToolBarCtrl Toolbar Updated Implements the internal control of the
CToolBar object.
CToolTipCtrl Tool tip Updated Implements updating of a ToolTip and its
attributes.
CTreeCtrl Tree Updated Supports check boxes and automatic
single-node expansion in a tree control.
2.3.3 CDialog::CDialog
Use either one of these constructors to construct a resource-based modal dialog box. One
form of the constructor provides access to the dialog resource by template name. The other
constructor provides access by template ID number, usually with an IDD_ prefix (for
example, IDD_DIALOG1).
At a Glance
Header File Afxwin.h
Platforms
Versions 1.0 and later
Call this member function to invoke the modal dialog box and return the dialog-box result
when done.
At a Glance
Header File Afxwin.h
Platforms
Versions 1.0 and later
CDialog::OnInitDialog
The framework calls this member function in response to the WM_INITDIALOG message.
This message is sent to the dialog box during the Create, CreateIndirect, or DoModal calls,
which occur immediately before the dialog box is displayed.
At a Glance
Header File Afxwin.h
Platforms
Versions 1.0 and later
2.3.4 CRecordset
A CRecordset object represents a set of records selected from a data source. Known as “recordsets,” CRecordset objects are typically used in two forms: dynasets and snapshots. A dynaset stays synchronized with data updates made by other users. A snapshot is a static view of the data. Each form represents a set of records fixed at the time the recordset is opened, but when you scroll to a record in a dynaset, it reflects changes subsequently made to the record, either by other users or by other recordsets in your application.
2.3.5 CObject
CObject is the principal base class for the MFC.
At a Glance
Header file: Afx.h
Platforms:
Versions: 1.0 and later
These functions are the standard CObject constructors. The default version is automatically
called by the constructor of your derived class.
CCmdTarget
Fig:2-18
CCmdTarget is the base class for the Microsoft Foundation Class library message-map
architecture. All classes that handle messages are derived, directly or indirectly, from this
class.
At a Glance
Header File Afxwin.hPlatformsVersions 1.0 and later
Working with Oracle Databases
The Microsoft® Visual Database Tools have been designed to work with Oracle databases
transparently — you can design database diagrams, queries, and views in the same way you
would for any database. In addition, the tools are Oracle-aware, allowing you to incorporate
Oracle data objects such as synonyms, produce Oracle-specific SQL commands, and so on. In
a few instances, however, you will find it useful to know how the Visual Database Tools
differ when you are working with Oracle databases. For example, it is helpful to understand
CObject
CCmd Target
how the Query Designer will work with case-sensitive database object names in Oracle. The
topics listed in the following table provide information specific to using the Database
Designer and Query Designer with Oracle databases.
Data View for Oracle Databases
For Oracle databases, you will see some differences in the Project Explorer (FileView in
Microsoft® Visual C++®) and Data View windows. For example, when you add a connection to
an Oracle database, you will see these folders under the connection: Database Diagrams,
Tables, Views, Synonyms, Stored Procedures, and Functions. The Tables folder contains the
base tables in your database. The Views folder contains any SELECT statements saved as
views.
Synonyms
The Synonyms folder contains synonyms in your database, which are names assigned to
tables or views that may thereafter be used to refer to them. You can also create new
synonyms.
To create a new synonym
From a query or SQL script, execute the following statement:
create synonym name
for table
Substitute the name of the new synonym for name and the name of a table for table. For
more details about synonyms, refer to your Oracle documentation.
Functions
The Functions folder contains the functions in your database. For details about functions,
refer to your Oracle documentation.
CHAPTER-3
3. PROJECT DESCRIPTION
3.1 Connectivity:
There are two types of connectivity: (i) ODBC connection
(ii) DAO connection
3.1.1 Why Migrate from ODBC to DAO?
There are a number of reasons why you might want to migrate applications from the ODBC
Database Classes to the DAO Database Classes, but the decision is not necessarily simple or
obvious. One thing to keep in mind is that the Microsoft Jet database engine that is used by
DAO can read any ODBC data source for which you have an ODBC driver. It may be more
efficient to use the ODBC Database Classes or call ODBC directly yourself, but the Microsoft
Jet database engine can read ODBC data.
There are some simple cases that make the ODBC/DAO decision easy. For instance, when
you only need access to data in a format that the Microsoft Jet engine can read directly
(Access format, FoxPro format, Excel format, and so on) the obvious choice is to use the
DAO Database Classes. More complex cases arise when your data exists on a server or on a
variety of different servers. In this case, the decision to use the ODBC Database classes or
the DAO Database classes is a difficult one. If you want to do things like heterogeneous joins
(join data from servers in multiple formats like SQL Server and Oracle), then the Microsoft
Jet database engine will perform the join for you rather than forcing you to do the work
necessary if you used the ODBC Database Classes or called ODBC directly. If you are using an
ODBC driver that supports driver cursors, your best choice might be the ODBC Database
classes.
The choice can be complicated, so you might want to write some sample code to test the
performance of various methods given your special needs. This technical note assumes that
you have made the decision to migrate from the ODBC Database Classes to the DAO
Database classes.
3.1.2 Similarities Between ODBC Database Classes and MFC DAO Database Classes
The original design of the MFC ODBC classes was based on the DAO object model that has
been in use in Microsoft Access and Microsoft Visual Basic. This means that there are many
common features of the ODBC and DAO MFC classes, which will not all be listed in this
section. In general, the programming models are the same.
To highlight a few similarities:
Both the ODBC and DAO classes have database objects that manage using the
underlying database management system (DBMS).
Both have recordset objects representing a set of results returned from that DBMS.
The DAO database and recordset objects have members nearly identical to the ODBC
classes.
With both sets of classes, the code to retrieve data is identical except for some
object and member name changes. Changes will be required, but usually the process
is a straightforward name change when switching from the ODBC classes to DAO
classes.
For example in both models the procedure to retrieve data is to create and open a database
object, create and open a recordset object, and navigate (move) though the data
performing some operation.
3.2 ODBC Connections
ODBC connections are configured in the system control panel. ODBC connections can be
made against any data source for which an ODBC driver has been installed. Visual C++ 6.0
ships drivers for Text files, Access, FoxPro, Paradox, dBase, Excel, SQL Server, and Oracle.
When you create an ODBC connection, it automatically receives a Data Source Name (DSN).
The DSN is subsequently used to identify connections in data-source controls, such as ADO
Data Control and RDO RemoteData Control.
OLE DB Connections No additional work is necessary to configure an OLE DB connection.
For example, if an ODBC data source is created, the OLE DB provider for ODBC automatically
detects it.
3.2.1 To configure an ODBC data source
1. Click on the Start button, select Settings, and then Control Panel.
2. In Control Panel, select 32bit ODBC (Windows 95) or ODBC (Windows NT).
3. Select the User DSN or System DSN tab. User DSN lets you create user-specific data-
source names and System DSN lets you create data-sources available to all users.
4. Click Add to display a list of locally installed ODBC drivers.
5. Select the driver corresponding to the type of indexed sequential access method
(ISAM) or database you want to connect to and click Finish.
6. Follow the instructions specific to the driver. After closing, the DSN is now available
for use.
When generating a DSN for some ODBC driver types, you need to know the location of the
actual file. For example when creating an Access DSN, you need to know the location of
the .mdb file. Also, you should have a valid username and password. For example, the
system username for most Access systems is admin.
3.2.2 CDaoDatabase
Fig:3-1
CObject
CDao Database
A CDaoDatabase object represents a connection to a database through which you can
operate on the data. For information about the database formats supported, see the
GetName member function. You can have one or more CDaoDatabase objects active at a
time in a given “workspace,” represented by a CDaoWorkspace object. The workspace
maintains a collection of open database objects, called the Databases collection. The MFC
DAO database classes are distinct from the MFC database classes based on ODBC. All DAO
database class names have the “CDao” prefix. Class CDaoDatabase supplies an interface
similar to that of the ODBC class CDatabase. The main difference is that CDatabase accesses
the DBMS through Open Database Connectivity (ODBC) and an ODBC driver for that DBMS.
CDaoDatabase accesses data through a Data Access Object (DAO) based on the Microsoft
Jet database engine. In general, the MFC classes based on DAO are more capable than the
MFC classes based on ODBC; the DAO-based classes can access data, including through
ODBC drivers, via their own database engine. The DAO-based classes also support Data
Definition Language (DDL) operations, such as adding tables via the classes, without having
to call DAO directly.
Usage
You can create database objects implicitly, when you create recordset objects. But you can
also create database objects explicitly. To use an existing database explicitly with
CDaoDatabase, do either of the following:
Construct a CDaoDatabase object, passing a pointer to an open CDaoWorkspace
object.
Or construct a CDaoDatabase object without specifying the workspace (MFC creates
a temporary workspace object).
3.2.3 Differences Between ODBC and DAO MFC Classes
The DAO classes include more objects and a richer set of methods, but this section will only
detail the differences in similar classes and functionality. Probably the most obvious
differences between the classes are the name changes for similar classes and global