integrateddbserverDocumentation

Embed Size (px)

Citation preview

  • 8/2/2019 integrateddbserverDocumentation

    1/43

    INTEGRATED DB SERVER

    ABSTRACTThe Database interface tool is designed and developed to test the database

    connectivity features of JDBC drivers and their supported databases .The

    environment chosen to develop this tool is ORACLE,. My-SQL .The tool

    provides in depth control of the API sequence of the driver. The DBI tool

    covers all methods defined in the JDBC specification. DBI tool provides

    facility for processing queries .The tool provides an abstract format and

    interface to submit an SQL statement and view the results.This mechanism

    is further simplified with Load and Gocommand . For instance when a

    Load & Go is used, the tool automatically takes SQL statement and view

    the results creates a JDBC statement object ,executes the statement and

    displays the result set. During the above sequence of operation the tool

    doesnt wait for any user action or input block .This tool has other

    additional useful feature for exporting the data in html or excel format.

    1

  • 8/2/2019 integrateddbserverDocumentation

    2/43

    CHAPTER-1

    2

  • 8/2/2019 integrateddbserverDocumentation

    3/43

    INTRODUCTION

    1.1 AIM

    Enterprise applications are changing more rapidly and the needs of enterprise is

    increasing enormously, as the needs are growing towards decision making ,obtaining

    accurate data in time plays a major role to withstand the fray .Ultimately the success lies

    in how fast can we retrieve data and manipulate the information .To send queries and

    process them quite efficiently is the task of drivers which lead us to connect to the

    databases. When different companies provide different drivers to connect to their

    databases ,we seldom found a server side application to interact with any database like

    oracle , my -sql offered by a database providers and also there is a need to have an

    user friendly interface to query the database and obtain the results from the server.

    3

  • 8/2/2019 integrateddbserverDocumentation

    4/43

    1.2 INTRODUCTION

    Database Interface is an industry-standard tool for application development . Using

    Database Interface, developers can interact with any back end software (i.e. Oracle,

    MS-Access, My-SQL etc). The database interface can be used to build, test and

    debug PL/SQL packages, procedures, triggers, and functions. Database Interface

    users can create and edit database objects such as tables, views, indexes, constraints, and

    users. Database Interfaces 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.

    The requirements of a database application developer will vary from project to

    project. On a large team where DBAs manage the DDL, a developer may spend 90 of

    development time coding and testing SELECT queries to issue from 3GL or 4GL

    application code. In such an environment, a developer might be concerned only with

    viewing the DDL and database code. On smaller teams, a developer might be responsible

    for maintenance of the development schema, movement of test data between schemas,

    writing procedure code, populating tables from legacy sources, and more. Database

    Interface facilitates all of these needs.

    For example if you are working with oracle, you dont have to be a PL/SQL expert

    to access database objects with Database Interface. You can view the Oracle Dictionary,

    tables, indexes, stored procedures, and more - all through a multi-tabbed browser.

    Database Interface utilizes direct Oracle OCI calls for full access to the Oracle API.

    Advanced editing features save time and increase productivity. Code can be created from

    shortcuts and code templates. You can even create your own code templates.

    4

  • 8/2/2019 integrateddbserverDocumentation

    5/43

    1.2.1 Use Database Interface to

    Create, browse, or alter objects (tables, views, indexes, etc.) including Oracle8

    TYPE objects

    Graphically build, execute, and tune queries

    Edit and Debug PL/SQL and profile stored procedures including functions,packages, and triggers

    Find and fix database problems with constraints, triggers, extents, indexes, andgrants

    1.3 IDENTIFICATION OF NEED

    To clearly identify the need of this application, it is exemplified with one situation.

    A project manager is dealing with an enterprise application, which is in the development

    phase. This application has got different faces such as a desktop interface, a web interface

    and mobile interface. Initially all these applications are not integrated. Once these entire

    interfaces are working well, they are going to be integrated. In such occasion the

    database which is being used must be same. But while designing these individual

    modules, creating a sample database for each module and perform the test, it is not

    possible practically. So for that reason, there must be a kind of tool, using which we

    can carry the database to any another location and use the database there very easily.

    The present application will fulfill the requirement. The current application can be

    used just as a brief case of database.

    1.4 PRELIMINARY INVESTIGATION:

    The present application can be differentiated into the following modules, which are

    closely integrated with one another.

    5

  • 8/2/2019 integrateddbserverDocumentation

    6/43

    1.Structure: It 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.

    2.Properties: The properties module enables us to modify data types, size and constraints

    assigned to each field.

    3.SQL: Using this module, we can use and implement different kinds of SQL statements.

    The result of the SQL statement will be displayed immediately after executing the

    statement.

    4.Import: This module gives an exclusive feature of importing the existing SQL scripts to

    the existing schema.

    5.Export: This module gives the feature of exporting existing schema object(s) to an SQL

    file. Here the facility is there to export only tables, only single user or the entire schema.

    6.Operations: This module will be used to create new database objects.

    2. 3 FEASIBILITY STUDY

    All projects are feasible given unlimited resources and infinite time! Unfortunately, the

    development of computer-based system or product is more likely plagued by a scarcity

    of resources and difficult delivery dates. It is both necessary and prudent to evaluate the

    feasibility of a project at the earliest possible time. Months or years of effort, thousands

    or millions of dollars, and untold professional embarrassment can be averted if an ill-

    conceived system is recognized early in the definition phase.

    Feasibility and risk analysis are related in many ways. If project risk is great the

    feasibility of producing quality software is reduced. During product engineering,

    however, we concentrate our attention on four primary areas of interest:

    2.3.1Technical Feasibility

    6

  • 8/2/2019 integrateddbserverDocumentation

    7/43

  • 8/2/2019 integrateddbserverDocumentation

    8/43

    configuration, system compatibility of any hardware and timing effective manner of

    allocating systems and registering complaints.

    2.3.3 Operational Feasibility:

    In our application front end is developed using GUI. So it is very easy to the customer

    to enter the necessary information. But customer has some knowledge on using web

    applications before going to use our application.

    8

  • 8/2/2019 integrateddbserverDocumentation

    9/43

    CHAPTER-2

    REVIEW

    OF

    RELATED LITERATURE

    9

  • 8/2/2019 integrateddbserverDocumentation

    10/43

    2.1 BASIC DATABASE CONCEPTS:

    A database is a corporate collection of data with some inherent meaning, designed, built

    and populated with data for a specific purpose. A database stores data that is useful to us.

    This data is only a part of the entire data available in the world around us.

    To be able to successfully design and maintain databases we have to do the

    following:

    Identify which part of the worlds data is of interest to us.

    Identify what specific objects in that part of the worlds data are of interest to us.

    Identify a relationship between the objects.

    Hence the objects, their attributes and the relationship between them that are of interest to

    us are still owed in the database that is designed, built and populated with data for a

    specific purpose.

    DBMS (Data base management systems) consists of database and a set of programs to

    access that database .The primary goal of DBMS is to provide an environment that

    is both convenient and efficient to use in retrieving and storing the database information.

    2.1.1 CHARACTERISTICS OF DBMS:

    It represents a complex relationship between data.

    Keeps a tight control of debtor redundancy

    Enforces user-defined rules to ensure integrity of table data.

    Has a centralized data dictionary for the storage of information pertaining to data

    and its manipulation.

    10

  • 8/2/2019 integrateddbserverDocumentation

    11/43

    Ensures that data can be shared across applications.

    Enforces data access authorization has automatic, intelligent backup and recovery

    procedures for data.

    Have different interfaces via which users can manipulate data.

    2.2 DATA ABSTRACTION:

    A major purpose of DBMS is to provide users with an abstract view of the data i..e

    hidden details of how the data is stored and maintained,different data abstraction levels

    are

    2.2.1 Physical Level : It describes how the data is actually stored in binaryform.

    2.2.2 Conceptual Level : The next higher level how the data is stored.

    2.2.2 View Level : Many users of the database system will not concerned with all

    that information .The system may provide many views for the same database.

    2. 3 DATA MODELS:

    The structure of the database is the conceptual model ,a collection of tools for describing

    data, data relationships ,data semantics and consistency constraints. Different data models

    are :

    2.3.1Object based Models :Object-based logical models are used in describing data

    at the conceptual and view levels.They allow data constraints to be specified to maintain

    consistency,explicitly.Two types

    2.3.1.1The Entity Relationship model :It is based on a perception of a real world

    which consists of a collection of basic objects called Entities and relationships among

    those objects.

    2.3.1.2Object oriented model:It is based on the collection of objects.Objects

    11

  • 8/2/2019 integrateddbserverDocumentation

    12/43

    contain same type of values and the same methods are grouped together into class.

    2. 3.2 RECORD BASED LOGICAL MODEL:

    Database is structured in fixed format records.Each record defines a fixed number of

    fields,or attributes,and each field is usually of a fixed length.The three models are:

    2.3.2.1 Relational Model: It represents the data and relationships among data by a

    collection of tables.

    2.3.2.2 Network model:It is represented by collection of records and relationships

    among data are represented by links ,can be viewed as pointers.

    2.3.2.3 Hierarchy Model: Data and relationships are represented by records andlinks

    ,where records are organized as collection of trees.

    2.4 RELATIONAL DATABASE MODEL:

    A relation database consists of a collection of tables ,each of which is assigned

    uniquename .Each table contains number of columns with a unique name.

    2.4.1 RELATIONAL DATABASE MANAGEMENT:

    A relational database management system uses only its relational capabilities to manage

    the information stored in its databases.

    2.4.2INFORMATION REPRESENTATION : All information stored in a

    relational database is represented only by data item values, which are stored in the tables

    that make up the database. Associations between data items are not logically represented

    in any other way, such as the use of pointers from one table to the other.

    2.4.3LOGICAL ACCESSIBILITY:

    12

  • 8/2/2019 integrateddbserverDocumentation

    13/43

    Every data item value stored in relational database is accessible by stating the nature of

    the table it is stored in, the name of the column under which it is stored and the value of

    the primary key that defines the row in which it is stored.

    2.4.4 REPRESENTATION OF NULL VALUES:

    The database management system has a consistent method for representing null

    values.For example, null values for numeric data must be distinct from zero or any other

    numeric and for the character data it must be different from a string of blanks or any

    other character value.

    2.4.5 CATALOGUE FACILITIES:

    The logical description of the relation database is represented in the same manner

    as ordinary data. This is done so that the facilities of the relation database management

    system itself can be used to maintain database description.

    2.4.6 DATA LANGUAGE:

    The relational database management system may support many types of languages for

    describing data and accessing the database. However, there must be at least one language

    that uses ordinary character strings to support the definition of data, the definition of

    views, the manipulation of data, constraints on data integrity, information concerning

    authorization and the boundaries for recovery of units.

    2.4.7 VIEW UPDATABILITY:

    Any view that can be defined using combination of basic tables, that are theoretically

    updateable, these capital of being updated by the relational database management

    system.

    2.4.8 INSERT, UPDATE AND DELETE:

    Any operand that describes the results of a single retrieval operation is capable of being

    applied to an insert update or delete operation as well.

    13

  • 8/2/2019 integrateddbserverDocumentation

    14/43

    2.4.9 PHYSICAL DATA INDEPENDENCE:

    Changes made to physical storage representation or access methods do not require

    changes to be made to application programmers.

    2.4.10 LOGICAL DATA INDEPENDENCE:

    Changes made to tables, that do not modify any data stored in that table, do not

    require changes to be made to application programmers

    .

    2.4.11INTEGRITY CONSTRAINTS:

    Constraints that apply to entity integrity and referential integrity are specifiable by the

    data language implemented by the database management system and not by the

    statements coded into the application program.

    2.4.12DATABASE DISTRIBUTION:

    The data language implemented by the relation database management system supports

    the ability to distribute the database without requiring changes to be made to application

    programmers. This facilitymust be provided in thedata language, whether or not the

    database management system itself supports distributed databases.

    2.5Data Definition Language:

    It allows u to define the structure of data. It facilitates to define and create tables in case

    of relationaldatabase management system which will be stored in a special table called

    Data Dictionary table.

    2.6 Data Manipulation Language:

    It allows us to modify and retrieve the data .That is :

    Retrieving the information

    Inserting the information

    Deleting the information

    Modification of data

    14

  • 8/2/2019 integrateddbserverDocumentation

    15/43

    2.7 DATA CONTROL LANGUAGE:

    It allows to control user access privileges of data. With this user access is restricted and

    Controlled.

    2.8 DATABASE METADATA:

    It is also called Data dictionary ,which contains metadata ,data about data. It contains

    information about the access permissions on a table ,creator(this happens by creating an

    entry whenever a DDL statement is executed).

    2.9 DATABASE MANAGER:It provides the interface between the low-level data stored in the database ,application

    programs and queries submitted in the system.

    2.10 DATABASE ADMINISTRATOR:

    It maintains data dictionary table ,granting of authorization for data access to users and

    integrity constraint specifications which is maintained in a special structure that is

    consulted by the database manager whenever an update takes place in the system.

    2.11 APPLICATION PROGRAMS:

    Programmers interact with the system through DML calls , which are embedded in a

    program written in a host language ,commonly referred to as application programs.

    2.12 USERS:

    Users interact with the system either submitting their requests in a database query

    language or through a program. Query processor by taking the DML statement ,parse

    he instructions that the DB manager understands.

    15

  • 8/2/2019 integrateddbserverDocumentation

    16/43

    2.13 INTRODUCTION TO SQL:

    SQL (Structured Query Language is a standard language for interacting with any

    database ,which comprises of DDL,DML and DCL functionalitys within it. SQL is a

    non-procedural language widely used as an interacting language in most of the RDBMS.

    It supports all the types of languages like DDL ,DML ,DCL and query language

    commands to create tables ,manipulate the data and retrieve the data efficiently.

    Various SQL commands deals with Creating tables ,specifying constraints, adding

    data to tables,retrieving data from tables modifying data in tables, deleting data from

    tables.

    2.14 INTRODUCTION TO JDBC AND ODBC:

    Data is manipulated with the help of SQL only. For Business processes ,we need very

    friendly user interfaces and support for diverse databases ,and support for integrating

    existing applications program written in a particular language and programs that are

    written in some other tool/language to share a common database. How a database

    connects can be connected to other programs that is by JDBC,ODBC.ODBC was

    developed by Microsoft as a standard databases .If a database is ODBC complaint ,it

    means that any application program that has ODBC support can retrieve data from the

    databases. JDBC is a front-end toll for connecting to a server and is similar to ODBC in

    that respect JDBC can connect only java clients and it uses ODBC for the connectivity.

    JDBC is essentially a low level application Programming interface. Why we need

    JDBC ,once we have ODBC on hand .ODBC gives a C language API .which uses

    pointers extensively .Since java does not have pointers ,Sun Microsystems ,inventor ofjava developed JDBC to suit its needs

    16

  • 8/2/2019 integrateddbserverDocumentation

    17/43

    .

    2.14.1 JDBCTM?

    JDBCTM is a JavaTM 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 or

    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. In other words, with the JDBC API, it isnt necessary to write one program to

    access a Sybase database,another program to access an Oracle database,another program

    to access an Informix database, and so on.

    One can write a single program using the JDBC API, and the program

    will be able to send SQL statements to the appropriate database.With an application

    written in the Java programming language, one also doesnt have to worry about writing

    different applications to run on different platforms. The combination of Java and JDBC

    lets a programmer write it once and run it a nywhere. Java being robust, secure, easy to

    use, easy to understand, and automatically downloadable on a network, is an excellent

    language basis for database applications. What is needed is a way for Java applications

    to talk to a variety of different databases. JDBC is the mechanism for doing this. JDBC

    extends what can be done in Java. For example, with Java and the JDBC API, it is

    possible to publish a web page containing an applet that uses information obtained from

    a remote database. Or an enterprise can use JDBC to connect all its employees (even if

    they are using a conglomeration of Windows, Macintosh, and UNIX machines) to one

    or more internal databases via an intranet. With more and more programmers using the

    17

  • 8/2/2019 integrateddbserverDocumentation

    18/43

    Java programming language, the need for easy database access from Java is continuing

    to grow. MIS managers like the combination of Java and JDBC because it makes

    disseminating information easy and economical. Businesses can continue to use their

    installed databases and access information easily even if it is stored on different

    database management systems. Development time for new applications is short.

    Installation and version control are greatly simplified. A programmer can write an

    application or an update once, put it on the server, and everybody has access to the latest

    version. And for businesses selling information services, Java and JDBC offer a better

    way of getting out information updates to external customers.

    2.14.2JDBC DRIVER TYPES:

    There are four types of JDBC drivers each having its own functionality. Each having

    their own suitability aspects.They are classified based on how they acces data from the

    database.

    Native JDBC Driver: A JDBC Driver which is partly written in java and most of it is

    implemented using methods to access the database.It can run on only on specific

    platforms.

    All-JAVA JDBC NET DRIVERS: It uses a common network protocal to connect to an

    intermediate server , which in turn employs native calls to connect to the database. It is

    suitable for applets.

    JDBC-ODBC BRIDGE DRIVER:A bridge driver provided with JDBC can convert the

    JDBC calls into ODBC calls using the native methods .It is recommended one since

    using ODBC drivers which are industry standard as of now ,would make an application

    truly portable across databases

    18

  • 8/2/2019 integrateddbserverDocumentation

    19/43

    .

    NATIVE PROTOCAL ALL_JAVA DRIVER: It is completely written in java ,and can

    access the database by use of native protocols .It is suitable in case of intranets ,it is

    provided by the vendor of the database.

    COMPONENTS OF JDBC:

    2.14.3.1.JDBC DRIVER MANAGER: Function of the driver manager is to find out

    available drivers in the system and connect the application database, whenever a

    connection is requested, Each driver should be registered by the driver manager.

    JDBC ARCHITECTURE

    2.14.3.2 JDBC DRIVER: Function is to accept the SQL calls from the application and

    convert them into native calls to the database. It takes the help of some other drivers

    depend upon the JDBC driver we are using.

    2.14.3.3JDBC - ODBC BRIDGE: Sun soft provides a special driver called JDBC

    ODBC bridge ,it can be connected to any existing database.

    14.3.4 APPLICATION: It is a java program that needs the information to be modified

    19

    Java Applications

    JDBC API

    JDBC DRIVER MANAGER

    JDBC

    DRIVER

    JDBC

    DRIVER

    DBMS DBMS

  • 8/2/2019 integrateddbserverDocumentation

    20/43

    in some database or wants to retrieve the information.

    2.15 CONNECTIVITY TO THE DATABASE:

    The following section explains how to connect to a database using the database driver

    and Driver manager.

    2.15.1CONNECTION:

    A connection object represents a connection with a database. A connection session

    includes the SQL statements that are executed and the results that are returned over the

    connection.

    A single application can have one or more connections with a single

    database, or it can have connections with many different databases.

    2.15.2 OPENING A CONNECTION:

    The standard way to establish a connection with a database is to call the method

    DriverManager.getConnection . This method takes a string containing a URL. The

    Driver Manager class, referred to a the JDBC management layer, attempts to locate a

    driver than can connect to the database represented Driver classes, and when the method

    get Connection is called, it checks with each driver in the list until it finds one that can

    connect uses this URL to actually establish the connection.

    -usually the driver or the database connectivity mechanism, which may

    be supported by one or more drivers. A prominent example of a sub protocol name is

    oracle, which has been reserved for URLs that specify thin-style data source names.

    - a way to identify the database. The sub names can vary, depending on the

    sub protocol, and it can have a sub name with any internal syntax the driver writer

    chooses. The point of a sub name is to give enough information to locate the database.

    20

  • 8/2/2019 integrateddbserverDocumentation

    21/43

    2.15.3 SENDING STATEMENT:

    Once a connection is established, it is used to pass SQL statements to its underlying

    database. JDBC does not put any restrictions on the kinds of SQL statements that can

    be sent; this provides a great deal of flexibility, allowing the use of database-specificstatements or even non-SQL statements. It requires, that the user be responsible for

    making sure that the underlying database can process the SQL statements being sent

    and suffer the consequences if it cannot.

    2.15.4 DRIVER MANAGER:

    TheDriver Managerclass is the management layer of JDBC, working between the user

    and the drivers. It keeps track of the drivers that are available and handles establishing a

    connection between a database and the appropriate driver. It addition, the driver manager

    class attends to things like driver login time limits and the printing of log and tracing

    messages. The only method in this class that a general programmer needs to use directly

    is DriverManager.getConnection.

    As its name implies, this method establishes a connection to a database.The next

    steps are :

    Keeping track of JDBC Drivers:Class.forName();

    Creating a statement :Statement stmt=con.createStatement();

    Executing the statement and getting back the results:

    Resultset rs=executeQuery();

    Interpreting the results.

    DATA CLASSIFICATION:

    Databases are normally implemented by using a package called a Data Base Management

    System (DBMS). Each particular DBMS has somewhat unique characteristics, and so

    such, general techniques for the design of database are limited. One of the most useful

    methods of analyzing the data required by the system for the data dictionary has

    developed from research into relational database, particularly the work of E.F. Codd

    21

  • 8/2/2019 integrateddbserverDocumentation

    22/43

    . this method of analyzing data is called Normalization. Unnormalized data are

    converted into normalized data by three stages. Each stage has a procedure to follow.

    2.17 NORMALIZATION

    The first stage is normalization is to reduce the data to its first normal form, by removing

    repeating items showing them as separate records but including in them the key fields of

    the original record.

    The next stage of reduction to the second normal form is to check that the record,

    which one is first normal form, all the items in each record are entirely dependent on the

    key of the record. If a data item is not dependent on the key of the record, but on the

    other data item, then it is removed with its key to form another record. This is done until

    each record contains data items, which are entirely dependent on the key of their record.

    The final stage of the analysis, the reduction of third normal form involves

    examining each record, which one is in second normal form to see whether any items are

    mutually dependent. If there are any item there are removed to a separate record leaving

    one of the items behind in the original record and using that as the key in the newly

    created record.

    2.18 DATABASE EXAMPLES:

    2.18.1ORACLE:

    Any programming environment used to create containers, to manage human data, in the

    conceptualization as a Data Management System. Traditionally, the block of human data

    being managed is called a Database. Hence, in very simple terms, these programming

    environments can the conceptualized as Database Management Systems, in short DBMS

    All Databases Management Systems (that is, Oracle is DBMS) allow users to create

    22

  • 8/2/2019 integrateddbserverDocumentation

    23/43

    containers for data stories and management. These containers are called cells.

    The minimum information that has to be given to Oracle for a suitable container to

    be constructed, which can hold free from human data, is,

    1. The cell name

    2. The cell length

    Another name that programming environments use for a Cell is Field. The version

    here included is oracle8i.

    2.18.2 MY-SQL :

    My -sql is one type of database that is available freely , even it can be

    downloaded from net .unlike oracle ,it cannot see for user , passward.

    2.19 PROGRAMMING CONCEPTS:

    2.19.1 JAVA:

    2.19.2Creation of Java:

    James Gosling conceived Java. Patrick Naughton, Chris Warth, Ed Frank and Mike

    Sheridan at Sun Micro Systems Incorporation in 1991. It took 18 months to develop the

    first working version. This language was initially called OAK in 1992 and public

    announcement of Java in 1995, many more contributed to the design and evolution of the

    language.

    2.19.3Advantages of Java:

    2.19.3.1 Java is Portable:

    One of the biggest advantages Java offers is that it is portable. An application written in

    Java will run on all the major platforms. Any computer with a Java based browser can

    run the applications or applets written in the Java programming language. These means

    that with the JDBC API extending Java, a programmer writing Java code can access all

    the major relational databases on any platform that supports the Java virtual machine.

    23

  • 8/2/2019 integrateddbserverDocumentation

    24/43

    2.19.3.2 Java is Object Oriented:

    Java is Object Oriented, which makes program design focus on what you are dealing

    with rather than on how you are going to do something. This makes it more useful for

    programming in sophisticated projects because one can break the things down into

    understandable components. A big benefit is that these components can then be reused.

    2.19.3.3 Java Makes It Easy:

    In addition to being portable and object oriented, Java facilitates writing correct code.

    Programmers spend less time writing Java code and a lot less time debugging it. In fact,

    developers have reported slashing development time by as much as two thirds.

    2.19.3.4 Java is Extensible:

    A big plus for Java is the fact it can be extended. It was purposely written to be lean with

    the emphasis on doing what it does very well, instead of tying to do everything from the

    beginning, it was return so that extending it is very easy. The java platform includes an

    extensive class library so that programmers can use already existing classes, as it is,

    create subclasses to modify existing classes, or implement to augment the capabilities of

    classes.

    2.19.3.5 Java is Secure:

    It is important that a programmer not be able to write subversive code for applications or

    applets. This is especially true with the Internet being used more and more extensively

    for services such as electronic commerce and electronic distribution of software and

    multimedia content.

    2.19.3.6 JAVA Performs Well:

    Java performance is better than one might expect. Javas many advantages, such as

    having built in security and being interpreted as well as complied, do have a cost

    attached to them. optimizations have been built, in, and the byte code interpreter can run

    very fast, interpreted byte codes are usually more than adequate to run interactive

    graphical end user applications.

    24

  • 8/2/2019 integrateddbserverDocumentation

    25/43

    2.19.3.7 Java is Robust:

    The multi plat formed environment of the WEB places extraordinary demands on a

    Program , because it must execute reliably in a variety of systems. Thus the ability to

    create robust programs was given a high priority in the design of Java.Java and Internet:

    The Internet helped catapult Java to the forefront of programming and Java in turn has

    had a profound effect on the Internet. The reason is simple: Java expands the universe of

    objects that can move about freely in cyberspace. In a network, there are two broad

    categories of objects transmitted between the Server and your Personal Computer:

    passive information and dynamic, active programs like an object that can be transmitted

    to your computer, which is a dynamic, self-executing program. Such a program would

    be an active agent ton the client computer, yet the server would initiate it. As desirable as

    dynamic, networked programs are, they also present serious problems in the areas of

    security and portability. Prior to Java cyberspace was effectively closed to half the

    entities that now live there. Java addresses these concerns and doing so, has opened the

    door to an exiting a new form of program.

    2.19.4SERVER SIDE APPLICATION:

    The rise of server-side Java applications is one of the latest and most exciting trends in

    Java programming. It was first hyped as a language for developing elaborate client-side

    web content in the form of applets. Now, Java is coming into its own as a language

    ideally suited for server-side development. Businesses in particular have been quick to

    recognize Javas potential on the server-Java is inherently suited for large client/server

    applications. The cross platform nature of Java is extremely useful for organizations that

    have a heterogeneous collection of servers running various flavors of the Unix of

    25

  • 8/2/2019 integrateddbserverDocumentation

    26/43

    Windows operating systems. Javas modern, object-oriented, memory-protected design

    allows developers to cut development cycles and increase reliability. In addition, Javas

    built-in support for networking and enterprise API provides access to legacy data, easing

    the transition from older client/server systems.

    SERVLETS:

    Java Servlets are a key component of server-side java development. A Servlet is a small,

    plug gable extension to a server that enhances the servers functionality. Servlets allow

    developers to extend and customize and Java enabled server a web server, a mail server,

    an application server, or any custom server with a unknown degree of portability

    , flexibility and easy.with its requests and responses it is more helpful for the generation

    of webpages.

    In this project we have implemented three-tier model, commands are sent to a middle

    tier of services, which then send SQL statements to the database. The database process

    the SQL statements and sends the results back to the middle tier, which then sends them

    to the user. JDBC is important to allow database access from a Java middle tier.

    2.21. Java and Java Script:

    Although the names are almost the same Java is not the same as Java Script. These are

    two different techniques for Internet programming. Java is a programming language;

    JavaScript is a scripting language (as the name implies). The difference is that we can

    create real programs with Java. But often to make a nice effect without having to bother

    about real programming. So JavaScript is meant to be easy to understand and easy to

    use. JavaScript authors should not have to care too much about programming.

    26

  • 8/2/2019 integrateddbserverDocumentation

    27/43

    2.20 HTML:

    HTML is hypertext language because it supports font styled text ,pictures , graphics and

    animations ,it provides the links used to browse the internet .It is the basis for creating

    webpage .

    27

  • 8/2/2019 integrateddbserverDocumentation

    28/43

    CHAPTER-3

    ACTUAL

    PROJECT WORK

    28

  • 8/2/2019 integrateddbserverDocumentation

    29/43

    3.1 SOFTWARE ENGENEERING PARADIGM:

    The linear sequential model for software engineering some times called the classic

    model or the water fall model, the linear sequential suggests a systematic, sequential

    approach to software development that begins at eth system level and process through

    analysis, design, coding, testing, and maintenance.

    System engineering and analysis encompasses requirements gathering at the system

    level with a small amount of top-level analysis and design. Information engineering

    encompasses requirements gathering at the strategic business level and at the strategic

    business level and at the business area level.

    3.1.1 SYSTEM REQUIREMENTS :

    It results in the specification of softwares operational characteristics ,indicates

    softwares interface with other system elements and establishes constraints that software

    must meet the requirements gathering process is intensified and focused specifically on

    software. To understand the nature of the programs to be built, the software Engineer

    must under stand the information domain for the software, as well as required function,

    behavior, performance, and inter facing. Requirements for the both the system and the

    software are documented and reviewed with the customer.

    3.1.1.1 SOFTWARE AND HARDWARE SPECIFICATIONS

    The following hardware using for developing the project

    (i) Hardware requirement for developing

    1. Pentium III Processor with @ 800 Mhz Speed

    2. 128 RAM

    29

  • 8/2/2019 integrateddbserverDocumentation

    30/43

    3. 20 GB HDD

    4. 14 Color Monitor

    5. 1.44 MB FDD

    6. CD ROM drive

    7. 105 keys keyboard

    8. 4 Serial + 4 Parallel ports

    9. Mouse

    10. Printer

    11. Ethernet card

    12. Internet Modem

    (ii) Software requirement for developing

    1. Windows 2000 Operating system

    2. Jdk 1.4

    3. Tomcat Web Server 5.0.25

    3.1.2 DESIGN :

    Software design is actually a multi step process that focuses on four distinct attributes of

    a program: data structure, software architecture, interface representations, and procedural

    detail.

    3.1.2.1ARCHITECTURAL DESIGN:

    JAVA DATABASE INTERFACE .This is to make common database interface

    30

  • 8/2/2019 integrateddbserverDocumentation

    31/43

    F

    31

    HTML/Servlet (client)

    Database dictionary representation(metadata)

    JDBC engine to collect data from database

    oracle mysql other

    or

    acle

    m

    ysql

    ot

    her

    Vendor specificJDBC driver

  • 8/2/2019 integrateddbserverDocumentation

    32/43

    The design process translates requirements into a representation of the software that can

    be assessed for quality before code generation begins. Like requirements the design is

    documented and becomes part of the software configuration. Design of software involves

    conceiving planning out and specifying the externally observable characteristics of the

    software product. We have data design, architectural design and user interface design in

    the design process. These are explained in the following section. The goals of design

    process it to provide a blue print for implementation, testing, and maintenance activities

    3.1.2.2 DATA DESIGN

    The primary activity during data design is to select logical representations of data objects

    Identified during requirement analysis and software analysis.

    A data dictionary explicitly on the elements of the data structure. A data dictionary

    should be established and used to define both data and program design .This project has

    no specific data design ,irrespective of the structure of the data in the database it deals

    with only connectivity to the back-end software.

    For any database we use vendor specific JDBC Drivers. As these drivers are built on

    JDBC Specifications we use JDBC as reference to access allDATA. We getconnection

    based on the driver selected and rest is independent of database.

    3.1.2.3 SYSTEM DESIGN:

    Class diagramUser interacts with the system by having an interface with the content

    what we have developed.GUI is developed with scripting lanaguage and the design is

    interpreted with the help of class-diagram and other relationships .A class is a set of

    objects that share a commonstructures and common behavior.Collectionof functions

    32

  • 8/2/2019 integrateddbserverDocumentation

    33/43

    and attributes of an object.Object is the combination of data and logic. GUI component

    is the main class here, menu ,input screen Report are the classes that generalizes the gui

    class. Datamanipulator is the object that is instantiated from the main class which uses

    the datastore class for storing the database. Description and listing of the db are the

    classes that inherited from the datastore. List of operations alter ,rename ,edit ,empty are

    the classes that inherited from the data manipulator class .This interpretates the class

    diagram.

    3.1.2.4 INTERFACE DESIGN:

    The goal of design is to provide a blueprint for implementation, system responsibilities

    are known by understanding how the user can use the system.This goal can be

    accomplished by giving modules.

    Use-case-diagram

    The whole system represented as per the module wise .First of all the userselects the

    particular driver and then according to the list of tables available in the system ,the user

    selects the particular operation which are here described as modules .Each module

    responsible for some operation structure ,retrieve ,query pane ,insert , some operations

    which alters , rename, emptythe tables .user selects the particular operation which

    are sequence of events represented as use cases with the user as actor.

    33

  • 8/2/2019 integrateddbserverDocumentation

    34/43

    User

    Stucture

    Properties

    SQL

    ExportImport

    SearchOperations

    Select Driver

    Sequential-diagram

    The sequence of flow of events is interpreted through this diagram .Theuser enters with

    this name and passward ,which are valid and able to access those tables which are

    created under the user name .Then he is allowed to do the available operations .The

    sequence of entire system is shown below and the flow of events for each module is also

    interpretated .

    For the entire system:

    34

  • 8/2/2019 integrateddbserverDocumentation

    35/43

    : UserLoginValidate Structure Properties SQL Export Import Operations Search

    (driver,url,username,pwd)(validate())

    For the structure:

    : User

    Login Validate Structure Table StructureSelect Table

    Name

    (driver,url,userid,pwd)

    (click on structure)

    (select table name)

    (validate())

    (display table structure)

    35

  • 8/2/2019 integrateddbserverDocumentation

    36/43

    For the retrieve(browse):

    : UserLogin Validate Browse Display TableSettings

    (driver,url,userid,pwd)(validate())

    (select browse) (select column to be displayed)

    For the querypane:

    : User

    Login Validate SQL Enter query

    (driver,url,userid,pwd)

    (validate())

    (select SQL) (click on run)

    For the import and export:

    36

  • 8/2/2019 integrateddbserverDocumentation

    37/43

    : UserLogin Validate Export Export Table

    (driver,url,userid,pwd)

    (validate())

    (select export) (Export table name, format)

    : UserLogin Validate import browse

    (driver,url,userid,pwd)

    (validate())

    (select import) (import from sql file)

    37

  • 8/2/2019 integrateddbserverDocumentation

    38/43

    For the operations:

    alterTabl: Login Operati(driver,url,useri

    (validat(select (enter table name, field

    STATE DIAGRAM:

    The state diagram represents different number of states. Whether the user is valid or not

    ,it is checked as in one state and after the validation he will enter into the menu for the

    operations.

    3.1.3 IMPLEMENTATIONImplementation is the process of having systems personnel check out and put new

    equipment into use, train users, install the new app Depending on the size of the

    38

    unauthenticated Validation DB Menu

    ( Driver,username,pwd)

    ( invalid )

    ( valid )

  • 8/2/2019 integrateddbserverDocumentation

    39/43

    organization that will be involved in using the application and the risk associated with its

    use, systems developers may choose to test the operation in only one area of the firm,

    say in one department or with only one or two persons. Sometimes they will run the old

    and new systems together to compare the results. In still other situation, developers will

    stop using the old system one-day and begin using the new one the next. As we will see,

    each implementation strategy has its merits, depending on the business situation in which

    it is considered. Regardless of the implementation strategy used, developers strive to

    ensure that the systems initial use in trouble-free.

    Once installed, applications are often used for many years. However, both the

    organization and the users will change, and the environment will be different over weeks

    and months. Therefore, the application will undoubtedly have to be maintained;

    modifications and changes will be made to the software, files, or procedures to meet

    emerging user requirements. Since organization systems and the business environment

    undergo continual change, the information systems should keep pace. In this sense,

    implementation is ongoing process.

    This project implementation is done with the help of the server i..e application server

    TOMCAT .Start the server .Install oracle and mysql .Open the Internet Explorer and

    through a request by typing the address the corresponding page is opened for response.

    3.1.4 TESTING:

    3.1.4.1 SOFTWARE TESTING TECHNIQUES:

    Software testing is a critical element of software quality assurance and represents the

    ultimate review of specification, designing and coding.

    3.1.4.1.1 TESTING OBJECTIVES:

    1. Testing is process of executing a program with the intent of finding anerror

    .

    2. A good test case design is one that has a probability of finding an as yet

    undiscovered error.

    3.A successful test is one that uncovers an as yet undiscovered error.

    .

    Testing cannot show the absence of defects, it can only show that software errors are

    39

  • 8/2/2019 integrateddbserverDocumentation

    40/43

  • 8/2/2019 integrateddbserverDocumentation

    41/43

  • 8/2/2019 integrateddbserverDocumentation

    42/43

    4.1 Conclusion

    This application has got very user friendly look and feel, so that it will

    provide easy access to connect to the databases without the need of code implementation

    externally.The tool performance including the security related aspects, result in the release

    of this application as a product in the market.

    4.2Future Enhancement

    This application can be extended so that it will give maximum

    performance including the security related aspects, releasing of this application as a

    product in the open market. As it has got very user friendly look and feel, it will be

    definitely succeeded in the market as a product.

    42

  • 8/2/2019 integrateddbserverDocumentation

    43/43

    BIBLIOGRAPHYThe Knowledge required for developing this project is extracted from the following

    books.

    1. Patric Naughton , The Java2 Complete Referece

    2. S. Horstmann & Gary Cornell ,Core Java2 Volume I FundamentalsSunSoft

    Press

    3. S. Horstmann & Gary Cornell ,Core Java2 Volume II Advanced Features ;

    SunSoft Press

    4. Karl moss, Java Database Programming with servlets

    5 Roger S. Pressmans ,Software Engineering ,Mc Graw Hill

    6. Raghu Ramakrishnan,Johannes Gehrke,Database Management Systems, Mc

    Graw Hill (II Edition)