You are on page 1of 59

Common Database Browser & Data

Manipulation Tool

Introduction about Project

Abstract:

Common Database Browser & Data Manipulation Tool which provides an easy
to use Web-Based based common interface for viewing, adding, editing, or
deleting entries in almost all the databases. The user should never have to
write SQL to view the data although a SQL window is provided. All user tables
and basic data type fields are available for access in the selected database.
As technology advances we tend to switch to new ways of accomplishing the
same tasks. Faster machines and better software increase our overall
computing and information processing speed as well as overall comfort and
reliability. New solutions sometimes offer expanded functionality and
increased performance. It is a database-independent application that defines
a common interface to provide fast access to SQL database servers.
This tool can be used to build, test, and debug PL/SQL packages, procedures
and functions. Using these users can create and edit database objects such
as tables, views, indexes, constraints, and users. Database Interface's SQL
editor provides an easy and efficient way to write and test scripts and
queries, and its powerful data grids provide an easy way to view and edit
data related to any DBMS or RDBMS.

Features:

Connects to any database

Get the meta-data regarding database product, databases, tables

It gives the structure information regarding a database or a table

He can browse through the table data.

It allows us to export or import a database or a table

It allows us to perform different SQL operations (like insert, update,


delete etc).
Search for a keyword in the database.

Organization Profile:

System Analysis

EXISTING SYSTEM & DISADVANTAGES:

In the existing system, all the database application developers are


using client softwares to managing the databases. For example to
manage the oracle database, oracle database vendor providing one
stand alone client software. In the same way all the database
vendors are providing their own client software to manage the
databases. So here we have a disadvantage is always we have to
install all the client softwares inside our systems. And in the
existing system we have to write queries to create / alter / drop /
delete / insert like operations. In this system we are disadvantages
like installing all client softwares in all system in the organization,
developers have to write all queries at all times and it is a
standalone application.

PROPOSED SYSTEM & ITS ADVANTAGES:


Common Database Browser & Data Manipulation Tool is an industrystandard tool for application development. Using Database Interface,
developers can interact with any back end software (i.e. Oracle, SQL Server,
MS-Access,

My-SQL

etc).

The

Common Database Browser &

Data

Manipulation Tool can be used to build, test, and debug PL/SQL packages,
procedures and functions. Common Database Browser & Data Manipulation
Tool users can create and edit database objects such as tables, views,
indexes, constraints, and users. Database Interface's SQL Editor provides an
easy and efficient way to write and test scripts and queries, and its powerful
data grids provide an easy way to view and edit data related to any
DBMS/RDBMS tool.

SOFTWARE REQUIREMENTS&HARDWARE REQUIREMENTS:


SOFTWARE REQUIREMENTS:
Operating System

: Windows

Technology

: Java/j2ee (JDBC, Servlet, JSP)

Web Technologies

: Html, JavaScript, CSS

Web Server

: Tomcat

Database
Softwares

: Oracle, MySql, MS-Access


: J2SDK1.5, Tomcat, Oracle, MySql

HARDWARE REQUIREMENTS:
Hardware

: Pentium based systems with a minimum of P4

RAM

: 256MB (minimum)

Feasibility Study:
Preliminary investigation examines project feasibility, the likelihood the
system will be useful to the organization. The main objective of the feasibility
study is to test the Technical and Economical feasibility for adding new
modules and debugging old running system. All systems are feasible if they

are given unlimited resources and infinite time. There are aspects in the
feasibility study portion of the preliminary investigation:

Technical Feasibility

Economical Feasibility

TECHNICAL FEASIBILITY
The technical issue usually raised during the feasibility stage of the
investigation includes the following:

Does the necessary technology exist to do what is suggested?

Do the proposed equipments have the technical capacity to hold the


data required to use the new system?

Will the proposed system provide adequate response to inquiries,


regardless of the number or location of users?

Can the system be upgraded if developed?

Are there technical guarantees of accuracy, reliability, ease of access and


data security?

ECONOMIC FEASILITY:
The computerized system takes care of the present existing systems
data flow and procedures completely and should generate all the reports of
the manual system besides a host of other management reports.
It should be built as a web based application with separate web server
and database server. This is required as the activities are spread throughout
the organization customer wants a centralized database. Further some of the
linked transactions take place in different locations. Open source software
like TOMCAT, JAVA, Mysql and Linux is used to minimize the cost for
Customer.

the

System Design

Functional Requirements:
The main purpose of functional requirements within the requirement
specification document is to define all the activities or operations that take
place in the system. These are derived through interactions with the users of
the system.

1. This system should allow the user to interact with any database.
2. This system should allow the user to view list of all tables which are
present in the current/selected user.
3. This system should allow the user to browse and view the structure of an
existing database object.
4. This system should allow the user to design new database objects
5. This system should allow the user to view entire information about
database like database product name, product version etc. to the user.
6. This system should allow the user to use and implement different kinds of
SQL statements. The result of the SQL statement will be displayed
immediately after executing the statement.
7. This system should allow the user to import any database structure along
with data.
8. This system should allow the user to export database structure along with
data
9. This system should allow the user to perform some operations on tables
of any Database like create table, alter table, rename table and drop
table.

10.

This system should allow the user can search any keywords which are
related to data in database.

11.

This system should allow the user to view list of all columns which are

present in the selected table.


12.

This system should allow the user can change the table settings like
display settings etc

13.

This system should allow the user can insert data in to any table

directly by giving values from user interface.


14.

This system should allow user to perform some operations on columns

of any table like alter column, rename column, drop column and empty
column.
15.

This system should allow the user to search any keywords which are
related to data in database.

16.

This system should allow the administrator will get different types of
reports regarding all the users who are registered in this portal.

Nonfunctional requirements:
Nonfunctional requirements describe user-visible aspects

of the

system that are not directly related to functionality of the system.

User Interface and Human factors:


The proposed system should provide a user- friendly interface to
database users and as well as Administrator with ease of use. The user
interface must be suitable for easy and

fast data entry from all the tables

from a single application. With the help of this interface, users even
without
tasks.

adequate knowledge of

all SQL Clients

would

complete their

Documentation:
The proposed system requires proper documentation, user level
documentation which helps the users and administrator how to interact
with the

system. This documentation includes how to fill the forms

provided and get reports that can be generated by the system. In the
proposed system help link provides the user level documentation. The
RAD prepared during analysis phase helps the developer in-order to
develop the system as per clients requirements. The system design
documentation prepared
information

regarding

during

design

development

goals

and

about

process
subsystems

proposed system which also helps in testing process. In


user level and

provides

development level documentation

into

the

addition to

proposed system

also requires technical documentation for maintainers of the system.


This technical documentation includes the port number on which server
is running and listening clients requests and also includes any other
configuration required for maintainers.

Hardware Consideration:
Hardware Considerations includes the virtual machine on which
the system should be built. Virtual machine includes operating system and
any software components needed. Virtual machine minimum required for

web server

is WINDOWS xp system and web browser is IE 6.0.And the

system is compatible with Linux, Unix based systems.

Performance Characteristics:
The

proposed

system

is

server

applications

and

server

applications are inherently multi-threaded. Every request creates new


thread hence the system supports any no of concurrent users. Hence
this system offers good performance and easy solutions to problems.
This is the static requirement. The Dynamic requirement is system response.
As

the

proposed

system

developed

using

JavaServerPages

which

reduces response problems.

Error handling and Extreme conditions:


The proposed system should handle exceptions that originate at
low level components and exceptions at high level components. The
high level components in proposed system should handle exceptions
that occur while connecting to databaseserver,IOExceptions etc. The end
user should not be bother about exceptions at low-level. When low
level

Exceptions

arises

user

should

be

shown

with

appropriate

message. Errors that arises during data entry should be handled by


performing client side validations. In the proposed system all client side
validations will be done using JavaScript.

Quality Issues:
Quality

issues

refers

to

how

reliable and

robust

should

the

system be? While developing the proposed system the developer must
be able to guarantee the reliability transactions so that they will be
processed completely and accurately.
The ability of system to detect failures and recovery from those
failures refers to the availability of system. Robustness of system refers
to

the

capability

of

system

providing

information

when

concurrent

users requesting for information.


As the proposed systems capability of handling various exception
it

is

reliable

and

it

will

be

developed

using

JSP

which

supports

multithreading. Hence it satisfies the requests from concurrent users. So it is


robust.

System modification:
As the proposed is not implementing employee hikes information
so

it

can

be

extended

and

developer familiar with specified

this

updation

hardware

followed for development of proposed system.

can

be

done

and software

by

any

constraints

Security Issues:
Security and confidentiality are the top most concerns of the client.
The proposed system should provide the following.
Administrator should be provided with id and password for secured
access of information regarding all users.
Each user should give certain parameters to interact with a databases

System Design:
SYSTEM DESIGN phase follows system analysis phase.

Design is

maintaining record proof design divisions and providing a blueprint for the
implementation phase. Design is the bridge between system analysis and
system implementation.
System design is transition from a user oriented, document oriented to
programmers or database personnel. The design is a solution, a how to
approach to the creation a new system. This is composed of several steps.
It

provides

the

understanding

and

procedural

details

necessary

for

implementing the system recommended in the feasibility study. Design goes


through logical and physical stages of development, logical design reviews
the present physical system, prepare input and output specifications, detail
the implementation plan, and prepare a logical design walkthrough.

OBJECTIVES OF DESIGN
System design is like a blue print for a building, it specifies all the
features that are to be in the finished product.

Design states how to

accomplish objectives determined in the analysis phase.

Modules Description:
This application consist four modules:
1. User Module
2. Database level
3. Table level
4. Reports Module

1. User Module:
This module tells all about users who are using UNIVERSAL
DATABASE MANAGEMENT AND APPLICATION DEVELOPMENT INTERFACE as
user

interface

to

interact

with

any

database.

While

developing

applications user need to get the data from the database.


2. Database level Module:
This module tells about the database, this module is categorized into
the following functionalities:
Structure: This module gives the list of all tables which are present in the
current/selected user. This module is used to browse and view the
structure of an existing database object. It can also be used to design new
database objects.

Properties:
The properties functionality will gives entire information about database

like database product name, product version etc. to the user.


SQL:
By using this functionality, we can use and implement different kinds of
SQL statements. The result of the SQL statement will be displayed
immediately after executing the statement.
Import:

By using this functionality any database structure along with data can be
imported in this portal.
Export:
By using this functionality any database structure along with data can be
exported from this portal.
Operations:
By using this functionality user can do some operations on tables of any
Database like create table, alter table, rename table and drop table.
Search:
By using this functionality user can search any keywords which are
related to data in database.

3. Table level Module:


Structure:
It gives the list of all columns which are present in the selected table.
This module is used to browse and view the structure of an existing database
object. It can also be used to design new database objects
Browse:
By using Browse functionality user can change the table settings like
display settings of information in the portal etc.
SQL:
By using this functionality, we can use and implement different kinds of
SQL statements. The result of the SQL statement will be displayed
immediately after executing the statement.
Insert:
By using this functionality user can insert data in to any table directly by
giving values from user interface.

Export:
By using this functionality any database structure along with data can be
exported from this portal.
Operations:
By using this functionality user can do some operations on columns of
any table like alter column, rename column, drop column and empty column.
Search:
By using this functionality user can search any keywords which are
related to data in database.
4. Reports Module:
In this module administrator will get different types of reports
regarding all the users who are registered in this portal..

SDLC
SPIRAL MODEL was defined by Barry Boehm in his 1988 article, A
spiral Model of Software Development and Enhancement. This model was
not the first model to discuss iterative development, but it was the first
model to explain why the iteration models.

As originally envisioned, the iterations were typically 6 months to 2


years long.

Each phase starts with a design goal and ends with a client

reviewing the progress thus far. Analysis and engineering efforts are applied
at each phase of the project, with an eye toward the end goal of the project.
The steps for Spiral Model can be generalized as follows:

The new system requirements are defined in as much details as


possible. This usually involves interviewing a number of users
representing all the external or internal users and other aspects of
the existing system.

A preliminary design is created for the new system.

A first prototype of the new system is constructed from the


preliminary design. This is usually a scaled-down system, and
represents an approximation of the characteristics of the final
product.

A second prototype is evolved by a fourfold procedure:


1. Evaluating the first prototype in terms of its strengths,
weakness, and risks.
2. Defining the requirements of the second prototype.
3. Planning an designing the second prototype.
4. Constructing and testing the second prototype.

At the customer option, the entire project can be aborted if the risk
is deemed too great. Risk factors might involved development cost
overruns, operating-cost miscalculation, or any other factor that
could, in the customers judgment, result in a less-than-satisfactory
final product.

The existing prototype is evaluated in the same manner as was the


previous

prototype,

and

if

necessary,

another

prototype

is

developed from it according to the fourfold procedure outlined


above.

The preceding steps are iterated until the customer is satisfied that
the refined prototype represents the final product desired.

The final system is constructed, based on the refined prototype.

The final system is thoroughly evaluated and tested. Routine


maintenance is carried on a continuing basis to prevent large scale
failures and to minimize down time.

Project Architecture

Database Layer: Contains the data and database-related objects like


stored procedures, triggers, packages, etc.
Application Layer: Contains the objects addressing the business logic;
Most of the middle-level Java objects will be here in application layer.

Web Interface Layer: It will be on the web server; It contains the web
pages (JSPs) of the application which will interact with the front-end
browsers

Client Layer: Contains the web browser which interacts with web server

UML DIAGRAMS

UseCase Diagram:

Class Diagram:

Sequence Diagram:

Activity Diagram:

Screen shots

Technology Description &


Implementation

Technologies:

Front end or User Interface Design


The entire user interface is planned to be developed in browser specific
environment with a touch of Intranet-Based Architecture for achieving the
Distributed Concept.
The browser specific components are designed by using the HTML
standards, and the dynamism of the designed by concentrating on the
constructs of the Java Server Pages.

Communication or Database Connectivity Tier


The Communication architecture is designed by concentrating on the
Standards of Servlets and Enterprise Java Beans. The database connectivity
is established by using the Java Data Base Connectivity. The standards of
three-tire architecture are given major concentration to keep the standards
of higher cohesion and limited coupling for effectiveness of the operations.
About Java:
Initially the language was called as oak but it was renamed as Java
in 1995. The primary motivation of this language was the need for a
platform-independent (i.e., architecture neutral) language that could be used
to create software to be embedded in various consumer electronic devices.

Java is a programmers language.

Java is cohesive and consistent.

Except for those constraints imposed by the Internet environment, Java


gives the programmer, full control.

Finally, Java is to Internet programming where C was to system


programming.

Importance of Java to the Internet

Java has had a profound effect on the Internet. This is because; Java
expands the Universe of objects that can move about freely in Cyberspace.
In a network, two categories of objects are transmitted between the Server
and the Personal computer. They are: Passive information and Dynamic
active programs. The Dynamic, Self-executing programs cause serious
problems in the areas of Security and probability. But, Java addresses those
concerns and by doing so, has opened the door to an exciting new form of
program called the Applet.
Servlets
Introduction:
The Java web server is JavaSoft's own web Server. The Java web server
is just a part of a larger framework, intended to provide you not just with a
web server, but also with tools. To build customized network servers for any
Internet or Intranet client/server system. Servlets are to a web server, how
applets are to the browser.
About Servlets

Servlets provide a Java-based solution used to address the problems


currently

associated

with

doing

server-side

programming,

including

inextensible scripting solutions, platform-specific APIs, and incomplete


interfaces.
Servlets are objects that conform to a specific interface that can be plugged
into a Java-based server. Servlets are to the server-side what applets are to
the client-side - object byte codes that can be dynamically loaded off the net.
They differ from applets in that they are faceless objects (without graphics or
a GUI component). They serve as platform independent, dynamically
loadable, plugable helper byte code objects on the server side that can be
used to dynamically extend server-side functionality.

For example, an HTTP Servlets can be used to generate dynamic HTML


content. When you use Servlets to do dynamic content you get the following
advantages:

Theyre faster and cleaner than CGI scripts

They use a standard API (the Servlets API)

They provide all the advantages of Java (run on a variety of servers


without needing to be rewritten).

Attractiveness of Servlets

There are many features of Servlets that make them easy and
attractive to use. These include:

Easily configured using the GUI-based Admin tool

Can be loaded and invoked from a local disk or remotely across the
network.

Can be linked together, or chained, so that one Servlets can call


another Servlets, or several Servlets in sequence.

Can be called dynamically from within HTML pages, using server-side


include tags.

Are secure - even when downloading across the network, the Servlets
security model and Servlets sandbox protect your system from
unfriendly behavior.

Java Script
JavaScript is a script-based programming language that was developed
by Netscape Communication Corporation. JavaScript was originally called
Live Script and renamed as JavaScript to indicate its relationship with Java.

JavaScript supports the development of both client and server components of


Web-based applications. On the client side, it can be used to write programs
that are executed by a Web browser within the context of a Web page. On
the server side, it can be used to write Web server programs that can
process information submitted by a Web browser and then updates the
browsers display accordingly

Even though JavaScript supports both client and server Web programming,
we prefer JavaScript at Client side programming since most of the browsers
supports it. JavaScript is almost as easy to learn as HTML, and JavaScript
statements can be included in HTML documents by enclosing the statements
between a pair of scripting tags .

<SCRIPTS>..</SCRIPT>.
<SCRIPT LANGUAGE = JavaScript>
JavaScript statements
</SCRIPT>
Here are a few things we can do with JavaScript :

Validate the contents of a form and make calculations.

Add scrolling or changing messages to the Browsers status line.

Animate images or rotate images that change when we move the


mouse over them.

Detect the browser in use and display different content for different
browsers.

Detect installed plug-ins and notify the user if a plug-in is required.

We can do much more with JavaScript, including creating entire


application.

Hyper Text Markup Language


Hypertext Markup Language (HTML), the languages of the World Wide
Web (WWW), allows users to produces Web pages that include text, graphics
and pointer to other Web pages (Hyperlinks).
HTML is not a programming language but it is an application of ISO
Standard 8879, SGML (Standard Generalized Markup Language), but
specialized to hypertext and adapted to the Web. The idea behind Hypertext
is that instead of reading text in rigid linear structure, we can easily jump
from one point to another point. We can navigate through the information
based on our interest and preference. A markup language is simply a series
of elements, each delimited with special characters that define how text or
other items enclosed within the elements should be displayed. Hyperlinks are
underlined or emphasized works that load to other documents or some
portions of the same document.
HTML can be used to display any type of document on the host computer,
which can be geographically at a different location. It is a versatile language
and can be used on any platform or desktop.
HTML provides tags (special codes) to make the document look attractive.
HTML tags are not case-sensitive. Using graphics, fonts, different sizes, color,
etc., can enhance the presentation of the document. Anything that is not a
tag is part of the document itself.
Basic HTML Tags :
<!--

-->

Specifies comments

<A>.</A>

Creates hypertext links

<B>.</B>

Formats text as bold

<BIG>.</BIG>

Formats text in large font.

<BODY></BODY>

Contains

all

tags

and

text

in

the

HTML

document
<CENTER>...</CENTER>

Creates text

<DD></DD>

Definition of a term

<DL>...</DL>

Creates definition list

<FONT></FONT>

Formats text with a particular font

<FORM>...</FORM>

Encloses a fill-out form

<FRAME>...</FRAME>

Defines a particular frame in a set of frames

<H#></H#>

Creates headings of different levels

<HEAD>...</HEAD>

Contains tags that specify information about a


document

<HR>...</HR>

Creates a horizontal rule

<HTML></HTML>

Contains all other HTML tags

<META>...</META>

Provides meta-information about a document

<SCRIPT></SCRIPT>

Contains client-side or server-side script

<TABLE></TABLE>

Creates a table

<TD></TD>

Indicates table data in a table

<TR></TR>

Designates a table row

<TH></TH>

Creates a heading in a table

ADVANTAGES

A HTML document is small and hence easy to send over the net.
It is small because it does not include formatted information.
HTML is platform independent.
HTML tags are not case-sensitive.
Java Database Connectivity
What Is JDBC?
JDBC is a Java API for executing SQL statements. (As a point of interest, JDBC
is a trademarked name and is not an acronym; nevertheless, JDBC is often
thought of as standing for Java Database Connectivity. It consists of a set of
classes and interfaces written in the Java programming language. JDBC
provides a standard API for tool/database developers and makes it possible
to write database applications using a pure Java API.
Using JDBC, it is easy to send SQL statements to virtually any relational
database. 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 lets a programmer write it once and run it
anywhere.

What Does JDBC Do?


Simply put, JDBC makes it possible to do three things:

Establish a connection with a database

Send SQL statements

Process the results.

JDBC versus ODBC and other APIs

At this point, Microsoft's ODBC (Open Database Connectivity) API is that


probably the most widely used programming interface for accessing

relational databases. It offers the ability to connect to almost all databases


on almost all platforms.
So why not just use ODBC from Java? The answer is that you can use ODBC from
Java, but this is best done with the help of JDBC in the form of the JDBC-ODBC
Bridge, which we will cover shortly. The question now becomes "Why do you need
JDBC?" There are several answers to this question:

1. ODBC is not appropriate for direct use from Java because it uses a C
interface. Calls from Java to native C code have a number of drawbacks
in the security, implementation, robustness, and automatic portability
of applications.
2. A literal translation of the ODBC C API into a Java API would not be
desirable. For example, Java has no pointers, and ODBC makes copious
use of them, including the notoriously error-prone generic pointer "void
*". You can think of JDBC as ODBC translated into an object-oriented
interface that is natural for Java programmers.
3. 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.
4. 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 Java platforms from network
computers to mainframes.

Java Server Pages (JSP)


Java server Pages is a simple, yet powerful technology for creating and
maintaining dynamic-content web pages. Based on the Java programming
language, Java Server Pages offers proven portability, open standards, and a

mature re-usable component model .The Java Server Pages architecture


enables the separation of content generation from content presentation. This
separation not eases maintenance headaches, it also allows web team
members to focus on their areas of expertise. Now, web page designer can
concentrate on layout, and web application designers on programming, with
minimal concern about impacting each others work.

Features of JSP:
Portability:
Java Server Pages files can be run on any web server or web-enabled
application server that provides support for them. Dubbed the JSP engine,
this support involves recognition, translation, and management of the Java
Server Page lifecycle and its interaction components.
Components:

It was mentioned earlier that the Java Server Pages architecture can
include reusable Java components. The architecture also allows for the
embedding of a scripting language directly into the Java Server Pages file.
The components current supported include Java Beans, and Servlets.
Processing:

A Java Server Pages file is essentially an HTML document with JSP


scripting or tags. The Java Server Pages file has a JSP extension to the server
as a Java Server Pages file. Before the page is served, the Java Server Pages
syntax is parsed and processed into a Servlet on the server side. The Servlet
that is generated outputs real content in straight HTML for responding to the
client.
Access Models:
A Java Server Pages file may be accessed in at least two different ways.
A clients request comes directly into a Java Server Page. In this scenario,
suppose the page accesses reusable Java Bean components that perform

particular well-defined computations like accessing a database. The result of


the Beans computations, called result sets is stored within the Bean as
properties. The page uses such Beans to generate dynamic content and
present it back to the client.
In both of the above cases, the page could also contain any valid Java
code. Java Server Pages architecture encourages separation of content from
presentation.
Steps in the execution of a JSP Application:
1. The client sends a request to the web server for a JSP file by giving the
name of the JSP file within the form tag of a HTML page.
2. This request is transferred to the JavaWebServer. At the server side
JavaWebServer receives the request and if it is a request for a jsp file
server gives this request to the JSP engine.
3. JSP engine is program which can understands the tags of the jsp and
then it converts those tags into a Servlet program and it is stored at
the server side. This Servlet is loaded in the memory and then it is
executed and the result is given back to the JavaWebServer and then it
is transferred back to the result is given back to the JavaWebServer
and then it is transferred back to the client.
JDBC connectivity
The JDBC provides database-independent connectivity between the J2EE
platform and a wide range of tabular data sources. JDBC technology allows
an Application Component Provider to:

Perform connection and authentication to a database server

Manager transactions

Move SQL statements to a database engine for preprocessing and


execution

Execute stored procedures

Inspect and modify the results from Select statements.

Implementation:
Login.java:
import java.lang.String;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Login extends HttpServlet


{
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
String message = req.getParameter("message");
res.setContentType("text/html");

PrintWriter writer = res.getWriter();


writer.println("<HTML>");
writer.println("<HEAD>");
writer.println("<TITLE> Myadmin </TITLE>");
writer.println("<META NAME=Author CONTENT=Sunil>");
writer.println(

"<STYLE>" +
"#t1 { " +
"

position:absolute; " +

"

margin-left:210px; " +

"

margin-top:50px; " +

"

width:340px; " +

"

height:33px; " +

"

background:#336699; " +

"

font-family:Serif; " +

"

font-weight:bold; " +

"

font-size:20px; " +

"

color:#ffffff; " +

"

text-align:center; " +

"

border-style:double; " +

"

border-color:black; " +

"

border-width:2px; " +

"} " +"#t2 { " +


"

position:absolute; " +

"

margin-left:210px; " +

"

margin-top:84px; " +

"

width:340px; " +

"

height:180px; " +

"

background:#f5f5f5; " +

"

font-family:Tahoma; " +

"

font-weight:bold; " +

"

font-size:14px; " +

"

color:black; " +

"

border-style:groove; " +

"

border-color:black; " +

"

border-width:1px; " +

"} " +
"#msg {" +
"

background:#abcdef; " +

"

font-family:Tahoma; " +

"

font-size:14; " +

"

font-weight:bold; " +

"

color:black; " +

"

text-align:center; " +

"

text-transform:Capitalize; " +

"} " +
"input { " +
"

height:26px; " +

"

width:240px; " +

"

font-size:14px; " +

"} " +
"select {

font-size:16px;

}"+

"</STYLE>");
writer.println(

"<SCRIPT LANGUAGE=javascript>" +
"

var onImages

= new Array(); " +

"

var offImages = new Array(); " +

"function verify() { " +


"

var ur =

"

if(ur == null || ur == \"\" || ur == \"

"

alert('URL must be entered.');

document.loginform.url.value; " +

\") { " +

"+
"
document.loginform.url.focus(); " +

"

}"+

"

else document.loginform.submit();

"+
"} " +
"function isEmpty(id) { " +
"

if(id.value==null || id.value==\"\"

|| id.value==\" \") { " +


"

alert(id.name + \" must be

"

id.focus(); " +

entered.\"); " +

"

}"+

"} " +
"function empty() { " +
"

document.loginform.reset(); " +

"

document.loginform.url.value

"

document.loginform.userid.focus();

= \"jdbc:odbc:mydsn\"; " +

"+
"} " +
"function down(id) { " +
"

if(id == 1)

document.loginform.pic1.src = onImages[id-1].src; " +

"

if(id == 2)

document.loginform.pic2.src = onImages[id-1].src; " +


"} " +
"function up(id) { " +
"

if(id == 1)

document.loginform.pic1.src = offImages[id-1].src; " +


"

if(id == 2)

document.loginform.pic2.src = offImages[id-1].src; " +


"} " +
"function load() { " +
"

onImages[0] = new Image(); " +

"

onImages[1] = new Image(); " +

"

onImages[0].src

"

onImages[1].src

"

offImages[0] = new Image(); " +

"

offImages[1] = new Image(); " +

"

offImages[0].src

"

offImages[1].src

"

document.loginform.url.value

= \"pics/login2.jpg\"; " +

= \"pics/reset2.jpg\"; " +

= \"pics/login1.jpg\"; " +

= \"pics/reset1.jpg\"; " +

= \"jdbc:odbc:mydsn\"; " +

"

document.loginform.userid.focus();

"+
"} " +
"function setURL() { " +
"

var i =

document.loginform.driver.selectedIndex; " +
"

if(i == 0)

document.loginform.url.value = \"jdbc:odbc:mydsn\"; " +


"

else if(i == 1)

document.loginform.url.value = \"jdbc:mysql://localhost:3306/test\";" +
"

else if(i == 2)

document.loginform.url.value = \"jdbc:oracle:thin:@localhost:1521:xe\"; " +


"} " +
"</SCRIPT>");
writer.println("</HEAD>");
writer.println("<BODY BGCOLOR=#f5f5f5 onLoad=load()>");
writer.println("<HR WIDTH=80%>");
writer.println("<TABLE ALIGN=center CELLPADDING=4
BORDER=0 WIDTH=80%");
writer.println("<TR>");
writer.println("<TH id=msg>Universal Database Management
and Application Development Interface </TH>");
writer.println("</TR>");

writer.println("</TABLE>");
writer.println("<HR WIDTH=80%>");

writer.println("<FORM NAME=loginform METHOD=post


ACTION='LoadAll'>");
writer.println("<TABLE align=center
id=t1><TR><TD>DATABASE LOGIN</TD></TR></TABLE>");
writer.println("<TABLE align=center id=t2>");
writer.println("<TR><TD align=center>Driver</TD>");
writer.println("<TD align=center>");
writer.println("<SELECT name=driver onChange=setURL()>");
writer.println("<OPTION
selected>sun.jdbc.odbc.JdbcOdbcDriver</OPTION>");
writer.println("<OPTION>com.mysql.jdbc.Driver</OPTION>");

writer.println("<OPTION>oracle.jdbc.driver.OracleDriver</OPTION>");
writer.println("</SELECT>");
writer.println("</TD>");
writer.println("</TR>");
writer.println("<TR><TD align=center>URL</TD>");
writer.println("<TD align=center><INPUT type=text name=url
size=32></TD></TR>");
writer.println("<TR><TD align=center>Username</TD>");

writer.println(

"<TD align=center><input type=text

name=userid size=32 " +


"onFocus='isEmpty(document.loginform.
url)'></TD></TR>");
writer.println("<TR><TD align=center>Password</TD>");
writer.println(

"<TD align=center><input type=password

name=pass size=32 " +


"onFocus='isEmpty(document.loginform.
url)'></TD></TR>");
writer.println("<TR><TD align=center colspan=2>");
writer.println(

"<IMG name=pic1 src='pics/login1.jpg'

border=0 " +
"onMouseOut='up(1)'
STYLE='cursor:hand' onMouseDown='down(1)' " +
"onMouseUp='up(1)'
onClick='verify()'>&nbsp&nbsp&nbsp");
writer.println(

"<img name=pic2 src='pics/reset1.jpg'

border=0 " +
"onMouseOut='up(2)'
STYLE='cursor:hand' onMouseDown='down(2)' " +
"onMouseUp='up(2)'
onClick='empty()'>");
writer.println("</TD></TR>");
writer.println("</TABLE>");

writer.println("</FORM>");
writer.println("</BODY>");
writer.println("</HTML>");

writer.close();
}
}

Testing

Testing:
Testing is the process of detecting errors. Testing performs a very
critical role for quality assurance and for ensuring the reliability of
software. The results of testing are used later on during maintenance
also.
Testing Objectives:
The main objective of testing is to uncover a host of errors,
systematically and with minimum effort and time. Stating formally, we
can say,
Testing is a process of executing a program with the intent of
finding an error.
A successful test is one that uncovers an as yet undiscovered
error.

A good test case is one that has a high probability of finding


error, if it exists.
The tests are inadequate to detect possibly present errors.

LEVELS OF TESTING
In order to uncover the errors present in different phases we have
the concept of levels of testing. The basic levels of testing are
Client Needs

Acceptance Testing

Requirements

System Testing

Design

Integration Testing

Code

Unit Testing

Unit testing:
Unit testing focuses verification effort on the smallest unit of
software i.e. the module. Using the detailed design and the process
specifications testing is done to uncover errors within the boundary of
the module. All modules must be successful in the unit test before the
start of the integration testing begins.
In this project each service can be thought of a module. There are
so many modules like Admin, Tracking, and Inventory. Each module has
been tested by giving different sets of inputs. When developing the
module as well as finishing the development so that each module
works without any error. The inputs are validated when accepting from
the user.
Integration Testing:
After the unit testing we have to perform integration testing. The
goal here is to see if modules can be integrated properly, the emphasis
being on testing interfaces between modules. This testing activity can
be considered as testing the design and hence the emphasis on testing
module interactions.
In this project the main system is formed by integrating all the
modules. When integrating all the modules I have checked whether the
integration effects working of any of the services by giving different
combinations of inputs with which the two services run perfectly before
Integration.

System Testing
Here the entire software system is tested. The reference
document for this process is the requirements document, and the goal
is to see if software meets its requirements.
Here

entire

Common

Database

Browser

&

Data

Manipulation Tool has been tested against requirements of project


and it is checked whether all requirements of project have been
satisfied or not.

Acceptance Testing
Acceptance Test is performed with realistic data of the client to
demonstrate that the software is working satisfactorily. Testing here is
focused on external behavior of the system; the internal logic of
program is not emphasized.
In this project Universal Database Management Application
Development Interface I have collected some data and tested
whether project is working correctly or not.
Test cases should be selected so that the largest number of
attributes of an equivalence class is exercised at once. The testing
phase is an important part of software development. It is the process of
finding errors and missing operations and also a complete verification
to

determine

whether

the

objectives

are

requirements are satisfied.

Test Case Report

met

and

the

user

S.N
O
1

TESTING
OBJECT

Login/UserID

EXPECT
ED
VALUE

name

SIMULATE EXPLANATI
D VALUE
ON

name

Pass

REMARKS

Expected
Value=Simul
ated Value
User ID

Login/UserID

name

Fail

Field
empty

Login/UserID

Login/Passw
ord

name

passwor
d

NAME

password

Fail

Pass

Case
Sensitive
Expected
Value=Simul
ated Value
Password

Login/Passw
ord

passwor
d

Login/Passw
ord

passwor
d

PASSWOR
D

Fail

Field
Empty

Fail

Case
Sensitive

CONCLUSION

CONCLUSION
This project named Common Database Browser & Data Manipulation Tool

provides an easy to use Web-Based based common interface for viewing,


adding, editing, or deleting entries in almost all the databases. The user
should never have to write SQL to view the data although a SQL window is
provided. All user tables and basic data type fields are available for access in
the selected database.
In the development of this project, I learned the concepts of
requirements gathering and analyzing, how to categorize functional and non

functional requirements, the design of the project using UML, importance and
division of modules (components), writing test cases and performing testing etc., I
also learnt the management skills and the team work.

FUTURE ENHANCEMENTS

Provide a facility through which the database administrator can take


and backup and restore the data from GUI.

Provide a facility through which the database administrator can


manage the different other database users and assign privileges to
them to work on this system through GUI.

Based on the future security issues, security can be improved using


emerging technologies like single sign-on.

As the technology emerges, it is possible to upgrade the system and


can be adaptable to desired environment.

Bibliography

Bibliography
References:

Core java volume-II Advanced features 7th edition by Cay S.Horstmann and
Gary Cornell (Pearson education).

Java Servlet Programming by Orelly publishers

Java Complete Reference 5th edition by Herbert Schildt (Tata McGraw Hill).

Algorithm and applications in java 3rd edition by Satraj Sahni (Tata McGraw
Hill).

Classical Data Structures by Samantha (Pearson education).

Java Server Programming 2.0 with complete J2EE concepts included (apress).

Software Engineering practice and principles 6th edition by Roger Pressmen


(Tata McGraw Hill).

Java How to program 5th edition Deitel and Deitel (Prentice Hall of India).

Internet & World Wide Web How to program 3rd edition by Deitel & Deitel and
Goldberg (Pearson education).

Web enabled commercial application development using Java 2.0 by Ivan


Bayross (Prentice Hall of India).

Data base System Concepts 4th edition by Silbershatz, Korth, and Sudharshan
(Tata McGraw Hill).

Fundamentals of Data base systems 4th edition by Ramez Elmasri and


Shamkant B.Navathe (Pearson education).

Websites
o www.javaworld.com
o www.apaache.org
o www.java.sun.com
o www.w3schools.com
o

www.itpapers.com

You might also like