Вы находитесь на странице: 1из 73

AUTOMATIC DATABASE SCHEMA GENERATION

SYNOPSIS

The Automatic Database Schema Generation is a system, which allows the


developers to focus on creating the database using the GUI interface .The user needs to fulfill
the requirements in the interface and he can perform the database operations which he wants
and can create the database.
This project aims at creation of an automatic database schema generation. This project
will be accessible to all developers and its facility allows developers to focus on creating the
database schema on the basis of JSP while letting the application server define table based on
the fields in JSP and relationships between them. This system provides the following facilities.

 This facilitates the user to focus much on application aspects leaving behind the
database aspects.
 This project allows users to generate database schema generation without having much
knowledge of database Aspects.
1. INTRODUCTION

This project aims at creation of an automatic database schema generation. This project will
be accessible to all developers and its facility allows developers to focus on creating the database
schema on the basis of JSP while letting the application server define table based on the fields in
JSP and relationships between them.
The user needs to fulfill the requirements in the interface and he can perform the database
operations which he wants and can create the database.
MODULES
1) SQL Query Pane Module
Here we can type SQL queries and get the data from Database
2) Import Option Module
We can import .sql files only into the Database
3) Export Option Module
We can export sql Structure, sql Data or both based on some conditions into 3 types of
files
i. .sql files
ii. .html files
iii. .csv files(Excel Files)
4) Operation Module
i. Here we can create table with constraints
ii. Alter the existing table like
iii. Alter column
iv. Rename column
v. Drop column
vi. Empty column

5) Search Database Module


i. Search based on keywords
ii. Search looks for column names only
iii. Search looks for data only

MODULES DESCRIPTION
SQL Query Pane Module
This module is used to retrieve data from the database by using SQL Queries. The User
interface is designed with a query pane to type the query, where a user can type the sql query.
The sql query is taken by the module as input and generates the output of that query. The output
is displayed in a tabular manner.
Import Option Module
This module is developed to retrieve schema from the external files. The supported files
are .sql files. .sql files contains the set of queries that can be executed. This module uses the FTP
protocol which will enable the web server to load the files.
Export Option Module
The user can export sql Structure, sql Data or both based on some conditions into 3 types
of files.
 .sql files
 .html files
 .csv files(Excel Files)
Operations Module
The user can create table with constraints, Alter the table, Rename the Table, Drop table.
The user can Alter the existing table like by using following keys.
o Alter column
o Rename column
o Drop column
o Empty column
The user can rename the table by giving the old name and new name. The user can drop the
table by selecting the table name from the select box.
Search Database Module
The user must search based on keywords
o Search looks for column names only
o Search looks for data only

1.2 SYSTEM SPECIFICATION


1.2.1 Hardware Specification

PROCESSOR : PENTIUM IV

HARD DISK CAPACITY : 40 GB

MONITOR : 14 “SAMTRON MONITOR

FLOPPY DISK DRIVE : 1.44 MB

PRINTER : TVS 80 COLOR

INTERNAL MEMORY CAPACITY : 128 MB

KEYBOARD : LOGITECH OF 104 KEYS

CPU CLOCK : 1.08 GHz

MOUSE : LOGITECH MOUSE

1.2.2 Software Specification

OPERATING SYSTEM : WINDOWS XP

FRONT END : JSP

BACK END : MS-SQL

SOFTWARE DESCRIPTION
WEB TECHNOLOGIES:
This project consists following web technologies
I. HTML and SGML.
II. Java Scripts.
III. Servlets.
IV. Java server pages.

I.HTML and SGML

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.
We can navigate through the information based on our interest and preference.

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.

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

Fig 1.1: basic HTML tags

II.Java Scripts

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 browser’s display accordingly.

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>

Fig 1.2: sample javascript program.

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 Browser’s status line.
 Animate images or rotate images that change when we move the mouse over them.

III.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.

an HTTP Servlets can be used to generate dynamic HTML content. When you use Servlets to do
dynamic content you get the following advantages:

 They’re 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).
 Easily configured using the GUI-based Admin tool
 Can be loaded and invoked from a local disk or remotely across the network.

A client can invoke Servlets in the following ways:


 The client can ask for a document that is served by the Servlet.
 The client (browser) can invoke the Servlet directly using a URL, once it has been
mapped using the Servlet Aliases section of the admin GUI.
 The Servlet can be invoked through server side include tags.
 The Servlet can be invoked by placing it in the Servlets/ directory.
 The Servlet can be invoked by using it in a filter chain.

IV.Java server pages

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.

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.

1.3.2. Middleware Technologies:

The automatic database schema generation requires following middleware technologies,

I.Java Database Connectivity.

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.

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

II.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.

In the two-tier model, a Java applet or application talks directly to the database. This
requires a JDBC driver that can communicate with the particular database management system
being accessed. A user's SQL statements are delivered to the database, and the results of those
statements are sent back to the user.
Fig 1.3:two-tier architecture.
JAVA
Client machine
Java applet or
Application
Html browser Client machine (GUI)
JDBC
DBMS-proprietary protocol
HTTP, RMI, or CORBA calls

Application
Server Server machine (business Logic)
(Java)JDBC DBMS-proprietary protocol
DBMS Database server
Database server

DBMS

DBMS

Fig 1.4: tree-tier architecture.

In the three-tier model, commands are sent to a "middle tier" of services, which then send
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 user.

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 Features

The Virtual Machine

 A "real" machine runs machine code for that machine only.


 A "virtual" machine runs its own sort of binary data
 The Java Virtual Machine (JVM) is a normal program on each architecture
 It takes Java Byte code as its input language
 Using non-native machine code as the input is called "interpreting".

Program Portabilty

a) The Java Virtual Machine (JVM) is a normal program on each architecture


b) It takes Java Byte code as its input language
c) A single Java program will run on any platform
Fig 1 Java Platform Description

The Big Idea

a) If the JVM has been ported to a platform then that platform can run any Java program.
b) If a program is written in Java then it can be run on any platform with a JVM.

JDBC
In an effort to set an independent database standard API for Java, Sun Microsystems
developed Java Database Connectivity, or JDBC. JDBC offers a generic SQL database access
mechanism that provides a consistent interface to a variety of RDBMSs. This consistent interface
is achieved through the use of “plug-in” database connectivity modules, or drivers. If a database
vendor wishes to have JDBC support, he or she must provide the driver for each platform that the
database and Java run on.

To gain a wider acceptance of JDBC, Sun based JDBC’s framework on ODBC. As you
discovered earlier in this chapter, ODBC has widespread support on a variety of platforms.
Basing JDBC on ODBC will allow vendors to bring JDBC drivers to market much faster than
developing a completely new connectivity solution.
JDBC was announced in March of 1996. It was released for a 90 day public review that
ended June 8, 1996. Because of user input, the final JDBC v1.0 specification was released soon
after.

The remainder of this section will cover enough information about JDBC for you to know
what it is about and how to use it effectively. This is by no means a complete overview of JDBC.
That would fill an entire book.

JDBC Goals
Few software packages are designed without goals in mind. JDBC is one that, because of
its many goals, drove the development of the API. These goals, in conjunction with early
reviewer feedback, have finalized the JDBC class library into a solid framework for building
database applications in Java.

The goals that were set for JDBC are important. They will give you some insight as to why
certain classes and functionalities behave the way they do. The eight design goals for JDBC are
as follows:

1. SQL Level API


The designers felt that their main goal was to define a SQL interface for Java. Although
not the lowest database interface level possible, it is at a low enough level for higher-level
tools and APIs to be created. Conversely, it is at a high enough level for application
programmers to use it confidently. Attaining this goal allows for future tool vendors to
“generate” JDBC code and to hide many of JDBC’s complexities from the end user.

2. SQL Conformance
SQL syntax varies as you move from database vendor to database vendor. In an effort to
support a wide variety of vendors, JDBC will allow any query statement to be passed through
it to the underlying database driver. This allows the connectivity module to handle non-
standard functionality in a manner that is suitable for its users.
3. JDBC must be implemental on top of common database interfaces
The JDBC SQL API must “sit” on top of other common SQL level APIs. This goal allows
JDBC to use existing ODBC level drivers by the use of a software interface. This interface
would translate JDBC calls to ODBC and vice versa.

4. Provide a Java interface that is consistent with the rest of the Java system
Because of Java’s acceptance in the user community thus far, the designers feel that they
should not stray from the current design of the core Java system.

Finally we decided to proceed the implementation using Java networking.

Networking

TCP/IP stack

The TCP/IP stack is shorter than the OSI one:

Fig 2 TCP/IP Stack

TCP is a connection-oriented protocol; UDP (User Datagram Protocol) is a


connectionless protocol.
IP datagram’s

The IP layer provides a connectionless and unreliable delivery system. It considers


each datagram independently of the others. Any association between datagram must be
supplied by the higher layers. The IP layer supplies a checksum that includes its own header.
The header includes the source and destination addresses. The IP layer handles routing
through an Internet. It is also responsible for breaking up large datagram into smaller ones for
transmission and reassembling them at the other end.

UDP

UDP is also connectionless and unreliable. What it adds to IP is a checksum for the
contents of the datagram and port numbers. These are used to give a client/server model

TCP

TCP supplies logic to give a reliable connection-oriented protocol above IP. It


provides a virtual circuit that two processes can use to communicate.

Internet addresses

In order to use a service, you must be able to find it. The Internet uses an address
scheme for machines so that they can be located. The address is a 32 bit integer which gives
the IP address. This encodes a network ID and more addressing. The network ID falls into
various classes according to the size of the network address.

Network address

Class A uses 8 bits for the network address with 24 bits left over for other
addressing. Class B uses 16 bit network addressing. Class C uses 24 bit network addressing
and class D uses all 32.
Subnet address

Internally, the UNIX network is divided into sub networks. Building 11 is


currently on one sub network and uses 10-bit addressing, allowing 1024 different hosts.

Host address

8 bits are finally used for host addresses within our subnet. This places a limit of 256
machines that can be on the subnet.

Total address

Fig 3 Total Address

The 32 bit address is usually written as 4 integers separated by dots.

Port addresses

A service exists on a host, and is identified by its port. This is a 16 bit number. To
send a message to a server, you send it to the port for that service of the host that it is running
on. This is not location transparency! Certain of these ports are "well known".

Sockets

A socket is a data structure maintained by the system to handle network


connections. A socket is created using the call socket. It returns an integer that is like a file
descriptor. In fact, under Windows, this handle can be used with Read File and Write File
functions.
#include <sys/types.h>
#include <sys/socket.h>
int socket(int family, int type, int protocol);
Here "family" will be AF_INET for IP communications, protocol will be zero, and type will
depend on whether TCP or UDP is used. Two processes wishing to communicate over a network
create a socket each. These are similar to two ends of a pipe - but the actual pipe does not yet
exist.

The Java programming language and environment is designed to solve a number of


problems in modern programming practice. It has many interesting features that make it an ideal
language for software development. It is a high-level language that can be characterized by all of
the following buzzwords:

Features

Sun describes Java as

 Simple
 Object-oriented

 Distributed

 Robust

 Secure

 Architecture Neutral

 Portable

 Interpreted

 High performance
 Multithreaded

 Dynamic.

Java is simple.

What it means by simple is being small and familiar.Sun designed Java as closely to C++
as possible in order to make the system more comprehensible, but removed many rarely used,
poorly understood, confusing features of C++. These primarily include operator overloading,
multiple inheritance, and extensive automatic coercions. The most important simplification is
that Java does not use pointers and implements automatic garbage collection so that we don't
need to worry about dangling pointers, invalid pointer references, and memory leaks and
memory management.

Java is object-oriented.

This means that the programmer can focus on the data in his application and the interface
to it. In Java, everything must be done via method invocation for a Java object. We must view
our whole application as an object; an object of a particular class. .

Java is distributed.

Java is designed to support applications on networks. Java supports various levels of


network connectivity through classes in java. net. For instance, the URL class provides a very
simple interface to networking. If we want more control over the downloading data than is
through simpler URL methods, we would use a URLConnection object which is returned by a
URL URL.openConnection () method. Also, you can do your own networking with the Socket
and Server Socket classes.

Java is robust.

Java is designed for writing highly reliable or robust software. Java puts a lot of emphasis
on early checking for possible problems, later dynamic (runtime) checking, and eliminating
situations that are error prone. The removal of pointers eliminates the possibility of overwriting
memory and corrupting data.

Java is secure.

Java is intended to be used in networked environments. Toward that end, Java


implements several security mechanisms to protect us against malicious code that might try to
invade your file system. Java provides a firewall between a networked application and our
computer.

Java is architecture-neutral.

Java program are compiled to an architecture neutral byte-code format. The primary
advantage of this approach is that it allows a Java application to run on any system that
implements the Java Virtual Machine. This is useful not only for the networks but also for single
system software distribution. With the multiple flavors of Windows 95 and Windows NT on the
PC, and the new PowerPC Macintosh, it is becoming increasing difficult to produce software that
runs on all platforms.

Java is portable.

The portability actually comes from architecture-neutrality. But Java goes even further by
explicitly specifying the size of each of the primitive data types to eliminate implementation-
dependence. The Java system itself is quite portable. The Java compiler is written in Java, while the Java
run-time system is written in ANSI C with a clean portability boundary.

Java is interpreted.

The Java compiler generates byte-codes. The Java interpreter executes the translated byte codes
directly on system that implements the Java Virtual Machine. Java's linking phase is only a process of
loading classes into the environment.

Java is high-performance.
Compared to those high-level, fully interpreted scripting languages, Java is high-
performance. If the just-in-time compilers are used, Sun claims that the performance of byte-
codes converted to machine code are nearly as good as native C or C++. Java, however, was
designed to perform well on very low-power CPUs.

Java is multithreaded.

Java provides support for multiple threads of execution that can handle different tasks
with a Thread class in the java.lang Package. The thread class supports methods to start a thread,
run a thread, stop a thread, and check on the status of a thread. This makes programming in Java
with threads much easier than programming in the conventional single-threaded C and C++
style.

Java is dynamic.

Java language was designed to adapt to an evolving environment. It is a more dynamic


language than C or C++. Java loads in classes, as they are needed, even from across a network.
This makes an upgrade to software much easier and effectively. With the compiler, first we
translate a program into an intermediate language called Java byte codes ---the platform-
independent codes interpreted by the interpreted on the Java platform. The interpreter parses and
runs each Java byte code instruction on the computer. Compilation happen s just once;
interpretation occurs each time the program is executed.

Java byte codes can be thought as the machine code instructions for the Java
Virtual Machine (JVM). Every Java interpreter, whether it’s a development tool or a web browser
that can run applets, is an implementation of the Java Virtual Machine.

The Java Platform

A platform is the hardware or software environment in which a program runs.


Most Platforms can be described as a combination of the operating system and hardware. The
Java platform differs from most other platforms in that it’s software –only platform that runs on
top of other hardware-based platforms.
The Java platform has two components:

1. The Java Virtual Machine (JVM).


2. The Java Application Programming Interfaces (Java API).
The JVM has been explained above. It’s the base for the Java platform and is ported onto
various hardware-based platforms.

The Java API is a large collection of ready-made software components that provide many
useful capabilities, such as graphical user interface (GUI). The Java API is grouped into libraries
of related classes and interfaces; these libraries are known as packages.

Native code is code that after you compile it, the compiled code runs on a specific
hardware platform. As a platform-independent environment, the Java platform can be bit slower
than native code. However, smart compilers, well-tuned interpreters, and just-in-time byte code
compilers can bring performance close to that of native code without threatening portability.

Overview of the Swing

The Swing package is part of Java Foundation Classes (JFC) in the Java platform.
The JFC encompasses a group of features to help people build GUIs; Swing provides all the
components from buttons to split panes and tables.

The Swing package was first available as an add-on to JDK 1.1. Prior to the introduction
of the Swing package, the Abstract Window Toolkit (AWT) components provided all the UI
components in the JDK1.0 and 1.1 platforms. Although the Java2 Platform still supports the
AWT components, we strongly encourage using Swing components instead. You can identify
Swing components because their names start with J. The AWT button class, for example, is
named Button, whereas the Swing button class is named JButton. In addition, the AWT
components are in the java.awt package, whereas the swing components are in the javax.swing
package.

As a rule, programs should not use “heavyweight” AWT components alongside Swing
components. Heavyweight components include all the ready-to-use AWT components, such as
Menu and ScrollPane, and all components that inherit from the AWT canvas and Panel classes.
When Swing components (and all other “lightweight” components) overlap with heavyweight
components, the heavyweight component is always painted on top.

Swing Features and Concepts:

It introduces Swing’s features and explains all the concepts we need to be able to use Swing
components effectively.

Swing Components and the Containment Hierarchy:


Swing provides many standard GUI components such as buttons, lists, menus and
textareas, which we combine to create our program’s GUI. It also includes containers such as
windows and tool bars.

Layout Management:

Containers use layout managers to determine the size and position of the components
they contain. Borders affect the layout of Swing GUIs by making Swing components larger. We
can also use invisible components to affect layout.

Event Handling:

Event handling is how programs respond to external events, such as the user pressing a
mouse button. Swing programs perform all their painting and event handling in the event-
dispatching thread.

Painting:

Painting means drawing the components on-screen. Although it’s easy to customize a
component’s painting, most programs don’t do anything more complicated than customizing a
component’s border.

Threads and Swing:

If we do something to a visible component that might depend on or affect its state, then
we need to do it from the event-dispatching thread. This isn’t an issue for many simple programs,
which generally refer to components only in event -handling code. However, other programs
need to use the invoke Later method to execute component-related calls in the event-dispatching
thread.

More Swing Features and Concepts:

These are some of the major concepts we need to know to build Swing GUIs—the containment
hierarchy, layout management, event handling, painting, and threads. These are some of the other
important Swing features. They are

 Features that JComponent provides


 Icons
 Actions
 Pluggable Look and Feel support
 Support for assistive technologies
 Separate data and state models
Features that JComponent Provides:

Except for the top-level containers, all components that begin with J inherit from the
JComponent class. They get many features from JComponent, such as the ability to have borders,
tool tips, and a configurable look and feel. They also inherit many convenient methods.

Icons:

Many Swing components—notably buttons and labels—can display images. We specify


these images as Icon objects.

Actions:

With Action objects, the Swing API provides special support for sharing data and state
between two or more components that can generate action events. For example, if we have a
button and a menu item that perform the same function, consider using an Action object to
coordinate the text, icon, and enabled state for the two components.

Pluggable Look and Feel:


This Feature enables the user to switch the look- and-feel of Swing components without
restarting the application. The Swing library supports cross-platform look-and-feel---also Java
look-and-feel--- that remains the same across all platforms wherever the program runs. The
native look-and-feel is native to whatever particular system on which the program happens to be
running, including Windows and Motif. The Swing library provides an API that gives great
flexibility in determining the look-and-feel of applications. It also enables you to create our own
look-and-feel.

Support for Assistive Technologies:

Assistive technologies such as screen readers can use the Accessibility API to get
information from swing components. Because support for the Accessibility API is built into the
Swing components, our swing program will probably work just fine with assistive technologies,
even if we do nothing special.

Separate Data and State Models:

Most noncontainer Swing components have models. A button (JButton), for example, has
a model (ButtonModel) that stores the button’s state—what its keyboard mnemonic is, Whether
it’s enabled, selected, or pressed, and so on.

Some components have multiple models. A list (JList), for example, uses a ListModel to
hold the list’s contents, and a ListSelectionModel to track the list’s current Selection.

Some Swing Components of Java:

JScrollPane:

Provides a scrollable view of a lightweight component. It is used to display a child


component with a built-in scrolling facility. The scrolling of a child component, when its size is
larger than the available view port, is performed in horizontal or vertical directions by using the
scrollbars associated with the scroll pane. Scroll panes are very easy to implement because the
adjustment events fired by the scrollbars are already taken care of by the scrollpane object. A
Swing scroll pane is an object of type JScrollPane that extends from the class JComponent.
JButton:

Swing buttons are represented by the objects of class JButton, and each button is
basically an implementation of a push-type button. Unlike AWT buttons, Swing buttons can be
displayed with text labels as well as icons. We can also set different icon for different states of
the buttons by using supporting methods.

JFrame:

An extended version of java.awt.Frame that adds support for the JFC/Swing components
architecture. The JFrame class is slightly incompatible with Frame. Like all other JFC/Swing
top-level containers, a JFrame contains a JRootPane as its only child. The content pane provided
by the root pane should, as a rule, contain all the non-menu components displayed by the
JFrame.

JTextField:

The swing text field can be used to display or edit a single line of plain text. The
component appears similar to the AWT text field; however, the Swing text field is a lightweight
component. A text-field object is created by using the class JTextField, which is a direct subclass
of JTextComponent. Thus, the functionality of JTextField spreads into JTextComponent and
JComponent. JTextField objects can fire the action and mouse events that can be captured by a
registered listener.

2. SYSTEM STUDY

System Study is a process of gathering and interpreting facts, diagnosing problems and
the information to recommend improvements on the system. It is a problem solving activity that
requires intensive communication between the system users and system developers. System
Study or study is an important phase of any system development process. The system is studied
to the minutest detail and analyzed. The system analyst plays the role of the interrogator and
dwells deep into the working of the present system. The system is viewed as a whole and the
input to the system are identified. The outputs from the organizations are traced to the various
processes. System Study is concerned with becoming aware of the problem, identifying the
relevant and decisional variables, analyzing and synthesizing the various factors and determining
an optimal or at least a satisfactory solution or program of action.

2.1 Existing system

There are many Database Management systems available today. The Database designer is
familiar with any one of the database Management Systems. Let us consider a condition when a
database designer required to design the schema for an application on different DBMS. He
required to learn all the DBMS User Interfaces. Where some of them are GUI (Graphic User
Interface) based and others are CUI(Character User Interface).

2.1.1 DRAWBACKS OF EXISTING SYSTEM

Through this approach to alter or to edit a large database schema, It consumes more time for a
Database Designer. The operations like altering the table structure, Editing the table, Dropping
columns, searching for a column name, searching for a data in the table.. etc.,

To Design and alter the Database schema there exists different user interfaces for different
DBMS.

2.2 PROPOSED SYSTEM:

The Automatic Database Schema Generation System provides the following features.

1. The Automatic Database Schema Generation System provides a Common User Interface
to interact with all the databases.

2. Here the user interface is Graphical User Interface.

3. This application is a Web based Application.

4. Being a web based application it doesn’t require any client side installation.
5. Any number of users can interact with the system simultaneously.

6. Centralized database connectivity.

7. Using Session management the interaction more flexible and secure.

.4 FEASIBILITY STUDY

An important outcome of the preliminary investigation is the determination that the


system requested is feasible. Feasibility study is carried out to select the best system that meets
the performance requirements.

Feasibility study is both necessary and prudent to evaluate the feasibility of the project at
the earliest possible time. It involves preliminary investigation of the project and examines
whether the designed system will be useful to the organization. Months or years of effort,
thousand for millions of money and untold professional embarrassment can be averted if an in-
conceived system is recognized early in the definition phase.

The different types of feasibility are: Technical feasibility, Operational feasibility,


Economical feasibility.

2.4.1 Technical feasibility

Technical Feasibility deals with the hardware as well as software requirements.


Technology is not a constraint to type system development. We have to find out whether the
necessary technology, the proposed equipments have the capacity to hold the data, which is used
in the project, should be checked to carryout this technical feasibility.

The technical feasibility issues usually raised during the feasibility stage of investigation
includes these

 This software is running in windows 2000 Operating System, which can be easily
installed.

 The hardware required is Pentium based server.

 The system can be expanded.

2.4.2 Behavioral Feasibility

This feasibility test asks if the system will work when it is developed and installed.
Operational feasibility in this project:

 The proposed system offers greater level of user-friendliness.

 The proposed system produces best results and gives high performance. It can be
implemented easily .So this project is operationally feasible.

2.4.3 Economical feasibility

Economical Feasibility deals about the economical impact faced by the organization to
implement a new system. Financial benefits must equal or exceed the costs. The cost of
conducting a full system, including software and hardware cost for the class of application being
considered should be evaluated. Economic Feasibility in this project:

 The cost to conduct a full system investigation is possible.


 There is no additional manpower requirement.
 There is no additional cost involved in maintaining the proposed system.

Operational Feasibility
In this step, we verify different operational factors of the proposed systems like man-
power, time etc., whichever solution uses less operational resources, is the best operationally
feasible solution. The solution should also be operationally possible to implement. Operational
Feasibility determines if the proposed system satisfied user objectives could be fitted into the
current system operation.
 The methods of processing and presentation are completely accepted by the clients since
they can meet all user requirements.
 The clients have been involved in the planning and development of the system.
 The proposed system will not cause any problem under any circumstances.
Our project is operationally feasible because the time requirements and personnel requirements
are satisfied. We are a team of four members and we worked on this project for three working
months.

3. SYSTEM STUDY AND DESIGN


INTRODUCTION
System Design is the most creative and challenging phase in the system life cycle.
Design is the first step into the development phase for any engineered product or system. Design
is a creative process. A good design is the key to effective system. System design is a solution
how to approach the creation of a new system. System design transforms a logic representation
of what is required to do into the physical specification. The specification is converted into
physical reality during development.

3.1 FILE DESIGN


Information systems in business are file and database-oriented. Data are accumulated into
files that are processed or maintained by the system. Here file concepts and concern concepts are
reviewed. File design describes how the files are stored in a database and what are all the
methods are used in the project file.

3.2 INPUT DESIGN

Input Design deals with what data should be given as input, how the data should be
arranged or code, the dialog to guide the operating personnel in providing input, methods for
preparing input validations and steps to follow when error occur. Input Design is the process of
converting a user-oriented description of the input into a computer-based system. This design is
important to avoid errors in the data input process and show the correct direction to the
management for getting correct information from the computerized system. It is achieved by
creating user-friendly screens for the data entry to handle large volume of data. The goal of
designing input is to make data entry easier and to be free from errors. The data entry screen is
designed in such a way that all the data manipulates can be performed. It also provides record
viewing facilities.

When the data is entered it will check for its validity. Data can be entered with the help of
screens. Appropriate messages are provided as when needed so that the user will not be in maize
of instant. Thus the objective of input design is to create an input layout that is easy to follow.

3.3 OUTPUT DESIGN

A quality output is one, which meets the requirements of the end user and presents the
information clearly. The objective of output design is to convey information about past activities,
current status or projections of the future, signal important events, opportunities, problems, or
warnings, trigger an action, confirm an action etc. Efficient, intelligible output design should
improve the system’s relationship with the user and helps in decisions making. In output design
the emphasis is on displaying the output on a CRT screen in a predefined format. The primary
consideration in design of output is the information requirement and objectives of the end users.
The major formation of the output is to convey the information and so its layout and design need
a careful consideration.

3.4 DATABASE DESIGN

A database is an organized mechanism that has the capability of storing information


through which a user can retrieve stored information in an effective and efficient manner. The
data is the purpose of any database and must be protected.

The database design is a two level process. In the first step, user requirements are
gathered together and a database is designed which will meet these requirements as clearly as
possible. This step is called Information Level Design and it is taken independent of any
individual Database Management System (DBMS).

In the second step, this Information level design is transferred into a design for the
specific DBMS that will be used to implement the system in question. This step is called
Physical Level Design, concerned with the characteristics of the specific DBMS that will be
used. A database design runs parallel with the system design. The organization of the data in the
database is aimed to achieve the following two major objectives.

o Data Integrity

o Data independence

3.5 SYSTEM DEVELOPMENT

TOP DOWN APPROACH

The importance of new system is that it is user friendly and a better interface with user’s
working on it. It can overcome the problems of manual system and the security problem.

Top down approach of software development is the incremental approach to the


construction of program structure. Modules are integrated by moving through the control
hierarchy, beginning with the main control module. Modules subordinate to the main control
modules are incorporate into the structure in either a depth first or breadth first manner.

The top down approach is performed in a serious of five steps,

1. The main module that is overall software is divided into five modules that are under the
control of the main control module.
2. Depending on the top down approach selected subordinate stubs is replaced one at a time
with actual components.
3. Tests are conducted as each component is integrated
4. On completion of each test another stub is replaced with real time component.
5. Regression testing may be conducted to ensure the new errors have not been introduced.

4. TESTING AND IMPLEMENTATION

TESTING

Testing is a series of different tests that whose primary purpose is to fully exercise the
computer based system. Although each test has a different purpose, all work should verify that all
system element have been properly integrated and performed allocated function. Testing is the
process of checking whether the developed system works according to the actual requirement
and objectives of the system.
The philosophy behind testing is to find the errors. A good test is one that has a high
probability of finding an undiscovered error. A successful test is one that uncovers the
undiscovered error. Test cases are devised with this purpose in mind. A test case is a set of data
that the system will process as an input. However the data are created with the intent of
determining whether the system will process them correctly without any errors to produce the
required output.

Testing is a process of executing a program with the interest of finding an error. A good
test is one that has high probability of finding the yet undiscovered error. Testing should
systematically uncover different classes of errors in a minimum amount of time with a minimum
amount of efforts. Two classes of inputs are provided to test the process.

I. A software configuration that includes a software requirement specification, a design


specification and source code.

II. A software configuration that includes a test plan and procedure, any testing tool and test
cases and their expected results.

Testing is divided into several distinct operations:

1. Unit Testing

Unit test comprises of a set tests performed by an individual program prior to the
integration of the unit into large system. A program unit is usually the smallest free functioning
part of the whole system. Module unit testing should be as exhaustive as possible to ensure that
each representation handled by each module has been tested. All the units that makeup the
system must be tested independently to ensure that they work as required.

During unit testing some errors were raised and all of them were rectified and handled
well. The result was quiet satisfactory and it worked well.

2. Integration Testing

Integration testing is a system 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 modules and build a program structure that has been dictated by design. Bottom-
up integration is the traditional strategy used to integrate the components of a software system
into functioning whole. Bottom-up integration consists of unit test followed by testing of the
entire system. A sub-system consists of several modules that communicated with other defined
interface.

The system was done the integration testing. All the modules were tested for their
compatibility with other modules .They test was almost successful. All the modules coexisted
very well, with almost no bugs. All the modules were encapsulated very well so as to not hamper
the execution of other modules.

3. Validation Testing

After validation testing, software is completely assembled as a package, interfacing errors


that have been uncovered and corrected and the final series of software test; the validation test
begins. Steps taken during software design and testing can greatly improve the probability of
successful integration in the larger system. System testing is actually a series of different tests
whose primary purpose is to fully exercise the compute –based system.

4. Recovery Testing

It is a system that forces the software to fail in a variety of ways and verifies that the
recovery is properly performed.

5. Security Testing

It attempts to verify that protection mechanisms built into a system will in fact protect it
from improper penetration. The system’s security must of course be tested from in vulnerability
form frontal attack.

6. Stress Testing

Stress tools are designed to confront programs with abnormal situations. Stress testing
executes a system in a manner that demands resources in abnormal quantity and volume.

7. Black Box Testing

Black box testing is done to find out the following information as shown in below:

1. Incorrect or missing functions.


2. Interface errors.

3. Errors or database access.

4. Performance error.

5. Termination error.

The mentioned testing is carried out successfully for this application according to the
user’s requirement specification.

IMPLEMENTATION

System implementation is stage in the project where the theoretical design is turned into
the working system. The most crucial stage is giving the users confidence that the new system
will work effectively and efficiently.

The performance of reliability of the system is tested and it gained acceptance. The
system was implemented successfully. Implementation is a process that means converting a new
system in to operation.

Proper implementation is essential to provide a reliable system to meet organization


requirements. During the implementation stage a live demon was undertaken and made in front
of end-users. The various features provided in the system were discussed during implementation.

The performance of reliability of the system is tested and it gained acceptance. The
system was implemented successfully. Implementation is a process that means converting a new
system in to operation. The purpose of System Implementation can be summarized as follows:

It making the new system available to a prepared set of users (the deployment), and
positioning on-going support and maintenance of the system within the Performing Organization
(the transition). At a finer level of detail, deploying the system consists of executing all steps
necessary to educate the Consumers on the use of the new system, placing the newly developed
system into production, confirming that all data required at the start of operations is available and
accurate, and validating that business functions that interact with the system are functioning
properly. Transitioning the system support responsibilities involves changing from a system
development to a system support and maintenance mode of operation, with ownership of the new
system moving from the Project Team to the Performing Organization.
List of System implementation is the important stage of project when the theoretical
design is tuned into practical system. The main stages in the implementation are as follows:

o Planning

o Training

o System testing and

o Changeover Planning

Planning is the first task in the system implementation. Planning means deciding on the
method and the time scale to be adopted. At the time of implementation of any system people
from different departments and system analysis involve. They are confirmed to practical problem
of controlling various activities of people outside their own data processing departments. The
line managers controlled through an implementation coordinating committee. The committee
considers ideas, problems and complaints of user department, it must also consider;

o The implication of system environment

o Self selection and allocation form implementation tasks

o Consultation with unions and resources available

o Standby facilities and channels of communication

The following roles are involved in carrying out the processes of this phase. Detailed
descriptions of these roles can be found in the Introductions to Sections I and III.

_ Project Manager

_ Project Sponsor

_ Business Analyst

_ Data/Process Modeler

_ Technical Lead/Architect
_ Application Developers

_ Software Quality Assurance (SQA) Lead

_ Technical Services (HW/SW, LAN/WAN, TelCom)

_ Information Security Officer (ISO)

_ Technical Support (Help Desk, Documentation, Trainers)

_ Customer Decision-Maker

_ Customer Representative

_ Consumer

The purpose of Prepare for System Implementation is to take all possible steps to
ensure that the upcoming system deployment and transition occurs smoothly, efficiently, and
flawlessly. In the implementation of any new system, it is necessary to ensure that the Consumer
community is best positioned to utilize the system once deployment efforts have been validated.
Therefore, all necessary training activities must be scheduled and coordinated. As this training is
often the first exposure to the system for many individuals, it should be conducted as
professionally and competently as possible. A positive training experience is a great first step
towards Customer acceptance of the system.

During System Implementation it is essential that everyone involved be absolutely


synchronized with the deployment plan and with each other. Often the performance of
deployment efforts impacts many of the Performing Organization’s normal business operations.
Examples of these impacts include:

o Consumers may experience a period of time in which the systems that they depend on
to perform their jobs are temporarily unavailable to them. They may be asked to
maintain detailed manual records or logs of business functions that they perform to be
entered into the new system once it is operational.
o Technical Services personnel may be required to assume significant implementation
responsibilities while at the same time having to continue current levels of service on
other critical business systems.

o Technical Support personnel may experience unusually high volumes of support


requests due to the possible disruption of day-to-day processing.

Because of these and other impacts, the communication of planned deployment activities
to all parties involved in the project is critical. A smooth deployment requires strong leadership,
planning, and communications. By this point in the project lifecycle, the team will have spent
countless hours devising and refining the steps to be followed. During this preparation process
the Project Manager must verify that all conditions that must be met prior to initiating
deployment activities have been met, and that the final ‘green light’ is on for the team to proceed.
The final process within the System Development Lifecycle is to transition ownership of the
system support responsibilities to the Performing Organization. In order for there to be an
efficient and effective transition, the Project Manager should make sure that all involved parties
are aware of the transition plan, the timing of the various transition activities, and their role in its
execution.

Due to the number of project participants in this phase of the SDLC, many of the
necessary conditions and activities may be beyond the direct control of the Project Manager.
Consequently, all Project Team members with roles in the implementation efforts must
understand the plan, acknowledge their responsibilities, recognize the extent to which other
implementation efforts are dependent upon them, and confirm their commitment.

The next stage after testing is implementation. Generally implementation is referred to


conversion of a new system design to an operational one. It also deals with the training of
operators. An implementation plan is to be made before starting the actual implementation of the
system. Implementation is the stage where the theoretical design is converted into a working
system. The newly proposed system is implemented after the successful testing of the system.

Implementation Methods

The term implementation has different meanings, ranging from the conversion of a basic
application to a complete replacement of a computer system. The procedure, however, is
virtually the same. Implementation is used here to mean the process for converting a new or
revised system into an operational one. Conversion is one aspect of implementation. The other
aspects are the post implementation review and software maintenance.

There are three types of implementation:

 Implementation of a computer system to replace a manual system.

 Implementation of a new computer system to replace an existing one.

 Implementation of a modified application to replace an existing one.

Conversion means changing from one system to another. That is data in the old format is run
through a program, or a series of programs, to convert it into the new format. Conversion can
also be from one hardware medium to another. The objective is to put the tested system into
operation while holding costs, risk and personnel irritation to a minimum. It involves:-

 Creating computer compatible files.

 Training the operating staff.

 Installing terminals and hardware.

A problem for management is discovering, at integration time, that pieces of modules simply
do not fit together. Such problem will arise when charge is made to only one copy of the design
document. When integration is completed, the product as whole is tested, this is termed product
testing. When the developers are confident about the correction of every aspect of product, it is
handled over to the client for acceptance testing.

Implementation Plan

The implementation plan includes a description of all the activities that must occur to
implement the new system and to put it into operation. It identifies the personnel responsible for
the activities and prepares a time chart for implementing the system. The implementation plan
consists of the following steps.

 List all files required for implementation.


 Identify all data required to build new files during the implementation.

 List all new documents and procedures that go into the new system.

The implementation plan should anticipate possible problems and must be able to deal
with them. The usual problems may be missing documents; mixed data formats between current
and files, errors in data translation, missing data etc.

IMPLEMENTATION PROCEDURES

The implementation phase is less creative than system design. A system design may be
dropped at any time prior to implementation, although it becomes more difficult when it goes to
the design phase. The final report of the implementation phase includes procedural flowcharts,
record layouts, and a workable plan for implementing the candidate system design into a
operational design.

USER TRAINING

It is designed to prepare the users for testing & converting the system. There is several
ways to trail the users they are:

1) User manual

2) Help screens

3) Training demonstrations.

1) User manual

The summary of important functions about the system & software can be provided as a
document to the user. User training is designed to prepare the user for testing and convening a
system.

The summary of important functions about the system and the software can be provided
as a document to the user

1. Open http page


2. Type the file name with URL index .asp in the address bar

3. Index. ASP is opened existing user the type the username and password

4. Click the submit button

2) Help screens

This features now available in every software package, especially when it is used with a
menu. The user selects the “Help” option from the menu. The System success the necessary
description or information for user reference.

3) Training demonstration

Another user training element is a training demonstration. Live demonstration with


personal contact is extremely effective for training users.

OPERATIONAL DOCUMENTATION

Documentation means of communication; it establishes the design and performance


criteria of the project. Documentation is descriptive information that portrays the use and /or
operation of the system. The user will have to enter the user name and password if it sis valid he
participate in auction. Otherwise if it is new user he needs to register.

Documentation means of communication; it establishes design & performance criteria for


phases of the project. Documentation is descriptive information that portrays he use &/or
operation of the system.

1) Documentation tools

Document production & desktop publishing tool support nearly ever aspect of software
developers. Most software development organizations spend a substantial amount of time
developing documents, and in many cases the documentation process itself is quite inefficient. It
is not use unusual for a software development effort on documentation. For this reason,
Documentation tools provide an important opportunity to improve productivity.

2) Document restructuring
Creating document is far too timed consuming. If the system work’s, we’ll live with
what we have. In some cases, this is the correct approach. It is not possible to recreate document
for hundreds of computer programs.

Documentation must be updated, but we have limited resources. It may not be necessary
to fully redocument an application. Rather, those portions of the system that are currently
undergoing change are fully documented.

The system is business critical and must be fully redocumented. Even in this case, an
intelligent approach is to pare documentation to an essential minimum.

5. CONCLUSION

The entire project has been developed and deployed as per the
requirements stated by the user, it is found to be bug free as per the testing standards that are
implemented. Any specification untraced errors will be concentrated in the coming versions,
which are planned to be developed in near future. The system at present does not take care off
the money payment methods, as the consolidated constructs need SSL standards and are
critically to be initiated in the first face; the application of the credit card transactions is applied
as a developmental phase in the coming days. The system needs more elaborative technicality for
its inception and evolution.

FUTURE WORK
Database Tier: The concentration is applied by adopting wide range of DBMS.

User Tier: The user interface is developed in a browser specific environment to have web based
architecture. The components are designed using HTML standards and Java server pages power
the dynamic of the page design. Java Script for Loading graphics and Validations.

Data Base Connectivity Tier: The communication architecture is designed by concentrated on


the standards of servlets and JSP’s. The database connectivity is established using the JDBC.

Bibliography

References for the Project Development Were Taken From the following Books and
Web Sites:

1. JAVA Technologies,

2. JAVA Complete Reference by Herbert Sheildt and Patrick Naughton,

3. Java Script Bible Gold Edition,

4. Web Enable Commercial Application Development Using… Java 2.0 by Ivan


Bayross,

5. Professional Java Server Programming Subhramanyam Allamaraju. ,

6. Inside Servlets.
7. Java.sun.com tutorials.

8. Software Engineering by Roger Pressman.

9. Object-Oriented Software Engineering Using UML, Pattern and Java Second Edition
by Bernd Bruegge, Allen H.Duetoit.

Use Cases diagram


SYSTEM NAME

Use case 1

Actor
Actor

Use case 2

Use case n

Use Cases diagram


AUTOMATIC DB SCHEMA GENERATION

Database Login
SCHEMA MODIFICATION

DATABASE SEARCH

Database Schema EXPORT SCHEMA


Designer
IMPORT SCHEMA

Database logout

Sample Code
import java.util.*;
class Cluster
{
ArrayList<DataObject>set=new ArrayList<DataObject>();
//TreeSet<DataObject>set=new TreeSet<DataObject>();
public void addMember(DataObject newmember)
{
set.add(newmember);
}
public void removeMember(DataObject member)
{
set.remove(member);
}
public void show()
{
for(int i=0;i<set.size();i++)
System.out.print(set.get(i)+"\t");
System.out.println();
}
public boolean exists(DataObject dob)
{
return set.contains(dob);
}
}

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=vamsi>");

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 = document.loginform.url.value; " +

" if(ur == null || ur == \"\" || ur == \" \") { " +


" alert('URL must be entered.'); " +

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

" }"+

" else document.loginform.submit(); " +

"} " +

"function isEmpty(id) { " +

" if(id.value==null || id.value==\"\" || id.value==\" \") { " +

" alert(id.name + \" must be entered.\"); " +

" id.focus(); " +

" }"+

"} " +

"function empty() { " +

" document.loginform.reset(); " +

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

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

"} " +

"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 = \"/httpadmin/pics/login2.jpg\"; " +

" onImages[1].src = \"/httpadmin/pics/reset2.jpg\"; " +

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

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

" offImages[0].src = \"/httpadmin/pics/login1.jpg\"; " +

" offImages[1].src = \"/httpadmin/pics/reset1.jpg\"; " +

" document.loginform.url.value = \"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/mysql\"; " +

" else if(i == 2) document.loginform.url.value


= \"jdbc:oracle:thin:@localhost:1521:oracle8i\"; " +

"} " +

"</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>" + message + "</TH>");

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

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

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

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


ACTION='/httpadmin/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>org.gjt.mm.mysql.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='/httpadmin/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='/httpadmin/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();

SCREEN SHOT:
Structure of Database:
Structure of Bonus Database:
Browse a Database:
Properties of SCOTT schema:
SQL Query Pane:
Result of SQL Query:
Import from SQL file:
Import scott_emp_ data schema:
Import succeeded message:
Export the Table:
Export the SQL file:
To save the Export file:
Save on Desktop:
Create the table:
Search the Database:
Search Results:
Logout from the Database:

Вам также может понравиться