The SqlPlus Tool By Oracle Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

SqlPlus is a tool provided by Oracle for use specifically with its database installations. It provides the user with full access to the database, provided that the user has the relevant permissions and/or access rights for the task they wish to carry out. The problem with SqlPlus, however, is that it is a command line interface. This is not so much a problem for the staff at the Organization, but for some students, especially those with little or no computing experience, it is a difficult task to learn to use it.

The main objective of this project is to develop a GUI tool for the Oracle installation.

A GUI tool would be the best thing to implement as it is more user friendly, and most people who have used a computer have used a GUI in some form or other, while most will not have used a command line interface. Even if a student has never used a computer before, they will be using a GUI when using the computers at the Organization, and so will have formed some sort of mental model of how a GUI looks and works, and so will find it much easier to adapt to a GUI tool for accessing the Oracle database rather than learning to adapt to a command line interface.

Currently, the SqlPlus tool can be accessed through one of two methods:

A terminal window on a Unix/Linux machine

A telnet window on a PC within the Organization

The method of connecting is a command typed in by the user, who is then prompted for a username and password. Once these are entered, the user is able to access the tables within their database, and create, edit, or delete data or tables themselves, within their own database. The permissions for students do not allow them access to other databases or to any of the functions used to administer the database itself. 



CMC was incorporated on December26, 1975, as the 'Computer Maintenance Corporation Private Limited'. The Government of India held 100 per cent of the equity share capital. On August19, 1977, it was converted into a public limited company.

CMC Limited is a leading IT solutions company and a subsidiary of Tata Consultancy Services Limited (TCS Ltd), one of the world's leading information technology consulting, services and business process outsourcing organizations. We are a part of the Tata group, India's best-known business conglomerate

Over 25 years' of experience in the IT sector has helped CMC understand exactly how technology can help businesses meet their needs. We can provide full life-cycle solutions starting from requirement analysis to maintenance. We have unrivalled software design and development services. Software design and development is a service offered by CMC's system integration strategic business unit.

Software development and maintenance:

We use innovative delivery models and proven quality processes to deliver cost-effective solutions. Our application development and maintenance framework has proven competency in reducing costs for our clients' productivity improvements year-on-year.

This is supplemented by our vast expertise in design and development of host-centric or client-server architecture with any number of tiers, across various environments. Our application development services address the needs of industry verticals such as banking, financial services, insurance, healthcare, government, transportation, mining, shipping, etc.

Our services are implemented with quality processes adhering to SEI-CMM Level 5 and ISO 9001.


Web-enabled applications involve adding a web interface to traditional applications that may have been created even before there was a web.

Web-based applications can integrate with other web-based applications. Web-enabled applications, on the other hand, have separate web gateways that integrate with old software. They permit the use of only specific parts of the software that have been re-written for the web.

Web-enabled applications can broaden access to an old application trapped on a mainframe. By putting a web browser on its front end, the old application becomes available to more employees and customers. It is usually more cost-effective than a completely new web-based system. But, if the legacy application is complex, it may not be economically feasible to build web hooks into more than its most basic function CMC develops web-based and web-enabled applications. Web-based applications are built from.


Graphical user interfaces are so called because we use mouse to point at graphical objects such as windows, menus, icons, buttons and other tools on the screen these graphical tools all represent different types of commands the GUI enables us to issue commands to the computer by using visual objects instead of typing commands this is one of the key advantage of the Graphical User Interface it frees us from memorizing and typing text commands

The scope of the project lies in creating an interface in JAVA for a GUI tool and main objective of the project is to develop a GUI tool for Oracle installation .

We use three concepts of Java they are SWINGS, JDBC, AWT's and also an interface Oracle (SQL PLUS).

A GUI tool would be the best thing to implement as it is more users friendly and must to people who have used a computer have used a GUI in some form or other wise most will not have used a command line interface.


In this we use SQL PLUS as a tool provided by the Oracle for data base installation

Since it provides the user full access to the database ,it is a command line interface

Using SQL PLUS tool we can access through a terminal window on a Unix / Linux machine or a telnet window on a PC with in the organization.

So people who are not having any computer knowledge it is a difficult task to learn and use it


In this we provide a GUI tool for Oracle installation

This GUI tool is more user friendly compared to SQL PLUS

Using this GUI tool the user can easily access the tables with in their data base and create, edit or delete data or tables themselves with in their own database

So it is easier to adapt GUI tool for accessing the database rather than command line interface.



There is only one module in this application Administrator and user.

The user is prompted for a username and password. Once these are entered the user is able to access the tables within their database, and create, edit or delete data or tables themselves with in their database.

The Administrator do not allow the users to access the other databases or to any of the functions used to administer the database it self.





SQL PLUS tool can be accessed through a telnet window on a PC within the organization. The method of connecting is a command typed in by the user and then prompted for a username and password. Once these are entered the user is able to access the tables within their database and can create, edit , or delete data or tables themselves, with in their own database. The permissions for users to access the database are provided by Administrator who checks the database, modifies etc.



P III 500 MHz or above

125 MB RAM

100 MB Free Hard Disk space

STD Color monitor


Operating System used:

Window XP: In this we have features like digital media support, advanced Networking and communications, advanced mobile computing added with efficient security.

Frond End: JAVA Technology ie both a programming language and a platform

Back End: DBMS is a soft ware tool that enables us to add, view and work with the data in a database.



A Data Flow Diagram (DFD) is a graphical technique that depicts information flow and the transforms that are applied as data move from input to output.

Data flow diagram is a logical model of a system. The model does not depend on hardware, software, and data structure or file organization. It only shows the data flow between modules to module of the entire system. Data flow diagrams can be completed using only four notations as follows,

Data Flow: Data move in a specific direction from an origin to destination. The data flow is a "packet" of data.

Process: People, procedures or devices that produce data. The physical component is not identified.

Source or Destination of Data: External sources or destinations of data, which may be people or organizations or other entities.

Data Source: Here a process references the data in the system





Access DB, modify DB


When ever required but with access permissions


With in the organization


to access the DB


By logging in and accessing the system DB




Provides access rights, checks DB and modifies DB


Whenever required


With in the organization



By logging in and accessing the system DB

Modifies data bases

Rights to user checks

Access data base

Gets access rights



Provides Access






Access data

Get access rights




Administrator DB

User DB

1st Level DFD user

Modify data

Checks database

Provides access rights



Student DB

Administrator DB

Student DB





Provides access rights to users

Gets access rights

Checks database


Modify data

Access data








Provide access rights to users

Gets access rights

Checks DB

Access DB

Modifies DB

Modify DB


Now-a-days all are familiar with Internet, the worldwide network of computers, which connects together thousands of computer all over the world. These network connections are increasing day by day in a rapid rate, so the network traffic is increasing at a pulse rate. Computers connected to the net are from many different manufacturers, running on different operating systems and they differ in architecture, computing power and capacity. By considering this point SUN Microsystems Corporation felt the need for a new programming language suitable for this heterogeneous Environment and java was the solution. This breaks barriers between different computers, chips and operating systems. Using java your application become compatible with all operating systems.





Object oriented



Simple: - It is simple for professional programmer to learn & they can use it effectively. If we already know object oriented programming, then learning java is very easy. It inherits syntax from c & object oriented features from c++, so if the user knows c\c++ then it will be a easy way to do effective java programming.

Secure: - As we know many people are effected by viral infection when they download an executable file or program. Rather than, virus programs we have malicious programs that can gather private information, such as credit card number, bank account balances & passwords by searching the contents of your computers local file system. Java has a better answer for this effect i.e., "FIREWALL" between networked application and your computer.

Portable:- As already we have discussed about compatibility of operating system, computers, chips. In Internet the programs have to be dynamically downloaded to all the various types of platforms. For this purpose java program will generate a byte code (which is not a executable code). Byte code is a highly optimized set of instructions designed to be executed by java run system, which is called as JVM (Java Virtual Machine).

Object-Oriented:- Java is purely object oriented. The object model in java is simple and easy to extend, while simple types, such as integers, are kept as high-performance non-objects.

Robust: - The ability to create robust programs was given a high priority in the design of java. To gain reliability, java restricts you in a few key areas, to force you to find your mistakes early in program development. At the same time, java frees you from having to worry about many of the most common causes of programming errors. Because java is a strictly typed language, it checks your code at Compile time. Java is robust for two reasons; they are Memory management & mishandled exceptional task in traditional programming environments.

5.2 What is JDBC?

JDBC is a Java API for executing SQL statements. (JDBC is often thought of as "Java Database Connectivity") .It consists of a set of classes and interfaces written in the java programming language.

Using JDBC, it is easy to send SQL statements to virtually any relational database. In the other words, with the JDBC API, it is not necessary to write to one program to access a Sybase database, another program to access Informix database, another program to access Oracle database, and so on. One can write a single program using the JDBC API, and the program will be able to send SQL statements to the appropriate database. The combinations of JAVA and JDBC let's a programmer writes it once and run it anywhere.

Java, being robust, secure, easy to use, easy to understand, and automatically downloadable on a network, is an excellent language basis for database applications.

JDBC extends what can be done in Java. For example, with Java and the JDBC API, it is possible to publish a web page, which contains an applet that uses information obtained from a remote database. With more and more Programmers using the Java Programming language, the need for easy database access from java is continuing to grow.

MIS managers like the combination of Java and JDBC because it makes disseminating information easy and economical, Businesses can continue to use their installed database and access information even if it is stored on different database management systems. Development time for new application is short. A programmer can write an application or an update once, put it on the server, and everybody has access to the latest version. A Low Level API and a Base for Higher-level APIs.

JDBC is a "Low level " interface that means that it is used to invoke SQL commands directly, it works very well in this capacity and is easier to use than other database connectivity APIs, but it was designed to be a base upon which to build higher level interfaces and tools. A high level interface is "user-friendly", using a more understandable or more convenient API that is translated behind the scenes into a low level interface such as JDBC. At the time of writing, two kinds of higher level APIs are under development of top of JDBC.

1) An embedded SQL for Java. At least one vendor plan to build this DBMS implement SQL, a language designed specifically for use with databases. JDBC requires that the SQL statements be passed as Strings to Java methods. The embedded SQL preprocessor then translates this JAVA/SQL mix into Java with JDBC calls.

2) A direct mapping of relational database tables to Java classes. In this "object/relational" mapping, each row of the table becomes an instance of that class, and each column value corresponds to an attribute of that instance. Programmers can then operate.

ODBC is hard to learn. It mixes simple and advanced features together, and it has complex options even for simple queries. JDBC, on the other hand, was designed to keep simple things simple while allowing more advanced capabilities where required.

A Java API like JDBC is needed in order to enable a "Pure Java" solution. When ODBC is used, the ODBC Driver Manager and drivers must be manually installed on every client machine. When the JDBC driver is written completely in Java, however, JDBC code is automatically installable, portable, and secure on all platforms from network computers to mainframes.

5.2.1 Two-tier and Three-tier Models:

The JDBC API supports both two-tier and three-tier models for database access.

In the two-tier model, a Java applet or application talks directly to the database. This requires a JDBC driver that communicates with the particular database management system being accessed. A user's SQL statements are delivered to the database and results of those statements are sent back to the user. The database may be located on another machine to which the user is connected via a network. This is referred to as a client/server configuration, with the user's machine as client and the machine housing the database as server. The networks can Intranet or it can be Internet.

Java Application


DBMS Database Server

Fig(8) : JDBC Two-tier Model

In the three-tier model, commands are sent to a "middle-tier" of services, which then sends SQL statements to the database. The database processes the SQL statements and sends the results back to the middle-tier, which then sends them to the users. Another advantage is that when there is a middle-tier, the user can employ an easy-to-use higher level API, which is translated by the middle tier into the appropriate low-level calls. Finally in many cases the three-tier architecture can provide performance advantages.

Java Application

Middle Ware

(Business Logics)

Data Base

Fig(9) JDBC Three- tier model

5.2.2 JDBC Driver Types:

The JDBC drivers that we are aware of this time generally fit into one of four categories:

JDBC-ODBC Bridge plus ODBC Driver: The Java Soft bridge product provides JDBC access via ODBC drivers. As a result, this kind of driver is most appropriate on a corporate network where client installations are not a major problem, or for application server code written in Java in a three-tier architecture.

Native-API partly Java driver: This kind of driver converts JDBC calls into calls on the Client API for Oracle, Sybase, Informix and DB2

JDBC-Net pure Java driver: This driver translates JDBC calls into a DBMS- independent net protocol, which is then translated to a DBMS-protocol by a server. The specific protocol used depends on the vendor.

Native-protocol Pure Java driver: This kind of driver converts JDBC

calls directly into the network protocol used by DBMS. Since many of these protocols are proprietary, the database vendors themselves will be the primary source.


Java is an ideal language for persistent data storage. By using class inheritance and data encapsulation, a Java application developed to work with one type of data storage can be ported or extended to work with another. An example is an application currently working with an RDBMS (Relational Database Management System) that is extended to use RMI (Remote Method Invocation) to store data in a file.

A common misconception with Java is that database access can occur only with JDBC (Java Database Connectivity) API. Although, the JDBC provides a handy set of lower level classes to manage database connections and transactions; it is not a mandatory component. MsqlJava uses the Socket classes included in the package and the data input and output stream classes included in the package. If you wanted to, you could as easily connect to a MSQL database using MsqlJava instead of the msql JDBC driver.

Additional efforts are underway to establish a standard Java class API to interface with object DBMS's (Database Management Systems). Companies are also creating their own optimized data access classes, such as Microsoft's DAO (Data Access Object) classes.

As an alternative to persistent storage of data in database management systems, Java can also be used to store data to files using object serialization.The JDK contained core classes grouped together into packages, two of these ( and provide the classes necessary to connect to a database and send and receive data. However, most of us do not want to create a socket and a stream data to and from it to implement a simple transaction.

The JDBC consists of a basic set of interfaces and a Driver Manager class used as the basis for several drivers. Drivers provide the functionality specific to a database or database middleware layer.

Certain limitations became immediately apparent when using the JDBC.First; the JDBC-ODBC Bridge used native method calls and a DLL (Dynamic Link Library) to connect to a database, prohibiting its use in applets accessible through the Internet. Because of applet security issues, the JDBC limits network connectivity to the same host from which the applet was downloaded. For use with an applet, databases must be installed on the same server as the HTTP server - a potential security risk. A workaround is to have the driver access a middleware layer, which in turn accesses a database, which located elsewhere. Several companies have produced this type of drivers.

Object Serialization simply means to store an object in such a way that the object can be retrieved as an object from the store. Objects can be manipulated in memory and can reference their members and any associations. With serialization, you can also store these same objects in a persistent format (such as a system file) for later retrieval.

As a handy way to explain the usefulness of the Database Metadata interface and to provide a good first step for beginning to work with data access in Java, the Java dbutil application was created to work with the JDBC-ODBC Bridge. This tool takes five parameters: the ODBC database name as defined with the ODBC Administrator, the username, the password (sorry the password is not encrypted), the information category, and the information category option. Among the options the existing tool can provide is information about the database, its procedures, tables' columns and transactions.

The JDK1.1 documentation contains a list of the methods and variables for use with the Database Metadata interface, which are too numerous to list here. Use the JDK documentation to modify the tool to suit your needs or to have a little fun with some very simple coding that provides very useful results.

The Java Database Connectivity (JDBC) API includes classes that can handle most database access needs. For simple select statements to processing the results of a complex stored procedure to access more than one database at a time, the JDBC provides the functionality most applications need. Connecting to a Database and making Simple Queries' One very important aspect of the JDBC is how easy is to use. To connect to a database, make a query, and process the result takes not more than a few lines of code, as the following sections demonstrate.


Java Server Pagesâ„¢ (JSP) is a new technology for web application development that has received a great deal of attention since it was first announced.

Why is JSP so exciting?

1. JSP is Java-based, and Java is well-suited for enterprise computing.

In fact, JSP is a key part of the Java 2 Enterprise Edition (J2EE) platform and can take advantage of the many Java Enterprise libraries, such as JDBC, JNDI, and Enterprise Java Beans.

2. JSP supports a powerful model for developing web applications that separates presentation from processing..

In the early days of the Web, the only tool for developing dynamic web content was the Common Gateway Interface (CGI). CGI outlined how a web server made user input available to a program, as well as how the program provided the web server with dynamically generated content to send back. CGI scripts were typically written in Perl. (In fact, CGI Perl scripts still drive numerous dynamic web sites.) However, CGI is not an efficient solution. For every request, the web server has to create a new operating-system process, load a Perl interpreter and the Perl script, execute the script, and then dispose of the entire process when it's done. To provide a more efficient solution, various alternatives to CGI have been added to programmers' toolboxes over the last few years: Fast CGI, for example, runs each CGI program in an external permanent process (or a pool of processes). In addition, mod_perl for Apache, NSAPI for Netscape, and ISAPI for Microsoft's IIS all run server-side programs in the same process as the web server itself. While these solutions offer better performance and scalability, each one is supported by only a subset of the popular web servers.

The Java Servlet API, introduced in early 1997, provides a solution to the portability issue. However, all these technologies suffer from a common problem: HTML code embedded inside programs. If you've ever looked at the code for a servlet, you've probably seen endless calls to out .println( ) that contain scores of HTML tags.

For the individual developer working on a simple web site this approach may work fine, but it makes it very difficult for people with different skills to work together to develop a web application. This is becoming a significant problem. As web sites become increasingly complex and are more and more critical to the success of an organization, the appearance and usability of the web interface becomes paramount. New client technologies, such as client-side scripts and DHTML, can develop more responsive and interactive user interfaces, style sheets can make it easier to globally change fonts and colors, and images can make the interface more appealing. At the same time, server-side code is getting more complex, and demands for reliability, performance, and fault tolerance are increasing. The growing complexity of web applications requires a development model that allows people with different skills to cooperate efficiently.

Java Server Pages provides just such a development model, allowing web page authors with skills in graphics, layout, and usability to work in tandem with programmers who are experienced in server-side technologies such as multithreading, resource pooling, databases, and caching. While there are other technologies, such as ASP, PHP and ColdFusion, that support similar development models, none of them offers all the advantages of JSP.


In the process of dynamic content generation, Sun Microsystems has introduced with a new concept as "Logic separation" from client .






Fig (9)

Logic which is required is written at one place and can be accessed by all the clients which are at different places when they require. So, in order to implement this, we have two Architectures known as

Model 1

Model 2

Model-1 Architecture:

In Model-1 Architecture, presentation logics and Business logics are combined.

When these two are combined each presentation logic requires copy of business logic so that the model and server should work towards this, such thing is time and resource consume, so in order to overcome this Model 2 Architecture has been introduced.

Model-1 Architecture is called as Java Bean.


Request processing

Data validation

Business logic processing

Data manipulation

Response generation



n- clients

Fig (10)

Model-2 Architecture:

Model-2 Architecture is also called as Java Strut. In this Model, presentation and business logics are separated. We have three parts in this,





Contains business logics which represent application state along with database.

View :

JSP act's a view which receives data from the model this view doesn't contain any data manipulation logics.

Controller :

Takes request from client, process the Model and provide information to different JSP page and passing control to different views







Fig (11)


6.1 Introduction to Database Management System (DBMS):

A Database is an integrated collection of user related data stored with minimum redundancy, serves many users/applications quickly and efficiently.

A database system is basically a computerized record keeping system, i.e. it is a computerized system whose overall purpose is to maintain information and make that information available on demand.

DBMS is a collection of inter-related data and set of programs that allow several users to access and manipulate data. Its main purpose is to provide users with an abstract view of the data, i.e. the system hides certain details of how the data is stored and maintained.

Database Management System is divided into 4 main components





Database: It consists of collection of persistent data that is used by the application system.

Hardware: The processor(s) and associated main memory that are used to support the execution of database system software..

Software: The layer between the physical database and the users that handles all requests from the user for access to the database.

User: There are three types of users

Application Programmers

End User

Database Administrator (DBA)


There are four major categories of DBMS data models.






Database Management System has evolved from hierarchical to network to relational models. Today, the most widely accepted database model is the relational model. The relational database management system uses only its relational capabilities to manage the information stored in the database. The relational model has three different aspects.



Integrity rules


They are well-defined objects that store the data of a database structure and the data contained within them can be manipulated by operations.


They are clearly defined actions that allow users to manipulate the data and structures of a database. The operations on a database must adhere to a predefined set of integrity rules.

Integrity rules:

They are laws that govern which operations are allowed on the data and structures of a database. Integrity rules protect the data and the structures of a database.

A DBMS can be regarded as relational only if it obeys a set of 12 rules formulated by Dr.E.F.Codd These rules define the scope and functionality of a relational database. There is a single overall rule called "Zero Rule" which is a foundation rule that covers all other rules. It states that " Any truly relational database must be manageable entirely through its relational capabilities".


The twelve rules are as follows:

Rule 1: The information rules

Rule 2: The guaranteed access rule

Rule 3: The systematic treatment of null values

Rule 4: The database description rule

Rule 5: The comprehensive sub-language rule

Rule 6: The view update rule

Rule 7: The insert, update and delete rule

Rule 8: The physical data independence rule

Rule 9: The logical data independence rule.

Rule 10: The integrity independence rule.

Rule 11: The distribution independence rule.

Rule 12: The no subversion rules.


Data redundancy can be reduced.

Data independence

Ensure access and integrity

Sharing data

Recovery from failure

Uniform security and privacy through password, view and automatic backup


Cost of software/hardware

Problems associated with centralization

Complexity of backup and recovery






The relation between two files

Has to be maintained programmatically,

If required.

Relationship can be specified

While creating structure



Client/Server architecture is not

Normally supported.

Most RDBMS support

Client/server architecture.


Distributed database is not


Supports distributed databases.


Least security: anyone can

Access records.

Multiple level of security


Login security

Command level security

Object level security


Does not follow Codd's rules

Follows many of the Codd's



SQL (pronounced "SEQUEL") stands for Structured Query Language, which is used to communicate with relational database, which are in turn a set of related information stored in the form of tables.

SQL is a non-procedural language because it processes sets of records rather than just one data at a time and also provides automatic navigation to the data. Here one can manipulate a set or rows rather than one at a time. SQL commands accept a sets or rows as input and return sets as outputs. The set property of SQL allows the results of one SQL statement to be used as input to another. Here one need not specify the access method of the data.

SQL is utilized as the communication language with the database among the database users like database administrators, System administrators, security administrators and application programmers. SQL provides commands for a variety of tasks including: 1. Inserting, updating, and deleting rows in an object.

2. Creating, replacing, altering and dropping objects.

3 .Controlling access to the database and its objects.

4. Guaranteeing database consistency and integrity.

The Commands in SQL is subdivided according to their functions as follows:

Data Definition Language (DDL) - create, alter, drop, truncate, rename.

Data Manipulation Language (DML) - insert, update, delete

Data Control Language (DCL) - grant, revoke

Data Retrieval Language (DRL) - select

Transaction Control Language (TCL) - commit, save point, rollback

SQL*PLUS is a program or a tool available for working with an ORACLE database. It allows the user to:

Create tables in a database.

Stores information in the tables.

Changes information in the tables.

Retrieve the information in the form we choose, performing calculations on it and combining it in new ways.

Maintain the database itself.


Any organization as growing the corresponding data volume and persons involved in business will increase. To handle this high volume data with greater efficiency it is not possible with normal database applications. Existing databases like FoxPro, DBase are designed for small organizations. As the volume grows the performance is deteriorated. These database applications are lack of security, frequent database corruptions that cause a very problem to organizations. The design of RDBMS architecture is very powerful having the features like high data security, automatic user handling, automatic back up, restore facilities, capability to handle large volumes of data, powerful database concepts, adoption of relational algebra, to increase the access speed during processes, powerful distributed database concept to provide online systems.

6.4 Why Oracle?

Even though the architecture of all RDBMS is same but the features are different from different RDBMS. Oracle, Sybase, Informix. As per the features concerned all the RDBMS can be related as it. But with the easiness, demand it is better to go for Oracle.

Because the professional availability in Oracle is high compared to other RDBMS professionals. Because the availability is high the manpower cost will be less compared to Sybase professionals, Informix professionals. Even the support from the vendors in also high in Oracle environment rather than other RDBMS.

Oracle9i is regarded as the RDBMS because it is the most widely acclaimed package across the globe with its 100% client-server architecture. Oracle has in-built features like data integrity, security, reverie and backup and total GUI based presentation and can easily and efficiently support small to very large scale applications.


The database connection string is the only JDBC component that references the particular database being accessed. You must provide a specific driver connection string that uses the protocol defined for the driver. The JDBC Driver Manager class to determine which driver to load uses the protocols currently maintained by Java Soft.

A Query returns a Result set object. This object contains the results of the query in a form of that can be accessed by the application. If the query has no results, the Result Set object contains no rows. Otherwise it contains rows of data matching the query (up to the limit specified by the database). If the database supports doing so, you can set the maximum number of rows using the Statement class method setMaxRows ().


Occasionally a database developer has to program for more complex database access situations. You may want to create a statement and then execute it many times, or call a stored procedure that returns multiple Result Sets, or issue a dynamic SQL statement. This section covers some techniques for handling these types of statements.

Two of the classes discussed Prepared Statement and Callable Statement, are extended classes: the former is an extension of Statement and the former is an extension of Prepared Statement.


The execute () method requires the database to support cursors, which enable processing of multiple result sets. The execute () method also requires the database and the database driver to support maintaining an open connection after a transaction. If the database does not support these features, the execute () method can result in an error such as invalid cursor state (as happened when we ran the sample7 application with both the Sybase SQL anywhere ODBC Driver and the Microsoft Access ODBC Driver).


The last Java application that was created in this chapter is one that refreshes a table in an mSQL database with the contents of a table in a Microsoft Access database. This example demonstrates the ease with which you can open and maintain multiple database connections at the same time.


What is Testing?

A process of executing a program with the explicit intention of finding errors, that is making the program fail.

7.1 Software Testing:

It is the process of testing the functionality and correctness of software by running it. Process of executing a program with the intent of finding an error.

A good test case is one that has a high probability of finding an as yet undiscovered error. A successful test is one that uncovers an as yet undiscovered error. Software Testing is usually performed for one of two reasons:

Defect detection

Reliability estimation

7.1.1 Black Box Testing:

Applies to software systems or module, tests functionality in terms of inputs and outputs at interfaces. Test reveals if the software function is fully operational with reference to requirements specification.

7.1.2 White Box Testing:

Knowing the internal workings i.e., to test if all internal operations are performed according to program structures and data structures.

To test if all internal components have been adequately exercised.

7.2 Software Testing Strategies:

A strategy for software testing will begin in the following order:

Unit testing

Integration testing

Validation testing

System testing

7.2.1 Unit testing:

It concentrates on each unit of the software as implemented in source code and is a white box oriented. Using the component level design description as a guide, important control paths are tested to uncover errors within the boundary of the module. In the unit testing,

The step can be conducted in parallel for multiple components.

7.2.2 Integration testing:

Here focus is on design and construction of the software architecture. Integration testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated with interfacing. The objective is to take unit tested components and build a program structure that has been dictated by design.

7.2.3 Validation testing:

In this, requirements established as part of software requirements analysis are validated against the software that has been constructed i.e., validation succeeds when software functions in a manner that can reasonably expected by the customer.

7.2.4 System testing:

In this software and other system elements are tested as a whole.


This is a Login frame specify the username of database (administrator/user) to connect to the database

This is the index frame, here we can select the particular action that we want to perform using database

This is edit frame used for selecting the various edit options like insert,update,view table, delete table,deleterow,alter,rename

This is a Create frame used to create a table in database maximum of five columns

This is the insert frame used for inserting the values in the existing table in our database

This is the alter frame, here we can add additional columns to the existing table in our database

This is a view table frame, here we can view the contents of the table and we can also view all table names in our database by specifying the table name as "tab"

This is a Update frame used for updating the values in the existing tables in our database

This is the rename frame used for renaming the existing table in our database

This is a Delete table frame used for deleting the existing table in database

This is a delete row frame used for deleting the particular row which satisfies the given condition


This project can later be extended to more Oracle Commands.

It can be used for Next Level of database Storage and Management.

More number of options can be added to the Project for further enhancement.


In this we provide a GUI tool for Oracle installation

This GUI tool is more user friendly compared to SQL PLUS

Using this GUI tool the user can easily access the tables with in their data base and create, edit or delete data or tables themselves with in their own database

So it is easier to adapt GUI tool for accessing the database rather than command line interface.


J2EE Complete Reference by Herbert Schildt

JAVA and CORBA by Orfali Harkey