You are on page 1of 70

Punjab Police Automation

D.A.V College, Jalandhar 1


Punjab Police Automation

1) INTRODUCTION
By developing this “PUNJAB POLICE” project named as “CRIME
CRIMINAL INFORMATION SYSTEM”, we tried to remove all the
drawbacks in the existing system.

The success of investigation depends upon the professional skill and


sustained efforts of the investigating officers. An indispensable requirement
is relevant information on ‘CRIME’, ‘CRIMINAL’ and ‘PROPERTY’.

The present system is storing the information about


CRIME: - when it occurred? , Where it occurred? , What type of place?,
From which direction of P.S? Etc.

CRIMINAL: - who is he/she? (Name and aliases), where is he/she residing?


(Present/probable addresses), how is he/she recognized? (Physical feature),
what are his/her habits? Etc.

PROPERTY:- whether identifiable or unidentifiable ; if identifiable whether


numbered or not like motor vehicles/fire-arms etc. ?

These were those designed when ‘POLICE MANUALS’ were


originally introduced. These have undergone little or no change. Crimes are
known to have increased not only quantitatively but also qualitatively. As a
result, new types of crimes are now being committed, adopting new types of
modus operandi by the criminals.

In investigating a crime, investigating officers compile the case


record/file. Basically, this is relied upon as the source for the above
information. Presently, integrated investigation forms are used for
investigating the crimes. They will automatically form case records/files and
be the source of information for being kept in the computer. With no other
computer input forms, it will eliminate additional scriptory work, delays and
errors.

D.A.V College, Jalandhar 2


Punjab Police Automation

The I .Os’ guide the concise material about this project discussed
later in this, illustrates the new crime classification to be used by the I.Os’ in
investigating crimes and catching criminals. This project enlarges the
information to what is applicable in the current day scenario.
The computers have been set up at the districts only to assist the I.Os’ to
keep relevant information of all crimes reported without exception so that
the legal/professional/statistical requirements are met by one time activity of
investigation thereby saving their valuable time. The same computer will
make it easy to access information relating to neighboring PS/District/State
also.
So, the new CRIME CRIMINAL INFORMATION SYSTEM
representing the above steps, thus, marks a departure from the old
information order to a new one and, above all providing a very good
interface to interact with the database and at the same time handling any
kind of problem relating to database. In existing systems, data is arranged
manually in paper work mostly in files. There are many drawbacks in
existing system that we had tried to eliminate. We have provided the user
with great flexibility to handle the database efficiently and respond to any
query of the I.Os’ within no time. Its user-friendly interface provides a nice
environment for the operator to work with. There is online help available by
which a new operator can know anything about the project or an old operator
can take help on any topic related to the project.

D.A.V College, Jalandhar 3


Punjab Police Automation

1.1) EXISTING SYSTEM

The existing system is totally manual and involves a lot of paper work.
The present system of information keeping on,

CRIME: - when it occurred? , Where it occurred? What type of place?,


which direction of P.S? Etc.

CRIMINAL: - who is he? (Name and aliases), where is he residing?


(Present/probable addresses), how is he recognized? (Physical feature), what
is his modus operandi? Etc.

PROPERTY: - whether identifiable or unidentifiable?, if identifiable whether


numbered or not like motor vehicles/fire-arms etc.,

These were those designed when ‘POLICE MANUALS’ were


originally introduced. These have undergone little or no change. Crimes are
known to have increased not only quantitatively but also qualitatively. As a
result, new types of crimes are now being committed, adopting new types of
modus operandi by the criminals.

Today in most of the police station, first information report i.e.


FIRs are written manually and mostly the most important information
whether it relates to victim, witness, I.Os, arrested person, lost and found
related and so on are stored on the papers called files. The handling of these
vital government documents or records/files are one of the most irritating
tasks in the government buildings where it is compulsory to send a daily
report to the senior officers for their decision making purposes. Like in
police station where a daily report of the crimes which have occurred on that
every day is sent to the senior superintendent of police i.e. S.S.P of that very
zone. And all these reports are generally in the forms of graphs, which
prepared on the paper and after ward sent to the S.S.P. Moreover, if he want
to see a particular report/status of any case. Then he has to tell to his/her
subordinates to bring that file from that P.S. and only then he would be able
to see that file. So, there is so much time wastage in bringing that file which

D.A.V College, Jalandhar 4


Punjab Police Automation

further results in delay in his/her decision making process. So if he did not


make the right decision at the right time, it would result in the loss of
thousands of property or even lives of innocent people.

Through this project we want to create a paperless environment


for the user and relieve the user from the hectic work of manually handling
the case records/files. Now, through the development of this project, this
project can assist the investigating officers in keeping relevant information
of all crimes reported without exception so that the
legal/professional/statistical requirement can be met by only one time
activity of investigation thereby can save their most valuable time.

D.A.V College, Jalandhar 5


Punjab Police Automation

1.2) DRAWBACKS OF EXISTING


SYSTEM

As all the work is done manually so the investigating officers


and senior officers have to wait for long to get their work done which can be
assigning duties to police personnel or solving a particular case of crime.
The head constable has to go through from a large number of files, if he has
to search or see an old record. As the system is manual, there is strong
probability of having error in accounts and other important documents.
Maintaining of paper files is a cumbersome task and it takes a lot of space to
store these files. Also these files are prone to damages like torning off of the
paper or misplacement of the file. All these drawbacks have been eliminated
through this project.

 Data redundancy and inconsistency

Since different employees of PS create different files, various


files are likely to have a different format. Moreover the same information
may be duplicated in several files. For e.g. the address of the victim may
appear in FIR General dairy register. This redundancy leads to higher
storage and access cost.

 Difficult in accessing data

It is difficult to access data for a request that was not


anticipated .e.g. if the officer wants to know about the criminal who killed a
person four year back, it is hard to search the files in almiras.

 Data Isolation

Because data are scattered in various files and files may be in


different format, it is difficult to answer new queries so as to retrieve the
appropriate data.

D.A.V College, Jalandhar 6


Punjab Police Automation

 Security problem
Not every user of the database system should be able to
access all the data .e.g. in the stock register, if an unauthorized
person change the general dairy details of the PS then it will create
a problem. Thus our existing system is not safe.

 Atomicity Problem

It is essential that data base should be atomic i.e.; it must


happen in its entirety or not at all. It is difficult to ensure this property in an
existing system.

 Technical Infeasibility of existing system

Existing personal record keeping of PS was manual but they


were using computers to calculate salaries, pays, and calculations regarding
employee’s amount deposits. One interesting fact was that their problem was
not a system demanding a technology that was not there, but the lack of
tools to work on available h/w and machines.

 Economic infeasibility of existing system

The existing record keeping was manual so as lot of clerical


time was wasted in adding, deleting, or retrieving the
information.

 Behavior infeasibility

The existing system was too clumsy and scattered that if


somebody needs information, the employee behavior remains non co-
operating due to time-consuming process of retrieving information.

D.A.V College, Jalandhar 7


Punjab Police Automation

1.3) PROPOSED SYSTEM


The proposed system is to automate the working of the existing manual
system. The entire task is to be made computerized. This will assure the
reliability, efficiency and accuracy of a new system. The system maintains a
RDBMS that caters with the need for storage and retrieval of the data. It is
based on a fully GUI and makes these activities as simple and easy as
possible. At all the levels of the system we have tried owe level best to make
this system a success.

Benefits of Proposed System:

 The proposed system is being designed so that the working of the Police
department will be faster, easier and to be more reliable and informative.

 System being designed is less time consuming than the existing system.

 Up-to-date data will be available as when required

 There will be minimal chance of errors in the report as they will be


generated with the help of computers.

 The proposed system will be very more systematic one.

 Proposed system is very time efficient than existing system which speed
up to work.

 It minimsed the redundancy of entries.

 It is less expensive system then the existing system because paper work
has reduced.

 Reports can be easily generated by the proposed system.

 All the work is done in the interactive mode.

D.A.V College, Jalandhar 8


Punjab Police Automation

ADVANTAGES OF THE PROPOSED SYSTEM

Now let us have look at the advantages which can accrued from the
computerization. The applications of computers in PS have enormous
advantages. Some of the advantages of computerization are enumerated as
below:

1. Increase of speed and saving in time while decision making.


2. Instant and up to date information on your desk.
3. It is interactive.
4. It is menu driven.
5. It is user friendly.
6. It is reliable.

Computer system will lend in updating of record files and more


quickly and easily
 Than manual system
 Will help for better staffing
 Will provide new services and information
 Protection of data records
 Quick , efficient and systematic report production

D.A.V College, Jalandhar 9


Punjab Police Automation

D.A.V College, Jalandhar 10


Punjab Police Automation

2.1) PRESENT SCOPE

The system has been working for three months and is working very well.
There is no complaint about the system from the department working on this
project. The system efficiently handles the record keeping. It efficiently
stores the information about the criminals, suspect, accused, victims, place
of occurrence of crime etc. This system generates the report whatever the
officer(s) want. In this system we can store all the information regarding
police employees such as their ranks, designation, belt number and the salary
paid to each employee. Selecting any field automatically fills the code of
that field.

D.A.V College, Jalandhar 11


Punjab Police Automation

2.2) FUTURE SCOPE

The system developed is so flexible that any future change will reflect
without any interruption for e.g. if a new district is added, it can be done
very easily. Similarly, if an existing district needs to be changed or
removed, then it can also be done very easily and efficiently. The system
can be developed further. First of all, it must be optimized further made
faster and even user friendlier. The amount of the extra work for users
should be close to zero, which requires further automation of status
reporting. Users should be able to enter information about why
information delayed to give information about crime. There is strong
need for the ability to create customized report and search through the
production database. The system could be further upgraded to provide
facilities for accounting department, i.e. it could provide assistance in
financial accounting to department.

D.A.V College, Jalandhar 12


Punjab Police Automation

3) IDENTIFICATION OF NEED

Identification of needs or recognition of needs is also referred to as a


SYTEM STUDY. This implies that one must know the problem before it can
be solved. The job of the software developer does not end with mere getting
aware of the problem statement and writing a workable program that solves
the problem. He has to computerize several problems of daily life and these
real life programs are in general or more complex. The computer
professional has to split up a big problem into a number of small problems.
He has to evolve the procedure to get the complete solution by solving the
smaller one and system study enables us to get the better procedure for
solving the problems. In short, the job is to identify the components of the
composite problems and their relationships so that it can solve the large
problem by solving the smaller ones.

Thus we can see from the introduction that from today’s


point of view what every thing is going to be computerized then why not in
“PUNJAB POLICE”. This computerized software helps us to work easily in
the PS and to provide the facility to employees and many more related to PS.
various queries are performed to generate the new entry. A final report
provides us the various day-to-day transactions performed in the PS.

The prime advantages of our proposed system are-:

 It is interactive.
 It is menu driven.
 It is user friendly.
 It is reliable.
 It is fast and accurate.

D.A.V College, Jalandhar 13


Punjab Police Automation

4) STATEMENT OF COMPLETENESS

This project is based on the “PUNJAB POLICE” it is a kind of


department .Our project completes all aspects of controlling the police
activities like fir entry, control on crime, etc. It also allows officers to
navigate crime charts or number of crime in a particular day, week, month
etc. When anyone use the software than he will have to know the username
and password. This option used in project only for security purpose. This is
very important feature of the project that the officer(s) tell(s) only fir number
and detail is automatically generated. If we want to add a new FIR or to
modify the statement of witness, this can be done very easily.

D.A.V College, Jalandhar 14


Punjab Police Automation

5)MINIMUM SOFTWARE AND HARDWARE


REQUIRMENTS

HARDWARE AND SOFTWARE SPECIFICATIONS

Hardware considerations:

The basic minimum hardware requirements for operating this project


efficiently are:

CPU

Type Specification
Processor Pentium II or up
Speed 266 MHz or more
RAM 128 MB or more
Cache 512 KB or more

PERIPHERALS

Type Specification
Monitor VGA Color
Mouse Any
Keyboard Any
Printer Color
Scanner Any

STORAGE MEDIA

Type Specification
Hard Disk 10 GB or more

D.A.V College, Jalandhar 15


Punjab Police Automation

Floppy Disk Drive 1.44MB


CD-Rom 48x/52x

SOFTWARE Considerations:

The software requirements for the project are:

Operating System Windows 2000 Advance server

Front End VB6.0

Back End Oracle 8i

D.A.V College, Jalandhar 16


Punjab Police Automation

6) DEVELOPMENT TOOLS

The tools used in the project are oracle 8i and visual basic. Oracle 8i is used
for the databases used in the project & visual basic is used to prepare all the
forms used in the project.

Oracle 8i is used as back end and visual basic is used as front


end in the project. The terms back end and front end are the technical jargon.
Where oracle is used as back end because all the databases used in the
project are designed in oracle and later on linked to the visual basic.
Therefore this is called back end .It works from the back. Visual Basic is
used as front end because all forms and out- looks of the project are
designed using this.

D.A.V College, Jalandhar 17


Punjab Police Automation

D.A.V College, Jalandhar 18


Punjab Police Automation

6.1) ORACLE 8i

INTRODUCTION OF ORACLE 8 i :
ORACLE 8i, the database for Internet computing,
changes the way information is managed and accessed to meet
the demands of the Internet age, while providing significant
new features for traditional online transaction processing
(OLTP) and data warehouse applications. It provides advanced
tools to manage all types of data in Web sites, but it also
delivers the performance, scalability, and availability needed to
support very large database (VLDB) and mission-critical
applications.

Oracle8i is much more than just a simple relational data


store. It introduces IFS, the Internet File System that allows
users to easily move all of their data into an Oracle8 i database
where it can be stored and managed more efficiently in an
integrated fashion. A new option, Oracle8 i interMedia, allows
businesses to manage and access multi-media data, including
image, text, audio, video, and spatial (locator) data. The
interMedia Clipboard and Web Agent work together to Web-
enable interMedia. WebDB is a new HTML-based development
tool for building HTML Web pages with content based on data
stored in Oracle databases.

Oracle8 i introduces new support for Java by including a


robust, integrated, and scalable Java Virtual Machine within
the server. Oracle8 i includes Oracle Enterprise Manager, which
is the comprehensive management framework for managing the
Oracle database and application environment. Oracle Enterprise
Manager Presents an easy-to-use centralized console, a rich set
of management tools, and the extensibility to detect and solve
any problems that may arise. It also includes several

D.A.V College, Jalandhar 19


Punjab Police Automation

administrative applications for performing day-to-day tasks for


databases and applications, such as scheduling backup routines.

Oracle8 i is designed to access and manage all your data


using the style and infrastructure of the Internet. Oracle8i is
the most complete and comprehensive platform for building,
deploying and managing Internet and traditional applications

It simplifies the development of applications.

It simplifies the management of Internet content.

It simplifies the deployment of applications.

Versions of Oracle 8 i :

Oracle 8i is available in four stand-alone versions:

Oracle 8 i, also referred to as the standard edition of Oracle


8i, is the basic version and includes core features for most
Windows NT and UNIX applications.

Oracle 8i Enterprise Edition adds several high-end features


and options for mission-critical OLTP and data warehousing
applications.

Oracle 8 i Workstation is a single-user development


database for Windows NT, Windows95, or Windows98, that
now includes all Enterprise Edition options and features.

Oracle 8 i Lite is a lightweight mobile Java database that


easily synchronizes laptops and hand held devices with
corporate databases.

New Features of Oracle 8 i :

Improved scalability

Improved security administration

D.A.V College, Jalandhar 20


Punjab Police Automation

Improved performance via partitioning

Enhanced support for database replication

Capability to handle a much larger number of concurrent


users

New and improved data types

Object relational features via oracle objects options

Oracle 8i provides the following database management


solutions:

It manages Very Large Databases (VLDB)

It helps build the following applications:

On Line Transaction Processing (OLTP) applications

Decision Support System (DSS) applications

Data warehousing applications

It provides high end database environment to support:

Partitioning of tables and indexes

Advanced Queuing

Parallel Query Enhancement

Fast Backup and Recovery

Manageable Security

Supports Parallel DML

Adaptive to Network computer Architecture

D.A.V College, Jalandhar 21


Punjab Police Automation

Enhanced support for Database Replication

Object Relational Features via the Oracle Object


Options

FEATURES OF ORACLE 8i

There are many significant features that have catapulted oracle


to the top of the growing information management vendor community few
are entitled & explained below: -

1. Security mechanisms.
2. Backup and recovery.
3. Space management.
4. Open connectivity.
5. Development tools.

1. Security Mechanisms

Oracle’s sophisticated security mechanisms control access to


sensitivity data by an assortment of privileges. Users are given rights to
view, modify, and create data based on the name they use to connect to the
database. Customers use these mechanisms to ensure specified users get to
see sensitive data, while others are forbidden.

Once the oracle engine is running, the security manager tool can be
used by the dba (database administrator) to create user accounts and grant
permission to the user accounts. Creation of user account will provide users
with: -

 Login identity.
 A password.
 Permission to use oracle resources.

The login identity and the password will allow a user to connect to
the oracle database. Once connected to the oracle database, a user can create
or use the oracle resources like tables, views etc. Depending on the
permissions granted by the dba (database administrator).

D.A.V College, Jalandhar 22


Punjab Police Automation

2. Backup and recovery

Oracle provides sophisticated backup and recovery routines.


Backup creates a secondary copy of oracle data; recovery restores a copy of
data from that backup. Oracle’s backup and recovery strategy minimizes
data loss and downtime when and if problem arise.

3. Space management

Oracle offers flexible space management. You can allocate disk


space for storage of data and control subsequent allocations by instructing
oracle how much space to set aside for future requirements.

4. Open connectivity

Oracle provides for uninterrupted access to the database 24


hours a day. Oracle provides open connectivity to and from other vendors’
software.

Using add-ons to the oracle database, you can work with information that
resides in other data repositories, such as IBM’s db2, Sybase, or Microsoft
access. As well, you are permitted to store your data in oracle’s database and
access it from other software, such as Microsoft visual basic, powerboat’s
power builder, and gupta’s sql* windows.

5. Development tools
the oracle server, commonly referred to as the database engine,
supports a wide range of the development tools, end- user query tools, off-
the-self applications, and office-wide information management tools.

Oracle tools

Oracle products are primarily divided into:


1. Oracle server tools
2. Oracle client tools

D.A.V College, Jalandhar 23


Punjab Police Automation

Oracle server:
The oracle server is a program that produces the most widely used
server based multi-user RDBMS. In the oracle server’s hard disk drive this
program must be loaded in ram so that it can process user request.
The oracle server product is either called:
 Oracle workgroup server
Or
 Oracle enterprise server

The functionality of both these is identical. However the oracle


workgroup server restricts the number of concurrent user who can query
the server. Oracle enterprise server has no such restrictions. Either
product must be loaded on a multi-user operating system.

The oracle server takes care of the following:

 Updating the database.


 Retrieving information from the database.
 Accepting query language statements.
 Enforcing security specification.
 Enforcing transaction consistency.
 Enforcing data integrity specification.
 Managing data sharing.
 Optimizing queries.
 Managing system catalogs.

Oracle client side tools:

For commercial application development user first log in to the server and
uses various tools for application development. Most important of them is
sql*plus tool.

The sql*plus tool is made up of two distinct parts


 Interactive sql
 pl/sql

D.A.V College, Jalandhar 24


Punjab Police Automation

Interactive sql:
Interactive sql is designed to create, access and maintain all
structures like tables, indexes and etc. It can also be used for interactive data
manipulations.

Pl/sql:
Programmers can use pl/sql to create programs for validation
and manipulation of table data. Pl/sql adds to the power of interactive sql
and provides the user with all the facility of a standard, modern day
programming environment. Via pl/sql the user cannot manipulate data but
also can use procedural techniques such as writing loops or branching to
another block of code.

INTRODUCTION TO SQL PLUS

Oracle was the first company to release a product that


used the English-based Structured Query Language, or SQL.
This language allowed end users to extract information
themselves, without using a systems group for every little
report.

Oracle’s query language has structure, just as English or


any other language has structure. It has rules of grammar and
syntax, but they are basically the normal rules of careful
English speech and can be readily understood.

SQL is a very simple, yet powerful, database access


language. SQL is a nonprocedural language; users describe in
SQL what they want done, and the SQL language compiler
automatically generates a procedure to navigate the database
and perform the desired task.

Oracle SQL includes many extensions to the ANSI/ISO


standard SQL language, and Oracle tools and applications
provide additional commands. The Oracle tools SQL*Plus,

D.A.V College, Jalandhar 25


Punjab Police Automation

Oracle Enterprise Manager, and Server Manager allow you to


execute any ANSI/ISO standard SQL statement against an
Oracle database, as well as additional commands or functions
that are available for those tools.

SQL Statements

All operations performed on the information in an Oracle


database are executed using SQL statements. A SQL statement
is a specific instance of a valid SQL command. A statement
consists partially of SQL reserved words, which have special
meaning in SQL and cannot be used for any other purpose. For
example, SELECT and UPDATE is reserved words and cannot
be used as table names.

A SQL statement can be thought of as a very simple, but


powerful, computer program or instruction. The statement must
be the equivalent of a SQL "sentence," as in:

SELECT ename, deptno FROM EMP;

Only a SQL statement can be executed, whereas a


"sentence fragment" such as the following generates an error
indicating that more text is required before a SQL statement
can execute:

SELECT ename

Here’s an example of how might use SQL. Suppose


you have a table named STUDENT which contains information
of students, which contains NAME, CLASS, ROLLNO and
PERCENTAGE fields and you want to know the PERCENTAGE
of ROLLNO 6622, your query to it would be as follows:

Select percentage from student where roll no = 6622

It shows the PERCENTAGE of ROLLNO 6622.

D.A.V College, Jalandhar 26


Punjab Police Automation

SQL provides statements for a variety of tasks, including:

Querying data

Inserting, updating, and deleting rows in a table

Creating, replacing, altering, and dropping objects

Controlling access to the database and its objects

Guaranteeing database consistency and integrity

SQL unifies all of the above tasks in one consistent language.

SQL is made of three languages such as:

Data Definition Language (DDL): Consists of commands to


create the objects, such as tables, views, indexes etc.

Data Manipulation Language (DML): Used for Query,


insertion, deletion and updation of information stored in
databases.

Data Control Language (DCL): Used for controlling data


and access to the databases.

SQL * Plus is a software product from Oracle Corporation that


allows users to interactively use the SQL commands, produce
formatted reports and support written command-procedures to
access Oracle databases.

Through SQL Plus a user can:

Enter, edit, store, retrieve, and run SQL commands

D.A.V College, Jalandhar 27


Punjab Police Automation

Format, perform calculations on, store, and print query


results in the form of reports

List column definition of any table

Access and copy data between SQL databases

Send messages to and accept responses from an end user

Oracle Datatypes:

The information in a database is maintained in the


form of tables. Each table consists of rows and columns to
store the data. A particular column in a table must contain
similar data, which is of a particular type. The different data
types available are:

Character Data types:

The character data types store characters


(alphanumeric) data in strings, with byte values corresponding
to the character encoding scheme (generally called a character
set or code page). Oracle supports both single-byte and multi-
byte encoding schemes.

Number Data Types:

The NUMBER data type stores fixed and floating-


point numbers. Numbers of virtually any magnitude can be
stored and are guaranteed portable among different systems
operating Oracle, up to 38 digits of precision.

Date Data Type:

The DATE data type stores point-in-time values


(dates and times) in a table. The DATE data type stores the
year (including the century), the month, the day, the hours, the
minutes, and the seconds (after midnight).

D.A.V College, Jalandhar 28


Punjab Police Automation

Data type Description Column Length and Default

CHAR Fixed-length Fixed for every row in the table


(size) character data of (with trailing blanks); maximum
length size bytes. size is 2000 bytes per row,
default size is 1 byte per row.
Consider the character set (one-
byte or multi-byte) before setting
size.

VARCHAR2 Variable-length Variable for each row, up to 4000


(size) character data. A bytes per row. Consider the
maximum size character set (one-byte or multi-
must be specified. byte) before setting size.

LONG Variable-length Variable for each row in the


character data. table, up to 2 3 1 - 1 bytes, or 2
gigabytes, per row.

NUMBER Variable-length Variable for each row. The


(p, s) numeric data. maximum space required for a
Maximum given column is 21 bytes per row.
precision p and/or
scale s is 38.

DATE Fixed-length date Fixed at 7 bytes for each row in


and time data, the table. Default format is a
ranging from string (such as DD-MON-YY)
January 1, 4712 specified by
BCE to December NLS_DATE_FORMAT parameter.
31, 9999 CE
("A.D.")

Starting SQL * Plus:

D.A.V College, Jalandhar 29


Punjab Police Automation

To start the SQL, first of all Double-click on the


SQL icon. Then the SQL shows a window on the screen where
you enter your username and password. Since Oracle is careful
to guard who can access the data it stores, it always requires
that you enter an ID and password to connect to it. When you
entered the username and password, SQL will announce that
you are connected to Oracle, and then will display this prompt;

SQL>

This shows that you are now in SQL, and it awaits


your instructions. If you entered a wrong username or
password, you will get the following message:

ERROR: ORA-1017: invalid username/password; logon denied

After three unsuccessful attempts to enter a username and


password that Oracle recognizes, SQL will terminate the
attempt to log on, with the message:

Unable to connect to ORACLE after 3 attempts, existing SQL


* Plus

When you want to quit working and leave SQL Plus, type this:
Quit

SQL Functions:

Functions are similar to operators in that they manipulate data


items and return a result. Functions differ from operators in the
format in which they appear with their arguments. This format
allows them to operate on zero, one, two, or more arguments:

Function (argument, argument ...)

There are two types of Functions:

SQL Functions
User-Defined Functions

SQL Functions:

D.A.V College, Jalandhar 30


Punjab Police Automation

SQL functions are built into Oracle and are available for use in
various appropriate SQL statements. If you call a SQL function
with an argument of a data type other than the data type
expected by the SQL function, Oracle implicitly converts the
argument to the expected data type before performing the SQL
function.

Number Functions:

Number functions accept numeric input and return


numeric values. Most of these functions return values that
are accurate to 38 decimal digits.

Character Functions:

Character functions that return character values,


unless otherwise noted, return values with the data type
VARCHAR2 and are limited in length to 4000 bytes.
Functions that return values of data type CHAR are limited
in length to 2000 bytes. If the length of the return value
exceeds the limit, Oracle truncates it and returns the result
without an error message.

Date Functions:

Date functions operate on values of the DATE data


type. All date functions return a value of DATE data type,
except the MONTHS_BETWEEN function, which returns a
number.

Conversion Functions:

Conversion functions convert a value from one data


type to another. Generally, the form of the function names
follows the convention data type TO data type. The first data
type is the input data type. The second data type is the
output data type.

User- Defined Functions:

D.A.V College, Jalandhar 31


Punjab Police Automation

You can write user functions in PL/SQL or Java to


provide functionality that is not available in SQL or SQL
functions. User functions can appear in a SQL statement
anywhere SQL functions can appear, that is, wherever an
expression can occur.

For example, user functions can be used in the following:

The condition of a WHERE clause

CONNECT BY, START WITH, ORDER BY, and GROUP BY


clauses

The VALUES clause of an INSERT statement

The SET clause of an UPDATE statement

D.A.V College, Jalandhar 32


Punjab Police Automation

D.A.V College, Jalandhar 33


Punjab Police Automation

6.2) Visual Basic Concepts


In order to understand the application development process, it is helpful to
understand some of the key concepts upon which Visual Basic is built.
Because Visual Basic is a Windows development language, some familiarity
with the Windows environment is necessary. If you are new to Windows
programming, you need to be aware of some fundamental differences
between programming for Windows versus other environments.

Windows Working: Windows, Events and Messages

A complete discussion of the inner workings of Windows


would require an entire book. A deep understanding of all of the technical
details isn't necessary. A simplified version of the workings of Windows
involves three key concepts: windows, events and messages.

Think of a window as simply a rectangular region with its


own boundaries. You are probably already aware of several different types of
windows: an Explorer window in Windows, a document window within your
word processing program, or a dialog box that pops up to remind you of an
appointment. While these are the most common examples, there are actually
many other types of windows. A command button is a window. Icons, text
boxes, option buttons and menu bars are all windows.

The Microsoft Windows operating system manages all of


these many windows by assigning each one a unique id number (window
handle). The system continually monitors each of these windows for signs of
activity or events. Events can occur through user actions such as a mouse
click or a key press, through programmatic control, or even as a result of
another window's actions.

Each time an event occurs, it causes a message to be sent to


the operating system. The system processes the message and broadcasts it to
the other windows. Each window can then take the appropriate action based
on its own instructions for dealing with that particular message (for example,
repainting itself when it has been uncovered by another window).

D.A.V College, Jalandhar 34


Punjab Police Automation

As you might imagine, dealing with all of the possible


combinations of windows, events and messages could be mind-boggling.
Fortunately, Visual Basic insulates you from having to deal with all of the
low-level message handling. Many of the messages are handled
automatically by Visual Basic; others are exposed as Event procedures for
your convenience. This allows you to quickly create powerful applications
without having to deal with unnecessary details.
Event-Driven Model

In traditional or procedural applications, the application


itself controls which portions of code execute and in what sequence.
Execution starts with the first line of code and follows a predefined path
through the application, calling procedures as needed.

In an event-driven application, the code doesn't follow a


predetermined path — it executes different code sections in response to
events. Events can be triggered by the user's actions, by messages from the
system or other applications, or even from the application itself. The
sequence of these events determines the sequence in which the code
executes; thus the path through the application's code differs each time the
program runs.

Because you can't predict the sequence of events, your code


must make certain assumptions about the "state of the world" when it
executes. When you make assumptions (for example, that an entry field must
contain a value before running a procedure to process that value), you should
structure your application in such a way as to make sure that the assumption
will always be valid (for example, disabling the command button that starts
the procedure until the entry field contains a value).

Your code can also trigger events during execution. For


example, programmatically changing the text in a text box cause the text
box's Change event to occur. This would cause the code (if any) contained in
the Change event to execute. If you assumed that this event would only be
triggered by user interaction, you might see unexpected results. It is for this
reason that it is important to understand the event-driven model and keep it
in mind when designing your application.

D.A.V College, Jalandhar 35


Punjab Police Automation

Interactive Development
The traditional application development process can be
broken into three distinct steps: writing, compiling, and testing code. Unlike
traditional languages, Visual Basic uses an interactive approach to
development, blurring the distinction between the three steps.

With most languages, if you make a mistake in writing your


code, the compiler catches the error when you start to compile your
application. You must then find and fix the error and begin the compile cycle
again, repeating the process for each error found. Visual Basic interprets
your code as you enter it, catching and highlighting most syntax or spelling
errors on the fly. It's almost like having an expert watching over your
shoulder as you enter your code.

In addition to catching errors on the fly, Visual Basic also


partially compiles the code as it is entered. When you are ready to run and
test your application, there is only a brief delay to finish compiling. If the
compiler finds an error, it is highlighted in your code. You can fix the error
and continue compiling without having to start over.

Because of the interactive nature of Visual Basic, you'll find


yourself running your application frequently as you develop it. This way you
can test the effects of your code as you work rather than waiting to compile
later.

MANAGING PROJECTS

To create an application with Visual Basic, you work with


projects. A project is the collection of files you use to build an application.
This chapter describes how to build and manage projects.
When you create an application, you will usually create new forms; you
might also reuse or modify forms that were created for previous projects.
The same is true for other modules or files that you might include in your
project. ActiveX controls and objects from other applications can also be
shared between projects.

D.A.V College, Jalandhar 36


Punjab Police Automation

After all of the components in a project have been assembled and the code
written, you compile your project to create an executable file.

D.A.V College, Jalandhar 37


Punjab Police Automation

Working with Projects

As you develop an application, you work with a project to


manage all the different files that make up the application. A project consists
of:
One project file that keeps track of all the components (. vbp).
One file for each form (. frm).

One binary data file for each form containing data for properties of controls
on the form (. frx). These files are not editable and are automatically
generated for any .frm file that contains binary properties, such as Picture or
Icon.

Optionally, one file for each class module (. cls).

Optionally, one file for each standard module (. bas).

Optionally, one or more files containing ActiveX controls (. OCX).

Optionally, a single resource file (. res).

The project file is simply a list of all the files and objects associated with the
project, as well as information on the environment options you set. This
information is updated every time you save the project. All of the files and
objects can be shared by other projects as well.
When you have completed all the files for a project, you can convert the
project into an executable file (. exe): From the File menu, choose the Make
project.exe command.

The Project Explorer

As you create, add, or remove editable files from a project,


Visual Basic reflects your changes in the Project Explorer window, which
contains a current list of the files in the project. The Project Explorer
window shows some of the types of files you can include in a Visual Basic
project.

D.A.V College, Jalandhar 38


Punjab Police Automation

The Project File

Each time you save a project, Visual Basic updates the project
file (. vbp). A project file contains the same list of files that appears in the
Project Explorer window, as well as references to the ActiveX controls and
insert able objects that are used in the project.

You can open an existing project file by double-clicking its icon,


by choosing the Open Project command from the File menu, or by dragging
the file and dropping it on the Project Explorer window.

The Structure of a Visual Basic Project

The following sections describe the different types of files and


objects that you can include in a project.

Form Modules

Form modules (. frm file name extension) can contain textual


descriptions of the form and its controls, including their property settings.
They can also contain form-level declarations of constants, variables, and
external procedures; event procedures; and general procedures.

Class Modules

Class modules (.cls file name extension) are similar to form


modules, except that they have no visible user interface. You can use class
modules to create your own objects, including code for methods and
properties.

Standard Modules

Standard modules (. bas file name extension) can contain


public or module-level declarations of types, constants, variables, external
procedures, and public procedures.

D.A.V College, Jalandhar 39


Punjab Police Automation

Resource Files

Resource files (. res file name extension) contain bitmaps, text


strings, and other data that you can change without having to re-edit your
code. For example, if you plan to localize your application in a foreign
language, you can keep all of the user-interface text strings and bitmaps in a
resource file, which you can then localize instead of the entire application. A
project can contain no more than one resource file.

ActiveX Documents

ActiveX documents (. dob) are similar to forms, but are


displayable in an Internet browser such as Internet Explorer. The
Professional and Enterprise editions of Visual Basic are capable of creating
ActiveX documents.

User Control and Property Page Modules

User Control (. ctl) and Property Page (. pag) modules are also
similar to forms, but are used to create ActiveX controls and their associated
property pages for displaying design-time properties. The Professional and
Enterprise editions of Visual Basic are capable of creating ActiveX controls.

Components

In addition to files and modules, several other types of


components can be added to the project.

ActiveX Controls

ActiveX controls (. OCX file name extension) are optional


controls which can be added to the toolbox and used on forms. When you
install Visual Basic, the files containing the controls included with Visual
Basic are copied to a common directory (the \Windows\System subdirectory
under Windows 95 or later). Additional ActiveX controls are available from

D.A.V College, Jalandhar 40


Punjab Police Automation

a wide variety of sources. You can also create your own controls using the
Professional or Enterprise editions of Visual Basic.

Insertable Objects

Insert able objects, such as a Microsoft Excel Worksheet object, are


components you can use as building blocks to build integrated solutions. An
integrated solution can contain data in different formats, such as
spreadsheets, bitmaps, and text, which were all created by different
applications.

References

You can also add references to external ActiveX components that


may be used by your application. You assign references by using the
References dialog, accessed from the References menu item on the Project
menu.

ActiveX Designers

ActiveX designers are tools for designing classes from which


objects can be created. The design interface for forms is the default designer.
Additional designers may be available from other sources.

Standard Controls

Standard controls are supplied by Visual Basic. Standard


controls, such as the command button or frame control, are always included
in the toolbox, unlike ActiveX controls and insertable objects, which can be
removed from or added to the toolbox.

D.A.V College, Jalandhar 41


Punjab Police Automation

Creating, Opening, and Saving Projects

Four commands on the File menu allow you to create, open, and save
projects.

Menu command Description


Closes the current project, prompting you to save any files
that have changed. You can select a type of project from
New Project
the New Project dialog. Visual Basic then creates a new
project with a single new file.
Closes the current project, prompting you to save any
changes. Visual Basic then opens an existing project,
Open Project
including the forms, modules, and ActiveX controls listed
in its project (. vbp) file.
Updates the project file of the current project and all of its
Save Project
form, standard, and class modules.
Updates the project file of the current project, saving the
project file under a file name that you specify. Visual
Save Project As
Basic also prompts you to save any forms or modules that
have changed.

It is also possible to share files between projects. A single file,


such as a form, can be part of more than one project. Note that changes made
to a form or module in one project will be propagated amongst all projects
that share that module.

Working with Multiple Projects

You can create many applications by working with a single


project. However, as your applications become more complex, you may
want to work with multiple projects in the same session of the programming
environment. For example, you may want to use one project to build an
application's executable file, and a second project to serve as a "scratch pad"
for testing code before you add it to the application.

D.A.V College, Jalandhar 42


Punjab Police Automation

You can add a new or existing project to your current editing


session by adding it to a project group. You can then save the project group
and work with it in subsequent editing sessions. You can open either the
project group or an individual project in the project group, or add the project
group or its individual projects to another project group.

In a project group, one executable project serves as a startup


project. When a project group is open and you choose Start from the Run
menu, click the Start button on the toolbar, or press F5, Visual Basic runs the
startup project.

In the Professional or Enterprise edition, you can use project


groups to create and debug multiple-component applications. For example,
you can create and debug project groups containing standard executable
projects, ActiveX executable projects, ActiveX dynamic-link library
projects, or ActiveX control projects.

Adding or removing a Project

When you create a new project either at startup or by selecting


the New Project command on the File menu, Visual Basic automatically
creates a project group for it. You can then add additional new or existing
projects to the project group.

To add a new project to a project group

 Click the Add Project button on the Toolbar or choose Add Project
from the File menu.In Visual Basic, Learning edition, Visual Basic
automatically adds a new executable project to the project group. In
the Professional and Enterprise editions, you can select the type of
project you want to add from the popup menu of the Add Project
button, or the icons displayed in the new tab of the Add Project
dialog box.

To add an existing project to a project group

1. From the File menu, choose Add Project. Visual Basic displays the Add
Project dialog box.

D.A.V College, Jalandhar 43


Punjab Police Automation

2. Click the Existing tab.

3. Select a project file, then choose Open.

Visual Basic adds the selected project to the project group.Visual


Basic displays multiple projects in the Project window in a hierarchical
view. Each project appears at the top level, with the project's forms,
modules, controls, property pages, or document objects grouped under it in
the hierarchical view.

To remove a project from a project group

1. Select the name of the project in the Project window.

2. From the File menu, choose Remove Project.

Visual Basic removes the selected project from the project group.
In the Professional and Enterprise editions of Visual Basic, you can change
the type of a project by selecting the Project Properties command on the
Project menu, then changing the Project Type option on the General tab in
the Project Properties dialog box.

Specifying a Startup Project

Because a project group contains multiple projects, Visual Basic


needs to know which project to run when you choose Start from the Run
menu, click the Start button on the toolbar, or press F5. By default, Visual
Basic runs the first executable (. exe) project that is added to a project group.
However, you can specify a different startup component.

To specify a startup component

1. In the Project window, select a project.

2. Click the right mouse button and select Set as Start Up from the
context menu.

Visual Basic displays the startup project's name in bold type in the
Project window.

D.A.V College, Jalandhar 44


Punjab Police Automation

Adding Controls to a Project

The set of controls available in the toolbox can be customized for


each project. Any given control must be in the toolbox before you can add it
to a form in the project.
Adding ActiveX Controls to a Project

You can add ActiveX controls and Insertable objects to your project by
adding them to the toolbox.

To add a control to a project's toolbox

4. From the Project menu, choose Components. The Components dialog


box is displayed, as shown in Figure 4.3. The items listed in this dialog box
include all registered ActiveX controls, Insertable objects, and ActiveX
designers.

5. To add a control (. OCX file name extension) or an Insertable object to


the toolbox, selects the check box to the left of the control name. To view
controls with .OCX file name extensions, select the Controls tab. To view
insertable objects, such as a Microsoft Excel Chart, select the Insertable
Objects tab.

6. Choose OK to close the Components dialog box. All of the ActiveX


controls that you selected will now appear in the toolbox.

To add ActiveX controls to the Components dialog box, choose


the Browse button, and search other directories for files with a .OCX file
name extension. When you add an ActiveX control to the list of available
controls, Visual Basic automatically selects the check box.

Removing Controls from a Project


To remove a control from a project

D.A.V College, Jalandhar 45


Punjab Police Automation

From the Project menu, choose Components. The Components


dialog box is displayed. Clear the check box next to each control you want
to remove. The control icons will be removed from the toolbox.
Using Other Applications' Objects

You can also use objects from other applications, such as those
included in the Microsoft Excel object library, either as controls in the
toolbox or as programmable objects in your code.
To make another application's objects available in your code,
but not as controls, set a reference to that application's object library.

To add a reference to another application's object library

1 From the Project menu, choose References. The References dialog


box is displayed.

2 Select the check box next to each reference you want to add to your
project. To add references to applications not listed in the References
dialog box, choose the Browse button, and then select the application.

3 Choose OK to add the selected references to your project.

If you are not using any objects in a referenced library, you


should clear the check box for that reference to minimize the number of
object references Visual Basic must resolve, thus reducing the time it takes
your project to compile.

Once you have set references to the object libraries you want
you can find a specific object and its methods and properties in the Object
Browser by choosing Object Browser from the View menu. You can use any
object listed in the Object Browser in your code.

Using a Resource File

A resource file allows you to collect all of the version-specific


text and bitmaps for an application in one place. This can include constant
declarations, icons, screen text, and other material that may change between
localized versions or between revisions or specific configurations.

D.A.V College, Jalandhar 46


Punjab Police Automation

To add a file to a project


1. From the Project menu, select Add File.The Add File dialog box is
displayed.
2. Select an existing resource file (. res) and choose Open.

A single project can have only one resource file; if you add a
second file with a .res extension, an error occurs.

Setting Project Options

Visual Basic allows you to customize each project by setting a


number of properties. Use the Project Properties dialog box, accessible
through the Project Properties command on the Project menu. Property
settings are saved to the project (. vbp) file.

The following table describes some of the options you can set.

Option Description
The first form that Visual Basic displays at run time,
Startup Object
or Sub Main ().
Identifies the project in code. It can't contain periods
(.), spaces, or start with a nonalphabetic character.
Project Name
For a public class name, the project name and class
name cannot exceed a total of 37 characters.
The name of the Help file associated with the
Help File
project.
The context ID for the specific Help topic to be
called when the user selects the "?" button while the
Project Help Context ID
application's object library is selected in the Object
Browser.
A user-friendly name for the project. Displayed in
Project Description
the References and Object Browser dialog boxes.

Many other options are also available, including those for


compiling, components, and multithreading. When you're ready to access

D.A.V College, Jalandhar 47


Punjab Police Automation

some of the more advanced options, you can find more information by
searching Help.

Forms, Controls, and Menus

The first step to creating an application with Visual Basic is to


create the interface, the visual part of the application with which the user
will interact. Forms and controls are the basic building blocks used to create
the interface; they are the objects that you will work with to build your
application.

Forms are objects that expose properties, which define their


appearance, methods, which define their behavior, and events, which, define
their interaction with the user. By setting the properties of the form and
writing Visual Basic code to respond to its events, you customize the object
to meet the requirements of your application.

Controls are objects that are contained within form objects.


Each type of control has its own set of properties, methods and events that
make it suitable for a particular purpose. Some of the controls you can use in
your applications are best suited for entering or displaying text. Other
controls let you access other applications and process data as if the remote
application was part of your code.

This chapter introduces the basic concepts of working with


forms and controls and their associated properties, methods, and events.
Many of the standard controls are discussed, as well as form-specific items
such as menus and dialog boxes.

Designing a Form

Form objects are the basic building blocks of a Visual


Basic application, the actual windows with which a user interacts when they
run the application. Forms have their own properties, events, and methods
with which you can control their appearance and behavior. The first step in
designing a form is to set its properties. You can set a form's properties at
design time in the Properties window or at run time by writing code.

D.A.V College, Jalandhar 48


Punjab Police Automation

Setting Form Properties

Many of a form's properties affect its physical appearance. The


Caption property determines the text that is shown in the form's title bar; the
Icon property sets the icon that is displayed when a form is minimized. The
Max Button and Min Button properties determine whether the form can be
maximized or minimized. By changing the Border Style property, you can
control the resizing behavior of the form.

Height and Width properties determine the initial size of a


form; Left and Top properties determine the form's location in relation to the
upper left-hand corner of the screen. The Window State property can be set
to start the form in a maximized, minimized, or normal state.

The Name property sets the name by which you will refer to
the form in code. By default, when a form is first added to a project, its name
is set to Form1, Form2, and so forth. It's a good idea to set the Name
property to something more meaningful, such as "frm Entry" for an order
entry form.

The best way to familiarize you with the many form properties
is to experiment. Change some of the properties of a form in the Properties
window, then run the application to see their effect. You can learn more
about each property by selecting it and pressing F1 to view the context-
sensitive Help.

Form Events and Methods

As objects, forms can perform methods and respond to events.


The Resize event of a form is triggered whenever a form is resized, either by
user interaction or through code. This allows you to perform actions such as
moving or resizing controls on a form when its dimensions have changed.

The Activate event occurs whenever a form becomes the


active form; the Deactivate event occurs when another form or application
becomes active. These events are convenient for initializing or finalizing the
form's behavior. For example, in the Activate event you might write code to

D.A.V College, Jalandhar 49


Punjab Police Automation

highlight the text in a particular text box; in the Deactivate event you might
save changes to a file or database.

To make a form visible, you would invoke the Show method:


Form2.Show
Invoking the Show method has the same effect as setting a form's visible
property to True.

Many of a form's methods involve text or graphics. The Print,


Line, Circle, and Refresh methods are useful for printing or drawing directly
onto a form's surface.

Additional Controls

Still other controls defy categorization, but are useful


nonetheless. You can also use ActiveX controls, previously called custom or
OLE controls, in a Visual Basic application in the same way that you use the
standard controls. The Professional and Enterprise editions of Visual Basic
include several ActiveX controls as well as the capability to build your own
controls. Additional ActiveX controls for just about any purpose imaginable
is available for purchase from numerous vendors.

Several other standard controls are included in the Visual Basic


toolbox. Some controls are useful for working with large amounts of data
contained in an external database. Other controls can be used to access the
Windows file system Data Access Controls

In today's business, most information is stored in one or more


central databases. Visual Basic includes several data access controls for
accessing most popular databases, including Microsoft Access and SQL
Server.

 The ADO Data control is used to connect to a database. Think of it as


a pipeline between the database and the other controls on your form.
Its properties, methods, and events allow you to navigate and
manipulate external data from within your own application.

D.A.V College, Jalandhar 50


Punjab Police Automation

 The Data List control is similar to the list box control. When used in
conjunction with an ADO Data control, it can be automatically filled
with a list of data from a field in an external database.

 The Data Combo control is like a combination of the Data List control
and a text box. The selected text in the text box portion can be edited,
with the changes appearing in the underlying database.

 The Data Grid control displays data in a grid or table. When used in
conjunction with an ADO Data control, it presents fully editable data
from multiple fields in an external database.

 The Microsoft Hierarchical Flex Grid control is a unique control for


presenting multiple views of data. Think of it as a combination of a
grid and a tree or outline control. At run time, the user can rearrange
columns and rows to provide different views of the data.

File System Controls

Visual Basic includes three controls for adding file-handling


capabilities to your application. These controls are normally used together to
provide a view of drives, directories and files; they have special properties
and events that tie them together.

 The Drive List Box control looks like a combo box. It provides a
drop-down list of drives from which the user can select.

 The Dir. List Box is similar to a list box control, but with the built-in
capability of displaying a list of directories in the currently selected
drive.

 The File List Box control also looks like a list box with a list of file
names in a selected directory.

Miscellaneous Controls

Several other standard controls are included in Visual Basic. Each serves a
unique purpose.

D.A.V College, Jalandhar 51


Punjab Police Automation

 The timer control can be used to create an event in your application at


a recurring interval. This is useful for executing code without the need
for user interaction.

 The OLE container control is an easy way to add capabilities like


linking and embedding to your application. Through the OLE
container control, you can provide access to the functionality of any
OLE-enabled application such as Microsoft Excel, Word and many
others.

 The common dialog control adds built-in dialog boxes to your


application for the selection of files, colors, fonts, and printing
functions.

Menu Basics

If you want your application to provide a set of commands to


users, menus offer a convenient and consistent way to group commands and
an easy way for users to access them.

The menu bar appears immediately below the title bar on the
form and contains one or more menu titles. When you click a menu title
(such as File), a menu containing a list of menu items drops down. Menu
items can include commands (such as New and Exit), separator bars, and
submenu titles. Each menu item the user sees corresponds to a menu control
you define in the Menu Editor .

To make your application easier to use, you should group menu


items according to their function. For example, the file-related commands
Knew, Open, and Save as… are all found on the File menu.

Some menu items perform an action directly; for example, the


Exit menu item on the File menu closes the application. Other menu items
display a dialog box — a window that requires the user to supply
information needed by the application to perform the action. These menu
items should be followed by an ellipsis (…). For example, when you choose
save as… from the File menu, the Save File As dialog box appears.

D.A.V College, Jalandhar 52


Punjab Police Automation

A menu control is an object; like other objects it has properties


that can be used to define its appearance and behavior. You can set the
Caption property, the Enabled and Visible properties, the checked property,
and others at design time or at run time. Menu controls contain only one
event, the Click event, which is invoked when the menu control is selected
with the mouse or using the keyboard.

Pop-up Menus

A pop-up menu is a floating menu that is displayed over a form,


independent of the menu bar .The items displayed on the pop-up menu
depend on the location of the pointer when the right mouse button is
pressed; therefore, pop-up menus are also called context menus. (In
Windows 95 or later, you activate context menus by clicking the right mouse
button.) You should use pop-up menus to provide an efficient method for
accessing common, contextual commands. For example, if you click a text
box with the right mouse button, a contextual menu would appear.Any menu
that has at least one menu item can be displayed at run time as a pop-up
menu. To display a pop-up menu, use the Popup Menu method.

Using the Menu Editor

With the Menu Editor, you can add new commands to existing
menus, replace existing menu commands with your own commands, create
new menus and menu bars, and change and delete existing menus and menu
bars. The main advantage of the Menu Editor is its ease of use. You can
customize menus in a completely interactive manner that involves very little
programming.

To display the Menu Editor

From the Tools menu, choose Menu Editor.


This opens the Menu Editor While most menu control properties can be set
using the Menu Editor; all menu properties are also available in the
Properties window. You would normally create a menu in the Menu Editor;
however, to quickly change a single property, you could use the Properties
window.

D.A.V College, Jalandhar 53


Punjab Police Automation

D.A.V College, Jalandhar 54


Punjab Police Automation

D.A.V College, Jalandhar 55


Punjab Police Automation

7) WINDOWS Advance Server 2000

An appreciation for the elegance, stablity,


security, and unfortunately, the complexity of Advance Server
is already been developed. Administration has become greatly
simplified by the developing GUI tools in version 5.0 .
Following are the primary Advance Server features that impact
Active Server:-

 Windows Advance Server services model or the way


Windows 2000 manages background application.

 Windows 2000 registry setting and editor, which


control the configuration setting for the operating
system and installed programs.

 The Windows 2000 file and directory security model,


which manages access permissions to the hard
drive.

 Windows 2000 computer management, which


controls the permisions and profile information
about users and groups set up for the Windows
2000 Server and/or Domain.

D.A.V College, Jalandhar 56


Punjab Police Automation

8) SYSTEM ANALYSIS

The basic aim of system analysis is to obtain a clear understanding of the


needs of the client and the users, what exactly is desired from the software
and what the constraints on the solution are. Analysis leads to the actual
specification. Analysis involves interviewing the client and end users.
Typically, analysts research a problem by asking questions to the clients and
the users by reading existing documents. The process of obtaining answers
to question that might arise in an analyst’s mind continues until the analyst
feels that “all” the information has been obtained.

Frequently the client and the user do not understand or know


all their needs, because the potential of the new system is often not fully
appreciated. Due to this, it is extremely important that the analyst thoroughly
understand the client’s organization and its purpose, the problem domain,
and the purpose of automation. System analysis is done by:

Analysis Issues:
As analysis is the activity that feeds information to the
specification activity; it is essential that during analysis a complete and
consistent set of specifications emerge for the system. For achieving this, the
first major problem is to obtain the necessary information. Generally, during
analysis, a massive amount of information is collected in the form of
answers to questions, questionnaires, and information from documentation,
ideas, and so forth.

The basic principle used in analysis is the same as in any


complex task: divide and conquer. That is, partition the problem into sub
problems and try to understand each sub problem and its relationships to
other sub problems in an effort to understand the total problem. However, to
employ partitioning for analysis, the immediate question that comes is
“partition with respect to what?”

D.A.V College, Jalandhar 57


Punjab Police Automation

Informal Approach:
The informal approach to analysis is one where no defined
methodology is used. Like in any approach, the information about the
system is obtained by interaction with the client, end users, questionnaires,
study of existing documents, brainstorming etc. Frequently ion such an
approach the analyst will have a series of meetings with the client and end
users. In the early meetings, the client and the end users will explain to the
analyst about their work, their environment, and their need as they perceive
them. The informal approach to analysis is used widely and can be quite
useful. The reason for its usefulness is that conceptually modeling-based
approaches frequently don’t model all aspects of the problem and are not
always well suited for all the problems.

Structured Analysis:
The structured analysis technique uses function based
decomposition while modeling the problem. It focuses on the function
performed in the problem domain and the data consumed and produced by
these functions. It is a top-down refinement approach, which was originally
called structured analysis.

Data flow diagrams and data dictionary:

Data flow diagram is commonly used during problem


analysis. DFDs area very useful; in understanding a system and can be
effectively used during analysis. A DFD shows the flow of data through a
system. The DFD aims to capture the transformation that take place within a
system to the input data so that eventually the output data is produced. It
should be point out That DFD is not a flow chart. A DFD represents the flow
of data, while a flow chart shows the flow of control. So while drawing a
DFD, one must not get involved in procedural detail, and procedural
thinking must be avoided.

Data dictionary:

D.A.V College, Jalandhar 58


Punjab Police Automation

The data dictionary is a repository of various data flows


defined in DFDs. The associated data dictionary states precisely the structure
of each data flow in the DFD. Once we have constructed the DFD and its
associated data dictionary, we have to somehow verify that they are
“correct”

D.A.V College, Jalandhar 59


Punjab Police Automation

D.A.V College, Jalandhar 60


Punjab Police Automation

9) FEASIBILITY STUDY

During Feasibility study, the operational, technical and the economic


viability of the project are examined. It is a test of system proposal
according to its workability, impact of the organization, ability to meet user
need and effective use of resources. Our objective was not to solve the
problem but to acquire a sense of its scope. The various important topics
covered in feasibility study are:

 Multiple accesses :- Multiple user should have


access to the same
Information simultaneously.

 Time saving :- Fewer personnel should be


able to retrieve more
Information in less time.

 Storage capacity: - The system should be large


enough to allow unlimited
expansion.

 Data organization: - Retrieval of data should be


specified in any order.

 Future flexibility: - The system should be capable


of adding more files in event of future
growth.

 Ease of transition :- Ease of transition which


involves implementation
Procedure and employee training.

9.1) Operational feasibility

D.A.V College, Jalandhar 61


Punjab Police Automation

The main objective here is to determine whether the system


will work after it is developed and installed. A proper investigation is done
in this regard and as a result the following conclusions are derived:

There is sufficient support from the management and the


personnel involved. The current methods are too cumbersome and take a lot
of time and include repetitive works. The important data is not readily
available when desired. It takes a lot of time to gather the important statistics
regarding the system. The persons involved in the current working of the
system are met and discussions are held with them to evolve a system with
much they have good participation and interest.

9.2) Technical feasibility

The proposed system hardware and software needs are


already satisfied because the police station already has personnel computers
installed in administrative office. They have other hardware, such as
printers, CD-ROMs etc. They also have a licensed version of Oracle 8i
which fulfills the requirements of the relational database management
system required for proposed system to manage database. The cost incurred
for the new system is only the development cost of the integrated application
program that will run on the existing hardware and will use the other
available resources.

9.3) Economical feasibility

The cost of acquiring the proposed system is not too high.


The company already has the suitable hardware with them. They just need to
buy the software to support the product.

9.4) Social feasibility

The main objective to develop the project is to provide the


user with ease to work with it so that he/she can easily run the project and
know its working.

D.A.V College, Jalandhar 62


Punjab Police Automation

D.A.V College, Jalandhar 63


Punjab Police Automation

10) TECHNIQUES USED TO GATHER


INFORMATION

10.1) ONLINE OBSERVATION AND

QUESTIONNARIES

Online observation involves the interaction of the analyst with the clients
and the users. In this approach we had a series of meetings with the Rama
madam and staff employees in the S.S.P Office of Jalandhar city. In the early
meetings, they explained to us about their work, their environment and their
needs as they perceive them. In those and early meetings we were basically
listeners, absorbing the information provided. Once we understood the
system to some extent, we use the next few meetings to seek clarifications of
the parts we had not understood. In the final meeting, we explain to them
what we understood the system should do and use the meetings as a means
of verifying if what we proposed the system should do is indeed consistent
with the objective of their department.

10.2) REVIW OF WRITTEN DOCUMENTS

In this approach we viewed the written documents of their staff as existing


documents are the major source of the information. So many documents
describing the work of the department were given to us, along with the
outputs of the existing methods of performing the task. We document the
information in some manner and did some brainstorming or thinking about
what the system should do. We study their FIR form, crime detail form,
arrest form, general dairy numbers register etc. After viewing or reviewing,
we organize the information obtained so that information can be effectively
evaluated for the completeness and consistency.

D.A.V College, Jalandhar 64


Punjab Police Automation

11) DATA FLOW DIAGRAM THEORY

The DFD was developed as a way of expressing system requirements in


graphical form; that is led into a modular design. A DFD is also known as
“Bubble Chart”. A DFD has a purpose of clarifying system requirement and
identifying major transformations that will become programs in system
design. So it is the staring point of the design phase that functionally
decomposes the requirement specification down to the lowest level of detail.
A DFD consists of a series of bubbles joined lines. The bubble represents
data transformation and the lines represents data floe in the system.

DFD SYMBOLS

In a DFD there are four symbols,


1. A square defines a source (originator) or destination of the system
data.
2. An arrow identifies data flow ---data in motion . It is pipeline through
which information flows.
3. A circle or a bubble (or an oval bubble) represents processes that
transform incoming dataflow(s) into outgoing dataflow(s).
4. An open rectangle is a data store –data at rest, or temporary repository
of data.

DFDs describe what data flow i.e. logical data flow rather how they are
processed,
And so it does not depend on hardware, software, data structures or file
organization.

Constructing a DFD

Several rules or thumbs are used in drawing a DFD:

1. Processes should be named and numbered for easy reference. Each


name should be representative of the process.

2. The direction of the flow if from top to bottom and from left to
right. Data traditionally flow from source (upper left corner) to the

D.A.V College, Jalandhar 65


Punjab Police Automation

destination (lower right corner), although they may flow back to


source. One way to indicate this is to draw along flow back to
source. An alternative way is to repeat he source symbol as a
destination. Since it is used more than once in the DFD, it is
marked with a short diagonal in the lower right corner.

3. When a process is exploded into lower-level details, they are


numbered.

4. The names of the data stores, sources, and destinations are written
in the capital letters. Process and dataflow names have the first
letter of each word capitalized.

D.A.V College, Jalandhar 66


Punjab Police Automation

D.A.V College, Jalandhar 67


Punjab Police Automation

12) Schema Diagram

1.)

D.A.V College, Jalandhar 68


Punjab Police Automation

2.)

D.A.V College, Jalandhar 69


Punjab Police Automation

3.)

D.A.V College, Jalandhar 70

You might also like