Project Report PTSM ACKNOWLEDGMENT I express thanks and gratitude to Mr.……………….. …….............. H.O.D computer science department, College for his encouraging support and guidance in carrying out the project. I would like to express gratitude and indebtedness to Mr.……………….... for his valuable advice and guidance without which this project would not have seen the light of the day. I thank Mr.…………………..................., project guide, GSS for his insistence on good programming technique which helped us to design and develop a successful model of PTSM. - 1 -
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
Project Report PTSM
ACKNOWLEDGMENT
I express thanks and gratitude to Mr.………………..…….............. H.O.D
computer science department, College for his encouraging support and
guidance in carrying out the project.
I would like to express gratitude and indebtedness to Mr.………………....
for his valuable advice and guidance without which this project would not
have seen the light of the day.
I thank Mr.…………………..................., project guide, GSS for his
insistence on good programming technique which helped us to design and
develop a successful model of PTSM.
____________________
______________________
- 1 -
Project Report PTSM
CONTENTS
DESCRIPTION PAGENO
ABSTRACT
INTRODUCTION
ORGANIZATION PROFILE
MODULE DESCRIPTION
TECHNOLOGY
DATAFLOW DIAGRAMS
SOFTWARE REQUIREMENTS
HARDWARE REQUIREMENTS
OVERVIEW OF JAVA TECHNOLOGY
OUTPUTS
CONCLUSION
BIBLIOGRAPHY
- 2 -
Project Report PTSM
ABSTRACT
Advances in technology and the growth and use of internet in different
domains has opened new ways of addressing and finding a far more
better Solution to problems in different domains.
One such domain is addressing to Trouble shooting and management of
computers and other sharable peripherals connected to a given network
The use of interconnected shared peripherals in a network has become a
norm in all huge, small, private, government corporate, non corporate
organizations ,especially in huge organizations where the number of
employees who use these shared peripherals is quite large allocation of
these peripherals and subsequent tracking and trouble shooting
management becomes a cumbersome ,complicated and inefficient .And in
organization where timelines play a very vital role immediate handling of all
trouble shooting becomes essential, A physical communication of this
problems rather becomes too time consuming and is prone to be
inefficient. thereby having an management system which allows
centralized control and management becomes rather essential.
The need of the hour is to implement an Online control and trouble
shooting management system for maintaining the peripherals in the
network of an huge corporate organization. In such a system the entire
peripheral allotment and subsequent trouble shooting reporting should be
centralized by implementing a complete control from a central controlling
authority say an administrator who is responsible for allocating different
- 3 -
Project Report PTSM
shared peripheral including computers to the organization employees, the
employees in turn can lodge there trouble shooting complaints online, in
turn the administrator can assign the trouble shooting rectifications to the
concerned engineers
Goals of the System
To have a centralized control and management of all the shared
peripherals in a given network .
Effeciently addressing to all the troubleshooting of the shared resources
in a given network.
The need to have a personnel interaction for trouble shoot reporting and
subsequent follow up must be eradicated and all issues must be handled
by the system, there by helping those organization where the network is
spread across a geographical domain
Contracts and subcontracts management with various concerned
agencies must be handled by the System.
Design a foolproof system where unauthorized access to resources is
totally eradicated by implementing an appropriate authentication
mechanism.
Generating reports about various managerial aspects such as allocation of
resources ,enquiry reports etc.
- 4 -
Project Report PTSM
ORGANIZATION PROFILE
GALAXY SOFTWARE SOLUTIONS
Galaxy Software Solutions (GSS) is an IT Solution Provider for a dynamic
environment where business and technology strategies converge. Our
approach focuses on new ways of business combining IT innovation and
adoption while also leveraging an organization's current IT assets. We
work with large global corporations and new generation technology
companies - to build new products or services and to implement prudent
business and technology strategies in today's environment.
Galaxy's range of expertise includes:
Software Development Services
Engineering Services
Systems Integration
Customer Relationship Management
Supply Chain Management
Product Development
Electronic Commerce
Consulting
IT Outsourcing
We apply technology with innovation and responsibility to achieve two
broad objectives:
Effectively address the business issues our customers face today
Generate new opportunities that will help them stay ahead in the
future
- 5 -
Project Report PTSM
This approach rests on:
A strategy where we Architect, Integrate and Manage technology
services and solutions — we call it AIM for success.
A robust offshore development methodology and reduced demand
on customer resources
A focus on the use of reusable frameworks to provide cost and time
benefits
We combine the best people, processes and technology to achieve
excellent results — consistently. We offer customers the advantages of:
Speed: We understand the importance of timing, of getting there before
the competition. A rich portfolio of reusable, modular frameworks helps
jump-start projects. Tried and tested methodology ensures that we follow a
predictable, low-risk path to achieve results. Our track record is testimony
to complex projects delivered within and even before schedule.
Expertise: Our teams combine cutting edge technology skills with rich
domain expertise. What's equally important — we share a strong customer
orientation that means we actually start by listening to the customer. We're
focused on coming up with solutions that serve customer requirements
today and anticipate future needs.
A Full Service Portfolio: We offer customers the advantage of being able
to Architect, Integrate and Manage technology services. This means that
they can rely on one, fully accountable source instead of trying to integrate
disparate multi-vendor solutions.
- 6 -
Project Report PTSM
Services: GSS is providing its services to Sain medicaments Pvt. Ltd,
Grace drugs and pharmaceuticals pvt ltd alka drugs and pharmaceuticals
pvt ltd to name just a few with out rich experience and expertise in
Information Technology we are in the best position to provide software
solutions to distinct business requirements.
MODULES
Administration
i) Allocation of resources
ii) Complaint handling through assigning wok to engineers
iii) Creation of reports for managerial use.
Employee interactions
MODULE DESCRIPTION
Administration:
Complaint Handling
Allocation
o Work for Engineers
o Sharable peripherals to employees
Adding of details
o Sharable peripheral details
o Employee details
o Contract management details
- 7 -
Project Report PTSM
Enquires
o Resource Enquires
o Dept Enquires
Reports
o Resource Details
o Issue Details
Employee:
Complaint Posting
Status Acquiring
TECHNOLOGY
Technology Used:
Java
Servlets
Oracle
Operating System:
o Any Operating System
- 8 -
Project Report PTSM
DATA FLOW DIAGRAMS
Data flow diagram is a structure analysis tool that is used for
graphical representation of Data processes through any organization. The
data flow approach emphasis on the logic underlying the system, by using
combination of only 4 symbols. It follows a top down approach. A full
description of a system actually consists of set of DFD s, which comprises
of various levels. And initial over view model is exploded lower level
diagrams that show additional feature of the system. Further each process
can be broken down into a more detailed DFD. This occurs repeatedly until
sufficient details are described.
DFD symbols
Square
It defines a source (originator) or destination of system data.
Arrow
It indicates data flow-data in motion. It is a pipeline through
which information flows.
Circle or Bubble
- 9 -
Project Report PTSM
It represents a process that transforms incoming data flow(s) into outgoing
data flow(s).
Open Rectangle
It is a data store-data at rest, or a temporary repository of data. Here I am
giving only the Data Flow Diagram.
They are explained by
GANE and SARON method
DEMACRO YORDAN method
GANE AND SARSON NOTATION
DATA FLOW
DATA STRUCTURE
- 10 -
Project Report PTSM
EXTERNAL ENTITY
OR DATA LINK
PROCESS
DATA BASE
DEMACRO YORDAN NOTATION
DATA FLOW
DATA STRUCTURE
- 11 -
Project Report PTSM
EXTERNAL ENTITY
OR DATA LINK
PROCESS
DATA BASE
CONTEXT LEVEL DIAGRAM
- 12 -
Project Report PTSM
- 13 -
Project Report PTSM
- 14 -
Project Report PTSM
E – R DIAGRAMS.
- 15 -
Project Report PTSM
DATA DICTIONARY.
Database Design:
Login:
Column Name Type(size)staffno varchar2(10)password Varchar2(10)
employee:
Column name Type(size)staffno Varchar2(10)uname Varchar2(10)Dept Varchar2(10)desg Varchar2(10)loc Varchar2(10)
Division:
Column name Type(size)Divname Varchar2(10)Loc Varchar2(10)phno Varchar2(10)
- 16 -
Project Report PTSM
Depatment:
Column name Type(size)deptno Varchar2(10)Divname Varchar2(10)Hod Varchar2(10) phno Varchar2(10)
pcdetails:
Column name Type(size) ConstraintSyscode Varchar2(10) Primary keySystype Varchar2(10) not nullKbtype Varchar2(10) not nullMonitor Varchar2(10) not nullCdrom Varchar2(10) not nullMemory Varchar2(10) not nullProcessor Varchar2(10) not nullstatus Varchar2(1)pcidate
prdetails:
Column name Type(size) Constraintprcode Varchar2(10) prd1 primary keyColor Varchar2(10) not nullModel Varchar2(10) not nullPidateStatus Varchar2(1)
- 17 -
Project Report PTSM
Usermaster
Column name Type(size) Constraintstaffno varchar2(10) use1 primary keydivname varchar2(10) references division(divname)deptno varchar2(10) references department(deptno)Desg varchar2(10) not nullLoc varchar2(10) not nullPhno varchar2(10) not nullsyscode varchar2(10)sysidateprcode varchar2(10)pridate
Supplier:
Column name Type(size) Constraintsupcode varchar2(10) Primary key
supname varchar2(10) Not null
address varchar2(10)
phno varchar2(10)
- 18 -
Project Report PTSM
Contract:
Column name Type(size) Constraint
conid varchar2(10) Primary key
supcode varchar2(10) References
supplier(supcode)
condate
npc varchar2(10)
npr varchar2(10)
systype varchar2(10)
ptype varchar2(10)
engineer
Column
name
Type(size) Constraint
engcode varchar2(10)
engname varchar2(10) not null
supname varchar2(10) constraint eng1 references
supplier(supcode)
phno varchar2(10) not null
- 19 -
Project Report PTSM
Complaint:
cmpno number(10) constraint com1
primary key
cdate
syscode varchar2(10)
comtype varchar2(20)
ccdate
staffno varchar2(10) constraint com2
references
usermaster(staffno)
engname varchar2(10)
cstatus varchar2(18) not null
- 20 -
Project Report PTSM
SOFTWARE REQUIREMENTS
1. Jdk 1.2, Jsdk1.2 (Servlets)
2. ODBC Drivers installed
3. JDBC Drivers installed
4. Fully Functional Browser
5. J2EE Complaint webserver
6. Database ( Oracle or Sql server)
HARDWARE REQUIREMENTS
1. Personal computer with 80486 or higher
processor
2. 5 GB hard disk space
3. 128 MB RAM
- 21 -
Project Report PTSM
PROJECT DESCRIPTION
In the project we are implementing centralized controlling system on
resources and peripherals of computers, which are connected in a LAN.
In the proposed system we are implementing online complaint posting and
checking the status of the complaint, which was posted by user (i.e. any of
the staff in an organization). In this system each user is provided with unique
login ID. Each user makes a login using his ID if any complaints are there to
be made regarding computer peripherals.
When logged as an administrator, using administrator login. Administrator
has complete control on allocating the resources, complaint clearance,
Enquiries and Reports.
The user has no permissions to access any of the administration part he is
restricted only to post and check status of complaint he made.
Administrator when logged takes view of the complaint which are made
earlier which are pending, new complaints which are made by users and
clear complaints which are to be cleared.
In complaint clearance he put the engineers to work , Administrator assigns
work for engineer. It is also the duty o administrator to take a glance at
- 22 -
Project Report PTSM
adding the new user information, computers information and engineer
information. Administrator should also has to maintain the database of the
supplier who supplies machines to organization and contract information.
Administrator also maintains report of activities which are performed by
him and team of engineers.
On the whole by providing the proposed system to client we make sure that
there will a centralized control for administrator, more user friendly,
efficient usage of the technical skill and usage of new technology available.
The new system developed is a GUI (Graphical User Interface). HTML is
used as front-end and ORACLE or any other RDBMS as datastorage,.
This system is developed with an eye towards the future and can easily be
updated with new modules, as it may need expansion at a later stage i.e.,
data transparency has been maintained to an extent.
The importance of new system is that it is user friendly and has a
better interface with users working on it. It can overcome the problems of
manual system as many users can access simultaneously and the security
problem is solved as it prevents the unauthorized users to access the
system.
Need for the Computerized System
The need for computerized system felt because of following
inefficiencies in the existing system:
- 23 -
Project Report PTSM
1. Existing system is subjected to all types of manual errors.
2. It is inefficient in speedy retrieval of data from the database. For
example just to find out how many PC’s a particular person is
main the administrator has to scan through the entire database.
3. It is cumbersome For example suppose the location of the
system has been changed thus the new IP address has to be
assigned to that particular PC. Cutting down that entry and writing
does it over that. These kinds of changes, which lead to changes
in, more than one table may create confusion if there is, some
mistake.
4. User identity is not checked while a user is registering a
complaint on
5. User is not sure of the status of his complaint
6. After the complaint has been corrected there is no provision so
that the user can give his feedback about the nature of services
rendered by the Engineer.
Thus for the above reason it is clear that automation of the existing manual
system would be of immense help to the user.
Automation:
Advantages of Speed and Accuracy:
Machines are supposed to be faster and accurate than human
beings. Machines can work continuously hours together where as human
beings are bound to make mistakes more hour and after hour. A computer
system provides up to date information to management with the help of
managerial decisions can be made. The speed and memory of human
beings are limited. The mechanized data processing helps in these
- 24 -
Project Report PTSM
directions without much difficulty because millions of operations are done
within few seconds with the help of the computer. Therefore ultimately it is
feasible to go for the process of computerization.
Requirement Specification:
The objective of the project is to provide the administrator and the
user an environment where the administrator can allocate systems and
know the current status of the database. The user can register the
complaint. The major sections of the applications can be classified as
follows
System allocations:
Allocation
Enquiries
Reports
System complaints:
New complaints
Complaint status
Stock details:
PC entry
Printer entry
It is decided that this project is to be programmed using Java Servlets at
the business logic end and HTML as a Client Tier, hence the design is
architecturally neutral and helps the programmer design with ease.
Since Java is Object Oriented, the project adheres to OOAD design
paradigm .
- 25 -
Project Report PTSM
OVERVIEW OF JAVA TECHNOLOGY
Java, whether you love it, or hate it, it's here to stay. Like everyone's
favorite language C, Java has had a major impact on the computing scene.
When the history of computers is written, its name will be up there with the
stars.
If you were to choose just one language to learn today, it should be Java.
It's being pushed aggressively by Sun and is growing by leaps and
bounds. There are lots of Java programmers out there and more join the
party every day.
Java started out as a bit of an accident. A team under Bill Joy was working
at Sun on a new programming language for embedded applications. Java
was originally expected to work in toasters and fridges, not on modern
computers! The initial prognosis for Java was not good and it was only the
rise of the Internet which saved Java from oblivion. Since then, neither the
Net nor Sun nor Java has looked back and all have grown from strength to
strength.
World Wide Web is an open ended information retrieval system
designed to be used in the distributed environment. This system contains
web pages that provide both information and controls. We can navigate to
a new web page in any direction. This is made possible worth HTML java
was meant to be used in distributed environment such as internet. So java
could be easily incorporated into the web system and is capable of
supporting animation graphics, games and other special effect. The web
has become more dynamic and interactive with support of java. We can
- 26 -
Project Report PTSM
run a java program on remote machine over internet with the support of
web.
JAVA ENVIRONMENT
Java environment includes a large no.of tools which are part of the
system known as java development kit (JDK) and hundreds of classes,
methods, and interfaces grouped into packages forms part of java
standard library (JSL).
JAVA ARCHITECTURE
Java architecture provides a portable, robust, high performing
environment for development. Java provides portability by compiling the
byte codes for the java virtual machine which are then interpreted on each
platform by the runtime environment. Java also provides stringent compile
and runtime checking and automatic memory management in order to
ensure solid code.
JAVA VIRTUAL MACHINE
When we compile the code, java compiler creates machine code
(byte code) for a hypothetical machine called java virtual machine (jvm).
The jvm will execute the byte code and overcomes the issue of portability.
The code is written and compile for one machine and interpreted all other
machines. This machine is called java virtual machine.
PARADIGM OF JAVA
Dynamic down loading applets(small application programs);
- 27 -
Project Report PTSM
Elimination of flatware phenomenon that is providing those
features of a product that user needs at a time. The remaining
features of a product can remain in the server.
Changing economic model of the software
Up-to-date software availability
Supports network entire computing
Supports CORBA & DCOM
ABOUT HTML
HTML (hyper text markup language) is a language used to create
hyper text documents that have hyper links embedded in them. It consists
of tags embedded in the text of a document with HTML. We can build web
pages or web documents. it is basically a formatting language and not a
programming language. The browser reading the document interprets
mark up tags to help format the document for subsequent display to a
reader. HTML is a language for describing structured documents. HTML is
a platform independent. WWW (World Wide Web) pages are written using
HTML. HTML tags control in part the representation of the WWW page
when view with web browser. The browser interprets HTML tags in the
web document and displays it. Different browsers show data differently.
Examples of browsers used to be web pages include:
Netscape
Internet Explorer
- 28 -
Project Report PTSM
JavaDataBaseConnectivity(JDBC)
Overview of New Features
Result set enhancements
The JDBC 1.0 API provided result sets that had the ability to scroll in a
forward directionally. Scrollable result sets allow for more flexibility in the
processing of results by providing both forward and backward movement
through their contents. In addition, Scrollable result sets allow for relative
and absolute positioning. For example, it’s possible to move to the fourth
row in a scrollable result set directly, or to move directly to the third row
following the current row provided the row exists. The JDBC API allows
result sets to be directly updatable, as well.
Batch updates
The batch update feature allows an application to submit multiple update
statements (insert/update/delete) in a single request to the database. This
can provide a dramatic Increase in performance when a large number of
update statements need to be executed.
Advanced data types
Increased support for storing persistent Java programming language
objects (Java objects). And a mapping for SQL99 data types such as
binary large objects, and structured Types, has been added to the JDBC
API. An application may also customize the map-ping
Of SQL99 structured types into Java programming language classes.
- 29 -
Project Report PTSM
Rowsets
As its name implies, a rowset encapsulates a set of rows. A rowset may or
may not maintain an open database connection. When a rowset is
‘disconnected’ from its data source, updates performed on the rowset are
propagated to the underlying database using an optimistic concurrency
control algorithm. Rowsets add support to the JDBC API for the
JavaBeans component model. A rowset object is a bean. A rowset
implementation may be serializable. Rowsets can be created at design
time and used in conjunction with other JavaBeans components in a visual
builder tool to construct an application.
JNDI for naming databases
The Java Naming and Directory Interface (JNDI) API can be used in
addition to a JDBC technology-based driver manager (JDBC driver
manager) to obtain a connection to a database. When an application uses
the JNDI API, it specifies a logical name that identifies a particular
database instance and JDBC driver for accessing that database.
This has the advantage of making the application code independent of a
particular
JDBC driver and JDBC technology URL.
Connection Pooling
The JDBC API contains ‘hooks’ that allow connection pooling to be
implemented on top of the JDBC driver layer. This allows for a single
connection cache that spans the different JDBC drivers that may be in use.
- 30 -
Project Report PTSM
Since creating and destroying database connections is expensive,
connection pooling is important for achieving good performance,
especially for server applications.
Distributed transaction support
Support for distributed transactions has been added as an extension to the
JDBC API.
This feature allows a JDBC driver to support the standard 2-phase commit
protocol used by the Java Transaction Service (JTS) API.
Other new features
Support for character streams has been added. This means that character
data can be retrieved and sent to the database as a stream of
internationalized Unicode characters.
Methods to allow java.math.BigDecimal values to be returned with full
precision have also been added. Support for time zones has been added.
What’s actually changed?
A New Package
The JDBC API has been factored into two complementary components.
The first component is API that is core to the Java platform (the core JDBC
2.1 API) and comprises the updated contents of the java’s sql package.
This document contains the specification for the core JDBC 2.1 API. The
second component, termed the JDBC 2.0 Optional
- 31 -
Project Report PTSM
Package API, comprises the contents of a new package, javax.sql, which
as its name implies will be delivered as an optional package to the Java
platform (formerly Java Standard Extension).
The JDBC 2.0 Optional Package API is described in a separate document.
The java.sql package contains all of the additions that have been made to
the existing interfaces and classes, in addition to a few new classes and
interfaces. The new javax.sql package has been introduced to contain the
parts of the JDBC API which are closely related to other pieces of the Java
platform that are themselves Optional Packages. Such as the Java
Naming and Directory Interface (JNDI), and the Java Transaction Service
(JTS).
In addition, some advanced features that are easily separable from the
core JDBC API, such as connection pooling and rowsets, have also been
added to javax.sql. Putting these advanced facilities into an optional
package instead of into core will help keep the core JDBC API small and
focused. Since optional packages are downloadable, it will always be
possible to deploy an application which uses the features in the JDBC
Optional Package that will “run any-where,” since if an optional package
isn’t installed on a client machine; it can be downloaded along with the
application that uses it.
Changes to Classes and Interfaces
The list below contains all of the JDBC 2.1 API core classes and
interfaces. Interfaces and classes that are new are listed in bold type. All of
the interfaces and classes present in the JDBC 1.0 API are also present in
the core JDBC 2.1 API; however, some of the JDBC 1.0 technology
interfaces have gained additional methods. The interfaces that contain new
methods are listed in italics and those that have not changed are in normal
- 32 -
Project Report PTSM
type.
java.sql.Array
java.sql.BatchUpdateException
java.sql.Blob
java.sql.CallableStatement
java.sql.Clob
java.sql.Connection
JDBC 2.1 Core API
java.sql.DatabaseMetaData
java.sql.DataTruncation
java.sql.Date
java.sql.Driver
java.sql.DriverManager
java.sql.DriverPropertyInfo
java.sql.PreparedStatement
java.sql.Ref
java.sql.ResultSet
java.sql.ResultSetMetaData
java.sql.SQLData
java.sql.SQLException
java.sql.SQLInput
java.sql.SQLOutput
java.sql.SQLWarning
java.sql.Statement
java.sql.Struct
java.sql.Time
java.sql.Timestamp
java.sql.Types
- 33 -
Project Report PTSM
The separate core JDBC 2.1 API documentation contains the Java
programming language definitions of the java.sql interfaces and classes
listed above. The figure below shows the more important core interfaces
and their relationships. The important relationships between interfaces
have not changed with the introduction of the new JDBC
API.
The list below contains the classes and interfaces that comprise the
javax.sql package.
A detailed specification of these new types is contained in a separate
document.
javax.sql.ConnectionEvent
javax.sql.ConnectionEventListener
javax.sql.ConnectionPoolDataSurce
- 34 -
Project Report PTSM
javax.sql.DataSource
javax.sql.PooledConnection
javax.sql.RowSet
javax.sql.RowSetEvent
javax.sql.RowSetInternal
javax.sql.RowSetListener
javax.sql.RowSetMetaData
javax.sql.RowSetReader
javax.sql.RowSetWriter
javax.sql.XAConnection
javax.sql.XADataSource
modified
Connection
DriverManager
PreparedStatement
Statement ResultSet
Data types: Date, Time,
TimeStamp, Numeric, CallableStatement
commit, abort
createStatement
getXXX
subclass
subclass
executeQuery
prepareStatement
getXXX
getConnection
prepareCall setXXX
- 35 -
Project Report PTSM
getMoreResults
execute
built-in Java types, etc.
executeQuery
Result Set Enhancements
This chapter discusses the new functionality that has been added to result
sets. The goal of the enhancements is to add two new basic capabilities to
result sets: scrolling and updatability. Several methods have also been
added to enable a JDBC driver to deliver improved performance when
processing results. A variety of examples are included to illustrate the new
features.
Scrolling
A result set created by executing a statement may support the ability to
move backward (last-to-first) through its contents, as well as forward (first-
to-last). Result sets that support this capability are called scrollable result
sets. Result sets that are scrollable also Support relative and absolute
positioning. Absolute positioning is the ability to move directly to a row by
specifying its absolute position in the result set, while relative positioning
gives the ability to move to a row by specifying a position that is relative to
the current row. The definition of absolute and relative positioning in the
JDBC API is modeled on the X/Open SQL CLI specification.
Result Set types
The JDBC 1.0 API provided one result set type—forward-only. The JDBC
2.1 core API Provides three result set types: forward-only, scroll-
insensitive, and scroll-sensitive. As their names suggest, the new result set
types support scrolling, but they differ in their ability to make changes
visible while they are open.
- 36 -
Project Report PTSM
A scroll-insensitive result set is generally not sensitive to changes that
are made while it is open. A scroll-insensitive result set provides a static
view of the underlying data it contains. The membership, order, and
column values of rows in a scroll-insensitive result set are typically fixed
when the result set is created. On the other hand, a scroll-sensitive result
set is sensitive to changes that are made while it is open, and provides a
‘dynamic’ view of the underlying data. For example, when using a scroll-
sensitive result set, changes in the underlying column values of rows are
visible. The membership and ordering of rows in the result set may be
fixed this is implementation defined.
Concurrency types
An application may choose from two different concurrency types for a
result set: read-only and updatable. A result set that uses read-only
concurrency does not allow updates of its contents. This can increase the
overall level of concurrency between transactions, since any number of
read-only locks may be held on a data item simultaneously.
A result set that is updatable allows updates and may use database write
locks to mediate access to the same data item by different transactions.
Since only a single write lock may be held at a time on a data item, this
can reduce concurrency. Alternatively, an optimistic concurrency control
scheme may be used if it is thought that conflicting accesses to data will be
rare. Optimistic concurrency control implementations typically compare
rows either by value or by a version number to determine if an update
conflict has occurred.
Performance
- 37 -
Project Report PTSM
Two performance hints may be given to a JDBC 2.1 technology-enabled
driver to make access to result set data more efficient. Specifically, the
number of rows to be fetched from the database each time more rows are
needed can be specified, and a direction for processing the rows forward,
reverse, or unknown—can be given as well. These values can be changed
for an individual result set at any time. A JDBC driver may ignore a
performance hint if it chooses.
Creating a result set
The example below illustrates creation of a result set that is forward only
and uses read-only concurrency. No performance hints are given by the
example, so the driver is free to do whatever it thinks will result in the best
performance. The transaction isolation level for the connection is not
specified, so the default transaction isolation level of the underlying
database is used for the result set that is created. Note that this code is
just written using the JDBC 1.0 API, and that it produces the same type of
result set that would have been produced by the JDBC 1.0 API.