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

A

PROJECT REPORT
ON

DREAM CODER
Submitted in partial fulfillment of the requirements
For the award of the degree of

MASTER OF BUSINESS ADMINISTRATION


IN
INFORMATION TECHNOLOGY

PROJECT GUIDE SUBMITTED BY:

MR. HEMANT JOSHI VIPIN KUMAR

Roll no (1670370140)

MBA

SHRI SIDDHI VINAYAK GROUP OF INSTITUTION


BAREILLY 243001
UTTAR PRADESH, INDIA.
(AFFILIATED TO A.K.T.U LUCKNOW)
VIPIN KUMAR 0 1670370140
(2017-2018)

DECLARATION
We hereby declare that this submission is our own work and that, to the best
of knowledge and belief, it contains no material previously published or
written by another person nor material which to a substantial extent has
been accepted for the award of master degree of the university or other
institute of higher learning, except where due acknowledgement has been
made in the text.

Signature:

Name : VIPIN KUMAR

Roll No. : 1670370140

Date :

VIPIN KUMAR 1 1670370140


CERTIFICATE
This is to certified that the project report entitled “ Dream Coder” submitted
by VIPIN KUMAR 1st to Shri Vinayak group of institution, Bareilly affiliated to
A.K.T.U Lucknow, Uttar Pradesh in partial fulfillment for the award of Master
degree of business administration ( IT) is bonafide record of the project work
carried ot by him from pie infocome pvt ltd during the year of 2017-2018

Project In charge
Project Guide

Head of Department ,

Information and Technology

VIPIN KUMAR 2 1670370140


ACKNOWLEDGEMENT
The completion of any task is the reward to not only persons actively
involved in accomplishing it, but also to thepeople invoved in inspiring,
guiding and helping those people. We take the opportunity here to thank all
those who are helping us in this project would not have been possibly
without the unrelenting care and support of many people. A Project is never
the sole product of a person whose name has appeared on the cover. Even
the best effort may not prove successful without guidance.

We owe our deepest gratitude to the Head of the Department of M.B.A (IT),
Project In charge Ms Priti Kumari and our Hemant Joshi sir for giving us an
ample opportunity to carry out this Project.

Thanking you,

VIPIN KUMAR

(1670370140)

MBA 3rd sem

VIPIN KUMAR 3 1670370140


PREFACE

We are on the thresh hold of a new information era and future

generations may view our era as the time when people developed tools to

amplify human intelligence.

Use of computer has grown immensely over the past few decades.

Computers are being used in every sphere of modern life to make better use of

time and space as they form the base of almost every third organization

and/or department. With the requirements and ease of use increasing every

day, the computer industry has seen some radical improvements in software

development tools.

For a software developer, the starting step is to properly understand the

overall problem. Every individual has different needs and it is very difficult to

develop common software to solve general problems. So we need to develop

various softwares to meet their individual needs so as to provide exactly what

they want. In this era of evolution, there are good software which are easy to

use and work with, and they do not need much learning.

VIPIN KUMAR 4 1670370140


This software is a step forward to attain this goal. It aims of providing

the accurate and complete information about what the “ DREAM CODER” is all

about?

It gives me immense pleasure in submitting the project report on

“DREAM CODER- A USER FRIENDLY SOFTWARE FOR ORACLE ” for the

partial fulfillment of the requirements for the degree of Master of Business

Administration In Information Technology (IT).

I am highly grateful to my guide in this project Mr. Sushant Pathak,

working in CRIS New Delhi, for his encouragement, guidance and valuable

suggestions, which I incorporated in my project.

I am also grateful to Mr.Vijay Jaishwal for helping me in the project

finalization process and for showing confidence in me.

I dedicate the whole project work to Mr. Arun Singh, who has always

been there to help, guide and support me throughout the project

development process.

And last but not the least I thank my parents and all my friends who

not only encouraged me but also helped me in the process of making this

project.

Thanking All

VIPINKUMAR
VIPIN KUMAR 5 1670370140
1670370140

VIPIN KUMAR 6 1670370140


SYNOPSIS

VIPIN KUMAR 7 1670370140


THE success and the longevity of any prominent business nowadays

depend on powerful application infrastructures and effective, reliable

management and development solutions.

In present, a wide range of IT companies are striving to provide business

owners with better application management and new, state-of-the-art

development solutions and tools, vital for increasing productivity and

facilitating process development for any business. In order to improve the

overall performance of commonly used application servers, and to enhance the

efficiency of specific application programs, more and more IT companies are

currently aiming to develop new, competitive software programs that support

popular, commonly used databases. Such software products offer an extended

set of features that help businesses implement better management and

development solutions and also considerably reduce the time, effort and costs of

process development.

Most software products implement support for My SQL databases,

providing users with a complete set of improved administration and

development solutions. Enhancing and correcting the features provided by the


VIPIN KUMAR 8 1670370140
popular My SQL Manager application, My SQL Turbo Manager is by far the best

software solution for My SQL database management, administration and

development in present. However, the standard My SQL Manager application

can't effectively meet today's requirements, users needing more powerful and

complex applications for creating, managing and interacting with various

databases.

“DREAM CODER” for Oracle is a powerful Integrated Development

Environment (IDE) for Oracle Databases. Using the intuitive “DREAM CODER”

GUI will increase your code quality and reduce the development process time.

“DREAM CODER” for Oracle easily enables you to build and execute

queries, build and execute scripts, compile and debug SQL code, create and

modify database objects, import and export data, enable and database

monitoring among other features.

The computer has change the way we work learn and communicate virtually

every kind of organization throughout the world conducts business with

computers. For many organizations computer based information system are

now at the heart of daily activities and a major consideration in corporate

decision-making.
VIPIN KUMAR 9 1670370140
Most software products implement support for My SQL databases,

providing users with a complete set of improved administration and

development solutions. Enhancing and correcting the features provided by the

popular My SQL Manager application, My SQL Turbo Manager is by far the best

software solution for My SQL database management, administration and

development in present. However, the standard My SQL Manager application

can't effectively meet today's requirements, users needing more powerful and

complex applications for creating, managing and interacting with various

databases.

The project report for this system provides a comprehensive view of the overall

system and various steps involved in the process of its development.

The project report is divided into number of sections. The very first

section describes the existing system, their problems and the

proposed system.

The second section gives detail information of all database design process.

The structure of the database that is designed in ORACLE is discussed in detail

with the help of data dictionary and other diagrams. Various requirements and

constraints have also been discussed. The biggest portion of this report is

VIPIN KUMAR 10 1670370140


dedicated to the interface design. The interface design of the system is Graphical

User Interface (GUI). The interface is designed in to Microsoft visual basic.net

2005. The structure of the interface is designed to provide several facilities along

with the process for data storage, easy maintenance and retrieval of

information, reports generation and a mean for analysis of the system outputs

for better performance. The entire system is divided into several modules driven

through a menu driven application. The other important section is to provide

reports needed by the user.

“DREAM CODER” is a small software package that helps in

managing the data. It provides a simple way to effectively store,

retrieve and update the data without writing a single code. A user

can easily create his own databank and store his/her data in

Tabular form. As it works in windows environment it is user-

Friendly Software. One can visually store, modify, search as well

as locate one’s own data. The key goal behind developing this

software is to provide an easy and fast method of creating

database and performing various operations on it. As all users are

not computer professionals it prevents from illegal access of data

VIPIN KUMAR 11 1670370140


by unauthorized user, by assigning a password to each databank.

So that security could be maintained.

OBJECTIVES

The objective of the project is to resolve the problems occurring in the

existing system and providing a visual solution.

WHY “DREAM CODER”:---

 Easy to use customizable interface makes your work comfortable

and productive.

 Multivendor environment support. You can work with different data

sources simultaneous.

 Plug-ins support and set of free plug-ins will add flexibility to your

work with this tool.

 Powerful built-in schema tools (browser, export, snapshots, and

search).

VIPIN KUMAR 12 1670370140


 Atomicity:- each transaction is a separate and distinct entity. It

happens in whole or not at all.


 Consistency:- each database change is partitioned from other

transactions. Results from another transaction won’t mysteriously

pop up in the middle of another transaction. One transaction moves

the database from one consistent state to the next.


 Isolation:- A transaction is not available to other users until it has

been committed. The results of a transaction are invisible to other

transactions until the transaction is complete thus increasing the

security on data.

 Durability:- Once committed (completed), the results of a

transaction are permanent and survive future system and media

failures and thus ensuring maintenance and protection of data.

Advanced “DREAM CODER” makes your work with script easy and

comfortable.

VIPIN KUMAR 13 1670370140


BACKGROUND

“DREAM CODER” for any database is a powerful Integrated

Development Environment (IDE) for any Databases . Using the intuitive

DREAM CODER’s GUI will increase your code quality and reduce the

development process time.

“DREAM CODER” feature list:

Generates data that perfectly matches to your database schema.

Intuitive, easy to use user interface makes it easy to start populating

database immediately.

Intelligently generates appropriate data based on table and column

names and data types.

Over 60 built in generators with sensible configuration option.


VIPIN KUMAR 14 1670370140
Inter-column dependency support, for example to generate record

with matching email address and domain name.

TOOLS USED IN THE PROJECT

VIPIN KUMAR 15 1670370140


SURVEY OF TOOLS

Software Tools :-

Front-end Tool :

In this project “JAVA” has been chosen as the Front-end tool for the process

of software development.

Selection of “JAVA” as a front-end tool is done on the following

facts:-

The JDBC API is designed to allow developers to create JAVA code that

can access almost any relational database without needing to continually

rewrite their code. Despite standards set by the ANSI committee, each

database system vendor has a unique way of connecting to its system. Any

type of JAVA code, including JAVA Servlets, JSP Pages, Enterprise JAVA

Beans and plain JAVA classes can use JDBC.

VIPIN KUMAR 16 1670370140


Java Database Connectivity (JDBC)

The JDBC API is designed to allow developers to create JAVA code that

can access almost any relational database without needing to continually

rewrite their code. Despite standards set by the ANSI committee, each

database system vendor has a unique way of connecting to its system. Any

type of JAVA code, including JAVA Servlets, JSP Pages, Enterprise JAVA

Beans and plain JAVA classes can use JDBC.

The JDBC API was first introduced with release 1.1 of JDK. JDK 1.5

contains JDBC 3.0 which of the composed of the JAVA.SQL and JAVAX.SQL

packages. JDBC provides application developers with a single API that is

uniform and database independent. The API provides a standard to write to,

as well as standard that takes all of the various application ensigns into

account.

The API database independence is due to set of JAVA interfaces that

are implemented by a driver. The driver takes care of translating the

standard JDBC calls into the specific calls required by the database it

supports. The application is written once and then moved to the various

drivers. The application remains the same; the driver change. Driver may be

used to develops the middle tire of a multi-tier database design.

VIPIN KUMAR 17 1670370140


In addition to providing developers with a uniform and database

independent framework.

JDBC also provides a means of allowing developers to retain the

specific functionally that their database vendor offers.

JDBC drivers must support ANSI SQL-2 entry level, but JDBC allows to

developers passing query strings directly to the connected driver. These

strings may or may not be ANSI SQL or SQL at all. The use of these strings

is up to underlying driver.

JDBC is not a derivative of Microsoft’s open database connectivity

(ODBC) specification. JDBC is written entirely in JAVA; ODBC is a ‘C’

interface. Both JDBC and ODBC however are based on the X/open SQL

command level interface (CLI). This Javasoft provides a JDBC–ODBC

bridges that translate JDBC to ODBC implementation alone with

native methods is very small and efficient.

VIPIN KUMAR 18 1670370140


JAVA SWING JFC

Swing is a set of packages built on the top of the AWT that provides you

with a great number of prebuilt classes (over 250 classes and 40 UI

components).

The Swing API has many classes for creating various types of user

interface elements. The swing family tree is spilt in such a way that the

component class is divided into two – the group of the classes derived from

Jcomponents class and another that descends from the Window classes.

Object
Object

Components
Component

Container
Container

Window
Window Jcompone
Jcompone
nt
nt

Frame
Frame

JFrame
JFrame JApplet
JApplet JPanel
JPanel JList
JList JRootPa
JRootPa JMenu
JMenu
ne
ne

The Swing Family Trees

VIPIN KUMAR 19 1670370140


Swings Features:-

 Borders

 Graphics debugging

 Easy mouseless operation

 Tooltips

 Easy Scrolling

 Pluggable look and feel

 New layout managers

Reporting Tool : HTML

VIPIN KUMAR 20 1670370140


HTML is a language for describing how pages of text, graphics

and other information are organized, formatted and linked together.

By 1993, almost 100 computers throughout the world were equipped to

serve up HTML pages. Those interlinked pages were dubbed the World Wide

Web (WWW), and several web browser programs had been written to allow

people to view web pages. Because the popularity of the Web, a few

programmers was Mare Andresen; he went on to become rich and famous,

selling one of the world’s most popular Web browser, Netscape Navigator.

Today HTML pages are the standard interface to the internet. They can

include animated graphics, sound and video complete interactive programs,

and good old fashioned text. Millions of Web pages are retrieve each day

from thousand of Web server computers around the world.

The Web is on the verge of becoming a mass-market medium, as high speed

internet connection through TV cables, modernized phone lines and direct

satellite feeds become common place.

BACKEND TOOL
VIPIN KUMAR 21 1670370140
MySQL, the most popular Open Source SQL database management

system, is developed, distributed, and supported by MySQL AB. MySQL AB is

a commercial company, founded by the MySQL developers. It is a second

generation Open Source Company that unites Open Source values and

methodology with a successful business model.

 MySQL is a database management system.

A database is a structured collection of data. It may be anything from

a simple shopping list to a picture gallery or the vast amounts of information

in a

corporate network. To add, access, and process data stored in a

computer database, you need a database management system such as

MySQL Server. Since computers are very good at handling large amounts of

data, database management systems play a central role in computing, as

standalone utilities or as parts of other applications.

 MySQL is a relational database management system.

A relational database stores data in separate tables rather than putting

all the data in one big storeroom. This adds speed and flexibility. The SQL

part of “MySQL” stands for “Structured Query Language.” SQL is the most

VIPIN KUMAR 22 1670370140


common standardized language used to access databases and is defined by

the ANSI/ISO SQL Standard. The SQL standard has been evolving since

1986 and several versions exist. In this manual, “SQL-92” refers to the

standard released in 1992, “SQL: 1999” refers to the standard released in

1999, and “SQL: 2003” refers to the current version of the standard. We use

the phrase “the SQL standard” to mean the current version of the SQL

Standard at any time.

 MySQL software is Open Source.

Open Source means that it is possible for anyone to use and modify

the software. Anybody can download the MySQL software from the Internet

and use it without paying anything. The MySQL software uses the GPL

(GNU General Public License), http://www.fsf.org/licenses/, to

define what you may and may not do with the software in different

situations.

MySQL Server was originally developed to handle large databases

much faster than existing solutions and has been successfully used in highly

demanding production environments for several years. Although under

constant development, MySQL Server today offers a rich and useful set of

functions. Its connectivity, speed, and security make MySQL Server highly

suited for accessing databases on the Internet.

VIPIN KUMAR 23 1670370140


 MySQL Server works in client/server or embedded systems.

The MySQL Database Software is a client/server system that consists

of a multi-threaded SQL server that supports different backend, several

different client programs and libraries, administrative tools, and a wide

range of application programming interfaces (APIs).

We also provide MySQL Server as an embeddeder, faster, easier-to-manage

product.

ORACLE10g – As a Back-end:

Oracle, on the other hand, is the most prevalent Relational Database

Management System (RDBMS).

VIPIN KUMAR 24 1670370140


The Oracle-8i database runs on every major machine and under every

prominent operating system available. Versions of Oracle exist for platforms

from modestly equipped portable computers up to powerful database servers

accommodating thousands of concurrent users. Oracle- 8i databases act as

on-line transaction processing engines; decision-support systems etc. The

prevalence and flexibility of ORACLE 10g have given rise to groups of IT

professionals.

Software houses took up the challenge of designing a system that


would help users in managing database. These systems were called
Database Management Systems (DBMS). One of the DBMS developed
by software houses was Oracle-8i.

Oracle is a company that produces server based, Multi-user

RDBMS. It works in a client / server environment .It has a suite


VIPIN KUMAR 25 1670370140
of products via which commercial application are created. Oracle

provides server that is used essentially for data storage. It has a

suite of tools that are being used to capture. Validate and display

data according to user and systems needs. It also allows

manipulation of data

Oracle-8i provides extensive security features in order to safeguard


information in its tables from an unauthorized viewing and damage.
Depending on a user’s status and responsibility appropriate rights on
oracle’s resources can be assigned to the user.

Objects that are created by a user are owned and controlled by


that user. If a user wishes to access any of the objects belonging to
another user, the owner of the object will have to give permissions for
such access.

The owner of the object can take privileges once given. Oracle-8 i
provides an interactive SQL tool, which allows users to enter ANSI SQL
sentences and pass them to the Oracle Engine for execution. These
sentences allow the user to create access and maintain data structures
like tables, indexes etc.

Oracle-8i provides fast access to SQL even when there are thousands
of data.

Oracle-8i expands significantly the use of triggers to administer a


database and publish information about events taking place within the
database

I preferred to use Oracle-8i backend because of the above


stated advantages of Oracle and also because the Oracle-8 i
server’s primary job is to manage data optimally among
VIPIN KUMAR 26 1670370140
multiple users that concurrently request for the same data.
Access to data, in the data storage system is always via the
Oracle-8i server. This gives a single entry point to access of
data, which in turn has the capacity of offering excellent data
security. I also chose Oracle-8i as backend as I have worked on
it.

VIPIN KUMAR 27 1670370140


Oracle

VIPIN KUMAR 28 1670370140


 Client/server environments (distributed processing):-
To take full advantage of a given computer system or network, Oracle
allows processing to be split between the database server and the
client application programs. The computer running the database
management system handles all of the database server responsibilities
while the workstations running the database application concentrate
on the interpretation and display of data.
 Large databases and space management:- Oracle
supports the largest of databases, which can contain terabytes of data.
To make efficient use of expensive hardware devices, Oracle allows full
control of space usage.
 Many concurrent database users:- Oracle supports large
numbers of concurrent users executing a variety of database
applications operating on the same data. It minimizes data contention

and guarantees data concurrency.


 Connectibility:- Oracle software allows different types of
computers and operating systems to share information across
networks.
 High transaction processing performance:- Oracle
maintains the preceding features with a high degree of overall system
performance. Database users do not suffer from slow processing
performance.
 Controlled availability:- Oracle can selectively control the
availability of data, at the database level and sub-database level. For
example, an administrator can disallow use of a specific application so
that the application's data can be reloaded, without affecting other
applications.
 Manageable security:- To protect against unauthorized database
access and use, Oracle provides fail-safe security features to limit and

VIPIN KUMAR 29 1670370140


monitor data access. These features make it easy to manage even the
most complex design for data access.
 Database enforced integrity:- Oracle enforces data integrity,
"business rules" that dictate the standards for acceptable data. This
reduces the costs of coding and managing checks in many database
applications
 Portability:- Oracle software works under different operating
systems. Applications developed for Oracle can be ported to any
operating system with little or no modification.
 Compatibility:- Oracle software is compatible with industry
standards, including most industry standard operating systems.
Applications developed for Oracle can be used on virtually any system
with little or no modification
 Distributed systems:- For networked, distributed environments,
Oracle combines the data physically located on different computers
into one logical database that can be accessed by all network users.
Distributed systems have the same degree of user transparency and
data consistency as non-distributed systems, yet receive the
advantages of local database management.
 Replicated environments:- Oracle software lets you replicate
groups of tables and their supporting objects to multiple sites. Oracle
supports replication of both data- and schema-level changes to these
sites. Oracle's flexible replication technology supports basic primary
site replication as well as advanced dynamic and shared-ownership.

I preferred to use Oracle backend because of the above stated


advantages of Oracle and also because the Oracle server’s primary job
is to manage data optimally among multiple users that concurrently
request for the same data. Access to data, in the data storage system
is always via the Oracle server. This gives a single entry point to

VIPIN KUMAR 30 1670370140


access of data, which in turn has the capacity of offering excellent data
security. I also chose Oracle as backend as I have worked on it.

An Oracle Instance
Multiple-process Oracle instance.

VIPIN KUMAR 31 1670370140


BACKEND TOOL Ms Access

Microsoft Access stores information in what is called a database. For now it

is good enough to know that your data is put into a database and not worry

about the details. We will be explaining databases and other key Access

elements in a later lesson.

There are four major steps to using Microsoft Access:

1. Database Creation: Create your Microsoft Access database and

specify what kind of data you will be storing. A retail business might

create a database to store all their sales information (i.e. items sold,

customer, employee, commission, etc)

2. Data Input: After your database is created the data the store gathers

every business day can be entered into the Access database.

3. Query: This is a fancy term to basically describe the process of

retrieving information from the database.

4. Report(optional): Information from the database is organized in a

nice presentation that can be printed in an Access Report.

VIPIN KUMAR 32 1670370140


 SYSTEM ANALYSIS

 The main purpose of conducting system analysis is to study the

various processes and to find out its requirements. These may include

ways of capturing or processing data, producing information,

controlling an activity or supporting management. The determination

of requirements entails studying the existing details about it to find out

what these requirements are.

 System analysis has been conducted with the following objectives in

mind.

 Identify the customer needs.

 Evaluate the system concept for feasibility.

 Perform economic and technical analysis.

 Allocate functions to hardware, software, people, data base, and other

System elements.

VIPIN KUMAR 33 1670370140


 System analysis includes requirements analysis. The requirement

analysis task is a process of discovery, refinement, modeling, and

specification. Requirement analysis allows the software engineer to

refine the software allocation and build models of the data, functional

and behavioral domains that will be treated by software. Requirement

specification provides the developer and the customer with the means

to assess quality once software is built. While the analysis phase of

development of this project following set of principles were considered:

 The information domain of a problem must be represented and

understood.

 The function that the software is to be performed must be defined.

 The behavior of the software must be represented.

 The models that depict information function and behavior must be

partitioned in a manner that uncovers detail in a layered fashion.

 The analysis process should move from essential information toward

 Implementation detail.

 All the necessary details required in the analysis process of project

were collected from record registers, customers, worker of the firm

and the manager.

VIPIN KUMAR 34 1670370140


 The requirement analysis played an important role in identifying what

the firm wants from the proposed system. All the analysis was done in

accordance to the user’s requirements so that the proper design can

be done and the firm requirements can be fulfilled.

o The basis for a candidate system is recognition of a need for

improving an information system or a procedure. The problem

definition phase identifies the problem, studies the alternate

solutions, and recommends the resources required for designing

the system.

 The need for the proposed project has arisen because oracle is not a

user friendly software.

 There are so many users who don’t know how to make a query.

 User cannot remember large queries for longer time period.

 For getting any information user needs some help of programmers and
the programmers are not available all time.

VIPIN KUMAR 35 1670370140


 Specially a lay man cannot operate oracle easily.

 If we have to make a database in oracle then we have to learn the

oracle and all DBMS concepts.

 There is no GUI feature in oracle.

 So in many companies and organizations waste there time in teaching

languages and queries.

 More money is wasted in teaching.

 On the basis of the above given problems the following conclusion is

made:

o A Proper software can solve the above given problems since it

can provide the general user important information at correct

time and can also help.

 REQUIREMENT SPECIFICATION

o After collecting the requirements, requirement specification is

created which specifies the need of the customer. It helps the

developer and customer to access quality once software is built.

If customer changes his requirements, the developer can

demand for more time or additional cost or both.


VIPIN KUMAR 36 1670370140
 The requirement specification for the proposed software is as follows:

 Because of the needs specified above, it is necessary to build user

friendly software, which would provide information about the

database. Since it is not advisable to go through a lengthy procedure

of making queries and learning languages for fetching information,

deleteing, updating and inserting data.

o This software will help in above defined problems. User can

easily do all task defined above.

 The basis for a candidate system is recognition of a need for improving


an information system or a procedure. The problem definition phase

identifies the problem, studies the alternate solutions, and

recommends the resources required for designing the system.

 The need for the proposed project has arisen because oracle is not a

user friendly software.

 There are so many users who don’t know how to make a query.

 User cannot remember large queries for longer time period.

 For getting any information user needs some help of programmers and
the programmers are not available all time.

 Specially a lay man cannot operate oracle easily.


VIPIN KUMAR 37 1670370140
 If we have to make a database in oracle then we have to learn the

oracle and all DBMS concepts.

 There is no GUI feature in oracle.

 So in many companies and organizations waste there time in teaching

languages and queries.

 More money is wasted in teaching.

o the basis of the above given problems the following conclusion is

made:

o Proper software can solve the above given problems since it can

provide the general user important information at correct time

and can also help.

PLANNING AND SCHEDULING

ACTION DAYS

Synopsis Preparation 5

Tool Learning 10

Project(Analysis,Coding,Testing) 24

Documentation 6

TOTAL 45 days

VIPIN KUMAR 38 1670370140


DREAM
CODER

CONTEXT LEVEL DFD

VIPIN KUMAR 39 1670370140


Request to open the table

Table opened

Request to design the selected table 1.0


TABLE
Table designed

Request to delete the selected table

Table deleted

Request to alter the table

Table altered

Request to rename the selected table

Table renamed

To insert the record

2.0
Record inserted
USER MANIPULATE

Request to delete the selected table

Table deleted

Request to create the view

View created 3.0


VIEW
Request to drop the view

View dropped

VIPIN KUMAR FIRST


40 LEVEL DFD 1670370140
4.0
DBA/UTILI
DBA TIES

FIRST LEVEL DFD (CONTINUED)

VIPIN KUMAR 41 1670370140


Request to view the table
1.1
Table viewed TABLE VIEW

Request to design the table

1.2
Table designed TABLE
DESIGN

Request to delete the table

1.3
Table deleted TABLE
DELETE

Request to alter the table


DBA 1.4TABLE
ALTER
Table altered

Request to rename the table 1.5


TABLE
RENAME
Table renamed

Request to update the table


1.6
TABLE
Table updated UPDATE

Request for the structure of table

1.7
Structure viewed TABLE
STRUCTURE

VIPIN KUMAR
SECOND42 LEVEL DFD 1670370140
SECOND LEVEL DFD (CONTINUED)

VIPIN KUMAR 43 1670370140


SECOND LEVEL DFD (CONTINUED)

VIPIN KUMAR 44 1670370140


DBA

SECOND LEVEL DFD (CONTINUED)

VIPIN KUMAR 45 1670370140


TYPE
SIZE
ORACLE/MYSQL/ NAME
MS-aCCESS TYPE
FIELD
N
1
TABLE HAS CONSTR-
HAS AINTS

USER CRE NAME


ATE

VIEW
M
CONDITION
HAS S

N NAME
MANIPULATE
RIGHTS
CONDITION
M

ADVANCED FUNTION
ASSIG
N S
1

DBA
PL/SQL PROGRAMMI-
NG
1 LANGUAGE

HAS

VARIOUS
RIGHTS ER-DIAGRAM
VIPIN KUMAR 46 1670370140
PRELIMINIARY PRODUCT DESCRIPTION

The objective of the project is to resolve the problems occurring in the

existing system and providing a visual solution . The key goal behind

developing this software is to provide an easy and fast method of creating

database and performing various operations on it. As all users are not

computer professionals it prevents from illegal access of data by

unauthorized user, by assigning a password to each databank. So that

security could be maintained.

VIPIN KUMAR 47 1670370140


PRELIMINARY INVESTIGATION

Very often when the customer put his demand for any system, the

definition of problem or requirement remains incomplete. To collect the

complete requirements so as to build a system according to the need of the

customer, preliminary investigation is conducted. During investigation

questions are asked to managers, person who will use the system. All the

necessary details required in the analysis of project are collected from the

record registers, customers.

Following questions are asked to the user to find out the major heading that

he wants to give on the software.

Which type of information he wants to display?

What facilities he wants?

In which format he to display information?

What are the expectations from the software?

What is the information he wants to be viewed only by administrator

and restricts to others?

The following fact-finding techniques are also used for preliminary

investigation.

Existing documentation, forms, file and records

Observation of the work environment

VIPIN KUMAR 48 1670370140


FEASIBILITY STUDY

FEASIBILITY STUDY

VIPIN KUMAR 49 1670370140


 During the systems analysis phase, a feasibility study (also known as,

a business case) is prepared and is updated during the remaining

steps in the SDLC.

 The extent of the feasibility study depends on the size and nature of

the system.

 Feasibility team should include:

 Management

 Accountants skilled in controls and auditing

 Systems personnel

 Users

 The feasibility study and its updates are used by the steering

committee as the project proceeds to decide whether to:

 Terminate the project

 Proceed

 Proceed if specific problems are resolved

VIPIN KUMAR 50 1670370140


Before getting started on the new system it was important to

determine the feasibility involved in the developed system so that the new

system development could be developed. Feasibility is the determination of

whether or not a project is not worth doing. The project followed in making

this determination is called a feasibility study. This type of study determines

if a project can and should Be Taken. Once it has been determined that

project is feasible, the analyst can go ahead and prepare the project

specification, which finalizes project requirements.

Generally, feasibility studies are undertaken within tight time

constraints and normally culminate in a written and feasibility report.

Five aspects need to be considered during a feasibility study:

 Technical feasibility: - Is the technology there to do it?

 Operational feasibility:-Do we have people who can do it, and will it


get used?

 Legal feasibility:-Does it comply with legal, regulatory, and

contractual obligations?

 Scheduling feasibility:-Can it be done in time?

 Economic feasibility:-Will the benefits exceed the costs?

VIPIN KUMAR 51 1670370140


1) Technical Feasibility: -

Definition: - The process of proving that the concept is technically

possible.

Objective: -The objective of the technical feasibility step is to confirm

that the product will perform and to verify that there are no production

barriers.

Product: - The product of this activity is a working model.

Technical Activities: - During the technical feasibility step the following

must be completed.

 Test for technical feasibility;

 Examine the operational requirements;

 Identify potential safety and environmental hazards;

 Conduct a preliminary production feasibility assessment;

 Conduct a preliminary manufacturing assessment;

 Estimate engineering prototype costs

VIPIN KUMAR 52 1670370140


Technical Information: - The technical feasibility step generates

knowledge about the product or process's design, performance,

production requirements, and preliminary production costs.

Assessment:-

 Do you have a working model of the product?

 Have you evaluated the safety factors of the model?

 Have you evaluated the environmental factors?

 Have you evaluated the feasibility of producing the product?

 Have you measured how the product will perform?

 Do you have a design for the product?

 Do you have a design for the production process?

As we know the technical feasibility is concerned with specifying

equipment and software that will successfully satisfy the user requirement.

It is used to determine the requirements of technologies for the current

system. The technical needs of the system may very considerably, but

might include:

The facility to produce outputs in a given time.

Response time under certain conditions.

Ability to process a certain volume of transaction at a particular speed.


VIPIN KUMAR 53 1670370140
Facility to communicate data to distinct location.

Data should be retrieved fast and accurate.

Technical feasibility assesses whether the current technical resources

are sufficient for the new system.

If they are not available, can they be upgraded to provide the level of

technology necessary for the new system?

In examination technical feasibility, configuration of the system is

given more importance than the actual make of hardware. The configuration

should give the complete picture about the system’s requirements: How

many workstations are required, how these units are interconnected so that

they could operate and communicate smoothly.

2) Operational Feasibility: -

Operational feasibility determines if the human resources are

available to operate the system once it has been installed. Users that

do not want a new system may prevent it from becoming operationally

feasible. Proposed projects are beneficial only if they can be turned

into information system that will meet the operating requirements of

the organization. This test of feasibility asks if the system will work

when it developed and installed. Are there major barriers to

implementation? Some of the important questions that are useful to

test the operational feasibility of a project are given below:

VIPIN KUMAR 54 1670370140


 Is there sufficient support for the project from the implementation?

From user? If the present system is well liked and used to the

extent that persons will not be able to see reasons for change, there

may be resistance.

 Are current business methods acceptable to the user? If they are not,

user may welcome a change that will bring about a more operational

and useful system.

 Have the user been involved in the planning and development of the

project? If they are involved at the earliest stage of project

development, the chances of resistance can be possibly reduced.

 Will the proposed system cause harm? Will it produce poorer result in

any case or area? Will the performance of staff member fall down

after implementation?

Issue that appears to be quite minor at the early stage can grow into

major problem after implementation. Therefore, it is always advisable to

consider operational aspects carefully. The system is developed in

keeping mind that it should be user friendly and easy to operate hence

the system is operational feasible

VIPIN KUMAR 55 1670370140


3) Economic Feasibility

Economic feasibility is probably the most important and

frequently analyzed aspect.

This examination requires a careful investigation of costs and benefits.

It typically uses a capital budgeting model that considers:

 Cost savings and other benefits

 Initial outlay costs

 Operating costs

 Other costs

An economic feasibility test/study focuses on returns and costs

of a proposed plan in both the short and long-term. An economic

feasibility study (EFS) should consider investment and operating costs,

the time value of money, risk and uncertainty, quality of available

data, and the sensitivity of assumptions. An economic feasibility study

should demonstrate the net benefit of the proposed course of action in

the context of direct and indirect benefits and costs to the organization

and to the general public as a whole. An EFS makes a business case,

prepares analytical worksheets and other necessary supporting

VIPIN KUMAR 56 1670370140


documentation. EFS should be required for both pilot and long-term

activities, plans and projects.

Economic analysis is the most frequently used technique for evaluating

the effectiveness of a proposed system. More commonly known as

cost/benefits analysis the procedure is to determine the benefits and

savings that are expected from a purposed system and compare with

costs. If benefits out weigh cost, a decision is taken to design and

implement the system otherwise further justification or alternative in

the proposed system will have to be made if it is to have a chance of

being approved. This is an on going effort that improves in accuracy at

each phase of the system life cycle. The analysis part also clears the

doubt of economic problems could be possible in developing the

system.

When possible, benefits and costs should be estimated and

included even if they are not easily quantifiable.

If some costs and benefits cannot be accurately estimated, they

should at least be listed, along with the likelihood of their occurrence

and their expected impact .

VIPIN KUMAR 57 1670370140


PROJECT PLANNING AND SCHEDULING

PROJECT PLANNING

Objectives:-

VIPIN KUMAR 58 1670370140


The objective of the system can be defined here as:

 The proposed system should be able to read the data from

oracle files and store validated data in the database.

 easy to manage large amount of data.

 data can be managed effectively.

Specific products to be delivered

The product that will be delivered:

 The tested system and network.

 Client workstation.

 A robust data management server

Activities and milestones

The activities in the system, after including the provisions for security are:

 verifications of software

 migration of the software

 validation of the migrated data

The milestones in the system are:-

 synopsis preparation: 07-FEB-2011—18-FEB-2011

VIPIN KUMAR 59 1670370140


 tool learning : 19-FEB-2011—21-MAR-2011

 analysis : 22-MAR-2011—05-APR-2011

 design : 06-APR-2011—26-APR-2011

 coding : 27-APR-2011—03-MAY-2011

 testing : 04-MAY-2011—21-MAY-2011

 documentation : 22-MAY-2011—24-MAY-2011

SCHEDULING

Scheduling of a software project can be correlated to prioritizing

various tasks (jobs) with respect to their cost, time, and duration.

Scheduling can be done with resource constraint or time constraint in mind.

VIPIN KUMAR 60 1670370140


Depending upon the project, scheduling methods can be static or dynamic in

implementation.

Scheduling techniques

There are various types of scheduling techniques in software engineering:

WORK BREAKDOWN STRUCTURE:-

The project is scheduled in various phases following a top-down

approach. A tree like structure is followed without any loops. At each phase

or step, milestones and deliverables are mentioned with respect to

requirements. The work breakdown structure shows the overall breakup flow

of the project and does not indicate any parallel flow. Work breakdown

structure of the website is given below-

WORK BREAKDOWN STRUCTURE OF THE PROJECT

Here the project is split into Analysis, Design, Coding and Testing

phase. Further analysis is divided into Feasibility Report, Cost Estimation,

and Project Planning and scheduling, and software requirement

specification; design is divided into procedural design, user interface

design, and architecture design; coding is divided into comments and

description, standardization of coding, error handling and security; testing

is divided into black box testing and white box testing.

VIPIN KUMAR 61 1670370140


SOFTWARE PROJECT

(DREAM CODER)

ANALYSIS DESIGNING CODING TESTING


OF THE PROJECT OF THE PROJECT OF THE PROJECT OF THE PROJECT

SOFTWARE
REQUIREMENT BLACK BOX
FEASIBILITY
SPECIFICATIO COMMENTS& TESTING
STUDY
N
DESCRIPTION

PROJECT VALIDATION
PLANNING AND GLASS BOX
CHECKS
STANDARISATION TESTING
SCHEDULING
OF CODING

PROCEDURAL ARCHITECTUR
ERROR
DESIGN E DESIGN HANDLING
USER

INTERFACE

GANTT CHART FOR PROJECT:->

When creating a software project schedule, the planner begins with


a set of tasks (the work breakdown structure). If automated tools
are used, the work breakdown is input as a task network. Effort,
duration and start dates are input are each task network. As a

VIPIN KUMAR 62 1670370140


consequence of this input, a timeline chart also called a Gantt chart
is generated. A timeline chart is developed for entire project.

S.NO ACTIVITY TIME START END DATE DURATION OF TASK

(days) DATE

1. SYNOPSIS 18/2/2011

PREPARATION
5 7/2/2011
2. 21/3/2011

TOOL LEARNING 10 19/2/2011


3. Analysis 2 5/4/2011

22/3/2011

4. Design 10 26/4/2011
24
5/4/2011
5. Coding 8 27/4/2011 3/5/2011

6. Testing 4 4/5/ 02011 21/5/ 2011

7. Documentation 6 22/5/2011 24/5/2011

Pert chart

Program evaluation and review technique (pert) is a project scheduling

method that is applied to software development.

Pert provide quantitative tool that allow the software planner to-

VIPIN KUMAR 63 1670370140


 Determine the critical path-the chain of tasks that determines the

duration of the project;

 Establish “most likely” time estimates for individual tasks by applying

statistical models; and

 Calculate “boundary times” that defines a time “window” for a particular

task.

Pert chart for project-

Preliminary 2
Investigation

(0,12) User Manual

Dum Testing
my Design Coding
1
4 5 6 7 8
2 2
Data collection

(0,10) 3 Analysis
1
(12,27)

Pert chart of business management system

VIPIN KUMAR 64 1670370140


S/W REQUIREMENT SPECIFICATION

SOFTWARE REQUIREMENT SPECIFICATION (SRS)

VIPIN KUMAR 65 1670370140


This document is generated as output of requirement analysis. The

requirement analysis involves obtaining a clear and throughout

understanding of the product to be developed. Thus SRS should be

consistent, correct unambiguous and complete document. The developer of

the system can prepare SRS after detail communication with the customer.

An SRS can clearly define the following:

 External interface of a system:- they identify the information

which is to flow ‘from and to the system’.

 Functional and non:-functional requirement of the system.

 Design constraints:-designing constraints of the system.

The SRS for the project is given below-

PURPOSE

SRS contain details of the proposed software system, sufficient enough

for designers to design the system. Thus SRS is means of communication

the finding of analysis stage to the design stage. The SRS includes:

 Interface
VIPIN KUMAR 66 1670370140
 logical database

 Hardware

 Performance and other constraints

General information

Project titled: ”DREAM CODER” -A User friendly software for oracle

Name of developer: MISS.ANURADHA GUPTA

Starting date: 07-FEB-2011

Expected end date: 24-MAY-2011

Hardware and Software Requirements:

VIPIN KUMAR 67 1670370140


Hardware

 Pentium 4 with 1700 GHz speed or above

 Minimum of 256MB RAM

 Minimum of 40GB Hard Disk

 Dot Matrix/ Laser Printer/ DeskJet

 15 ‘SVGA’colored monitor

 Serial plug and play Mouse

Software

 Windows xp or above Operating system

 ORACLE 10g or above

 Visual Basic .net 2005

 Virus scan program

 Crystal reports

VIPIN KUMAR 68 1670370140


Interface requirement

The interface requirements include:

 Easy to follow interface

 No hidden buttons

 Relevant error message

Functional requirement

 There should be detailed information about the division of the project

 There should be detailed information about user need.

 There should be detailed information about the database.

 There should be detailed information about the

 The administrator and the parties should be able to view all details.

Administrator can also delete the records.

 Administrator should be able to add, update or delete all records

updated by user.

VIPIN KUMAR 69 1670370140


Non functional requirements

 Performance

 Reliability

 Efficiency

 Usability

 Portability

 Testability

 Understandability

 Modifiability

Basic processing actions of the system

The basic processing actions for the system are:

 Verification of the user

 Uploads data

VIPIN KUMAR 70 1670370140


METHODOLOGY

VIPIN KUMAR 71 1670370140


Software Engineering Paradigm applied

In this project, Spiral model is used for the development. Spiral model

has features of prototyping and linear sequential model. It helps to

develop incremental versions of the software rapidly. Because software

evolves as the process progresses, the developer and customer better

understand and react to risks at each evolutionary level. This is a very

powerful model to develop large-scale system and software.

VIPIN KUMAR 72 1670370140


This model is divided into a number of task regions. Each of the regions is

populated by a set of work tasks called a task set that are done according to

the requirement of the project to be developed. For small projects the

number of tasks and their formality is low. Conversely, for large projects the

reverse is true.

These task regions of spiral model are:

Customer communication: - This task is basically done to establish

effective communication between developer and customer.

In this task region customers are asked about their requirements from the

system, through a dialog between developer and the customer.

Planning:- This task is basically done to define resources, time lines and

other project related information. In this task region resource, timelines and

other project related information are considered and appropriate decision

taken

Risk analysis:- This task is basically done to assess both technical and

management risks In this region technical and management risks are

identified and suitable measures taken wherever feasible.

Engineering:- This task is basically done to build one or more

representations of the application. In this region one or more

representations of application are built.

VIPIN KUMAR 73 1670370140


Construction and Release:- This task is basically done to construct, test,

install and provide user support (e.g., documentation and training). In this

region, application is constructed, tested, installed and user support is

provided.

Customer evaluation:- This task is basically done to obtain customer

feedback based on the evaluation of the software representation created

during the engineering stage and implemented during the install stage in

this region, feedback is taken from the customer about the overall

performance of the application built during the engineering and implemented

during installation stage.

The evolutionary process begins at the centre position and moves in a

clockwise direction. Each traversal of the spiral typically results in a

deliverable. For example, the first and second spiral traversals may result in

the production of a product specification and a prototype, respectively. In

this way a more stochastic version of the software is produced after some

subsequent traversal. A key difference between the spiral model and other

software models is that risk analysis is performed in former and not in later.

Advantages of the Spiral Model

 The spiral model is a very good approach to develop large-scale

software because of its evolutionary approach to develop software.

VIPIN KUMAR 74 1670370140


Besides this both customer and developer can identify and remove the

risks that can occur during the software development.


 Prototyping is used to reduce the risk as it can be developed at any

stage of the evolutionary level.


 Due to its demand of considering technical risks at all stages, it

reduces risks that may become a big problem in future.


 It combines iterative and linear feature which helps in developing

better software.

Thus according to the steps of spiral model first of all following steps are

performed for the proposed project:

 The requirements are collected and partial software is developed

fulfilling basic requirements of the user’s (based on the

requirement collected).
 As the information, the user wants to put on the software and

the manner in which he wants to give the information has

already been discussed, the technical and managerial risks were

reduced.
 After designing and creation of some pages of site, a feedback is

asked from the users. According to the given feedback, further

refinement to the software was made, wherever required.


 This procedure was followed until the whole software was

completely developed.

Thus the complete software was developed in an iterative and

sequential way to the entire satisfaction of the user’s.


VIPIN KUMAR 75 1670370140
SYSTEM DESIGN

SYSTEM DESIGN

 The design of the system is most critical factor affecting the quality of
the software; it has major impact on the phases particularly testing

and maintenance. This document is similar to blueprint or plan for the

solution.

The design activity is often divided into two phases:

 System Design
 Detailed Design
 Database design
SYSTEM DESIGN:-
 System design aims to identify the modules there should be in the

system, the specification of these modules and how they interact with
VIPIN KUMAR 76 1670370140
each other to produce the desired result. At the end of system design

all the major data structures, file formats and the major modules in

the system and their specifications are decided.

DETAILED DESIGN:-
 During detailed design, the internal logic of each of the modules

specified in the system design is decided. During this phase further of

the data structures and the algorithm design of the module is

specification. The logic of a module is usually speciation in a high-

level design description language, which is independent of the

language in which the software will eventually be implemented .

DATABASE DESIGN:-
 A database may be thought of a set of related files. Related

files mean that records in another file. The conventional file based

systems emphasized that the application and the files were built

around it. The database environment emphasizes the independently

of application that use the data. The application are allowed evolve

around a database design such that it can adopt the changing needs.

Data becomes the central resource in the database environment.


 Information system is built around this central resource to give flexible

access to data. Special software called Database Management System

often referred the database operations.

VIPIN KUMAR 77 1670370140


MODULES

MySQL MODULE
ORACLE MODULE
MS-ACCESS MODULE

VIPIN KUMAR 78 1670370140


MySQL MODULE

NUMBER OF MySQLMODULES

1. Login.

2. Table.

 Create Table.

 Create New Table

 Create Table Using Another Table

 Open Table

 Alter Table
VIPIN KUMAR 79 1670370140
 Add New Fields

 Modify Column

 Rename Table

 Delete Table

3. Advanced

 Print

 Data Structure

 Sorting

3. Manipulate

 Insert Record.

 Delete Record

4. View

 Create View

 Delete View.

VIPIN KUMAR 80 1670370140


5. DBA Utilities(Administrator)

 Create New User

 Drop User

6 Schema

 Create New Schema

 Drop Schema

NUMBER OF ORACLE MODULES

1. Login.

2. Table.

 Create Table.

 Create New Table

 Create Table Using Another Table

VIPIN KUMAR 81 1670370140


 Open Table

 Alter Table

 Add New Fields

 Modify Column

 Rename Table

 Delete Table

3. Manipulate

 Insert Record.

 Delete Record

4. View

 Create View

 Delete View.

VIPIN KUMAR 82 1670370140


5. DBA Utilities(Administrator)

 Create New User

 Drop User

NUMBER OF MS-ACCESS MODULES

1. Login.

2. Table.

 Create Table.

 Create New Table

 Create Table Using Another Table

 Open Table

 Rename Table
VIPIN KUMAR 83 1670370140
 Delete Table

3. Manipulate

 Insert Record.

 Delete Record

DETAILS OF MODULES

 Login:-It is used for security reasons so that authorized persons

can use the Software.

 Table:-It is used for operations on any Table.

 Create Table:- It is used to create a new table.

 Create Table Using Another:- It is used to create new

table using another old table with same datatype.

 Open Table:- It is used to select a table and view its

record
VIPIN KUMAR 84 1670370140
 Alter Table:- It is used to modify data structure of

existing table.

 Add New Fields:- It is used to add new fields in old table.

 Modify Column:- It is used to change datatype and size

of existing column.

 Add Primary Key:- It is used to add primary key in any

existing table.

 Rename Table:- It is used to give a new name to the

existing table.

 Delete Table:- It is used to delete a selected table along

with its structure.

 DBA Utilities: It is used by the persons who have being given

DBA rights.

 Create New User:- It is used to create a new user in

Oracle.

 Drop User:- It is used to drop a existing user from Oracle.

 Manipulate: Other operations on table like insert, update,

Delete can be performed in this module.


VIPIN KUMAR 85 1670370140
 Insert Record:- It is used to insert a new record and

modify the existing entries of a record.

 Delete Record:- It is used to delete record based on

some criteria.

 Find /Update Record:- It is used find any record and

update.

 View

 Create View: It is used to create a view based on a

selected table.

 Delete View: It is used to delete a selected view.]

 Advanced

 Print:- It is used to print report through printer.

 Data Structure:- Using this user can view data structure

of any existing table.

 Sorting:- It is used to sort data available in table.

Note: - There are 33 Modules in “DREAM CODER” Project


VIPIN KUMAR 86 1670370140
What Is a Table?
Tables are the basic structure where data is stored in the database. In

most cases, there is no way for the database vendor to know ahead of time

what our data storage needs are, chances are that we will need to create

tables in the database. Many database tools allow us to create tables without

writing SQL, but given that tables are the container of all the data, it is

important to include the syntaxes of create, drop, alter, rename table.


Advantages of Table?

It is a good idea to understand what goes into a table. Tables are

divided into rows and columns. Each row represents one piece of data, and

each column can be thought of as representing a component of that piece of

data. So, for example, if we have a table for recording customer information,

then the columns may include information such as First Name, Last Name,

Address, City, Country, Birth Date, and so on. As a result, when we specify a

table, we include the column headers and the data types for that particular

column.

Table options:-

 Create table:-we It is used to store data by executing SQL CREATE

TABLE statement. This statement is one of the data definition

language(DDL) statements. DDL statements are a subset of SQL

statements that are used to create, modify, or remove oracle database

structures.
VIPIN KUMAR 87 1670370140
Syntax:- CREATE TABLE "table_name" column 1"

"data_type_for_column_1", "column 2" "data_type_for_column_2",...)

In the above syntax:

Table is the name of the table

Column is the column name

Datatype is column’s dataype and length

HELP:

Table : select a table name from the list of tables.

Field: select a column name from the list of column

Type: select the datatype of column

Size: specify the size of the column

Add fields: used to add selected items in selected item

box. You can add more fields after pressing add button.

Create composite primary key: check the radiobutton if

you want to make any column a primary key

Build: To execute the query

Close: to close the current form

VIPIN KUMAR 88 1670370140


example:- if we are to create the customer table specified as above,

we would type in

CREATE TABLE customer

(First_Name char(50),

Last_Name char(50),

Address char(50),

City char(50),

Country char(25),

Birth_Date date)

 Alter table:- The ALTER TABLE statement allows you to rename an

existing table. It can also be used to add, modify, or drop a column

from an existing table.

Use alter table statement to :

add a new column

modify an existing column

drop a column
VIPIN KUMAR 89 1670370140
syntax:- ALTER TABLE table_name RENAME TO new_table_name;

ALTER TABLE table

ADD/MODIFY/DROP (column datatype, column dataype, ….)

In above syntax:

Table is the name of the table

ADD/MODIFY/DROP is the type of modification

Column is the name of the new column

Datatype is the datatype and length of new expression

example:- ALTER TABLE customer RENAME TO cus_name; ALTER

TABLE dept_90

ADD (job_id VARCHAR2(9))

Add a new column

Modify an existing column

Drop a column

Add Column:

You can add a new column by executing this query. First select the

table in which you want to add column. Give the name of column

that you want to add. Also specify the datatype of column.

VIPIN KUMAR 90 1670370140


Syntax:

ALTER TABLE table

ADD (column datatype, column dataype, ….

In above syntax:

Table is the name of the table

ADD is the type of modification

Column is the name of the new column

Datatype is the datatype and length of new expression

Example:

ALTER TABLE dept_90

ADD (job_id VARCHAR2(9))

Modify Column:

You can modify an existing column ( i.e you can change column’s

datatype, size, name) by executing this query. First select the table

in which you want to modify column. Give the name of column that

you want to modify. Also specify the datatype of column.

Syntax:

VIPIN KUMAR 91 1670370140


ALTER TABLE table

MODIFY (column datatype, column datatype , ….)

In above syntax:

Table is the name of the table

MODIFY is the type of modification

Column is the name of the new column

Datatype is the datatype and length of new expression

Example:

ALTER TABLE dept_90

MODIFY (last_name VARCHAR2(30))

Drop Column:

You can drop a column from a table by using ALTER TABLE

statement with DROP COLUMN clause..using alter table only one

column is dropped at a time. First select the table in which you

want to drop a column. Give the name of column that you want to

drop. Also specify the datatype of column.

VIPIN KUMAR 92 1670370140


Syntax:

ALTER TABLE table

DROP COLUMN column

In above syntax:

Table is the name of the table

DROP is the type of modification

Column is the name of the new column

Example:

ALTER TABLE dept_90

DROP COLUMN job_id

Update Table:

You can modify existing rows by using the update statement.

Syntax:

UPDATE table

SET column = value [,column = value, …

WHERE condition;

VIPIN KUMAR 93 1670370140


In above syntax:

Table is the name of the table

Column is the name of the column to populate

Value is the corresponding value

Condition identifies the rows to be updated

Example:

UPDATE employees

SET department_id = 110

WHERE emp_id = 113;

 Rename table:- It is used to rename a table. First select table name

that you want to rename and then specify the new name that you

want to give. Press rename button to execute the query. Refresh

button changes the name in the list of table.

syntax:- RENAME old_name TO new_name

In above syntax :

Old_name is the old name of the table

New_name is the new name of the table

VIPIN KUMAR 94 1670370140


example:- RENAME dedpt_80 TO dept_90

 Drop table:- Sometimes we may decide that we need to get rid of a

table in the database for some reason. In fact, it would be problematic

if we cannot do so because this could create a maintenance nightmare

for the DBA's. Fortunately, SQL allows us to do it, as we can use the

DROP TABLE command. Drop table removes the definition of an oracle

table. When you drop a table, the database loses all the data in the

table and all indexes associated with it.

syntax:- DROP TABLE tablename;

example:- we will drop the above table which is given in the previous

example

DROP TABLE customer;

Optons of DBA Utilities?

Create New User:- It is used to create a new user in Oracle. It is an

account through which you can log in to the database, and to establish the

means by which Oracle Database permits access by the user. The DBA

creates the user by executing the CREATE USER statement. The user does

not have any privileges at this point. The DBA can then grant privileges to

that user. These privileges determine what the user can do at the database

level.
VIPIN KUMAR 95 1670370140
syntax:- CREATE USER username SET PASSWORD ‘password'[ SET

GROUPS groups_list ][ SET ACCOUNT ( LOCK | UNLOCK ) ]

In the syntax:

User is the name of the user to be created

Password specifies that the user must log in with this password

example:- CREATE USER harry SET PASSWORD 'cat'

 Privileges:-Privileges are the right to execute particular SQL

statements. The database administrator (DBA) is a high-level user with

the ability to grant users access to the database and its objects. The

users require system privileges to gain access to the database and

object privileges to manipulate the content of the objects in the

database. Users can also be given the privilege to grant additional

privileges to other users or to roles, which are named groups of

related privileges.

Database security:

System security

Data security

System privileges: Gaining access to the database


VIPIN KUMAR 96 1670370140
Object privileges: Manipulating the content of the database

objects.

Schemas: Collections of objects, such as tables, views, and

sequences

 System Privileges:-More than 100 distinct system privileges are

available for users and roles. System privileges typically are provided

by the database administrator.

Typical DBA Privileges:-

System Privilege Operations Authorized

CREATE USER Grantee can create other Oracle users

(a privilege required a DBA Role)

DROP USER Grantee can drop another user.

DROP ANY TABLE Grantee can drop a table in any

schema.

BACKUP ANY TABLE Grantee can back up any table in any

schema with the export utility.

SELECT ANY TABLE Grantee can query tables, views, or

snapshots in any schema

CREATE ANY TABLE Grantee can create tables in any

VIPIN KUMAR 97 1670370140


schema.

Create Users Grantee can create any user

Grant System Can grant any privileges to user.

Privileges

 User System Privileges:- Once a user is created, the DBA can grant

specific system privileges to a user.

syntax:- GRANT privilege [, privilege...] TO user [, user| role,

PUBLIC...];

In the syntax:

Privilege is the system privilege to be granted

User |role|PUBLIC is the name of the user, the name of the role, or

PUBLIC

Designates that every user is granted the privilege

An application developer, for example, may have the following system privilege

System Privilege Operations Authorized

CREATE SESSION Connect to the database

VIPIN KUMAR 98 1670370140


CREATE TABLE Create tables in the user’s schema

CREATE SEQUENCE Create a sequence in the user’s

schema

CREATE VIEW Create a view in the user’s schema

CREATE PROCEDURE Create a stored procedure, function,

or package in the user’s schema

 Granting System Privileges:-The DBA uses the GRANT statement to

allocate system privileges to the user. Once the user has been granted

the privileges, the user can immediately use those privileges.

example:- GRANT create session, create table, create sequence, create

view TO scott;

Grant succeeded.

In the example on the slide, user Scott has been assigned the privileges to

create sessions, tables, sequences, and views.

 Change Password:- It is used to change password of specified user

of Oracle.

syntax:- alter user user_name identified by new_password;

example:- alter user harry identified by autumn;

VIPIN KUMAR 99 1670370140


 Drop User:- It is used to drop a existing user from Oracle.

syntax:- DROP USER username

example:- DROP USER harry;

 Import Database:- It is used to restore the backup taken.

 Export Database:- It is used to take Backup of an Oracle User.

 Show Password:- It is used only by Administrator to view password

of any user.

Options of Manipulate ?

 Insert Record:- It is used to insert a new record and modify the

existing entries of a record.

syntax:- INSERT INTO "table_name" ("column1", column2",...)

VALUES ("value1", "value2", ...)

example:INSERTINTOStore_Information(store_name,sales,Date)VAL

UES ('Los Angeles', 900, 'Jan-10-1999')

VIPIN KUMAR 100 1670370140


 Delete Record:- It is used to delete record based on some

criteria.You can remove existing rows from the table by using the

delete statement. First select the table From which you want to delete

a record.Specific rows are deleted if you specify the where clause.All

rows are deleted if where clause is omitted.

syntax:- DELETE FROM table WHERE condition

In the above syntax:

Table is the table name from which you want to delete a

record.

Condition identifies rows to be deleted

example:- DELETE FROM dept_90 WHERE dept_name = ‘finance’;

 Find /Update Record:- It is used to search and Update a record

based on a given criteria.

VIPIN KUMAR 101 1670370140


What Is a View?

You can present logical subsets or combinations of data by creating

views of tables. A view is a logical table based on a table or another view. A

view contains no data of its own but is like a window through which data

from tables can be viewed or changed. The tables on which a view is based

are called base tables. The view is stored as a SELECT statement in the data

dictionary.

Why Use Views?

To restrict data access


To make complex queries easy
To provide data independence
To present different views of the same data
Advantages of Views

 Views restrict access to the data because the view can display

selective columns from the table.


 Views can be used to make simple queries to retrieve the results of

complicated queries. For example, views can be used to query

VIPIN KUMAR 102 1670370140


information from multiple tables without the user knowing how to write

a join statement.
 Views provide data independence for ad hoc users and application

programs. One view can be used to retrieve data from several tables.
 Views provide groups of users access to data according to their

particular criteria

Simple Views versus Complex Views

There are two classifications for views:

simple

complex

A simple view is one that:

Derives data from only one table

Contains no functions or groups of data

Can perform DML operations through the view

A complex view is one that:

Derives data from many tables

Contains functions or groups of data

Does not always allow DML operations through the view

View Options
 Can be a simple view, based on one table
VIPIN KUMAR 103 1670370140
 Can be a complex view based on more than one table or can contain

groups of functions
 Can replace other views with the same name
 Can contain a check constraint
 Can be read-only

 Create View:- Create a view by using column aliases in the subquery.

Creates a new view. A view is a virtual table based on the result of a

SELECT query. The content of a view may reference any number of

other tables and views.

syntax:- CREATE VIEW view_name AS SELECT column_name(s)

FROM table_name WHERE condition

example:- CREATE VIEW [Current Product List] AS

SELECT ProductID,ProductName FROM Products

WHERE Discontinued=No.

Retrieving Data from a View

You can retrieve data from a view as you would from any table. You can

display either the contents of the entire view or just specific rows and

columns.

 Drop View:-You can remove a view without losing data because a

view is based on underlying tables in the database.


VIPIN KUMAR 104 1670370140
syntax:- DROP VIEW table_name

example:- DROP VIEW empvu80

View dropped:-You use the DROP VIEW statement to remove a

view. The statement removes the view definition from the

database. Dropping views has no effect on the tables on which the

view was based. Views or other applications based on deleted views

become invalid. Only the creator or a user with the DROP ANY VIEW

privilege can remove a view.

What are Advanced options?

 Print:- It is used to generating crystal reports. Using this user can

create crystal report and take a printout.

 Sorting:-Sometimes we need the data in sort way. Fortunately, SQL

allows us to do it, as we can use the ORDER BY clause to sort data in

any table.

syntax:- SELECT * FROM tablename ORDER BY fieldname [desc];

example:- This command sort data by default in ascending order.

SELECT * FROM customer ORDER BY emp_id;

VIPIN KUMAR 105 1670370140


 Data Structure:- Using this user can view data structure of any

existing table like “DESC” command used in oracle to display structure.

Data Structure

This software is conceptual, so there are just three tables used.

Rest of the tables, views and synonyms are created at run time

automatically by this project.


Login details

S.no. Fieldname Datatype Size

1 UserName Varchar2 30

2 DateLogin Varchar2 15

3 TimeLogin Varchar2 15

VIPIN KUMAR 106 1670370140


Print_DETAILS1

S.no. Fieldname Datatype Size

1 F1 Varchar2 40

2 F2 Varchar2 40

3 F3 Varchar2 75

4 F4 Varchar2 40

5 F5 Varchar2 40

6 F6 Varchar2 40

QUERIES

S.no. Fieldname Datatype Size

1 UserName Varchar2 30

2 DateLogin Varchar2 15

3 TimeLogin Varchar2 15

PROCESS LOGIC

LOGIN:-No user name will be displayed automatically to the user. User has

to type the USERNAME and type the respective PASSWORD. If the

USERNAME and PASSWORD matches then a WELCOME massage will display

and after 5 second “Main form” opens automatically else an error message

will be flashed.
VIPIN KUMAR 107 1670370140
TABLE:-

 CREATE TABLE:-User has to given table name, fieldname, type

and its size. If all the entries are valid then table is created else

error message is flashed.

 CREATE USING ANOTHER:- User has to input new table name

and select the old table to create a new table including data or not.

 OPEN TABLE:-All the table names in a specific “user” will be

displayed automatically. User has to select a table name from

combo box to see its content in the grid.

 ALTER TABLE:-All the table names in a specific “user” will be

displayed automatically. User has to select the table name to be

modified along with its fieldname and new details. Finally table is

altered.

VIPIN KUMAR 108 1670370140


 RENAME TABLE:-All the table names of current user will be

displayed automatically. User has to type new table name. Finally if

all entries are valid then the table name is renamed .

 DELETE TABLE:-All the table names in a specific “user” will be

displayed automatically. user has to select a table name which has

to be deleted.

DBA UTILITIES:-

 CREATE NEW USER:-Any DBA can create new user. DBA has
to input “user name” and type appropriate password for user

to create new user. If all entries are valid then user is

created.

GRANT PERMISSION:-Any DBA can give the permission to any

user. Permissions are like Create Session, Connect, Resource

and DBA.

 DROP USER:-All users which are created are displayed

automatically. DBA has to be select one of the user to be

dropped.

VIPIN KUMAR 109 1670370140


MANIPULATE:-

 INSERT RECORD:- All the table names in a specific “user” will

be displayed automatically. User has to select one of the table

names and its content will be displayed in a grid and finally you

can insert new record.

 DELETE RECORD:- All the table names in a specific “user” will

be displayed automatically. User has to select one of the table

names and its content will be displayed in a grid and user has to

select condition to delete a record. According to given condition

record will delete. If there is any problem then an error message

will be displayed.

 FIND/UPDATE RECORD: - All the table names in a specific

“user” will be displayed automatically. User has to select one of

the table names and its content will be displayed in a grid and

user has to select condition to find or update any record.

VIEW:-

VIPIN KUMAR 110 1670370140


 CREATE VIEW:-All the table names in a specific “user” will

be displayed automatically. User has to enter view name and

condition of creation of a view if any. If all entries are valid

then view is created.

 DELETE VIEW:-All views which are created are displayed

automatically. User has to be select one of the view to be

dropped.

ADVANCED:-

 PRINT:-All the table names in a specific “user” will be displayed

automatically. User has to select table name then all fields are

shown in list then user has to select the desired fields and click

on print. If all entries are valid then crystal report will created.

 DATA STRUCTURE:- All the table names in a specific “user” will

be displayed automatically. User has to select table name to

show data structure

HELP:-

 QUERY BROWSER:-User can run SQL query like SQL Console.

VIPIN KUMAR 111 1670370140


 HELP TOPICS:-User can find help related to software.

 developed.

Thus the complete software was developed in an iterative and

sequential way to the entire satisfaction of the user’s.

DFD AND ER DIAGRAM

VIPIN KUMAR 112 1670370140


DREA
M
CODER

CONTEXT LEVEL DFD

VIPIN KUMAR 113 1670370140


FIRST LEVEL DFD

VIPIN KUMAR 114 1670370140


FIRST LEVEL DFD(CONTINUED)

VIPIN KUMAR 115 1670370140


SECOND LEVEL DFD

VIPIN KUMAR 116 1670370140


SECOND LEVEL DFD

VIPIN KUMAR 117 1670370140


SECOND LEVEL DFD

VIPIN KUMAR 118 1670370140


SECOND LEVEL DFD

VIPIN KUMAR 119 1670370140


SECOND LEVEL DFD

VIPIN KUMAR 120 1670370140


E-R DIAGRAM

VIPIN KUMAR 121 1670370140


PROCESS LOGIC

LOGIN:-No user name will be displayed automatically to the user. User has

to type the USERNAME and type the respective PASSWORD. If the

USERNAME and PASSWORD matches then a WELCOME massage will display

and after 5 second “Main form” opens automatically else an error message

will be flashed.

TABLE:-

 CREATE TABLE:-User has to given table name, fieldname, type

and its size. If all the entries are valid then table is created else

error message is flashed.

 CREATE USING ANOTHER:- User has to input new table name

and select the old table to create a new table including data or not.

 OPEN TABLE:-All the table names in a specific “user” will be

displayed automatically. User has to select a table name from

combo box to see its content in the grid.

VIPIN KUMAR 122 1670370140


 ALTER TABLE:-All the table names in a specific “user” will be

displayed automatically. User has to select the table name to be

modified along with its fieldname and new details. Finally table is

altered.

 RENAME TABLE:-All the table names of current user will be

displayed automatically. User has to type new table name. Finally if

all entries are valid then the table name is renamed .

 DELETE TABLE:-All the table names in a specific “user” will be

displayed automatically. user has to select a table name which has

to be deleted.

DBA UTILITIES:-

 CREATE NEW USER:-Any DBA can create new user. DBA has
to input “user name” and type appropriate password for user

to create new user. If all entries are valid then user is

created.

 GRANT PERMISSION:-Any DBA can give the permission to

any user. Permissions are like Create Session, Connect,

Resource and DBA.


VIPIN KUMAR 123 1670370140
 DELETE USER:-All users which are created are displayed

automatically. DBA has to be select one of the user to be

dropped.

MANIPULATE:-

 INSERT RECORD:- All the table names in a specific “user”

will be displayed automatically. User has to select one of the

table names and its content will be displayed in a grid and

finally you can insert new record.

 DELETE RECORD:- All the table names in a specific “user”

will be displayed automatically. User has to select one of the

table names and its content will be displayed in a grid and

user has to select condition to delete a record. According to

given condition record will delete. If there is any problem then

an error message will be displayed.

 FIND/UPDATE RECORD: - All the table names in a specific

“user” will be displayed automatically. User has to select one

of the table names and its content will be displayed in a grid

and user has to select condition to find or update any record.

VIPIN KUMAR 124 1670370140


VIEW:-

 CREATE VIEW:-All the table names in a specific “user” will

be displayed automatically. User has to enter view name and

condition of creation of a view if any. If all entries are valid

then view is created.

 DELETE VIEW:-All views which are created are displayed

automatically. User has to be select one of the view to be

dropped.

ADVANCED:-

 PRINT:-All the table names in a specific “user” will be

displayed automatically. User has to select table name then

all fields are shown in list then user has to select the desired

fields and click on print. If all entries are valid then crystal

report will created.

 DATA STRUCTURE:- All the table names in a specific “user”

will be displayed automatically. User has to select table name

to show data structure.

VIPIN KUMAR 125 1670370140


HELP:-

 QUERY BROWSER:-User can run SQL query like SQL

Console.

 HELP TOPICS:-User can find help related to software.

VIPIN KUMAR 126 1670370140


Coding

START UP FORM

package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import javax.swing.tree.*;

public class StartUpForm extends JWindow

VIPIN KUMAR 127 1670370140


{

private JLabel l1;

private JButton cmd1,cmd2;

private JComboBox com1;

private JPanel p1,p2;

private JDesktopPane desktop;

private void initLabel()

l1=new JLabel(new ImageIcon("images/db.jpg"));

private void initCombobox()

com1=new JComboBox();

com1.addItem("NONE");

com1.addItem("MYSQL");

com1.addItem("MS ACCESS");

com1.addItem("ORACLE");

private void initButton()

VIPIN KUMAR 128 1670370140


cmd1=new JButton("CANCEL");

cmd1.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

StartUpForm.this.setVisible(false);

});

cmd2=new JButton("PROCEED");

this.getRootPane().

setDefaultButton(cmd2);

cmd2.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent ae)

Stringdb=com1.getSelectedItem().toString().toUpperCase(
);

VIPIN KUMAR 129 1670370140


if(db.equals("NONE"))

StartUpForm.this.setVisible(false);

if(db.equals("MYSQL"))

MySqlLoginForm p=new MySqlLoginForm();

p.pack();

StartUpForm.this.setVisible(false);

if(db.equals("ORACLE"))

OracleBrowserForm f=new OracleBrowserForm();

f.pack();

StartUpForm.this.setVisible(false);

if(db.equals("MS ACCESS"))

MsAcessLoginForm a=new MsAcessLoginForm();


VIPIN KUMAR 130 1670370140
a.pack();

StartUpForm.this.setVisible(false);

});

private void initComponent()

this.initLabel();

this.initButton();

this.initCombobox();

p1=new JPanel(new GridLayout(1,4,5,5));

p1.setBorder(BorderFactory.createTitledBorder(""));

p1.add(new JLabel("SELECT DATABASE"));

p1.add(com1);

p1.add(cmd1);
VIPIN KUMAR 131 1670370140
p1.add(cmd2);

this.getContentPane().add(p1,BorderLayout.SOUTH);

p2=new JPanel();

p2.setBorder(BorderFactory.createTitledBorder(""));

p2.add(l1);

this.getContentPane().add(p2,BorderLayout.NORTH);

public StartUpForm()

this.initComponent();

this.setSize(350,350);

//this.setLocation(250,250);

this.setVisible(true);

Helper.setPosition(this);

public static void main (String[] args)


VIPIN KUMAR 132 1670370140
{

try

StartUpForm p=new StartUpForm();

UIManager.setLookAndFeel(newcom.birosoft.liquid.LiquidL
ookAndFeel());

SwingUtilities.updateComponentTreeUI(p);

p.pack();

catch(Exception e){}

}}

VIPIN KUMAR 133 1670370140


MySQL LOGIN FORM

package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import java.io.*;

import java.sql.Connection;

import java.sql.DriverManager;

public class MsAcessLoginForm extends JFrame

private Connection cn;

private JLabel l1,l2,l3;

private JTextField txt1,txt2;

private String path;

private JButton cmd1,cmd2,cmd3;

private void initCmdbutton()

{
VIPIN KUMAR 134 1670370140
cmd1=new JButton("Browse");

cmd2=new JButton("Proceed");

this.getRootPane().setDefaultButton(cmd2);

cmd2.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent ae)

try

MsAcessQueryBrowserFormf=newMsAcessQueryBrowserForm(cn)
MsAcessLoginForm.this.setVisible(false);

catch(Exception e)

JOptionPane.showMessageDialog(null,"Login
Failed...Retry\n\n");

});

cmd1.setEnabled(false);

cmd2.setEnabled(false);

VIPIN KUMAR 135 1670370140


cmd3=new JButton("Cancel");

cmd3.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

MsAcessLoginForm.this.setVisible(false);

});

cmd1.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

try

JFileChooser ch=new
JFileChooser();

ch.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

ch.showOpenDialog(null);

VIPIN KUMAR 136 1670370140


File
file=ch.getSelectedFile();

txt1.setText(file.getAbsolutePath());

path=file.getAbsolutePath()+"\\"+txt2.getText()+".mdb";

File temp=new File(path);

if(!temp.exists())

JOptionPane.showMessageDialog(null,path);

FileInputStream
fis=new FileInputStream("lib/Temp.mdb");

FileOutputStream
fos=new FileOutputStream(path);

for(int
i=fis.read();i!=-1;i=fis.read())

fos.write(i);

fis.close();

fos.close();

VIPIN KUMAR 137 1670370140


}

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

cn=DriverManager.getConnection("jdbc:odbc:Driver={Micro
soft Access Driver (*.mdb)};DBQ="+path);

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

});

}
VIPIN KUMAR 138 1670370140
private void initLabel()

l1=new JLabel(new ImageIcon("images/sd.jpg"));

l2=new JLabel("SELECT PATH");

l3=new JLabel("FILE NAME");

private void initTextField()

txt1=new JTextField(10);

txt1.setEditable(false);

txt2=new JTextField(10);

txt2.addKeyListener(new KeyAdapter()

public void keyReleased(KeyEvent ke)

if(txt2.getText().length()>0)

cmd1.setEnabled(true);

cmd2.setEnabled(true);

else

cmd1.setEnabled(false);
VIPIN KUMAR 139 1670370140
cmd1.setEnabled(false);

});

private void initComponent()

this.initLabel();

this.initTextField();

this.initCmdbutton();

JPanel p1=new JPanel();

p1.setBorder(BorderFactory.createTitledBorder(""));

p1.add(l1);

JPanel p2=new JPanel(new GridLayout(1,3,5,5));

p2.setBorder(BorderFactory.createTitledBorder(""));

p2.add(l2);

p2.add(txt1);

p2.add(cmd1);

JPanel p3=new JPanel(new GridLayout(2,2,5,5));

VIPIN KUMAR 140 1670370140


p3.setBorder(BorderFactory.createTitledBorder(""));

p3.add(l3);

p3.add(txt2);

p3.add(cmd2);

p3.add(cmd3);

this.getContentPane().add(p1,BorderLayout.NORTH);

this.getContentPane().add(p2,BorderLayout.CENTER);

this.getContentPane().add(p3,BorderLayout.SOUTH);

public MsAcessLoginForm()

this.initComponent();

this.setTitle("MS ACESS BROWSER");

this.setVisible(true);

this.setSize(350,350);

this.setLocation(300,300);

this.setVisible(true);

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
VIPIN KUMAR 141 1670370140
}

VIPIN KUMAR 142 1670370140


MySQL

package com.db;

import java.sql.Connection;

import java.sql.DriverManager;

public class MySQL

public String ERROR;

private String ip;

private String port;

private String database;

private String user;

private String password;

private String url;

private void makeUrl()

this.url="jdbc:mysql://"+this.ip+":"+this.port+"/"+this.data
base;

VIPIN KUMAR 143 1670370140


public MySQL()

this.ip="127.0.0.1";

this.port="3306";

this.database="mysql";

this.user="root";

this.password="";

this.makeUrl();

public MySQL(String ip)

this.ip=ip;

this.port="3306";

this.database="mysql";

this.user="root";

this.password="";

this.makeUrl();

public MySQL(String ip,String port)

this.ip=ip;

this.port=port;
VIPIN KUMAR 144 1670370140
this.database="mysql";

this.user="root";

this.password="";

this.makeUrl();

public MySQL(String ip,String port,String database)

this.ip=ip;

this.port=port;

this.database=database;

this.user="root";

this.password="";

this.makeUrl();

public MySQL(String ip,String port,String


database,String user)

this.ip=ip;

this.port=port;

this.database=database;

this.user=user;

this.password="";
VIPIN KUMAR 145 1670370140
this.makeUrl();

public MySQL(String ip,String port,String


database,String user,String password)

this.ip=ip;

this.port=port;

this.database=database;

this.user=user;

this.password=password;

this.makeUrl();

public Connection getConnection()

Connection cn=null;

try

Class.forName("com.mysql.jdbc.Driver");

cn=DriverManager.getConnection(this.url,this.user,this.
password);

catch(Exception e)
VIPIN KUMAR 146 1670370140
{

this.ERROR=e.getMessage();

return cn;

public Connection getConnection(boolean commitMode)

Connection cn=null;

try

Class.forName("com.mysql.jdbc.Driver");

cn=DriverManager.getConnection(this.url,this.user,this.
password);

if(!cn.isClosed())

cn.setAutoCommit(commitMode);

catch(Exception e)

this.ERROR=e.getMessage();

VIPIN KUMAR 147 1670370140


}

return cn;

public void setIP(String ip)

this.ip=ip;

this.makeUrl();

public void setPort(String port)

this.port=port;

this.makeUrl();

public void setDatabase(String database)

this.database=database;

this.makeUrl();

public void setUser(String user)

this.user=user;

this.makeUrl();

}
VIPIN KUMAR 148 1670370140
public void setPassword(String password)

this.password=password;

public String getIP()

return this.ip;

public String getPort()

return this.port;

public String getDatabase()

return this.database;

public String getUser()

return this.user;

VIPIN KUMAR 149 1670370140


public String getPassword()

return this.password;

public String getUrl()

return this.url;

CREATE TABLE

package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import javax.swing.table.*;

VIPIN KUMAR 150 1670370140


import java.sql.*;

import java.sql.Connection;

public class CreateTable extends JFrame

private Connection cn;

private JLabel l1;

private JTable table;

private DefaultTableModel model;

private JButton cmd1,cmd2,cmd3;

private JTextField txt1;

private JPanel p1,p2,p3;

private void initTabel()

model=new DefaultTableModel();

model.addColumn("FIELD");

model.addColumn("TYPE");

model.addColumn("SIZE");

model.addColumn("CONSTRAINT");

//model.addRow(new java.util.Vector());

//model.addRow(new java.util.Vector());

//model.addRow(new java.util.Vector());

//model.addRow(new java.util.Vector());

//model.addRow(new java.util.Vector());
VIPIN KUMAR 151 1670370140
//model.addRow(new java.util.Vector());

//model.addRow(new java.util.Vector());

//model.addRow(new java.util.Vector());

//model.addRow(new java.util.Vector());

//model.addRow(new java.util.Vector());

table=new JTable(model);

table.setPreferredScrollableViewportSize(new
Dimension(400,150));

private void initLabel()

l1=new JLabel("TABLE NAME");

private void initTextBox()

txt1=new JTextField(10);

private void initButton()

cmd1=new JButton("GENERATE");

cmd2=new JButton("ADD ROW");


VIPIN KUMAR 152 1670370140
cmd2.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

model.addRow(new java.util.Vector());

String
a[]={"INTEGER","VARCHAR","DOUBLE","VARCHAR2","NUMBER","
TEXT","DATE/TIME"};

table.getColumnModel().getColumn(1).setCellEditor(new
DefaultCellEditor(new JComboBox(a)));

});

cmd3=new JButton("REMOVE ROW");

cmd3.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

VIPIN KUMAR 153 1670370140


int row=table.getSelectedRow();

model.removeRow(row);

});

cmd1.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

initQuery();

});

private void initPanel()

this.initButton();

this.initTabel();

this.initTextBox();

this.initLabel();

p1=new JPanel(new GridLayout(1,2,5,5));

VIPIN KUMAR 154 1670370140


p1.setBorder(BorderFactory.createTitledBorder("create
table"));

p1.add(l1);

p1.add(txt1);

this.getContentPane().add(p1,BorderLayout.NORTH);

p2=new JPanel(new GridLayout(1,0,5,5));

p2.setBorder(BorderFactory.createTitledBorder("table"))
;

p2.add(new JScrollPane(table));

this.getContentPane().add(p2,BorderLayout.CENTER);

p3=new JPanel(new GridLayout(1,3,5,5));

p3.setBorder(BorderFactory.createTitledBorder(""));

p3.add(cmd2);

p3.add(cmd3);

p3.add(cmd1);

this.getContentPane().add(p3,BorderLayout.SOUTH);

}
VIPIN KUMAR 155 1670370140
public void initQuery()

try

String str4="";

if(table.getRowCount()>0&&txt1.getText().length()>0)

String str2="";

for(int
i=0;i<table.getRowCount();i++)

String
field=table.getValueAt(i,0).toString();

String
type=table.getValueAt(i,1).toString();

String
size=table.getValueAt(i,2).toString();

VIPIN KUMAR 156 1670370140


String
constraint=table.getValueAt(i,3).toString();

String str=field+"
"+type+"("+size+") "+constraint;

str2=str2+str+" , ";

str="";

for(int i=0;i<=str2.length()-3;i+
+)

str4=str4+str2.charAt(i);

String str1="CREATE TABLE "+


txt1.getText().toString()+"("+str4+")";

JOptionPane.showMessageDialog(null,str1);

PreparedStatement
ps=cn.prepareStatement(str1);

int a=ps.executeUpdate();

else

{
VIPIN KUMAR 157 1670370140
JOptionPane.showMessageDialog(null,"DATA NOT
ENTERED");

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

public CreateTable(Connection con)

cn=con;

this.initPanel();

this.setTitle("CREATE TABLE");

this.setVisible(true);

//this.setLocation(300,300);

Helper.setPosition(this);

VIPIN KUMAR 158 1670370140


this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

ALTER TABLE

package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import javax.swing.table.*;

import java.sql.*;

import java.sql.Connection;

import javax.swing.table.DefaultTableModel;

import javax.swing.tree.*;

VIPIN KUMAR 159 1670370140


import java.util.Vector;

import java.sql.PreparedStatement;

public class AlterTable extends JFrame

private int previousRowCount;

private Connection cn;

private String tablename;

private DefaultTableModel model;

private JLabel l1,l2;

private JTextField txt1;

private JButton cmd1,cmd2,cmd3,cmd4;

private DataComboBox cbo;

private DataTable table;

private void initLabel()

l1=new JLabel(" TABLE NAME");

l2=new JLabel(" TABLE NAME");

private void initComboBox()

cbo=new DataComboBox();
VIPIN KUMAR 160 1670370140
cbo.setData(cn," Show Tables ",true);

cbo.setSelectedItem(this.tablename);

private void initTable()

table=new DataTable();

JPanel p2=new JPanel(new GridLayout(1,1,5,5));

p2.setBorder(BorderFactory.createTitledBorder("Result
Set"));

p2.add(new JScrollPane(table));

this.getContentPane().add(p2,BorderLayout.CENTER);

private void initCmdButton()

cmd1=new JButton("ADD ROW");

cmd1.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

VIPIN KUMAR 161 1670370140


table.getDataTableModel().addRow(new
Vector());

});

cmd2=new JButton("ADD");

cmd3=new JButton("REMOVE ROW");

cmd3.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent ae)

int row=table.getSelectedRow();

table.getDataTableModel().removeRow(row);

});

cmd4=new JButton("Discard");

cmd4.addActionListener(new ActionListener()
VIPIN KUMAR 162 1670370140
{

public void actionPerformed(ActionEvent


ae)

AlterTable.this.setVisible(false);

});

cmd2.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

String str="";

try

int i=0;

String sql="ALTER TABLE


"+tablename+" ";

for(i=previousRowCount;i<table.getRowCount()-1;i++)

VIPIN KUMAR 163 1670370140


String
a1=table.getValueAt(i,0).toString();

String
a2=table.getValueAt(i,1).toString();

//String
a3=table.getValueAt(i,2).toString();

String
a4=table.getValueAt(i,3).toString();

sql+="ADD COLUMN"+" "+a1+"


"+a2+" "+a4+",";

String
a1=table.getValueAt(i,0).toString();

String
a2=table.getValueAt(i,1).toString();

//String
a3=table.getValueAt(i,2).toString();

String
a4=table.getValueAt(i,3).toString();

sql+="ADD COLUMN"+" "+a1+" "+a2+"


"+a4;

JOptionPane.showMessageDialog(AlterTable.this,sql);

PreparedStatement
ps=cn.prepareStatement(sql);
VIPIN KUMAR 164 1670370140
int a=ps.executeUpdate();

catch(Exception e)

JOptionPane.showMessageDialog(AlterTable.this,e.getMess
age());

});

private void initTextBox()

txt1=new JTextField(10);

txt1.setText(this.tablename);

private void initComponent()

this.initLabel();

this.initCmdButton();
VIPIN KUMAR 165 1670370140
this.initTextBox();

this.initComboBox();

this.initTable();

JPanel p1=new JPanel(new GridLayout(1,4,5,5));

p1.setBorder(BorderFactory.createTitledBorder(""));

p1.add(l1);

p1.add(txt1);

p1.add(l2);

p1.add(cbo);

this.getContentPane().add(p1,BorderLayout.NORTH);

JPanel p3=new JPanel(new GridLayout(1,3,5,5));

//p3.setBorder(BorderFactory.createTitledBorder
(""));

p3.add(cmd1);

p3.add(cmd2);

p3.add(cmd3);

JPanel p4=new JPanel(new GridLayout(1,1,5,5));

//p4.setBorder(BorderFactory.createTitledBorder
(""));

p4.add(cmd4);

JPanel p0=new JPanel(new GridLayout(2,1,5,5));

VIPIN KUMAR 166 1670370140


p0.setBorder(BorderFactory.createTitledBorder(""));

p0.add(p3);

p0.add(p4);

this.getContentPane().add(p0,BorderLayout.SOUTH);

public AlterTable(Connection con,String str)

cn=con;

this.tablename=str;

this.initComponent();

this.setTitle("ALTER TABLE");

this.setVisible(true);

//this.setLocation(300,300);

this.setSize(300,300);

Helper.setPosition(this);

this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

structure();

VIPIN KUMAR 167 1670370140


}

private void structure()

try

table.clearTable();

Vector v1=new Vector();

PreparedStatement
ps=cn.prepareStatement("DESC "+tablename);

ResultSet rs=ps.executeQuery();

while(rs.next())

Vector v2=new Vector();

for(int
i=1;i<=rs.getMetaData().getColumnCount();i++)

v2.add(rs.getString(i));

v1.add(v2);

Vector v3=new Vector();

VIPIN KUMAR 168 1670370140


for(int
i=1;i<=rs.getMetaData().getColumnCount();i++)

v3.add(rs.getMetaData().getColumnLabel(i));

table.getDataTableModel().setDataVector(v1,v3);

table.updateUI();

previousRowCount=table.getRowCount();

catch(Exception e)

JOptionPane.showMessageDialog(null,e.toString());

CREATE DATABASE
VIPIN KUMAR 169 1670370140
package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import javax.swing.table.*;

import java.sql.*;

import java.sql.Connection;

public class CreateDatabase extends JFrame

private Connection cn;

private JLabel l1,l2;

private JTextField txt1;

private JButton cmd1,cmd2;

private void initQuery()

try

String str1="CREATE DATABASE "+ txt1.getText();

JOptionPane.showMessageDialog(null,str1);

PreparedStatement ps=cn.prepareStatement(str1);

int a=ps.executeUpdate();

}
VIPIN KUMAR 170 1670370140
catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

private void initComponent()

l1=new JLabel("Please Enter a Name For THe New


Schema ");

l2=new JLabel("Enter New Schema");

txt1=new JTextField(10);

cmd1=new JButton("O.K");

cmd1.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

initQuery();

});

VIPIN KUMAR 171 1670370140


cmd2=new JButton("Discard");

cmd2.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

CreateDatabase.this.setVisible(false);

});

JPanel p1=new JPanel(new GridLayout(1,1));

p1.setBorder(BorderFactory.createTitledBorder(""));

p1.add(l1);

this.getContentPane().add(p1,BorderLayout.NORTH);

JPanel p2=new JPanel(new GridLayout(2,2,5,5));

p2.setBorder(BorderFactory.createTitledBorder(""));

p2.add(l2);

p2.add(txt1);

VIPIN KUMAR 172 1670370140


p2.add(cmd1);

p2.add(cmd2);

this.getContentPane().add(p2,BorderLayout.SOUTH);

public CreateDatabase(Connection con)

cn=con;

this.initComponent();

this.setTitle("Create Database");

this.setVisible(true);

this.setLocation(300,300);

Helper.setPosition(this);

this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

CREATE USER
package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

VIPIN KUMAR 173 1670370140


import javax.swing.tree.*;

import java.sql.*;

import javax.swing.table.DefaultTableModel;

import java.util.Vector;

import java.sql.Connection;

import java.sql.PreparedStatement;

public class CreateUser extends JFrame

private Connection cn;

private JLabel l1,l2,l3;

private JButton cmd1;

private JTextField txt1;

private JPasswordField jpf;

private DataComboBox cbo;

private void initComboBox()

cbo=new DataComboBox();

try

ResultSet rs=cn.prepareStatement("Show
databases").executeQuery();
VIPIN KUMAR 174 1670370140
while(rs.next())

cbo.addItem(rs.getString(1));

catch(Exception e){}

private void initComponent()

this.initComboBox();

this.cmdButton();

l1=new JLabel("DATABASE ");

l2=new JLabel("User Name");

l3=new JLabel("Password");

txt1=new JTextField(10);

jpf=new JPasswordField(10);

JPanel p1=new JPanel(new GridLayout(3,2,5,5));

p1.setBorder(BorderFactory.createTitledBorder(""));
VIPIN KUMAR 175 1670370140
p1.add(l1);

p1.add(cbo);

p1.add(l2);

p1.add(txt1);

p1.add(l3);

p1.add(jpf);

JPanel p2=new JPanel();

p1.setBorder(BorderFactory.createTitledBorder(""));

p2.add(cmd1);

this.getContentPane().add(p1,BorderLayout.NORTH);

this.getContentPane().add(p2,BorderLayout.SOUTH);

private void cmdButton()

cmd1=new JButton("Create user");

cmd1.addActionListener(new ActionListener()

{
VIPIN KUMAR 176 1670370140
public void actionPerformed(ActionEvent
ae)

try

String sql = " GRANT ALL PRIVILEGES ON


"+cbo.getSelectedItem().toString()+".*"+" TO
"+txt1.getText()+"@localhost IDENTIFIED
BY \""+jpf.getText()+"\"";

//String sql = " CREATE USER


"+txt1.getText()+"@localhost IDENTIFIED
BY \""+jpf.getText()+"\"";

PreparedStatement
ps=cn.prepareStatement(sql);

int a=ps.executeUpdate();

JOptionPane.showMessageDialog(null,sql);

JOptionPane.showMessageDialog(null,"
USER SUCCESSFULLY CREATED");

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

VIPIN KUMAR 177 1670370140


}

})

public CreateUser(Connection con)

cn=con;

this.initComponent();

this.setTitle("Create User");

this.setSize(200,200);

this.setVisible(true);

Helper.setPosition(this);

this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

VIPIN KUMAR 178 1670370140


CREATE VIEW

package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import javax.swing.tree.*;

import java.sql.*;

import javax.swing.table.DefaultTableModel;

import java.util.Vector;

import java.sql.Connection;

import java.sql.PreparedStatement;

public class CreateView extends JFrame

private Connection cn;

private JLabel l1;

private JButton cmd1,cmd2;

private JTextField txt1;

private String tablename;

private void cmdButton()

VIPIN KUMAR 179 1670370140


cmd1=new JButton("Create View");

cmd1.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

try

String sql=" CREATE VIEW


"+txt1.getText().toString()+" AS "+"SELECT * FROM
"+tablename;

PreparedStatement
ps=cn.prepareStatement(sql);

ps.executeUpdate();

JOptionPane.showMessageDialog(null,sql);

JOptionPane.showMessageDialog(null,"
VIEW SUCCESSFULLY CREATED ");

catch(Exception e)

VIPIN KUMAR 180 1670370140


JOptionPane.showMessageDialog(CreateView.this,e.getMess
age());

});

cmd2=new JButton(" cancel");

cmd2.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

CreateView.this.setVisible(false);

});

private void initComponent()

txt1=new JTextField(10);
VIPIN KUMAR 181 1670370140
this.cmdButton();

l1=new JLabel("ENTER THE VIEW U YOU WANT TO


CREATE ");

JPanel p1=new JPanel(new GridLayout(1,2,5,5));

p1.setBorder(BorderFactory.createTitledBorder(""));

p1.add(l1);

p1.add(txt1);

JPanel p2=new JPanel(new GridLayout(1,2,5,5));

p1.setBorder(BorderFactory.createTitledBorder(""));

p2.add(cmd1);

p2.add(cmd2);

this.getContentPane().add(p1,BorderLayout.NORTH);

this.getContentPane().add(p2,BorderLayout.SOUTH);

public CreateView(Connection con,String str)

cn=con;

VIPIN KUMAR 182 1670370140


this.tablename=str;

this.initComponent();

this.setTitle("Create User");

this.setSize(200,200);

this.setVisible(true);

Helper.setPosition(this);

this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

Drop view
VIPIN KUMAR 183 1670370140
package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import javax.swing.tree.*;

import java.sql.*;

import javax.swing.table.DefaultTableModel;

import java.util.Vector;

import java.sql.Connection;

import java.sql.PreparedStatement;

public class DropView extends JFrame

private Connection cn;

private JLabel l1;

private JButton cmd1,cmd2;

private JTextField txt1;

private String tablename;

private void cmdButton()

cmd1=new JButton("Drop View");

cmd1.addActionListener(new ActionListener()
VIPIN KUMAR 184 1670370140
{

public void actionPerformed(ActionEvent


ae)

try

String sql=" DROP VIEW


"+txt1.getText().toString();

PreparedStatement
ps=cn.prepareStatement(sql);

ps.executeUpdate();

JOptionPane.showMessageDialog(null,sql);

JOptionPane.showMessageDialog(null,"
View Dropped Succesfully");

catch(Exception e)

JOptionPane.showMessageDialog(DropView.this,e.getMessag
e());

}
VIPIN KUMAR 185 1670370140
});

cmd2=new JButton(" cancel");

cmd2.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

DropView.this.setVisible(false);

});

private void initComponent()

txt1=new JTextField(10);

this.cmdButton();

l1=new JLabel("ENTER THE VIEW U YOU WANT TO


DELETE ");

VIPIN KUMAR 186 1670370140


JPanel p1=new JPanel(new GridLayout(1,2,5,5));

p1.setBorder(BorderFactory.createTitledBorder(""));

p1.add(l1);

p1.add(txt1);

JPanel p2=new JPanel(new GridLayout(1,2,5,5));

p1.setBorder(BorderFactory.createTitledBorder(""));

p2.add(cmd1);

p2.add(cmd2);

this.getContentPane().add(p1,BorderLayout.NORTH);

this.getContentPane().add(p2,BorderLayout.SOUTH);

public DropView(Connection con,String str)

cn=con;

this.tablename=str;

this.initComponent();

this.setTitle("DROP USER");

this.setSize(200,200);

VIPIN KUMAR 187 1670370140


this.setVisible(true);

Helper.setPosition(this);

this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

RENAME TABLE

package com.db;

import java.awt.*;
VIPIN KUMAR 188 1670370140
import java.awt.event.*;

import javax.swing.*;

import javax.swing.table.*;

import java.sql.*;

public class RenameTable extends JFrame

private Connection cn;

private JLabel l1,l2;

private JTextField txt1;

private JButton cmd1,cmd2;

private DataComboBox cbo;

private void initLabel()

l1=new JLabel(" OLD TABLE NAME");

l2=new JLabel(" NEW TABLE NAME");

private void initTextBox()

txt1=new JTextField(10);

private void initComboBox()


VIPIN KUMAR 189 1670370140
{

cbo=new DataComboBox();

cbo.setData(cn,"Show Tables",true);

private void initCmdButton()

cmd1=new JButton("Rename");

cmd1.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent ae)

initQuery();

});

cmd2=new JButton("Cancel");

cmd2.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

clear();
VIPIN KUMAR 190 1670370140
}

});

private void initQuery()

try

String str1="ALTER TABLE "+


cbo.getBackValue()+" RENAME TO
"+txt1.getText().toString();

PreparedStatement
ps=cn.prepareStatement(str1);

ps.executeUpdate();

JOptionPane.showMessageDialog(null,"Successfully
Renamed");

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());
VIPIN KUMAR 191 1670370140
}

private void clear()

txt1.setText("");

private void initComponent()

this.initLabel();

this.initCmdButton();

this.initTextBox();

this.initComboBox();

JPanel p1=new JPanel(new GridLayout(2,2,5,5));

p1.setBorder(BorderFactory.createTitledBorder(""));

p1.add(l1);

p1.add(cbo);

p1.add(l2);

p1.add(txt1);
VIPIN KUMAR 192 1670370140
JPanel p2=new JPanel(new GridLayout(1,2,5,5));

p2.setBorder(BorderFactory.createTitledBorder(""));

p2.add(cmd1);

p2.add(cmd2);

this.getContentPane().add(p1,BorderLayout.NORTH);

this.getContentPane().add(p2,BorderLayout.SOUTH);

public RenameTable(Connection con)

cn=con;

this.initComponent();

this.setTitle("Rename Table");

this.setVisible(true);

//this.setLocation(300,300);

this.setSize(300,300);

Helper.setPosition(this);

this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

VIPIN KUMAR 193 1670370140


}

MySQL QUERY BROWSER FORM

package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import javax.swing.tree.*;

import java.sql.*;

import javax.swing.table.DefaultTableModel;

VIPIN KUMAR 194 1670370140


import java.util.Vector;

import java.sql.Connection;

import java.sql.PreparedStatement;

public class MySqlQueryBrowser extends JFrame

protected Connection cn;

private JButton
cmd1,cmd2,cmd3,cmd4,cmd5,cmd6,cmd7,b1;

private JTextArea txtr1;

private JToolBar tlb;

private JLabel l1;

private JTree tree1,tree2;

private DefaultMutableTreeNode root1,root2;

private JTabbedPane tab1;

private JPopupMenu Pmenu;

private JMenuItem menuItem;

private JMenuBar bar ;

private JMenu
Table,Advanced,Edit,View,Administrator;

private JMenuItem
table1,table2,table3,table4,table5;

private JMenuItem adv1,adv2,adv3;

private JMenuItem edit1,edit2;


VIPIN KUMAR 195 1670370140
private JMenuItem view1,view2;

private JMenuItem admin1,admin2;

private DataTable table;

public void MenuContainer()

table1=new JMenuItem("Open Table");

table1.addActionListener(new ActionListener()

public void
actionPerformed(ActionEvent ae)

String
name=tree1.getLastSelectedPathComponent().toString();

TreeNode
node=(TreeNode)tree1.getLastSelectedPathComponent();

if(!node.isLeaf())

JOptionPane.showMessageDialog(null,name);

VIPIN KUMAR 196 1670370140


table.setData(cn," SELECT *
FROM "+name);

});

table2=new JMenuItem("Rename Table");

table2.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

RenameTable r=new RenameTable(cn);

r.pack();

});

table3=new JMenuItem("Create Table");

table3.addActionListener(new
ActionListener()

VIPIN KUMAR 197 1670370140


{

public void
actionPerformed(ActionEvent ae)

CreateTable c=new CreateTable(cn);

c.pack();

});

table4 =new JMenuItem("Drop Table");

table4.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

droptable();

setTree();

});
VIPIN KUMAR 198 1670370140
table5=new JMenuItem("Create using Another
Table");

table5.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

CreateTable c=new CreateTable(cn);

c.pack();

});

adv1=new JMenuItem("Data Structure");

adv1.addActionListener(new ActionListener()

public void
actionPerformed(ActionEvent ae)

VIPIN KUMAR 199 1670370140


try

String
name=tree1.getLastSelectedPathComponent().toString().tr
im();

TreeNode
node=(TreeNode)tree1.getLastSelectedPathComponent();

if(!node.isLeaf())

table.clearTable();

Vector v1=new
Vector();

PreparedStatement
ps=cn.prepareStatement("DESC "+name);

ResultSet
rs=ps.executeQuery();

while(rs.next())

Vector v2=new
Vector();

for(int
i=1;i<=rs.getMetaData().getColumnCount();i++)

VIPIN KUMAR 200 1670370140


v2.add(rs.getString(i));

v1.add(v2);

Vector v3=new
Vector();

for(int
i=1;i<=rs.getMetaData().getColumnCount();i++)

v3.add(rs.getMetaData().getColumnLabel(i));

table.getDataTableModel().setDataVector(v1,v3);

table.updateUI();

catch(Exception e)

VIPIN KUMAR 201 1670370140


JOptionPane.showMessageDialog(null,e.toString());

});

adv2=new JMenuItem("Sorting");

adv2.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

String
name=tree1.getLastSelectedPathComponent().toString();

TreeNode
node=(TreeNode)tree1.getLastSelectedPathComponent();

if(node.isLeaf())

VIPIN KUMAR 202 1670370140


JOptionPane.showMessageDialog(null,name+node.getParent(
).toString());

table.setData(cn," SELECT *
FROM "+node.getParent().toString()+" ORDER BY "+name);

});

adv3=new JMenuItem("Print");

adv3.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

if(table.getRowCount()>0)

Helper.printTable(table);

});

VIPIN KUMAR 203 1670370140


edit1=new JMenuItem("Insert Record");

edit1.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

initInsertValues();

});

edit2=new JMenuItem("Delete Record");

edit2.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

try

VIPIN KUMAR 204 1670370140


{

TreeNode
node=(TreeNode)tree1.getLastSelectedPathComponent();

String sql="DELETE FROM


"+node.getParent().toString()+" WHERE
"+node+"="+JOptionPane.showInputDialog("Enter Value For
: "+node);

JOptionPane.showMessageDialog(null,sql);

PreparedStatement
ps=cn.prepareStatement(sql);

int a=ps.executeUpdate();

if(a>0)

table.setData(cn,"Select *
from "+node.getParent().toString());

catch(Exception e){}

});

VIPIN KUMAR 205 1670370140


view1=new JMenuItem("Create View");

view1.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

String
name=tree1.getLastSelectedPathComponent().toString().tr
im();

CreateView e=new
CreateView(cn,name);

e.pack();

});

view2=new JMenuItem("Drop View");

view2.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

VIPIN KUMAR 206 1670370140


{

String
name=tree1.getLastSelectedPathComponent().toString().tr
im();

DropView d=new DropView(cn,name);

d.pack();

});

admin1=new JMenuItem("Create User");

admin1.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

CreateUser c=new CreateUser(cn);

c.pack();

});

admin2=new JMenuItem("Drop User");

VIPIN KUMAR 207 1670370140


admin2.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

String
name=tree1.getLastSelectedPathComponent().toString().tr
im();

DropUser e=new DropUser(cn,name);

e.pack();

});

Table=new JMenu("Table");

Advanced=new JMenu("Advanced");

Edit=new JMenu("Edit");

View=new JMenu("View");

Administrator=new
JMenu("Administrator");

VIPIN KUMAR 208 1670370140


Table.add(table1);

Table.add(table2);

Table.add(table3);

Table.add(table4);

Table.add(table5);

Advanced.add(adv1);

Advanced.add(adv2);

Advanced.add(adv3);

Edit.add(edit1);

Edit.add(edit2);

View.add(view1);

View.add(view2);

Administrator.add(admin1);

Administrator.add(admin2);

bar=new JMenuBar();

bar.add(Table);

bar.add(Advanced);

bar.add(Edit);

bar.add(View);

bar.add(Administrator);
VIPIN KUMAR 209 1670370140
this.setJMenuBar(bar);

private void PopUpMenu()

Pmenu = new JPopupMenu();

menuItem = new JMenuItem("Create new Table");

Pmenu.add(menuItem);

menuItem.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent e)

CreateTable c=new CreateTable(cn);

c.pack();

setTree();

});

menuItem = new JMenuItem("Insert Row");

Pmenu.add(menuItem);

menuItem.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent ae)


VIPIN KUMAR 210 1670370140
{

String
name=tree1.getLastSelectedPathComponent().toString();

Helper.insertRow(cn,table,name);

});

menuItem = new JMenuItem("Alter Table");

Pmenu.add(menuItem);

menuItem.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent e)

String
name=tree1.getLastSelectedPathComponent().toString().tr
im();

AlterTable r=new AlterTable(cn,name);

r.pack();

});

VIPIN KUMAR 211 1670370140


menuItem = new JMenuItem("Rename Table");

Pmenu.add(menuItem);

menuItem.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent e)

RenameTable r=new RenameTable(cn);

r.pack();

});

menuItem = new JMenuItem("Drop Table");

Pmenu.add(menuItem);

menuItem.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent e)

droptable();

setTree();

});
VIPIN KUMAR 212 1670370140
menuItem = new JMenuItem("Create New Schema");

Pmenu.add(menuItem);

menuItem.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent ae)

CreateDatabase c=new CreateDatabase(cn);

c.pack();

setTree();

});

menuItem = new JMenuItem("Refresh");

Pmenu.add(menuItem);

menuItem.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent e)

txtr1.setText("");

setTree();

});
VIPIN KUMAR 213 1670370140
}

private void initLabel()

l1=new JLabel(new
ImageIcon("images/mysql1.jpg"));

private void initToolbar()

tlb=new JToolBar();

this.initLabel();

txtr1=new JTextArea();

cmd1=new JButton(new
ImageIcon("images/goback.jpg"));

cmd1.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

QueryBrowserForm q=new
QueryBrowserForm();

q.pack();

VIPIN KUMAR 214 1670370140


MySqlQueryBrowser.this.setVisible(false);

});

cmd3=new JButton(new
ImageIcon("images/refresh1.jpg"));

cmd3.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

txtr1.setText("");

setTree();

});

cmd4=new JButton(new
ImageIcon("images/execute.jpg"));

cmd4.addActionListener(new ActionListener()

VIPIN KUMAR 215 1670370140


public void actionPerformed(ActionEvent
ae)

try

if(txtr1.getText().length()>0)

String
sql=txtr1.getText().toUpperCase();

if(sql.startsWith("SELECT") ||
sql.startsWith("DESC") || sql.startsWith("SHOW"))

table.setData(cn,sql);

else

PreparedStatement
ps=cn.prepareStatement(sql);

int a=ps.executeUpdate();

catch(Exception e)

VIPIN KUMAR 216 1670370140


JOptionPane.showMessageDialog(null,e.getMessage());

});

cmd5=new JButton(new
ImageIcon("images/Stop.jpg"));

cmd5=new JButton(new
ImageIcon("images/refresh1.jpg"));

cmd5.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

MySqlQueryBrowser.this.setVisible(false);

});

tlb.add(cmd1);
VIPIN KUMAR 217 1670370140
tlb.add(cmd3);

tlb.add(txtr1);

tlb.add(cmd4);

tlb.add(cmd5);

tlb.add(l1);

this.getContentPane().add(tlb,BorderLayout.NORTH);

private void initTree()

try

root1=new
DefaultMutableTreeNode("---------------"+cn.getCatalog(
)+"--------------");

this.setTree();

root2=new
DefaultMutableTreeNode("History");

catch(Exception e){}

VIPIN KUMAR 218 1670370140


tree1=new JTree(root1);

tree1.addMouseListener(new MouseAdapter()

public void mouseReleased(MouseEvent me)

if(me.isPopupTrigger())

Pmenu.show(me.getComponent(),me.getX(),me.getY());

});

tree2=new JTree(root2);

tab1=new JTabbedPane();

tab1.add("Schemata",new JScrollPane(tree1));

tab1.add("History",new JScrollPane(tree2));

JPanel p1 =new JPanel(new GridLayout(1,1));

p1.add(tab1);

VIPIN KUMAR 219 1670370140


this.getContentPane().add(p1,BorderLayout.EAST);

private void initTable()

table=new DataTable();

JPanel p1=new JPanel(new GridLayout(1,1,5,5));

p1.setBorder(BorderFactory.createTitledBorder("Result
Set"));

p1.add(new JScrollPane(table));

this.getContentPane().add(p1,BorderLayout.CENTER);

private void droptable()

try

String
name=tree1.getLastSelectedPathComponent().toString();

VIPIN KUMAR 220 1670370140


TreeNode
node=(TreeNode)tree1.getLastSelectedPathComponent();

if(!node.isLeaf())

if(table.getRowCount()==0)

JOptionPane.showMessageDialog(null,name);

String sql=" DROP TABLE


"+name;

PreparedStatement ps=
cn.prepareStatement(sql);

int a=ps.executeUpdate();

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

private void initcomponents()

{
VIPIN KUMAR 221 1670370140
this.MenuContainer();

this.initTree();

PopUpMenu();

this.initTable();

cmd6=new JButton("APPLY INSERT");

cmd6.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

initInsertValues();

});

cmd7=new JButton("APPLY DELETE");

cmd7.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

try

VIPIN KUMAR 222 1670370140


{

TreeNode
node=(TreeNode)tree1.getLastSelectedPathComponent();

String sql="DELETE FROM


"+node.getParent().toString()+" WHERE
"+node+"="+JOptionPane.showInputDialog("Enter Value For
: "+node);

JOptionPane.showMessageDialog(null,sql);

PreparedStatement
ps=cn.prepareStatement(sql);

int a=ps.executeUpdate();

if(a>0)

table.setData(cn,"Select *
from "+node.getParent().toString());

catch(Exception e){}

});
VIPIN KUMAR 223 1670370140
JPanel p2=new JPanel(new GridLayout(1,2,5,5));

p2.setBorder(BorderFactory.createTitledBorder(""));

p2.add(cmd6);

p2.add(cmd7);

this.getContentPane().add(p2,BorderLayout.SOUTH);

public MySqlQueryBrowser(Connection con)

cn=con;

this.initToolbar();

this.initcomponents();

this.setTitle("MY SQL BROWSER.....");

this.setVisible(true);

this.setSize(Toolkit.getDefaultToolkit().getScreenSize(
));

this.setResizable(false);

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

private void setTree()


VIPIN KUMAR 224 1670370140
{

root1.removeAllChildren();

java.util.Iterator
itr=Helper.getTables(cn);

while(itr.hasNext())

String n=(String)itr.next();

DefaultMutableTreeNode temp=new
DefaultMutableTreeNode(n);

setFields(temp,n);

root1.add(temp);

tree1.updateUI();

private void initInsertValues()

try

Vector v=new Vector();

String
name=tree1.getLastSelectedPathComponent().toString();

int count=table.getColumnCount();
VIPIN KUMAR 225 1670370140
String str="INSERT INTO "+name+ " VALUES
(";

for(int i=0;i<table.getColumnCount()-1;i+
+)

str+="?,";

v.addElement(table.getValueAt(table.getSelectedRow(),i)
.toString());

str+="?)";

v.addElement(table.getValueAt(table.getSelectedRow(),co
unt-1).toString());

JOptionPane.showMessageDialog(null,str);

PreparedStatement
ps=cn.prepareStatement(str);

for(int k=1;k<=count;k++)

ps.setString(k,(String)v.get(k-1));

int a=ps.executeUpdate();
VIPIN KUMAR 226 1670370140
}

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

private void setFields(DefaultMutableTreeNode


parent,String tableName)

try{

PreparedStatement ps=cn.prepareStatement("DESC "+tableName);

ResultSet rs=ps.executeQuery();

while(rs.next())

parent.add(new
DefaultMutableTreeNode(rs.getString(1)));

catch(Exception e){}

}}

VIPIN KUMAR 227 1670370140


ORACLE BROWSER FORM

package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import java.sql.Connection;

public class OracleBrowserForm extends JFrame

private JLabel l1,l3,l4,l5,l6,l7;

private JTextField txt1,txt2,txt3,txt4;

private JButton cmd1,cmd2,cmd3,cmd4;

private JPasswordField jpf;

private void cmdbutton()

cmd1=new JButton("Details >>");

cmd2=new JButton("O.K");

this.getRootPane().setDefaultButton(cmd2);
VIPIN KUMAR 228 1670370140
cmd2.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

Oracle p=new Oracle();

try

p.setIP(txt1.getText());

p.setPort(txt2.getText());

p.setSid(txt3.getText());

p.setUser(txt4.getText());

p.setPassword(jpf.getText());

Connection
cn=p.getOracleConnection();

if(!cn.isClosed())

OracleQuerybrowserForm
f=new OracleQuerybrowserForm(cn);

OracleBrowserForm.this.setVisible(false);

VIPIN KUMAR 229 1670370140


else

JOptionPane.showMessageDialog(null,"Login
Failed...Retry\n\n"+p.ERROR);

catch(Exception e)

JOptionPane.showMessageDialog(null,"Login
Failed...Retry\n\n"+p.ERROR);

});

cmd3=new JButton("Clear");

cmd3.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

VIPIN KUMAR 230 1670370140


clear();

});

cmd4=new JButton("Cancel");

cmd4.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

OracleBrowserForm.this.setVisible(false);

});

private void initLabel()

l1=new JLabel(new
ImageIcon("images/Oracle.jpg"));

VIPIN KUMAR 231 1670370140


l3=new JLabel("Server Host");

l4=new JLabel("Port");

l5=new JLabel("S.ID NO.");

l6=new JLabel("Username");

l7=new JLabel("Password");

private void textfield()

txt1=new JTextField(10);

txt1.setText("127.0.0.1");

txt2=new JTextField(2);

txt2.setText("1521");

txt3=new JTextField(10);

txt3.setText("xe");

txt4=new JTextField(10);

private void clear()

txt1.setText("");
VIPIN KUMAR 232 1670370140
txt2.setText("");

txt3.setText("");

txt4.setText("");

jpf.setText("");

private void initComponents()

this.initLabel();

this.textfield();

this.cmdbutton();

JPanel p1=new JPanel();

p1.setBorder(BorderFactory.createTitledBorder(""));

p1.add(l1);

JPanel p2=new JPanel(new


GridLayout(6,2,5,5));

VIPIN KUMAR 233 1670370140


p2.setBorder(BorderFactory.createTitledBorder("Connect
to Oracle server Instance"));

p2.add(l3);

p2.add(txt1);

p2.add(l4);

p2.add(txt2);

p2.add(l5);

p2.add(txt3);

p2.add(l6);

p2.add(txt4);

p2.add(l7);

jpf=new JPasswordField(10);

p2.add(jpf);

JPanel p3= new JPanel(new


GridLayout(1,4,5,5));

p3.setBorder(BorderFactory.createTitledBorder(""));

p3.add(cmd1);

VIPIN KUMAR 234 1670370140


p3.add(cmd2);

p3.add(cmd3);

p3.add(cmd4);

this.getContentPane().add(p1,BorderLayout.NORTH);

this.getContentPane().add(p2,BorderLayout.CENTER);

this.getContentPane().add(p3,BorderLayout.SOUTH);

public OracleBrowserForm()

this.initComponents();

this.setTitle("Oracle Query Browser");

this.setSize(450,450);

this.setLocation(300,300);

this.setVisible(true);

this.setResizable(false);

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

VIPIN KUMAR 235 1670370140


}

VIPIN KUMAR 236 1670370140


ORACLE

package com.db;

import java.sql.Connection;

import java.sql.DriverManager;

public class Oracle

public String ERROR;

private String ip;

private String port;

private String sid;

private String user;

private String password;

private String url;

private void makeUrl()

this.url="jdbc:oracle:thin:@"+this.ip+":"+this.port+":"
+this.sid;

public Oracle()
VIPIN KUMAR 237 1670370140
{

this.ip="127.0.0.1";

this.port="1521";

this.sid="xe";

this.user="system";

this.password="";

this.makeUrl();

public Oracle(String ip)

this.ip=ip;

this.port="1521";

this.sid="xe";

this.user="sytem";

this.password="";

this.makeUrl();

public Oracle(String ip,String port)

this.ip=ip;

this.port=port;

this.sid="xe";

this.user="system";
VIPIN KUMAR 238 1670370140
this.password="";

this.makeUrl();

public Oracle(String ip,String port,String


database)

this.ip=ip;

this.port=port;

this.sid="xe";

this.user="Oracle";

this.password="";

this.makeUrl();

public Oracle(String ip,String port,String


database,String user)

this.ip=ip;

this.port=port;

this.sid="xe";

this.user=user;

this.password="";

this.makeUrl();

VIPIN KUMAR 239 1670370140


public Oracle(String ip,String port,String
database,String user,String password)

this.ip=ip;

this.port=port;

this.sid=sid;

this.user=user;

this.password=password;

this.makeUrl();

public Connection getOracleConnection()

Connection cn=null;

try

Class.forName("oracle.jdbc.OracleDriver");

cn=DriverManager.getConnection(this.url,this.user,this.
password);

catch(Exception e)

this.ERROR=e.getMessage();
VIPIN KUMAR 240 1670370140
}

return cn;

public Connection getOracleConnection(boolean


commitMode)

Connection cn=null;

try

Class.forName
("oracle.jdbc.driver.OracleDriver");

cn=DriverManager.getConnection(this.url,this.user,this.
password);

if(!cn.isClosed())

cn.setAutoCommit(commitMode);

catch(Exception e)

this.ERROR=e.getMessage();

VIPIN KUMAR 241 1670370140


return cn;

public void setIP(String ip)

this.ip=ip;

this.makeUrl();

public void setPort(String port)

this.port=port;

this.makeUrl();

public void setDatabase(String database)

this.makeUrl();

public void setUser(String user)

this.user=user;

this.makeUrl();

}
VIPIN KUMAR 242 1670370140
public void setPassword(String password)

this.password=password;

public String getIP()

return this.ip;

public String getPort()

return this.port;

public String getSid()

return this.sid;

public String getUser()

return this.user;

public String getPassword()

return this.password;
VIPIN KUMAR 243 1670370140
}

public String getUrl()

return this.url;

public void setSid(String s)

this.sid=s;

RENAME ORACLE TABLE


package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import javax.swing.table.*;

import java.sql.*;

VIPIN KUMAR 244 1670370140


public class RenameOracleTable extends JFrame

private Connection cn;

private JLabel l1,l2;

private String tablename;

private JTextField txt1;

private JTextField txt2;

private JButton cmd1,cmd2;

// private DataComboBox cbo;

private void initLabel()

l1=new JLabel(" OLD TABLE NAME");

l2=new JLabel(" NEW TABLE NAME");

private void initTextBox()

txt1=new JTextField(10);

txt1.setText(this.tablename);

txt2=new JTextField(10);

private void initCmdButton()


VIPIN KUMAR 245 1670370140
{

cmd1=new JButton("Rename");

cmd1.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent ae)

initQuery();

});

cmd2=new JButton("Cancel");

cmd2.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

clear();

});

private void initQuery()

{
VIPIN KUMAR 246 1670370140
try

String str1="ALTER TABLE "+


txt1.getText().toString()+" RENAME TO
"+txt2.getText().toString();

PreparedStatement
ps=cn.prepareStatement(str1);

ps.executeUpdate();

JOptionPane.showMessageDialog(null,"Successfully
Renamed");

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

private void clear()

txt1.setText("");
VIPIN KUMAR 247 1670370140
txt2.setText("");

private void initComponent()

this.initLabel();

this.initCmdButton();

this.initTextBox();

//this.initComboBox();

JPanel p1=new JPanel(new GridLayout(2,2,5,5));

p1.setBorder(BorderFactory.createTitledBorder(""));

p1.add(l1);

p1.add(txt1);

p1.add(l2);

p1.add(txt2);

JPanel p2=new JPanel(new GridLayout(1,2,5,5));

p2.setBorder(BorderFactory.createTitledBorder(""));

p2.add(cmd1);

p2.add(cmd2);

VIPIN KUMAR 248 1670370140


this.getContentPane().add(p1,BorderLayout.NORTH);

this.getContentPane().add(p2,BorderLayout.SOUTH);

public RenameOracleTable(Connection con,String str)

cn=con;

this.tablename=str;

this.initComponent();

this.setTitle("Rename Table");

this.setVisible(true);

this.setSize(300,300);

Helper.setPosition(this);

this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

VIPIN KUMAR 249 1670370140


ORACLE QUERY BROWSER FORM

package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import javax.swing.tree.*;

import java.sql.*;

import javax.swing.table.DefaultTableModel;

import java.util.Vector;

import java.sql.Connection;

import java.sql.PreparedStatement;

public class OracleQuerybrowserForm extends JFrame

{
VIPIN KUMAR 250 1670370140
protected Connection cn;

private JButton cmd1,cmd2,cmd3,cmd4,cmd5,b1,cmd6,cmd7;

private JTextArea txtr1;

private JToolBar tlb;

private JTree tree1,tree2;

private DefaultMutableTreeNode root1,root2;

private JTabbedPane tab1;

private JPopupMenu Pmenu;

private JMenuItem menuItem;

private JMenuBar bar ;

private JMenu
Table,Advanced,Edit,View,Administrator;

private JMenuItem
table1,table2,table3,table4,table5;

private JMenuItem adv1,adv2,adv3;

private JMenuItem edit1,edit2,edit3;

private JMenuItem view1,view2;

private JMenuItem admin1,admin2;

private DataTable table;

private void PopUpMenu()

VIPIN KUMAR 251 1670370140


Pmenu = new JPopupMenu();

menuItem = new JMenuItem("Create new Table");

Pmenu.add(menuItem);

menuItem.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent e)

CreateTable c=new CreateTable(cn);

c.pack();

setTree();

});

menuItem = new JMenuItem("Insert Row");

Pmenu.add(menuItem);

menuItem.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent ae)

String
name=tree1.getLastSelectedPathComponent().toString();
VIPIN KUMAR 252 1670370140
Helper.insertRow(cn,table,name);

});

menuItem = new JMenuItem("Rename Table");

Pmenu.add(menuItem);

menuItem.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent e)

String
name=tree1.getLastSelectedPathComponent().toString().tr
im();

RenameOracleTable r=new
RenameOracleTable(cn,name);

r.pack();

});

menuItem = new JMenuItem("Drop Table");

Pmenu.add(menuItem);

menuItem.addActionListener(new ActionListener()

{
VIPIN KUMAR 253 1670370140
public void actionPerformed(ActionEvent e)

droptable();

setTree();

});

menuItem = new JMenuItem("Refresh");

Pmenu.add(menuItem);

menuItem.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent e)

setTree();

txtr1.setText("");

});

public void MenuContainer()

table1=new JMenuItem("Open Table");


VIPIN KUMAR 254 1670370140
table1.addActionListener(new ActionListener()

public void
actionPerformed(ActionEvent ae)

String
name=tree1.getLastSelectedPathComponent().toString();

TreeNode
node=(TreeNode)tree1.getLastSelectedPathComponent();

if(!node.isLeaf())

JOptionPane.showMessageDialog(null,name);

table.setData(cn," SELECT *
FROM "+name);

});

table2=new JMenuItem("Rename Table");

VIPIN KUMAR 255 1670370140


table2.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

RenameOracleTable r=new
RenameOracleTable(cn);

r.pack();

});

table3=new JMenuItem("Create Table");

table3.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

CreateTable c=new CreateTable(cn);

c.pack();

VIPIN KUMAR 256 1670370140


}

});

table4 =new JMenuItem("Drop Table");

table4.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

droptable();

setTree();

});

table5=new JMenuItem("Create using Another


Table");

table5.addActionListener(new
ActionListener()

VIPIN KUMAR 257 1670370140


public void
actionPerformed(ActionEvent ae)

CreateTable c=new
CreateTable(cn);

c.pack();

});

adv1=new JMenuItem("Print");

adv1.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

if(table.getRowCount()>0)

Helper.printTable(table);

VIPIN KUMAR 258 1670370140


}

});

edit1=new JMenuItem("Insert Record");

edit1.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

initInsertValues();

});

edit2=new JMenuItem("Delete Record");

edit2.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

try

VIPIN KUMAR 259 1670370140


{

TreeNode
node=(TreeNode)tree1.getLastSelectedPathComponent();

String sql="DELETE FROM


"+node.getParent().toString()+" WHERE
"+node+"="+JOptionPane.showInputDialog("Enter Value For
: "+node);

JOptionPane.showMessageDialog(null,sql);

PreparedStatement
ps=cn.prepareStatement(sql);

int a=ps.executeUpdate();

if(a>0)

table.setData(cn,"Select *
from "+node.getParent().toString());

catch(Exception e){}

});

VIPIN KUMAR 260 1670370140


view1=new JMenuItem("Create View");

view1.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

String
name=tree1.getLastSelectedPathComponent().toString().tr
im();

CreateView e=new
CreateView(cn,name);

e.pack();

});

view2=new JMenuItem("Drop View");

view2.addActionListener(new
ActionListener()

VIPIN KUMAR 261 1670370140


public void
actionPerformed(ActionEvent ae)

String
name=tree1.getLastSelectedPathComponent().toString().tr
im();

DropView d=new DropView(cn,name);

d.pack();

});

admin1=new JMenuItem("Create User");

admin1.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

CreateUser c=new CreateUser(cn);

c.pack();

});

VIPIN KUMAR 262 1670370140


admin2=new JMenuItem("Drop User");

admin2.addActionListener(new
ActionListener()

public void
actionPerformed(ActionEvent ae)

String
name=tree1.getLastSelectedPathComponent().toString().tr
im();

DropUser e=new DropUser(cn,name);

e.pack();

});

Table=new JMenu("Table");

Advanced=new JMenu("Advanced");

Edit=new JMenu("Edit");

View=new JMenu("View");

Administrator=new
JMenu("Administrator");

VIPIN KUMAR 263 1670370140


Table.add(table1);

Table.add(table2);

Table.add(table3);

Table.add(table4);

Table.add(table5);

Advanced.add(adv1);

Edit.add(edit1);

Edit.add(edit2);

View.add(view1);

View.add(view2);

Administrator.add(admin1);

Administrator.add(admin2);

bar=new JMenuBar();

bar.add(Table);

bar.add(Advanced);

bar.add(Edit);

bar.add(View);

bar.add(Administrator);

this.setJMenuBar(bar);
VIPIN KUMAR 264 1670370140
}

private void initTree()

try

root1=new
DefaultMutableTreeNode("---------"+cn.getMetaData()
+"---------");

this.setTree();

root2=new DefaultMutableTreeNode("History");

catch(Exception e){}

tree1=new JTree(root1);

tree1.addMouseListener(new MouseAdapter()

public void mouseReleased(MouseEvent me)

if(me.isPopupTrigger())

Pmenu.show(me.getComponent(),me.getX(),me.getY());
VIPIN KUMAR 265 1670370140
}

});

tree2=new JTree(root2);

tab1=new JTabbedPane();

tab1.add("Schemata",new JScrollPane(tree1));

tab1.add("History",new JScrollPane(tree2));

JPanel p1 =new JPanel(new GridLayout(1,1));

p1.add(tab1);

this.getContentPane().add(p1,BorderLayout.EAST);

private void initToolbar()

tlb=new JToolBar();

txtr1=new JTextArea();
VIPIN KUMAR 266 1670370140
cmd1=new JButton(new
ImageIcon("images/goback.jpg"));

cmd1.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

OracleBrowserForm q=new
OracleBrowserForm();

q.pack();

OracleQuerybrowserForm.this.setVisible(false);

});

cmd2=new JButton(new
ImageIcon("images/next.jpg"));

cmd3=new JButton(new
ImageIcon("images/refresh1.jpg"));

cmd4=new JButton(new
ImageIcon("images/execute.jpg"));

cmd5=new JButton(new
ImageIcon("images/Stop.jpg"));

cmd4.addActionListener(new ActionListener()

VIPIN KUMAR 267 1670370140


public void actionPerformed(ActionEvent
ae)

try

if(txtr1.getText().length()>0)

String
sql=txtr1.getText().toUpperCase();

if(sql.startsWith("SELECT") ||
sql.startsWith("DESC") || sql.startsWith("SHOW"))

table.setData(cn,sql);

else

PreparedStatement
ps=cn.prepareStatement(sql);

int a=ps.executeUpdate();

catch(Exception e)

VIPIN KUMAR 268 1670370140


JOptionPane.showMessageDialog(null,e.getMessage());

});

tlb.add(cmd1);

tlb.add(cmd2);

tlb.add(cmd3);

tlb.add(txtr1);

tlb.add(cmd4);

tlb.add(cmd5);

this.getContentPane().add(tlb,BorderLayout.NORTH);

private void initTable()

table=new DataTable();

JPanel p1=new JPanel(new GridLayout(1,1,5,5));

p1.setBorder(BorderFactory.createTitledBorder("Result
Set"));

VIPIN KUMAR 269 1670370140


p1.add(new JScrollPane(table));

this.getContentPane().add(p1,BorderLayout.CENTER);

private void initcomponents()

this.MenuContainer();

this.initTree();

PopUpMenu();

this.initTable();

cmd6=new JButton("APPLY INSERT");

cmd6.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

initInsertValues();

});

VIPIN KUMAR 270 1670370140


cmd7=new JButton("APPLY DELETE");

cmd7.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent ae)

try

TreeNode
node=(TreeNode)tree1.getLastSelectedPathComponent();

String sql="DELETE FROM


"+node.getParent().toString()+" WHERE
"+node+"="+JOptionPane.showInputDialog("Enter Value For
: "+node);

JOptionPane.showMessageDialog(null,sql);

PreparedStatement
ps=cn.prepareStatement(sql);

int a=ps.executeUpdate();

if(a>0)

VIPIN KUMAR 271 1670370140


table.setData(cn,"Select *
from "+node.getParent().toString());

catch(Exception e){}

});

JPanel p2=new JPanel(new GridLayout(1,2,5,5));

p2.setBorder(BorderFactory.createTitledBorder(""));

p2.add(cmd6);

p2.add(cmd7);

this.getContentPane().add(p2,BorderLayout.SOUTH);

private void droptable()

try

VIPIN KUMAR 272 1670370140


String
name=tree1.getLastSelectedPathComponent().toString();

TreeNode
node=(TreeNode)tree1.getLastSelectedPathComponent();

if(!node.isLeaf())

if(table.getRowCount()==0)

JOptionPane.showMessageDialog(null,name);

String sql=" DROP TABLE


"+name;

PreparedStatement ps=
cn.prepareStatement(sql);

int a=ps.executeUpdate();

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

VIPIN KUMAR 273 1670370140


public OracleQuerybrowserForm(Connection con)

cn=con;

this.initToolbar();

this.initcomponents();

this.setTitle("Oracle Query
Browser.....");

this.setVisible(true);

this.setSize(Toolkit.getDefaultToolkit().getScreenSize(
));

this.setResizable(false);

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

private void initInsertValues()

try

VIPIN KUMAR 274 1670370140


Vector v=new Vector();

String
name=tree1.getLastSelectedPathComponent().toString();

int count=table.getColumnCount();

String str="INSERT INTO "+name+ " VALUES


(";

for(int i=0;i<table.getColumnCount()-1;i+
+)

str+="?,";

v.addElement(table.getValueAt(table.getSelectedRow(),i)
.toString());

str+="?)";

v.addElement(table.getValueAt(table.getSelectedRow(),co
unt-1).toString());

JOptionPane.showMessageDialog(null,str);

PreparedStatement
ps=cn.prepareStatement(str);

for(int k=1;k<=count;k++)

{
VIPIN KUMAR 275 1670370140
ps.setString(k,(String)v.get(k-1));

int a=ps.executeUpdate();

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

private void setTree()

root1.removeAllChildren();

java.util.Iterator
itr=Helper.getOracleTables(cn);

while(itr.hasNext())

String n=(String)itr.next();

DefaultMutableTreeNode temp=new
DefaultMutableTreeNode(n);

setFields(temp,n);

root1.add(temp);

VIPIN KUMAR 276 1670370140


}

tree1.updateUI();

private void setFields(DefaultMutableTreeNode


parent,String tableName)

try

PreparedStatement
ps=cn.prepareStatement("SELECT * FROM TAB
"+tableName);

ResultSet rs=ps.executeQuery();

while(rs.next())

parent.add(new
DefaultMutableTreeNode(rs.getString(1)));

catch(Exception e){}

} }

VIPIN KUMAR 277 1670370140


VIPIN KUMAR 278 1670370140
MS-ACCESS LOGIN FORM
package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import java.io.*;

import java.sql.Connection;

import java.sql.DriverManager;

public class MsAcessLoginForm extends JFrame

private Connection cn;

private JLabel l1,l2,l3;

private JTextField txt1,txt2;

private String path;

private JButton cmd1,cmd2,cmd3;

private void initCmdbutton()

cmd1=new JButton("Browse");

cmd2=new JButton("Proceed");

this.getRootPane().setDefaultButton(cmd2);

cmd2.addActionListener(new ActionListener()
VIPIN KUMAR 279 1670370140
{

public void actionPerformed(ActionEvent


ae)

try

MsAcessQueryBrowserForm
f=new MsAcessQueryBrowserForm(cn);

MsAcessLoginForm.this.setVisible(false);

catch(Exception e)

JOptionPane.showMessageDialog(null,"Login
Failed...Retry\n\n");

VIPIN KUMAR 280 1670370140


});

cmd1.setEnabled(false);

cmd2.setEnabled(false);

cmd3=new JButton("Cancel");

cmd3.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

MsAcessLoginForm.this.setVisible(false);

});

cmd1.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

try

JFileChooser ch=new
JFileChooser();
VIPIN KUMAR 281 1670370140
ch.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

ch.showOpenDialog(null);

File
file=ch.getSelectedFile();

txt1.setText(file.getAbsolutePath());

path=file.getAbsolutePath()+"\\"+txt2.getText()+".mdb";

File temp=new File(path);

if(!temp.exists())

JOptionPane.showMessageDialog(null,path);

FileInputStream
fis=new FileInputStream("lib/Temp.mdb");

FileOutputStream
fos=new FileOutputStream(path);

for(int
i=fis.read();i!=-1;i=fis.read())

fos.write(i);
VIPIN KUMAR 282 1670370140
}

fis.close();

fos.close();

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

cn=DriverManager.getConnection("jdbc:odbc:Driver={Micro
soft Access Driver (*.mdb)};DBQ="+path);

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

VIPIN KUMAR 283 1670370140


});

private void initLabel()

l1=new JLabel(new ImageIcon("images/sd.jpg"));

l2=new JLabel("SELECT PATH");

l3=new JLabel("FILE NAME");

private void initTextField()

txt1=new JTextField(10);

txt1.setEditable(false);

txt2=new JTextField(10);

txt2.addKeyListener(new KeyAdapter()

public void keyReleased(KeyEvent ke)

if(txt2.getText().length()>0)

cmd1.setEnabled(true);

cmd2.setEnabled(true);

}
VIPIN KUMAR 284 1670370140
else

cmd1.setEnabled(false);

cmd1.setEnabled(false);

});

private void initComponent()

this.initLabel();

this.initTextField();

this.initCmdbutton();

JPanel p1=new JPanel();

p1.setBorder(BorderFactory.createTitledBorder(""));

p1.add(l1);

JPanel p2=new JPanel(new GridLayout(1,3,5,5));

p2.setBorder(BorderFactory.createTitledBorder(""));

VIPIN KUMAR 285 1670370140


p2.add(l2);

p2.add(txt1);

p2.add(cmd1);

JPanel p3=new JPanel(new GridLayout(2,2,5,5));

p3.setBorder(BorderFactory.createTitledBorder(""));

p3.add(l3);

p3.add(txt2);

p3.add(cmd2);

p3.add(cmd3);

this.getContentPane().add(p1,BorderLayout.NORTH);

this.getContentPane().add(p2,BorderLayout.CENTER);

this.getContentPane().add(p3,BorderLayout.SOUTH);

public MsAcessLoginForm()

this.initComponent();

VIPIN KUMAR 286 1670370140


this.setTitle("MS ACESS BROWSER");

this.setVisible(true);

this.setSize(350,350);

this.setLocation(300,300);

this.setVisible(true);

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

MS-ACCESS QUERY BROWSER


FORM

package com.db;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

VIPIN KUMAR 287 1670370140


import javax.swing.tree.*;

import javax.swing.table.DefaultTableModel;

import java.util.Vector;

import java.sql.Connection;

import java.sql.PreparedStatement;

import java.sql.*;

public class MsAcessQueryBrowserForm extends JFrame

protected Connection cn;

private JButton cmd1,cmd2,cmd3,cmd4,b1;

private JTextArea txtr1;

private JToolBar tlb;

private JTree tree1,tree2;

private DefaultMutableTreeNode root1,root2;

private JTabbedPane tab1;

private JLabel l1;

private DataTable table;

private JMenuBar bar ;

private void initLabel()


VIPIN KUMAR 288 1670370140
{

l1=new JLabel(new
ImageIcon("images/msacess.jpg"));

private void initTree()

try

root1=new
DefaultMutableTreeNode("------------"+cn.getCatalog()
+"--------------");

java.util.Iterator
itr=Helper.getTables(cn);

while(itr.hasNext())

String n=(String)itr.next();

root1.add(new
DefaultMutableTreeNode(n));

root2=new
DefaultMutableTreeNode("History");

catch(Exception e){}

VIPIN KUMAR 289 1670370140


tree1=new JTree(root1);

tree2=new JTree(root2);

tab1=new JTabbedPane();

tab1.add("Schemata",new JScrollPane(tree1));

tab1.add("History",new JScrollPane(tree2));

JPanel p1 =new JPanel(new GridLayout(1,1));

p1.add(tab1);

this.getContentPane().add(p1,BorderLayout.EAST);

private void initcomponents()

this.initTree();

this.initTable();

VIPIN KUMAR 290 1670370140


private void initToolbar()

tlb=new JToolBar();

this.initLabel();

txtr1=new JTextArea();

cmd1=new JButton(new
ImageIcon("images/goback.jpg"));

cmd1.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

MsAcessLoginForm q=new
MsAcessLoginForm();

q.pack();

MsAcessQueryBrowserForm.this.setVisible(false);

VIPIN KUMAR 291 1670370140


}

});

cmd2=new JButton(new
ImageIcon("images/refresh1.jpg"));

cmd2.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

txtr1.setText("");

setTree();

});

cmd3=new JButton(new
ImageIcon("images/execute.jpg"));

cmd3.addActionListener(new ActionListener()

public void actionPerformed(ActionEvent


ae)

try

VIPIN KUMAR 292 1670370140


if(txtr1.getText().length()>0)

String
sql=txtr1.getText().toUpperCase();

if(sql.startsWith("SELECT") ||
sql.startsWith("DESC") || sql.startsWith("SHOW"))

table.setData(cn,sql);

JOptionPane.showMessageDialog(null,sql);

else

PreparedStatement
ps=cn.prepareStatement(sql);

int a=ps.executeUpdate();

JOptionPane.showMessageDialog(null,sql);

catch(Exception e)

VIPIN KUMAR 293 1670370140


JOptionPane.showMessageDialog(null,e.getMessage());

});

cmd4=new JButton(new
ImageIcon("images/Stop.jpg"));

tlb.add(cmd1);

tlb.add(cmd2);

tlb.add(txtr1);

tlb.add(cmd3);

tlb.add(cmd4);

tlb.add(l1);

this.getContentPane().add(tlb,BorderLayout.NORTH);

private void initTable()

table=new DataTable();

VIPIN KUMAR 294 1670370140


JPanel p1=new JPanel(new GridLayout(1,1,5,5));

p1.setBorder(BorderFactory.createTitledBorder("Result
Set"));

p1.add(new JScrollPane(table));

this.getContentPane().add(p1,BorderLayout.CENTER);

private void droptable()

try

String
name=tree1.getLastSelectedPathComponent().toString();

TreeNode
node=(TreeNode)tree1.getLastSelectedPathComponent();

if(!node.isLeaf())

if(table.getRowCount()==0)

JOptionPane.showMessageDialog(null,name);

VIPIN KUMAR 295 1670370140


String sql=" DROP TABLE
"+name;

PreparedStatement ps=
cn.prepareStatement(sql);

int a=ps.executeUpdate();

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

private void setTree()

root1.removeAllChildren();

java.util.Iterator
itr=Helper.getTables(cn);

while(itr.hasNext())

String n=(String)itr.next();

DefaultMutableTreeNode temp=new
DefaultMutableTreeNode(n);
VIPIN KUMAR 296 1670370140
setFields(temp,n);

root1.add(temp);

tree1.updateUI();

private void initUpdate()

try

String
name=tree1.getLastSelectedPathComponent().toString();

TreeNode
node=(TreeNode)tree1.getLastSelectedPathComponent();

if(!node.isLeaf())

// int row=table.getSelectedRow();

String sql=" UPDATE "+name+"


SET"+node+"WHERE" ;

PreparedStatement
ps=cn.prepareStatement(sql);

int a=ps.executeUpdate();

if(a>0)

VIPIN KUMAR 297 1670370140


JOptionPane.showMessageDialog(this,"Data Update");

else

JOptionPane.showMessageDialog(this,"Required Data
Missing");

catch(Exception e)

JOptionPane.showMessageDialog(this,e.getMessage());

private void initInsertValues()

try

VIPIN KUMAR 298 1670370140


Vector v=new Vector();

String
name=tree1.getLastSelectedPathComponent().toString();

int count=table.getColumnCount();

String str="INSERT INTO "+name+ " VALUES


(";

for(int i=0;i<table.getColumnCount()-1;i+
+)

str+="?,";

v.addElement(table.getValueAt(table.getSelectedRow(),i)
.toString());

str+="?)";

v.addElement(table.getValueAt(table.getSelectedRow(),co
unt-1).toString());

JOptionPane.showMessageDialog(null,str);

PreparedStatement
ps=cn.prepareStatement(str);

for(int k=1;k<=count;k++)

{
VIPIN KUMAR 299 1670370140
ps.setString(k,(String)v.get(k-1));

int a=ps.executeUpdate();

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

public MsAcessQueryBrowserForm(Connection con)

cn=con;

this.initToolbar();

this.initcomponents();

this.setTitle("Ms Acess QUERY


BROWSER.....");

this.setVisible(true);

VIPIN KUMAR 300 1670370140


this.setSize(Toolkit.getDefaultToolkit().getScreenSize(
));

this.setResizable(false);

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

private void setFields(DefaultMutableTreeNode


parent,String tableName)

try

PreparedStatement
ps=cn.prepareStatement("DESC "+tableName);

ResultSet rs=ps.executeQuery();

while(rs.next())

parent.add(new
DefaultMutableTreeNode(rs.getString(1)));

catch(Exception e){}

VIPIN KUMAR 301 1670370140


HELPER
package com.db;

import com.mysql.jdbc.DatabaseMetaData;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.SQLException;

import java.util.Iterator;

import java.util.Vector;

import javax.swing.JOptionPane;

import java.sql.PreparedStatement;

import java.io.*;

public class Helper

public static String getKey(int range)

java.util.Random r=new java.util.Random();


VIPIN KUMAR 302 1670370140
int key=r.nextInt(range);

return key+"";

public static boolean


isEmpty(javax.swing.JTextField txt)

if(txt.getText().length()>0)

return true;

else

return false;

public static void open(String application)

try

Runtime r=Runtime.getRuntime();

Process p=r.exec(application);

catch(Exception e)
VIPIN KUMAR 303 1670370140
{

javax.swing.JOptionPane.showMessageDialog(null,e.getMes
sage());

public static Connection openConnection()

Connection cn=null;

try

Class.forName("com.mysql.jdbc.Driver");

cn=DriverManager.getConnection("jdbc:mysql://127.0.0.1:
3306/mysql","root","anu");

catch(Exception e)

JOptionPane.showMessageDialog(null,
e.toString());

return cn;

}
VIPIN KUMAR 304 1670370140
public static Connection openConnection(String
database)

Connection cn=null;

try

Class.forName("com.mysql.jdbc.Driver");

cn=DriverManager.getConnection("jdbc:mysql://127.0.0.1:
3306/"+database,"root","anu");

catch(Exception e)

JOptionPane.showMessageDialog(null,
e.toString());

return cn;

public static Connection openConnection(String


database,String port)

Connection cn=null;

try

VIPIN KUMAR 305 1670370140


Class.forName("com.mysql.jdbc.Driver");

cn=DriverManager.getConnection("jdbc:mysql://127.0.0.1:
"+port+"/"+database,"root","anu");

catch(Exception e)

JOptionPane.showMessageDialog(null,
e.toString());

return cn;

public static void closeConnection(Connection con)

try

if(!con.isClosed())

con.close();

catch(Exception e){}

public static Connection openOracleConnection()


VIPIN KUMAR 306 1670370140
{

Connection cn=null;

try

Class.forName("oracle.jdbc.driver.OracleDriver");

cn=DriverManager.getConnection("jdbc:oracle:thin:@local
host:1521:xe","system","anu");

cn.setAutoCommit(false);

catch(Exception e)

JOptionPane.showMessageDialog(null,
e.toString());

return cn;

public static Connection


openAccessConnection(java.io.File file)

Connection cn=null;

try

VIPIN KUMAR 307 1670370140


Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

cn=DriverManager.getConnection("jdbc:odbc:Driver={Micro
soft Access Driver
(*.mdb)};DBQ="+file.getAbsolutePath());

catch(Exception e)

JOptionPane.showMessageDialog(null,
e.toString());

return cn;

public static String readFile(File file)

String str="";

try

FileInputStream fis=new
FileInputStream(file);

for(int i=fis.read();i!=-
1;i=fis.read())
VIPIN KUMAR 308 1670370140
{

str+=(char)i;

fis.close();

catch(Exception e){}

return str;

public static boolean writeFile(File file,String


content)

boolean flag=false;

try

FileOutputStream fos=new
FileOutputStream(file);

fos.write(content.getBytes());

fos.close();

flag=file.exists();

catch(Exception e){}

return flag;

VIPIN KUMAR 309 1670370140


public static Iterator<String> getTables(Connection
cn)

Vector <String> vector=new


Vector<String>();

try

DatabaseMetaData
meta=(DatabaseMetaData) cn.getMetaData();

String[] TABLE_TYPES = {"TABLE"};

ResultSet tables = meta.getTables(null,


null, null, TABLE_TYPES);

while (tables.next())

vector.addElement(tables.getString("TABLE_NAME"));

catch(Exception e){}

return vector.iterator();

public static Iterator<String>


getOracleTables(Connection cn)

VIPIN KUMAR 310 1670370140


Vector <String> vector=new
Vector<String>();

try

PreparedStatement
ps=cn.prepareStatement("SELECT * FROM TAB");

ResultSet tables=ps.executeQuery();

while (tables.next())

vector.addElement(tables.getString(1));

tables.close();

catch(Exception e){}

return vector.iterator();

public static Iterator<String>


getMsAccessTables(Connection cn)

VIPIN KUMAR 311 1670370140


Vector <String> vector=new
Vector<String>();

try

DatabaseMetaData
meta=(DatabaseMetaData) cn.getMetaData();

String[] TABLE_TYPES = {"TABLE"};

ResultSet tables = meta.getTables(null,


null, null, TABLE_TYPES);

while (tables.next())

vector.addElement(tables.getString("TABLE_NAME"));

catch(Exception e){}

return vector.iterator();

public static void setPosition(javax.swing.JFrame


frame)

java.awt.Dimension screenSize =
java.awt.Toolkit.getDefaultToolkit().getScreenSize();

int height = screenSize.height;

int width = screenSize.width;


VIPIN KUMAR 312 1670370140
frame.setSize(width/2, height/2);

frame.setLocationRelativeTo(null);

public static void setPosition(javax.swing.JWindow


frame)

java.awt.Dimension screenSize =
java.awt.Toolkit.getDefaultToolkit().getScreenSize();

int height = screenSize.height;

int width = screenSize.width;

frame.setSize(width/2, height/2);

frame.setLocationRelativeTo(null);

public static void


setPosition(javax.swing.JInternalFrame frame)

java.awt.Dimension screenSize =
java.awt.Toolkit.getDefaultToolkit().getScreenSize();

int height = screenSize.height;

int width = screenSize.width;

frame.setSize(width/2, height/2);

//frame.setLocationRelativeTo(null);

VIPIN KUMAR 313 1670370140


public static void insertRow(Connection
cn,DataTable table,String tableName)

try

table.setData(cn,"Select * from
"+tableName);

Vector v1=new Vector();

table.getDataTableModel().addRow(v1);

table.updateUI();

catch(Exception e)

JOptionPane.showMessageDialog(null,e.toString());

public static void printTable(DataTable table)

try

table.print();
VIPIN KUMAR 314 1670370140
}

catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

VIPIN KUMAR 315 1670370140


DATA TABLE
package com.db;

import java.sql.*;

import java.util.Vector;

import javax.swing.*;

public class DataTable extends JTable

private javax.swing.table.DefaultTableModel model;

public DataTable()

model=new
javax.swing.table.DefaultTableModel();

this.setModel(model);

public DataTable(String a[])

model=new
javax.swing.table.DefaultTableModel();

for(int i=0;i<a.length;i++)

model.addColumn(a[i]);

this.setModel(model);
VIPIN KUMAR 316 1670370140
}

public
DataTable(javax.swing.table.DefaultTableModel m)

model=m;

this.setModel(model);

public DataTable(Connection cn,String sql)

setData(cn,sql);

public DataTable(java.awt.Dimension dimension)

model=new
javax.swing.table.DefaultTableModel();

this.setModel(model);

this.setPreferredScrollableViewportSize(dimension);

this.updateUI();

this.repaint();

public void setData(Connection cn,String sql)

try
VIPIN KUMAR 317 1670370140
{

clearTable();

java.util.Vector v1=new
java.util.Vector();

PreparedStatement
ps=cn.prepareStatement(sql.toUpperCase().trim());

ResultSet rs=ps.executeQuery();

while(rs.next())

java.util.Vector v2=new
java.util.Vector();

for(int
i=1;i<=rs.getMetaData().getColumnCount();i++)

try

v2.add(rs.getString(i).toUpperCase());

catch(Exception e11)

v2.add("");

VIPIN KUMAR 318 1670370140


}

v1.add(v2);

java.util.Vector v3=new
java.util.Vector();

for(int
i=1;i<=rs.getMetaData().getColumnCount();i++)

v3.add(rs.getMetaData().getColumnLabel(i).toUpperCase()
);

model.setDataVector(v1,v3);

catch(SQLException sqle)

JOptionPane.showMessageDialog(null,
sqle.toString());

catch(Exception e)

VIPIN KUMAR 319 1670370140


JOptionPane.showMessageDialog(null,
e.toString());

public void setData(ResultSet rs)

try

clearTable();

while(rs.next())

java.util.Vector v2=new
java.util.Vector();

for(int
i=1;i<=rs.getMetaData().getColumnCount();i++)

v2.add(rs.getString(i).toUpperCase());

model.addRow(v2);

VIPIN KUMAR 320 1670370140


catch(SQLException sqle)

JOptionPane.showMessageDialog(null,
sqle.toString());

catch(Exception e)

JOptionPane.showMessageDialog(null,
e.toString());

public String [] getTableSelectedRowData(int row)

if(this.getRowCount()>0 &&
row<this.getRowCount())

String a[]=new
String[this.getColumnCount()];

for(int i=0;i<a.length;i++)

a[i]=this.getValueAt(row,i).toString().toUpperCase().tr
im();

return a;
VIPIN KUMAR 321 1670370140
}

else

return null;

public void createRow(java.util.Vector v)

model.addRow(v);

public void deleteRow(int rowNumber)

if(this.getRowCount()>0)

model.removeRow(rowNumber);

public void clearTable()

Vector a=new Vector();

for(int i=0;i<model.getColumnCount();i++)

{
VIPIN KUMAR 322 1670370140
a.add(model.getColumnName(i));

model.setDataVector(new Vector(), a);

public javax.swing.table.DefaultTableModel
getDataTableModel()

return this.model;

DATA COMBO BOX

package com.db;

import java.util.Vector;

import javax.swing.JOptionPane;

public class DataComboBox extends javax.swing.JComboBox


VIPIN KUMAR 323 1670370140
{

private java.util.Vector<String> value;

public DataComboBox()

value=new java.util.Vector<String>();

public DataComboBox(java.sql.Connection cn,String


sql)

value=new java.util.Vector<String>();

setData(cn,sql);

public String getBackValue()

return value.get(this.getSelectedIndex());

public String getFrontValue()

return this.getSelectedItem().toString();

VIPIN KUMAR 324 1670370140


public void setData(java.sql.Connection cn,String
sql)

try

value.removeAllElements();

this.removeAllItems();

java.sql.PreparedStatement
ps=cn.prepareStatement(sql);

java.sql.ResultSet rs=ps.executeQuery();

while(rs.next())

value.add(rs.getString(1));

this.addItem(rs.getString(2));

catch(Exception e){}

public void setData(java.sql.Connection cn,String


sql,boolean flag)

try

{
VIPIN KUMAR 325 1670370140
value.removeAllElements();

this.removeAllItems();

java.sql.PreparedStatement
ps=cn.prepareStatement(sql);

java.sql.ResultSet rs=ps.executeQuery();

while(rs.next())

String v=rs.getString(1);

value.add(v);

this.addItem(v);

catch(Exception e)

JOptionPane.showMessageDialog(null,e.toString());

public void setData(String frontValue,String


backValue)

this.addItem(frontValue);

value.add(backValue);
VIPIN KUMAR 326 1670370140
}

public Vector<String> getValues()

return this.value;

INPUT/OUTPUT SHOTS

VIPIN KUMAR 327 1670370140


MY SQL FORM SHOTS

VIPIN KUMAR 328 1670370140


VIPIN KUMAR 329 1670370140
SPLASH FORM

VIPIN KUMAR 330 1670370140


SELECT MYSQL MODULE
FROM THE SPLASH FORM

VIPIN KUMAR 331 1670370140


PROCEED WITH MYSQL MODULE

VIPIN KUMAR 332 1670370140


MYSQL LOGIN FORM

VIPIN KUMAR 333 1670370140


MYSQL Query browser from

VIPIN KUMAR 334 1670370140


MYSQL LOGIN FORM
Login with the required database

VIPIN KUMAR 335 1670370140


MYSQL Query browser FORM
With employee databse

VIPIN KUMAR 336 1670370140


MYSQL Query browser FORM
With employee databse
tables

VIPIN KUMAR 337 1670370140


CREATE table

TABLE CREATION(IS DONE IN 3 WAYS)

FIRST WAY:

VIPIN KUMAR 338 1670370140


CREATE table

SECOND WAY

VIPIN KUMAR 339 1670370140


CREATE table FROM

CREATE TABLE USING THIS FORM BY ADDING THE ROWS


AS PER USER’S NEED

VIPIN KUMAR 340 1670370140


CREATE table FROM

ENTER ALL THE REQUIRED FIELDS AS PER USER’S NEED


AND CLICK ON GENERATE

CREATE table FROM


VIPIN KUMAR 341 1670370140
NOTE:->
BEFORE CLICKING OR HITTING THE GENERATE
COMMNAD MAKE SURE DAT THERE ARE NO EXTRA OR
BLANK ROWS

CREATE table FROM

VIPIN KUMAR 342 1670370140


AS SOON AS THE GENERATE COMMAND IS CLICKED
TABLE CREATION SYNTAX IS GENERATED

CLICK ON O.K

CREATE table FROM

VIPIN KUMAR 343 1670370140


AS THE O.K IS PRESSED TABLE IS CRETAED .BT AT
PRESENT IT WILL NOT BE DISPLAYED IN THE TREE..TO
SEE THE TABLE USER HAS CREATED WE HAVE TO RIGHT
CLICK ANY WHERE ON THE TREE.POPUPMENU APPEARS
SELECT REFRESH FROM THE POPUPMENU

CREATE table FROM

VIPIN KUMAR 344 1670370140


TABLE CREATED

CREATE table FROM

VIPIN KUMAR 345 1670370140


CREATED TABLE WITH ITS FIELD

CREATE table FROM

THIRD WAY

VIPIN KUMAR 346 1670370140


TABLE CREATION USING COMMAND:-

CREATE table FROM

VIPIN KUMAR 347 1670370140


CLICK ON REFRESH MENU

CREATED table THROUGH


COMMAND
VIPIN KUMAR 348 1670370140
TABLE CREATED

CREATED table THROUGH


COMMAND AND ITS FIELDS
VIPIN KUMAR 349 1670370140
Open table

VIPIN KUMAR 350 1670370140


Open table

VIPIN KUMAR 351 1670370140


WITH THE SELECTED TABLE

CLICK ON O.K

Open table

VIPIN KUMAR 352 1670370140


Open table
THROUGH COMMAND

VIPIN KUMAR 353 1670370140


Rename table

1)FIRST THROUGH TABLE MENU

VIPIN KUMAR 354 1670370140


Rename table

SECOND THROUGH POPUPMENU

VIPIN KUMAR 355 1670370140


Rename table

VIPIN KUMAR 356 1670370140


rename table

VIPIN KUMAR 357 1670370140


rename table

VIPIN KUMAR 358 1670370140


CLICK ON REFERSH MENU

Table renamed

VIPIN KUMAR 359 1670370140


rename table

THIRD THROUGH COMMAND

VIPIN KUMAR 360 1670370140


rename table
THROUGH COMMAND
VIPIN KUMAR 361 1670370140
Table RENAMED
THROUGH COMMAND
VIPIN KUMAR 362 1670370140
INSERT RECORD

VIPIN KUMAR 363 1670370140


INSERT RECORD

Step1: Firstly open table in which record


is to be inserted

OPEN TABLE TO

VIPIN KUMAR 364 1670370140


INSERT RECORD

INSERT RECORD

SECOND METHOD
VIPIN KUMAR 365 1670370140
INSERT RECORD

VIPIN KUMAR 366 1670370140


STEP2: INSERT A BLANK ROW TO INSERT RECORD

INSERT RECORD

WRITE THE RECORDS IN THE FIELDS THAT WE WANT TO


ENTER

VIPIN KUMAR 367 1670370140


AND CLICK ON THE APPLY INSERT COMMAND BUTTON

INSERT RECORD

VIPIN KUMAR 368 1670370140


CLICK ON O.K

OPEN TABLE TO SEE THE


INSERTED RECORD

VIPIN KUMAR 369 1670370140


TABLE OPENED WITH THE
INSERTED RECORD

VIPIN KUMAR 370 1670370140


DELETE RECORD

DELETE RECORD(IS DONE IN 2 WAYS):

VIPIN KUMAR 371 1670370140


FIRST METHOD

DELETE RECORD

VIPIN KUMAR 372 1670370140


DELETE RECORD

VIPIN KUMAR 373 1670370140


TABLE AFTER DELETION
OF RECORD
VIPIN KUMAR 374 1670370140
DROP TABLE

DROP TABLE(TABLE IS DONE IN 2 WAYS)

FIRST METHOD:
VIPIN KUMAR 375 1670370140
DROP TABLE

SECOND METHOD

VIPIN KUMAR 376 1670370140


DROP TABLE

VIPIN KUMAR 377 1670370140


SELECT THE TABLE TO BE DELETED

DROP TABLE

VIPIN KUMAR 378 1670370140


TABLE IS BEING DROPPED AND REMOVED FROM THE
EMPLOYEE DATABASE

CREATE USING aNOTHER TABLE

VIPIN KUMAR 379 1670370140


CREATE USING aNOTHER TABLE

VIPIN KUMAR 380 1670370140


CREATE USING aNOTHER TABLE

VIPIN KUMAR 381 1670370140


TABLE IS BEING CREATED USING CREATE USING ANOTHER
TABLE

CREATE NEW Schema /database

VIPIN KUMAR 382 1670370140


CREATE NEW Schema /database

VIPIN KUMAR 383 1670370140


CREATE NEW Schema /database

VIPIN KUMAR 384 1670370140


CREATE NEW Schema /database

VIPIN KUMAR 385 1670370140


Login through NEW
database

VIPIN KUMAR 386 1670370140


Mysql Query browser from
through NEW created database

VIPIN KUMAR 387 1670370140


describe

VIPIN KUMAR 388 1670370140


Selected table with its
data stucture

VIPIN KUMAR 389 1670370140


Describe through command

VIPIN KUMAR 390 1670370140


Alter table

VIPIN KUMAR 391 1670370140


Alter table

VIPIN KUMAR 392 1670370140


Alter table

VIPIN KUMAR 393 1670370140


Alter table

VIPIN KUMAR 394 1670370140


TABLE ALTERED(ADD)

Altered table
VIPIN KUMAR 395 1670370140
Alter table through command

VIPIN KUMAR 396 1670370140


Altered table

VIPIN KUMAR 397 1670370140


sorting
VIPIN KUMAR 398 1670370140
sorting
VIPIN KUMAR 399 1670370140
SORTING AS PER THE SELECTED FIELD

sorting

VIPIN KUMAR 400 1670370140


CLICK ON O.K

Table after sorting

VIPIN KUMAR 401 1670370140


Print

VIPIN KUMAR 402 1670370140


Print

VIPIN KUMAR 403 1670370140


Create view

VIPIN KUMAR 404 1670370140


Create view

VIPIN KUMAR 405 1670370140


Create view
VIPIN KUMAR 406 1670370140
Create view

VIPIN KUMAR 407 1670370140


Drop view
VIPIN KUMAR 408 1670370140
drop view

VIPIN KUMAR 409 1670370140


Login through root to
Create user

VIPIN KUMAR 410 1670370140


Create user

VIPIN KUMAR 411 1670370140


Create user

VIPIN KUMAR 412 1670370140


Create user

VIPIN KUMAR 413 1670370140


Create user
VIPIN KUMAR 414 1670370140
Create user

VIPIN KUMAR 415 1670370140


Create user

VIPIN KUMAR 416 1670370140


VIPIN KUMAR 417 1670370140
ORACLE FORM SHOTS

VIPIN KUMAR 418 1670370140


PROCEED WITH ORACLE
MODULE

VIPIN KUMAR 419 1670370140


ORACLE LOGIN FORM

MYSQL Query browser from


VIPIN KUMAR 420 1670370140
VIPIN KUMAR 421 1670370140
ORACLE LOGIN FORM
Login with the required
USER

VIPIN KUMAR 422 1670370140


ORACLE qUERY browser FORM
With REQUIRED USER

CREATE table
VIPIN KUMAR 423 1670370140
TABLE CREATION(IS DONE IN 3 WAYS)

FIRST WAY:

CREATE table FROM

VIPIN KUMAR 424 1670370140


NOTE:->

BEFORE CLICKING OR HITTING THE GENERATE


COMMNAD MAKE SURE DAT THERE ARE NO EXTRA OR
BLANK ROWS

CREATE table FROM

VIPIN KUMAR 425 1670370140


AS SOON AS THE GENERATE COMMAND IS CLICKED
TABLE CREATION SYNTAX IS GENERATED

CLICK ON O.K

CREATE table FROM

VIPIN KUMAR 426 1670370140


TABLE CREATED

INSERT RECORD

VIPIN KUMAR 427 1670370140


INSERT RECORD

VIPIN KUMAR 428 1670370140


INSERT RECORD

VIPIN KUMAR 429 1670370140


OPEN TABLE

VIPIN KUMAR 430 1670370140


OPEN TABLE

VIPIN KUMAR 431 1670370140


OPEN TABLE

VIPIN KUMAR 432 1670370140


DELETE RECORD

VIPIN KUMAR 433 1670370140


AFTER DELETION

VIPIN KUMAR 434 1670370140


RENAME TABLE

VIPIN KUMAR 435 1670370140


RENAME TABLE

VIPIN KUMAR 436 1670370140


RENAMED TABLE

VIPIN KUMAR 437 1670370140


DROP TABLE

VIPIN KUMAR 438 1670370140


DROP TABLE

VIPIN KUMAR 439 1670370140


DROPPED TABLE

VIPIN KUMAR 440 1670370140


PRINT

VIPIN KUMAR 441 1670370140


PRINT

VIPIN KUMAR 442 1670370140


CREATE VIEW

VIPIN KUMAR 443 1670370140


CREATE VIEW

VIPIN KUMAR 444 1670370140


CREATE VIEW

VIPIN KUMAR 445 1670370140


CREATE VIEW

VIPIN KUMAR 446 1670370140


DROP VIEW

VIPIN KUMAR 447 1670370140


DROP VIEW

VIPIN KUMAR 448 1670370140


DROP VIEW

VIPIN KUMAR 449 1670370140


DROP VIEW

VIPIN KUMAR 450 1670370140


CREaTE USER

VIPIN KUMAR 451 1670370140


CREaTE USER

VIPIN KUMAR 452 1670370140


VIPIN KUMAR 453 1670370140
MS-ACCESS FORM SHOTS

VIPIN KUMAR 454 1670370140


SELECT MS-ACCESS MODULE

VIPIN KUMAR 455 1670370140


PROCEED WITH MS-ACCESS
MODULE

VIPIN KUMAR 456 1670370140


MS-ACCESS LOGIN FORM

MS-ACCESS LOGIN FORM

VIPIN KUMAR 457 1670370140


SELECT THE PATH FOR THE
TABLE TO BE CREATED

VIPIN KUMAR 458 1670370140


MS-ACCESS LOGIN FORM

VIPIN KUMAR 459 1670370140


CLICK ON O.K

MS-ACCESS LOGIN FORM

VIPIN KUMAR 460 1670370140


CLICK ON PROCEED TO CREATE/OPEN THE SELECTED
DATABASE

MS-ACCESS QUERY BROWSER


FORM

VIPIN KUMAR 461 1670370140


CREATE TABLE

VIPIN KUMAR 462 1670370140


CREATE TABLE

VIPIN KUMAR 463 1670370140


A TABLE IS BEING CERATED IN Ms-Access Database named
Dept

INSERT RECORD
VIPIN KUMAR 464 1670370140
INSERT RECORD
VIPIN KUMAR 465 1670370140
OPEN TABLE TO SEE THE
INSERTED RECORD
VIPIN KUMAR 466 1670370140
OPEN TABLE TO SEE THE
INSERTED RECORD

VIPIN KUMAR 467 1670370140


OPEN TABLE IN MS-ACCESS TO
SEE THE INSERTED RECORD

VIPIN KUMAR 468 1670370140


DATA IS BEING INSERTED IN MS-ACCESS DEPT TABLE

RENAME TABLE

VIPIN KUMAR 469 1670370140


OPEN RENAMED TABLE

VIPIN KUMAR 470 1670370140


OPEN RENAMED TABLE

VIPIN KUMAR 471 1670370140


TABLE RENAMED

OPEN RENAMED TABLE IN MS-


ACCESS

VIPIN KUMAR 472 1670370140


DROP TABLE

VIPIN KUMAR 473 1670370140


dROP TABLE

VIPIN KUMAR 474 1670370140


AFTER DELETION CHECK FOR THE DROPPED TABLE

dROP TABLE

VIPIN KUMAR 475 1670370140


DEPT1 TABLE IS BEING DELETED FROM MS-ACCESS

VIPIN KUMAR 476 1670370140


MY SQL VALIDATION CHECK

VIPIN KUMAR 477 1670370140


ORACLE VALIDATION CHECK

VIPIN KUMAR 478 1670370140


TESTING TECHNIQUES

Introduction: Testing present an interesting anomaly. A series of the test

are creating that are intended to “demolish” the software that has been

created. Testing required that the developer discard preconceived notions of

VIPIN KUMAR 479 1670370140


the “correctness” of the software just developed overcome a conflict of

interest that accurse when errors are uncovered.

Testing Objective: These are as follows-

 Testing is a process of the executing a program with the intent of the

finding an error.

 A good test case is one that has a high probability of the finding an as-

yet undiscovered error.

 A successful test is one that is one uncovers as-yet undiscovered

error. If the testing is conducted successfully it will uncover errors in

the software. Testing can not show the absence of the defects, it can

only show that software errors are present.

Testing principles-

All tests should be traceable to customer requirements.

Tests should be planned long before testing begins.

The pareto principle applies to testing ( this principle implies that 80% of the

all errors uncovered during testing likely be traceable to 20% of the of all

program modules)”.

VIPIN KUMAR 480 1670370140


Testing should begin “in the small” and progress toward testing “in the

large”.

Exhaustive testing is not possible.

TESTING-

Since the faults can occur during any phase in the software

development life cycle, different levels of testing are used in the testing

process. Each level of testing aims to test different aspects of the system.

Thus the system was put through the following tests:

Unit Testing

In unit testing the programs that make up the system were tested.

This level focuses first on the independent module to locate the error.

Integration testing

In integration testing many modules, which passed the Unit, testing

was combined into subsystems and was then tested.

System Testing

In System Testing the entire Software system is tested to find any

type of discrepancy that still exist between the designed system and the

software requirements document.


VIPIN KUMAR 481 1670370140
Performance Testing

In the test of performance time of inquiry was tested when the

designed system was fully loaded with operating data.

Each and every input and output program is executed separately and tested

for bugs. Whole of the system is executed and test data is parted and is

fixing into the system and the output reports are compared with the

parameters. Testing forms a very important part of the system development

life cycle. It is basically this stage that helps the programmer to know all the

possible flaws related with the working of his software and also helps to

check the functioning of the various checks that have been used in the

programs.

The complete project was tested in top down approach. For modular

testing of programs the program are executed one by one and there inputs

were taken out. The outputs thus formed were taken in the form of reports

of the project, which is given in the later part of the documentation. The

reports thus formed were found out to be correct when compared with the

data entered in the files.

Objective of System Testing:

Once a system has been designed it is necessary to undergo an

exhaustive to before installing the system. This is important because in

VIPIN KUMAR 482 1670370140


some cases a small error not detected and corrected early before

installation, may explode into a much large problem later on. Testing is

being performed when users are asked to assist in identifying all possible

situations. That might arise as regards the factor that efforts were put to

tackle the problem under consideration. A plan was decided to be followed

for testing the system. The complete testing procedure was divided into

several steps, to be performed at different stages. Test was to be done as

follows.

TESTING CRITERIA

White Box Testing :

This testing is also known as “glass-box testing”. Using white-box

testing, test cases are derived that

 Guarantee that all independent path with in a module have been

exercised at last once.

 Exercise all logical decisions on their boundaries and with in their

operational bounds.

 Exercise internal data structures to assure their validity.

Reasons for preferring White-box Testing:

VIPIN KUMAR 483 1670370140


Logic errors and incorrect assumptions are inversely proportional to

the probability that a program path will be executed.

We often believe that a logical path is not likely to be executed when

infect it may be executed on a regularly basis.

Topographical errors are random.

Transaction path Testing

In this phase each and every condition with in a unit program were tested.

As and when a loop or condition statement were incorporated in to a unit the

loops where tested for correctness, for foundry condition and for not getting

into infinite execution cycle. The data used was whatever necessary at the

instance. The path of each transaction from origin to destination was tested

for reliable results.

Module Testing

This was carried out during the programming stage itself. Individual

programs were tested at the time of coding and necessary changes are

made there on to make sure that the tested at the time of coding and

necessary changes are made there on to make sure that the modules in the

VIPIN KUMAR 484 1670370140


form program is working satisfactory as regards the expected output from

the module. All aspects of the program viz. all choices available are properly

tested.

String Testing

After loading all individual program string was performed for each one of

programs where the output generated by one program is used as input by

another program. This step was completed after making necessary changes

wherever required.

Black Box Testing :

This testing focuses on the functional requirements of the software i.e.

it enables to derive set of the input conditions that will folly exercise all

functional requirements for a program. It is not an alternative to white-

box techniques rather it is a complementary approach i.e. likely to

uncover a different class of than white-box Testing methods.

Black-box attempts to find errors the following categories:

Incorrect or missing function,

Interface errors,

Error in data structure or external database access


VIPIN KUMAR 485 1670370140
Performance errors

Initialization and termination errors

System Testing

After module and string testing, the systems were tested as whole

system testes were undertaken to check bundled modules for errors. The

errors founded in the couple system as a whole was corrected. A testing

on the actual data of the company followed this. During this phase the

existing system and this package was running in parallel to enable us to

verify and compare the result sets. The following criteria were to be used

while testing the system.

Output Testing

No systems could be useful if it does not produced the required operation for

that matter operation in the required format the output generated or

displayed by the system under consider was tested by asking the format

required by them.

User Acceptance Testing

User acceptance of a system is a key factor for the success of any system.

The system under consideration was tested for user acceptance by

constantly keeping in touch with the prospected system user at time of

developing and making changes.


VIPIN KUMAR 486 1670370140
Testing Procedure

Different type of checks like duplicate checks, completeness check, validity

checks etc. are incorporated in this system, as the data has to be entered in

different cards.

The user is not familiar with new system the data entry screens are designed

in such a way that they are:

 Consistent

 Compatible

 Easy to use

 Had quick response

 The following conventions are used while designing of the various

screens to make the system user friendly.

 All the items that are logically related are together.

 For a particular card, query has been provided.

 Error and validation messages are provided wherever required.

 System testing is against its initial objectives, it is done either in

a simulated environment.

Test Review

Test review is the process, which ensures that testing is carried out, as

planned test review decides whether or not the program is ready to ship out

VIPIN KUMAR 487 1670370140


for the implementation. For each data entry screen, we prepared test data

with extreme values and under all relevant data screen against real this

process helps in rectifying the modules time.

Functional testing

For this reason this testing is sometimes refers to as Black box testing in

which the content of a black box is not known and function of black box is

understood completely in terms of its inputs and outputs. We have used

functional testing in our project. Functional testing refers to testing, which

involves only observation of output for certain input values, and there is no

attempt to analyze the code, which produces the output.

VIPIN KUMAR 488 1670370140


IMPLEMENTATION

This section will be discussing the plan, which is adopted in implementation

of the software. The description of the implementation plan in the

organization is as follows:

In conversion from manual to computerize, the objective is to put the tested

system into operation while holding cost, risks and personal irritation to a

minimum. It involves creating:

VIPIN KUMAR 489 1670370140


 Computer capable files

 Training operation staff

 Installing terminals and hardware

 A critical aspect of conversion is not disrupting the functioning of

organization. Conversion should be existing, because it is the last

step before the candidate system begins to show result.

Unfortunately the results of the conversion have been chaotic and

traumatic for many firms. Unforeseen difficulties crop us as the

system break down, data files are damaged and tempers grow

short. The training package is frequently not complete and people

are trying package is frequently not complete and people are trying

to figure out what to do. Much of stem from poor planning or no

planning at all. Therefore to avoid such problems we will be using

the “parallel run approach “.

 The basic steps involved in the conversion are as follows:

 Conversion begins with a review of the project plan, the system test

documentation and the plan.


 The conversion portion of the implementation plan is finalized and

approach.
 Files are converted.
 Parallel processing between the existing system and the new system is

initiated.

VIPIN KUMAR 490 1670370140


 Result of computer runs and operation for the new system are logged

on a special from.
 Assuming no problem, parallel procession is discontinued.

Implementation result are documented for reference Conversion is

completed. Plan for the post implementation review are prepared.


 Following the review, the new system is officially operational.

The reason behind the use of this approach is that the software has been

prepared and tested on a stand alone system. So, this software will be used

along with the manual system in the organization for sometimes to test its

functioning under real life conditions if there will be any problem with the

software then necessary changes will be made in the software and tem it will

be implemented for use.

MAINTENANCE

Maintenance is a set of the software engineering activities that occur after

software has been delivered to the customer and put into operation.

Changes will occur because the software must be adapted to accommodate

changes in its external environment (e.g. a change required because of


VIPIN KUMAR 491 1670370140
operating system or peripheral devices) or because the customer requires

functional or performance enhancements.

Software maintenance reapplies each of the preceding phases to an existing

program rather that a new one.

All the four categories of the maintenance have been guarantied to the

system of the Annual Maintenance Contract:

Corrective Maintenance:

Corrective maintenance means repairing, processing of performance failure

or making changes because of previously incorrect of false assumptions.

Perfective Maintenance:

Perfective Maintenance means enhancing the performance or modification

the programmers to respond to users additional or changing needs. More

money is spending on perfective than on corrective maintenance together.

VIPIN KUMAR 492 1670370140


Preventive maintenances are the process by which we prevent our system

from becoming obsolete. Preventive maintenance involves the concept of re-

engineering in which and system with an old technology is re-engineering

into using new technology.

COST ESTIMATION OF THE PROJECT

Cost/Benefit analysis is performed to ascertain whether the costs in the

system match with the benefits it will provide. The various kinds of costs

incurred in the development and implementation of the system include:

 Cost of Hardware:- Cost incurred in purchase of hardware, i.e.,

computer and its peripherals.

 Personnel Costs:- Include The salaries of the EDP staff as well as

perks of personnel involved in the development of the system.

VIPIN KUMAR 493 1670370140


 Costs of Facilities:- Expenses incurred in the preparation of the

physical site. This includes flooring, wiring, lighting, etc.

 Operating Costs:- Include all the costs associated with the day to day
operation of the system.

 Supply Costs:- Variable costs that increase with increased use of

paper, ribbon, disks etc.

Under Cost/Benefit analysis of the “SQL GENERATOR” it was analyzed

that the firm is ready to do one time investment but doesn’t want high

operational expenses. As a result of which the operating cost has been

reduced as no user training is needed and only paper and ribbon costs

will have to be incurred after regular intervals.

SCOPE

The idea of the project is to develop software for caring out the following

activities like:

 Easy to used Oracle on click event.

 Providing facility of the content as well as structure of a table.

VIPIN KUMAR 494 1670370140


 Generating report and Creating backup.

 It works are a navigator for Oracle -8i as it doesn’t have

navigator facility

 This s/w package occupies less storage space in comparison of

Oracle Navigator.

VIPIN KUMAR 495 1670370140


FUTURE SCOPE AND FURTHER

ENHANCEMENT OF THE PROJECT

The candidate system developed is itself very flexible to modify itself

with the needs of users and customers in the future. Yet the software is

capable of enhancement. Few features, which can be later, introduce in the

software for the enhancing it.

 More authentication responsibilities can be added in existing

system.

 The system could be implemented that the user can create

sequences.

 Programming facilities (PL/SQL) can be introduced such that a

user can develop own program.

VIPIN KUMAR 496 1670370140


LIMITATIONS OF THE PROJECT

The candidate system developed is itself very flexible to modify itself with

the needs of users and customers in the future. Yet the software is capable

of enhancement. Few features, which can be later, introduce in the software

for the enhancing it.

 More authentication responsibilities can be added in existing

system.

 The system could be implemented that the user can create

sequences .

 Programming facilities can be introduced such that a user can

develop own program.

 Using sub queries and joins.

The idea of the project is to develop software for caring out the following

activities like:

 Easy to use Oracle on click event.

 Providing facility of the content as well as structure of a table.

 Delete or more field name from a table.

 Generating report and Creating backup.

VIPIN KUMAR 497 1670370140


Bibliography

Here I would like to mention the name of the books and URLs used for

reference while designing, testing, implementation, and coding of the

system:

DESIGNING, TESTING, IMPLEMENTATION PHASE

 System Analysis & Design, by Elias M. Ewad.

 An Integrated Approach to S/W Engineering, by Pankaj Jalote.

 Software Engineering, by Roger S. Pressman.

 Database System Concepts, by Kurt.

 Oracle SQL developer handbook by Mc Grow Hill.

 CODING PHASE

 Complete Reference-Java

 Black Book -Java

 www.sunjava.com

 www.w3schools.com

VIPIN KUMAR 498 1670370140


VIPIN KUMAR 499 1670370140
VIPIN KUMAR 500 1670370140