Main Project Report Multiple Database Manager
1. INTRODUCTION
1.1 About project:
In our present world up to now we have many types of database converters. They are limited
to a little extend only that is some of them are just converting the structure of the database,
some of them are limited to two databases only.
But our idea is to develop a multiple database manager which is having not only the database
conversion but also should have multiple operations for the database.
This multiple operation involves the basic operations of a database like DML, DDL, and
DCL.
The DML consist operations like INSERT, UPDATE, DELETE.
The DDL consist operations like CREATE, ALTER, DROP.
The DCL consist operation like SELECT.
In this tool we are providing all kinds of migrations techniques according to the performed
operation of the source DB.
To use this amazing tool we need to have a backend support database, so for that reason when
ever we are going to install this tool in our system we should have the basic ORACLE
database should be installed for the back end support.
In this Database Manager we need to fallow some protocols in order to get the accurate and
desired output for the user, for this we need to fallow the fallowing
At first if you need to perform the migration operation, you can directly click on the
MIGRATE option in the present menu page.
If you need to perform any kind of changes in your database you can directly
choose the any operation present in the menu page.
After performing the required operations of the source database then return to the
menu page and perform the MIGRATION operation.
By fallowing these we can able to get the exact result as we need from this tool with out any
exceptions.
Aizza College of Engineering & Technology Page 1
Main Project Report Multiple Database Manager
1.2 Existing system with Drawbacks:
Up to now we have many types of database migration tools are exists like DB converter
for access & Ms Access & MS sql, ERWIN tool, CSV converter.
The following tools are limited have the operation of converting entire structure of the
selected databases but not the selected record.
Drawbacks: Some of the tools (CSV converter,DB converter) are limited to 2 database only
They used to convert (Erwin tool) entire structure of the DB but not the data.
Tools are used for complete table migrate but not individuals.
These tools are expensive in real time to use their limited features.
1.3 Proposed system with features:
In this tool we are providing all kinds of migrations techniques according to the performed
operation of the source DB.
It is an open source tool which can be used and extended for free of cost in future.
Features: This tool can be used to migrate for any one DB to any kind of db.
Migration can be done for individual and group of the DB.
No tool is present up to now.
It can be used for free.
Aizza College of Engineering & Technology Page 2
Main Project Report Multiple Database Manager
2. SYSTEM ANALYSIS
2.1 Software & Hardware Requirements:
Hardware Requirements (preferable)
Processor : Intel Pentium-IV
Hard disk : 40GB Min.
RAM : 1GB Min
Software Requirements (preferable)
Front End : JAVA/J2EE
Operating System : Windows XP
IDE’S : .Net Beans6.9.1
Database : Oracle 10g
2.2 Functional & Non-Functional Requirements:
Non Functional Requirements:
Speed:In our project we are providing various migration techniques, so each migration having the
speed of 10kb/sec.
Cost:It is free of cost, because it is an open source tool
Size:It occupies very less space in the memory i.e. less than 10 Mb.
Maintainability: Maintainability is used to make future maintenance easier, meet new requirements.
Robustness:Robustness is the quality of being able to withstand stress, pressures, or changes in procedure
or circumstance.
Aizza College of Engineering & Technology Page 3
Main Project Report Multiple Database Manager
2.3 Technology used:
NetBeans IDE[5] is a modular, standards-based integrated development environment (IDE),
written in the Java programming language. The NetBeans project consists of a full-featured
open source IDE written in the Java programming language and a rich client application
platform, which can be used as a generic framework to build any kind of application. For
information about how to install the software on your system, please see the NetBeans IDE
6.9.1 Installation Instructions.
The following changes have been made to the database functionality in NetBeans IDE
6.9.1:
Upgraded Drivers. The MySQL drivers included in NetBeans IDE have been updated to
version is 5.1.6.
Tested Drivers
NetBeans IDE 6.9.1 has been tested with the following databases and drivers.
Driver
Version
Example URL
JavaDB Derby 10.4.1.3
jdbc:derby://localhost:1527/sample (Network)
Oracle Oracle Database 11g
(11.1.0.7 )
jdbc:oracle:thin:@//localhost:1521:ora9i
PostgreSQL 8.x
jdbc:postgresql://jsmith.mycompany.com:5432/postgres
MySQL MySQL Connector/J
5.1.6
jdbc:mysql://localhost:3306/sample
Aizza College of Engineering & Technology Page 4
Main Project Report Multiple Database Manager
2.4 Module Description:
DML (Data Manipulation Language)
DCL (Data Control Language)
DDL (Data Definition Language)
MIGRATE
DML:
Definition - A data manipulation language (DML) is a family of computer languages
including commands permitting users to manipulate data in a database. This manipulation
involves inserting data into database tables, retrieving existing data, deleting data from
existing tables and modifying existing data. DML is mostly incorporated in SQL databases.
DML resembles simple English language and enhances efficient user interaction with the
system. The functional capability of DML is organized in manipulation commands like
UPDATE, INSERTINTO and DELETE FROM, as described below.
UPDATE: This command modifies data of one or more records. An update command syntax
is UPDATE table name SET column name = value where [condition].
INSERT: This command adds one or more records to a database table. The insert command
syntax is INSERT INTO table name [column(s)] VALUES [value(s)].
DELETE: This command removes one or more records from a table according to specified
conditions. Delete command syntax is DELETE FROM table name where [condition].
DCL:A data control language (DCL) is a syntax similar to a computer programming language used
to control access to data stored in a database. In particular, it is a component of Structured
Query Language (SQL).
Examples of DCL commands include:
SELECT: This command is used to allow specified users to select specified tasks.
Aizza College of Engineering & Technology Page 5
Main Project Report Multiple Database Manager
DDL:The Data Definition Language (DDL) is used to create and destroy databases and database
objects. These commands will primarily be used by database administrators during the setup
and removal phases of a database project.
The functional capability of DDL is organized in manipulation commands like CREATE,
ALTER, and DROP, as described below.
CREATE: The CREATE command can be used to create a table in a database. The syntax of
this command is Create table <table name> (<col1> <datatype>(<size>),<col2>
<datatype><size>));
ALTER: This command is used to modify the structure of the tables.The syntax of this command is
Alter table <tablename> add(<new col><datatype(size),<new
col>data type(size));
DROP: This command is used to destroy the tables.The syntax of this command is
Drop table <tablename>;
MIGRATE: This operation is used to convert one database to another database by using its relevant data
types.
Aizza College of Engineering & Technology Page 6
Main Project Report Multiple Database Manager
3. SYSTEM DESIGN
3.1Block Diagram:
Figure: 3.1(a) Block Diagram
Aizza College of Engineering & Technology Page 7
Main Project Report Multiple Database Manager
3.2 Data Flow Diagrams:
A data flow diagram[4] is graphical tool used to describe and analyze movement of
data through a system. These are the central tool and the basis from which the other
components are developed.
The transformation of data from input to output, through processed, may be described
logically and independently of physical components associated with the system.
These are known as the logical data flow diagrams.
The physical data flow diagrams show the actual implements and movement of data
between people, departments and workstations.
DFD is also known as a “Bubble Chart” has the purpose of clarifying system
requirements and identifying major transformations that will become programs in
system design. So it is the starting point of the design to the lowest level of detail.
DFD symbols:
Element References Symbols Data Flow Process
Process
Data Store
Source & Destination
Aizza College of Engineering & Technology Page 8
Main Project Report Multiple Database Manager
Description:
Process:
No process can have only outputs
No process can have only inputs. If an object has only inputs than it must be a sink.
A process has a verb phrase libels.
Data Store:Data cannot move directly from one data store to another data store, a process must
move data.
Data cannot move directly from an outside source to a data store, a process, which
receives, must move data from the source and place the data into data store.
A data store has a noun phrase label.
Source or Sink:
The origin and/or destination of data
Data cannot move directly from a source to sink it must be moved by a process
Source and/or sink has a noun phrase
Aizza College of Engineering & Technology Page 9
Main Project Report Multiple Database Manager
Context Level DFD for User
Figure: 3.2(a) Context Level DFD for User
Aizza College of Engineering & Technology Page 10
Main Project Report Multiple Database Manager
Top level DFD for User
Figure: 3.2(b) Top Level DFD for User
Aizza College of Engineering & Technology Page 11
Main Project Report Multiple Database Manager
Detailed Level DFD for User
Aizza College of Engineering & Technology Page 12
Main Project Report Multiple Database Manager
Figure: 3.2 (c) Detailed Level DFD for user
Aizza College of Engineering & Technology Page 15
Main Project Report Multiple Database Manager
3.3 UML Diagrams:
3.3.1 Use Case Diagram:
Early stages of the design process to collect the intention requirements of a project .
The first diagram to look at a project is the Use Case diagram [1]. The main ingredients for
this type of diagram are use cases and actors. They are associated to the tasks, or use cases,
they are involved in. it is often used in
ACTORS - also referred to as roles. Name and stereotype of an actor can
be changed in its properties tab.
INHERITANCE - refinement relations between actors. This relation can
carry a name and a stereotype.
USE CASES - these can have extension points.
ASSOCIATIONS - between roles and use cases. It is useful to give
associations speaking names.
DEPENDENCIES - between use cases. Dependencies often have a
stereotype to better define the role of the dependency. There are two special
kinds of dependencies: <<extend>> and <<include>>.
EXTEND RELATIONSHIP - a unit-directional relationship between two
use cases. An extend relationship between use case b and use case a means
that the behavior of b can be included in a.
INCLUDE RELATIONSHIP - a unit-directional relationship between
two use cases. Such a relationship between use cases a and b means, that the
behavior of b is always included in a.
SYSTEM BORDER -. You can simply draw a rectangle; use it as system
border by putting all corresponding use cases inside the rectangle.
Aizza College of Engineering & Technology Page 16
Main Project Report Multiple Database Manager
Use Case Diagram
Figure: 3.3.1(a) Use case Diagram
Aizza College of Engineering & Technology Page 17
Main Project Report Multiple Database Manager
3.3.2 Sequence Diagram:
A Sequence diagram [1] is an easily comprehensible visualization of single
scenarios in time. The diagram essentially includes a timeline that flows from the top to the
bottom of the diagram and is displayed as a dotted line. The interaction between objects is
described by specifying the different kinds of messages sent between them. Messages are
called stimuli.
Diagram Elements:
OBJECTS - elements responsible for sending and receiving messages.
CALL STIMULI - represents a synchronous message, which means that it is
regarded as a procedure call.
SEND STIMULI - illustrates an asynchronous message, which means that it is
regarded as a signal. As such, the sender doesn't wait for an answer from the receiver.
RETURN STIMULI - represents the return statement of a call stimulus.
CREATE STIMULI - used to create a new object at a certain point in the
sequence. The created object will then be placed at this specific point and not at the
top of the diagram pane
DESTROY STIMULI - used to destroy an object at a specific point in the
sequence. the lifeline of the destroyed object will then end with a cross at this point
and not at the bottom of the diagram pane
Aizza College of Engineering & Technology Page 18
Main Project Report Multiple Database Manager
Sequence Diagram
u:User h:Home v:Viewdatabase
s:Selectoperations
d:Destination
m:Migrate d:Database
1:LOGIN2:VALIDATION
3:RETRIEVE THE HOME
4:CHOOSE THE SOURCE DATABASE
5:SELECT THE OPERATION
7:SELECT THE DATABASE
8:MIGRATE THE DATABASE
9:STORE INTO DATABASE
10:LOGOUT
6:RETRIEVE THE DATABASE
Aizza College of Engineering & Technology Page 19
Main Project Report Multiple Database Manager
Figure: 3.3.2(b) Sequence diagram
3.3.3 Collaboration Diagram:
A Collaboration diagram[1] emphasizes the organization of the objects that
participates in interaction. It addresses the dynamic view of the system. It consists of a path
and sequence number. A path is used to indicate how one object is linked to another; you can
attach a path stereotype to the far end of a link. The sequence diagram used to indicate the
time-ordering of message; we prefix the message with a number.
Diagram Elements:
Objects- in Collaborations, objects represent different roles these are specified as
classifier roles in Poseidon for UML.
Association- Associations illustrate the connections between collaborating
objects. Messages are then placed along them.
Messages- Messages just like in Sequence diagrams, messages are used to
describe the interaction between objects. The numbers in front of the given names.
Aizza College of Engineering & Technology Page 20
Main Project Report Multiple Database Manager
Collaboration diagram
Figure: 3.3.3(c) Collaboration diagram
Aizza College of Engineering & Technology Page 21
Main Project Report Multiple Database Manager
3.3.4 Activity Diagram:
Activity diagrams[1] are often used to model business processes. They simply and
quite plainly show how things work, and so function as a good aid to discussions of aspects
of the workflow with the domain experts.
Diagram Elements:
Initial States And Final States - indicate the beginning and end of the observed
process.
Action States - specific activities which comprise the process. They must be executed
in a specified chronological order. Sometimes you may want to split the sequence;
therefore, you have two different possibilities: branches (choice) and forks
(concurrency).
Branches - these divide the sequence into several alternatives specified by different
conditions (guards).
Forks And Joins - forks divide the sequence into concurrent sub-sequences. Joins
merge the sub-sequences.
Synchronization States - used in concurrent sub-sequences to synchronize producer-
consumer relations.
Transitions - the ingredient that keep states active and the model elements together.
Each transition can be given guards, triggers, and actions as properties to describe its
behavioral details.
Object Flow States - objects are inputs or outputs of activities and are accordingly
connected by transitions to them.
Dependencies - always possible between any model elements.
Aizza College of Engineering & Technology Page 22
Main Project Report Multiple Database Manager
Activity diagram
Aizza College of Engineering & Technology Page 23
Main Project Report Multiple Database Manager
USER
NO
LOGOUT
HOME
VIEW DATABASE
SELECT OPERTAION
DESTINATION
MIGRATE
DATABASEYES LOGIN
DATABASEMIGRATEDESTINATIONSELECTOPERATIONVIEW DATABASEHOMEUSER
Figure: 3.3.4(d) Activity diagram
Aizza College of Engineering & Technology Page 24
Main Project Report Multiple Database Manager
4. SAMPLE CODING
Welcome page :/* * To change this template, choose Tools | Templates * and open the template in the editor. */
/* * welcomepage.java * * Created on 19 Mar, 2012, 2:14:20 PM */
package databasemanager;
import java.io.FileInputStream;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.Statement;import java.util.Properties;import javax.swing.JOptionPane;
/** * * @author HARISAIKRISHNA */public class welcomepage extends javax.swing.JFrame {
/** Creates new form welcomepage */ public welcomepage() { initComponents(); this.setSize(800,600); }
/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() {
jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel();
Aizza College of Engineering & Technology Page 25
Main Project Report Multiple Database Manager
jButton1 = new javax.swing.JButton(); jTextField1 = new javax.swing.JTextField(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jPasswordField1 = new javax.swing.JPasswordField(); jLabel4 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); addWindowListener(new java.awt.event.WindowAdapter() { public void windowOpened(java.awt.event.WindowEvent evt) { formWindowOpened(evt); } }); getContentPane().setLayout(null);
jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setLayout(null);
jLabel1.setFont(new java.awt.Font("Times New Roman", 1, 18)); jLabel1.setForeground(new java.awt.Color(0, 102, 0)); jLabel1.setText("User Id :-"); jPanel1.add(jLabel1); jLabel1.setBounds(70, 230, 90, 20);
jLabel2.setFont(new java.awt.Font("Times New Roman", 1, 18)); jLabel2.setForeground(new java.awt.Color(102, 0, 0)); jLabel2.setText("PassWord :-"); jPanel1.add(jLabel2); jLabel2.setBounds(70, 270, 100, 22);
jButton1.setText("Signin"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jPanel1.add(jButton1); jButton1.setBounds(70, 330, 70, 33);
jTextField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField1ActionPerformed(evt); } }); jTextField1.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTextField1FocusLost(evt); } }); jPanel1.add(jTextField1);
Aizza College of Engineering & Technology Page 26
Main Project Report Multiple Database Manager
jTextField1.setBounds(170, 220, 200, 30);
jButton2.setText("Signup"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jPanel1.add(jButton2); jButton2.setBounds(150, 330, 80, 32);
jButton3.setText("Forgot Password"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jPanel1.add(jButton3); jButton3.setBounds(240, 330, 140, 33);
jPasswordField1.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jPasswordField1FocusLost(evt); } }); jPanel1.add(jPasswordField1); jPasswordField1.setBounds(170, 270, 200, 30);
jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Slide1.JPG"))); // NOI18N jPanel1.add(jLabel4); jLabel4.setBounds(70, -10, 820, 570);
getContentPane().add(jPanel1); jPanel1.setBounds(-70, 0, 870, 590);
pack(); }// </editor-fold>
private void jPasswordField1FocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(jPasswordField1.getText().equals("")) { JOptionPane.showMessageDialog(this,"enter ur password","alert",JOptionPane.ERROR_MESSAGE); }}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: forgotpassword f=new forgotpassword();
Aizza College of Engineering & Technology Page 27
Main Project Report Multiple Database Manager
f.setSize(800,500); f.setVisible(true); this.dispose();}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: signupform s1=new signupform(); s1.setSize(800,550); s1.setVisible(true); this.dispose();}
private void jTextField1FocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here:}
private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here:}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { try { FileInputStream fis=new FileInputStream("d:\\oradbconn.properties"); Properties p=new Properties(); p.load(fis); String driver=p.getProperty("driver"); String url=p.getProperty("url"); String username=p.getProperty("username"); String password=p.getProperty("password"); Class.forName(driver); Connection con=DriverManager.getConnection(url,username,password); String login=jTextField1.getText(); String pass=jPasswordField1.getText(); PreparedStatement pst=con.prepareStatement("select userid ,pwd from registration where userid=? and pwd=?"); pst.setString(1,login); pst.setString(2,pass); // String str= ResultSet rs=pst.executeQuery(); if(rs.next()) { Homepage h1=new Homepage(); h1.setSize(800,500); h1.setVisible(true); this.dispose();
} else { JOptionPane.showMessageDialog(this,"your password is incorrect","alert",JOptionPane.ERROR_MESSAGE);
Aizza College of Engineering & Technology Page 28
Main Project Report Multiple Database Manager
}
// TODO add your handling code here: } catch (Exception e) { JOptionPane.showMessageDialog(this, e); } }
private void formWindowOpened(java.awt.event.WindowEvent evt) {
// TODO add your handling code here: }
/** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new welcomepage().setVisible(true); } }); }
// Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel4; private javax.swing.JPanel jPanel1; private javax.swing.JPasswordField jPasswordField1; private javax.swing.JTextField jTextField1; // End of variables declaration
}
SIGNUP FORM/*
Aizza College of Engineering & Technology Page 29
Main Project Report Multiple Database Manager
* To change this template, choose Tools | Templates * and open the template in the editor. */
/* * signupform.java * * Created on 19 Mar, 2012, 2:25:30 PM */
package databasemanager;
import java.io.FileInputStream;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.Statement;import java.util.Properties;import java.util.Random;import javax.swing.JOptionPane;
/** * * @author HARISAIKRISHNA */public class signupform extends javax.swing.JFrame {
/** Creates new form signupform */ public signupform() { initComponents(); this.setSize(800,550); }
/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() {
jTextField5 = new javax.swing.JTextField(); jLabel17 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jLabel10 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jTextField2 = new javax.swing.JTextField();
Aizza College of Engineering & Technology Page 30
Main Project Report Multiple Database Manager
jLabel3 = new javax.swing.JLabel(); jPasswordField1 = new javax.swing.JPasswordField(); jLabel4 = new javax.swing.JLabel(); jPasswordField3 = new javax.swing.JPasswordField(); jLabel5 = new javax.swing.JLabel(); jTextField8 = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); jTextField9 = new javax.swing.JTextField(); jLabel7 = new javax.swing.JLabel(); jComboBox1 = new javax.swing.JComboBox(); jTextField6 = new javax.swing.JTextField(); jTextField7 = new javax.swing.JTextField(); jLabel8 = new javax.swing.JLabel(); jLabel16 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); jLabel14 = new javax.swing.JLabel(); jLabel15 = new javax.swing.JLabel(); jCheckBox1 = new javax.swing.JCheckBox(); jLabel9 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jLabel19 = new javax.swing.JLabel();
jTextField5.setText("jTextField5");
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); addWindowListener(new java.awt.event.WindowAdapter() { public void windowOpened(java.awt.event.WindowEvent evt) { formWindowOpened(evt); } });
jPanel1.setMaximumSize(new java.awt.Dimension(800, 500)); jPanel1.setPreferredSize(new java.awt.Dimension(800, 500)); jPanel1.setLayout(null);
jLabel10.setFont(new java.awt.Font("Times New Roman", 1, 18)); jLabel10.setForeground(new java.awt.Color(255, 255, 255)); jLabel10.setText("REGISTRATION FORM"); jPanel1.add(jLabel10); jLabel10.setBounds(260, 20, 206, 33);
jLabel1.setFont(new java.awt.Font("Times New Roman", 1, 12)); jLabel1.setForeground(new java.awt.Color(102, 255, 255)); jLabel1.setText("Name"); jPanel1.add(jLabel1); jLabel1.setBounds(120, 100, 60, 14);
Aizza College of Engineering & Technology Page 31
Main Project Report Multiple Database Manager
jTextField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField1ActionPerformed(evt); } }); jTextField1.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTextField1FocusLost(evt); } }); jPanel1.add(jTextField1); jTextField1.setBounds(270, 90, 180, 20);
jLabel2.setFont(new java.awt.Font("Times New Roman", 1, 12)); jLabel2.setForeground(new java.awt.Color(204, 255, 204)); jLabel2.setText("Userid"); jPanel1.add(jLabel2); jLabel2.setBounds(120, 140, 60, 14);
jTextField2.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTextField2FocusLost(evt); } }); jPanel1.add(jTextField2); jTextField2.setBounds(270, 130, 184, 20);
jLabel3.setFont(new java.awt.Font("Times New Roman", 1, 12)); jLabel3.setForeground(new java.awt.Color(255, 153, 204)); jLabel3.setText("Password"); jPanel1.add(jLabel3); jLabel3.setBounds(120, 190, 70, 14);
jPasswordField1.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jPasswordField1FocusLost(evt); } }); jPanel1.add(jPasswordField1); jPasswordField1.setBounds(270, 170, 184, 20);
jLabel4.setFont(new java.awt.Font("Times New Roman", 1, 12)); jLabel4.setForeground(new java.awt.Color(102, 255, 102)); jLabel4.setText("Confirm Password"); jPanel1.add(jLabel4); jLabel4.setBounds(120, 220, 100, 14);
jPasswordField3.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) {
Aizza College of Engineering & Technology Page 32
Main Project Report Multiple Database Manager
jPasswordField3FocusLost(evt); } }); jPanel1.add(jPasswordField3); jPasswordField3.setBounds(270, 210, 184, 18);
jLabel5.setFont(new java.awt.Font("Times New Roman", 1, 12)); jLabel5.setForeground(new java.awt.Color(51, 255, 51)); jLabel5.setText("Emailid"); jPanel1.add(jLabel5); jLabel5.setBounds(120, 260, 70, 14);
jTextField8.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTextField8FocusLost(evt); } }); jPanel1.add(jTextField8); jTextField8.setBounds(270, 250, 184, 20);
jLabel6.setFont(new java.awt.Font("Times New Roman", 1, 12)); jLabel6.setForeground(new java.awt.Color(255, 102, 153)); jLabel6.setText("PhoneNo"); jPanel1.add(jLabel6); jLabel6.setBounds(120, 310, 70, 14);
jTextField9.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTextField9FocusLost(evt); } }); jPanel1.add(jTextField9); jTextField9.setBounds(270, 300, 184, 20);
jLabel7.setFont(new java.awt.Font("Times New Roman", 1, 12)); jLabel7.setForeground(new java.awt.Color(255, 255, 51)); jLabel7.setText("Type of Organisation"); jPanel1.add(jLabel7); jLabel7.setBounds(120, 360, 140, 14);
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jComboBox1.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jComboBox1ItemStateChanged(evt); } }); jPanel1.add(jComboBox1); jComboBox1.setBounds(270, 350, 198, 20);
Aizza College of Engineering & Technology Page 33
Main Project Report Multiple Database Manager
jTextField6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField6ActionPerformed(evt); } }); jPanel1.add(jTextField6); jTextField6.setBounds(120, 390, 124, 34);
jTextField7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField7ActionPerformed(evt); } }); jTextField7.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTextField7FocusLost(evt); } }); jPanel1.add(jTextField7); jTextField7.setBounds(300, 390, 124, 33);
jLabel8.setForeground(new java.awt.Color(255, 51, 51)); jLabel8.setText("Type the shown characters"); jPanel1.add(jLabel8); jLabel8.setBounds(510, 400, 210, 14);
jLabel16.setForeground(new java.awt.Color(255, 51, 51)); jLabel16.setText("*"); jPanel1.add(jLabel16); jLabel16.setBounds(480, 400, 6, 14);
jLabel11.setForeground(new java.awt.Color(255, 0, 0)); jLabel11.setText("*"); jPanel1.add(jLabel11); jLabel11.setBounds(490, 90, 169, 14);
jLabel12.setForeground(new java.awt.Color(255, 51, 51)); jLabel12.setText("*"); jPanel1.add(jLabel12); jLabel12.setBounds(490, 120, 169, 14);
jLabel13.setForeground(new java.awt.Color(255, 0, 0)); jLabel13.setText("*"); jPanel1.add(jLabel13); jLabel13.setBounds(490, 160, 169, 14);
jLabel14.setForeground(new java.awt.Color(204, 0, 0)); jLabel14.setText("*"); jPanel1.add(jLabel14); jLabel14.setBounds(490, 210, 169, 14);
Aizza College of Engineering & Technology Page 34
Main Project Report Multiple Database Manager
jLabel15.setForeground(new java.awt.Color(255, 51, 51)); jLabel15.setText("*"); jPanel1.add(jLabel15); jLabel15.setBounds(490, 260, 169, 14); jPanel1.add(jCheckBox1); jCheckBox1.setBounds(220, 440, 21, 21);
jLabel9.setForeground(new java.awt.Color(51, 255, 204)); jLabel9.setText("I accept the terms & conditions"); jPanel1.add(jLabel9); jLabel9.setBounds(300, 440, 230, 14);
jButton1.setFont(new java.awt.Font("Times New Roman", 1, 14)); jButton1.setText("Signin"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jPanel1.add(jButton1); jButton1.setBounds(200, 470, 90, 30);
jButton2.setFont(new java.awt.Font("Times New Roman", 1, 14)); jButton2.setText("Cancel"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jPanel1.add(jButton2); jButton2.setBounds(320, 470, 100, 30);
jButton3.setFont(new java.awt.Font("Times New Roman", 1, 14)); jButton3.setText("<<Back"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jPanel1.add(jButton3); jButton3.setBounds(450, 470, 130, 30);
jLabel19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/new.jpg"))); // NOI18N jPanel1.add(jLabel19); jLabel19.setBounds(0, 0, 930, 520);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout);
Aizza College of Engineering & Technology Page 35
Main Project Report Multiple Database Manager
layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 935, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(215, 215, 215) .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(431, Short.MAX_VALUE)) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 511, Short.MAX_VALUE) );
pack(); }// </editor-fold>
private void jTextField6ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: }
private void jTextField7ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: }
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: }
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { try { FileInputStream fis=new FileInputStream("d:\\oradbconn.properties"); Properties p=new Properties(); p.load(fis); String driver=p.getProperty("driver"); String url=p.getProperty("url"); String username=p.getProperty("username"); String password=p.getProperty("password"); Class.forName(driver); Connection con=DriverManager.getConnection(url,username,password);
String nam=jTextField1.getText();
Aizza College of Engineering & Technology Page 36
Main Project Report Multiple Database Manager
String uid=jTextField2.getText();String pwd=jPasswordField1.getText();String eid=jTextField8.getText();String phno=jTextField9.getText();int pno=0;//if(int i=0;i<pno.length();i++)String org=jComboBox1.getSelectedItem().toString();String cap=jTextField7.getText();PreparedStatement ps=con.prepareStatement("insert into registration values(?,?,?,?,?,?,?)");if(nam.equals("")){ JOptionPane.showMessageDialog(this,"enter the username","alert",JOptionPane.ERROR_MESSAGE);}else if(uid.equals("")){ JOptionPane.showMessageDialog(this,"enter ur userid","alert",JOptionPane.ERROR_MESSAGE);}else if(pwd.equals("")){ JOptionPane.showMessageDialog(this,"enter ur password","alert",JOptionPane.ERROR_MESSAGE);}else if(eid.equals("")){ JOptionPane.showMessageDialog(this,"enter ur emailid","alert",JOptionPane.ERROR_MESSAGE);} else if((!eid.contains("@")) || (!eid.contains("."))){ JOptionPane.showMessageDialog(this,"email should contain @ and dot(.)","alert",JOptionPane.ERROR_MESSAGE); }else if(phno.length()!=10)
{ JOptionPane.showMessageDialog(this,"enter Size as Mobile Number","alert",JOptionPane.ERROR_MESSAGE);} else if(phno.equals("")){ JOptionPane.showMessageDialog(this,"Enter Mobile Number"); } else if(jComboBox1.getSelectedIndex() == 0)
{ JOptionPane.showMessageDialog(this,"enter ur organization","alert",JOptionPane.ERROR_MESSAGE);} else if((jComboBox1.getSelectedIndex()==1)&& (jComboBox1.getSelectedIndex()==2)&& (jComboBox1.getSelectedIndex()==3)){ ps.setString(6,org);
Aizza College of Engineering & Technology Page 37
Main Project Report Multiple Database Manager
Random r=new Random();String r1=String.valueOf(r.nextInt());jTextField6.setText(r1);
}
else if(cap.equals("")){ JOptionPane.showMessageDialog(this,"enter the capcha data","alert",JOptionPane.ERROR_MESSAGE);} else if(!jTextField6.getText().equals(jTextField7.getText())){ JOptionPane.showMessageDialog(this, "Enter Corrct Captcha Code"); } else if(!jCheckBox1.isSelected()){ JOptionPane.showMessageDialog(this,"Please select the accept rules"); } else{ //int pno1=(Integer.parseInt(phno)); ps.setString(1,uid);ps.setString(2,nam);ps.setString(3,pwd);ps.setString(4,eid);ps.setString(5, phno);ps.setString(6, cap);ps.setString(7, cap); int i=ps.executeUpdate();if(i>0){ JOptionPane.showMessageDialog(this,"inserted","alert",JOptionPane.INFORMATION_MESSAGE);} else{ JOptionPane.showMessageDialog(this,"not inserted","alert",JOptionPane.ERROR_MESSAGE); } } } catch (Exception e) { JOptionPane.showMessageDialog(this,e); }
// TODO add your handling code here: }
Aizza College of Engineering & Technology Page 38
Main Project Report Multiple Database Manager
private void jTextField2FocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here: try { /*Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","hsk","hsk");*/ if(jTextField2.getText().equals("")){ //JOptionPane.showMessageDialog(this,"Enter the userid"); jLabel12.setText("Enter the userid *");} else{ jLabel12.setText("*"); }
} catch (Exception e) { }
}
private void jTextField1FocusLost(java.awt.event.FocusEvent evt) { if(jTextField1.getText().equals("")){ //JOptionPane.showMessageDialog(this,"Enter the Name"); jLabel11.setText("Enter the Name *");} else{ jLabel11.setText("*"); }
// TODO add your handling code here: }
private void jPasswordField1FocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here:if(jPasswordField1.getText().equals("")){ //JOptionPane.showMessageDialog(this,"Enter the password"); jLabel13.setText("enter password *");} else{ jLabel13.setText("*"); }
}
Aizza College of Engineering & Technology Page 39
Main Project Report Multiple Database Manager
private void jPasswordField3FocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(jPasswordField3.getText().equals("")){// JOptionPane.showMessageDialog(this,"Enter the confirmed password"); jLabel14.setText("enter confirmed password *");} else if(!jPasswordField1.getText().equals(jPasswordField3.getText())) { jLabel14.setText("Password Mismatch *"); } else{ jLabel14.setText("*"); }
}
private void jTextField9FocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(jTextField9.getText().equals("")){ JOptionPane.showMessageDialog(this,"Enter ur mobile number"); // jLabel15.setText("enter mobile");} else if(jTextField9.getText().length()!=10) { JOptionPane.showMessageDialog(this,"Enter Valid Mobile Number"); } else{ //jLabel15.setText("*"); } }
private void jTextField8FocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(jTextField8.getText().equals("")){// JOptionPane.showMessageDialog(this,"Enter ur email id"); jLabel15.setText("enter email");} else if((!jTextField8.getText().contains("@"))||(!jTextField8.getText().contains("."))) { jLabel15.setText("Enter the valid email id *"); } else{
Aizza College of Engineering & Technology Page 40
Main Project Report Multiple Database Manager
jLabel15.setText("*"); } }
private void jComboBox1ItemStateChanged(java.awt.event.ItemEvent evt) { // TODO add your handling code here:
}
private void jTextField7FocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here: if(jTextField7.getText().equals("")){ JOptionPane.showMessageDialog(this,"Enter the capcha");
} else{
} }
private void formWindowOpened(java.awt.event.WindowEvent evt) { Random r=new Random();jTextField6.setText(String.valueOf(r.nextInt()));
// TODO add your handling code here: }
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: welcomepage w=new welcomepage(); w.setSize(800,500); w.setVisible(true); this.dispose(); }
private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: }
/** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new signupform().setVisible(true); }
Aizza College of Engineering & Technology Page 41
Main Project Report Multiple Database Manager
}); }
// Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JCheckBox jCheckBox1; private javax.swing.JComboBox jComboBox1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel13; private javax.swing.JLabel jLabel14; private javax.swing.JLabel jLabel15; private javax.swing.JLabel jLabel16; private javax.swing.JLabel jLabel17; private javax.swing.JLabel jLabel19; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private javax.swing.JPanel jPanel1; private javax.swing.JPasswordField jPasswordField1; private javax.swing.JPasswordField jPasswordField3; private javax.swing.JTextField jTextField1; private javax.swing.JTextField jTextField2; private javax.swing.JTextField jTextField5; private javax.swing.JTextField jTextField6; private javax.swing.JTextField jTextField7; private javax.swing.JTextField jTextField8; private javax.swing.JTextField jTextField9; // End of variables declaration
}
5. RESULTS
Aizza College of Engineering & Technology Page 42
Main Project Report Multiple Database Manager
Welcome page:
Signup form:
Aizza College of Engineering & Technology Page 43
Main Project Report Multiple Database Manager
Forgot Password Form:
Aizza College of Engineering & Technology Page 44
Main Project Report Multiple Database Manager
Homepage:
Aizza College of Engineering & Technology Page 45
Main Project Report Multiple Database Manager
Menu Page:
Aizza College of Engineering & Technology Page 46
Main Project Report Multiple Database Manager
DML Form:
Aizza College of Engineering & Technology Page 47
Main Project Report Multiple Database Manager
Insert Operation Form:
Aizza College of Engineering & Technology Page 48
Main Project Report Multiple Database Manager
Update Table Form:
Aizza College of Engineering & Technology Page 49
Main Project Report Multiple Database Manager
Delete Table Form:
Aizza College of Engineering & Technology Page 50
Main Project Report Multiple Database Manager
DDL Form:
Aizza College of Engineering & Technology Page 51
Main Project Report Multiple Database Manager
Create Table Form:
Alter Table Form:
Aizza College of Engineering & Technology Page 53
Main Project Report Multiple Database Manager
Drop Table Form:
Aizza College of Engineering & Technology Page 54
Main Project Report Multiple Database Manager
DCL Operation Form:
Aizza College of Engineering & Technology Page 55
Main Project Report Multiple Database Manager
Select Table Form:
Aizza College of Engineering & Technology Page 56
Main Project Report Multiple Database Manager
Migration Form:
Aizza College of Engineering & Technology Page 57
Main Project Report Multiple Database Manager
6. SYSTEM TESTING
The purpose of this project is for security testing to ensure the robustness of a system
at the face of malicious attacks or regular software failure . A process of executing a program
with explicit intension of finding errors that is that is making the program fails. A primary
purpose for testing is to detect software failures so that defects may be uncovered and
corrected. The scope testing often includes examination of code as execution of that code in
various environments and conditions.
Software testing:It is process of testing[2] the functionality and it is the process of executing a program
with the intent of finding an error.
Black box Testing:The base of the black box testing strategy lies in the selection of appropriate data as
per functionality and testing it against the functional specifications in order to check for
normal and abnormal behavior of system. Now a days, it is becoming to route the testing
work to a third party as the developer of the system knows too much of the internal logic and
coding of system, Which makes it unfit to test application by the developer.
Test case:In our project, we have used the validation such that only required details to be entered.
Validation control is applied [Regular expression validation] for all the fields of mail
address such that the mail address is to be entered with format………. @.
Calendar control is used such that format of date/month and year are correctly
inserted.
White box testing:White box testing requires access to the source code. Though White box testing can
be performed any time in the life cycle after the code is developed, it is a good practice white
box testing during the unit testing phase.
Aizza College of Engineering & Technology Page 63
Main Project Report Multiple Database Manager
Test cases:According to our project, we have performed testing to check the correctness of
process.
Testing is performed to check the errors and to debug those errors, such that the forms or
modules are executed. I have done the unit testing by checking each line of code and found
that the code is error free.
Aizza College of Engineering & Technology Page 64
Main Project Report Multiple Database Manager
7. SCOPE & EXPANSIONScope:
Our project is mainly based on the various database migration techniques and their
related database operation.
Expansion: Our project can be extended further by adding “n” number of databases and “n” number
of operations.
Aizza College of Engineering & Technology Page 65
Main Project Report Multiple Database Manager
8. LIMITATION AND CONCLUSION
Limitation:
As our project is limited to 5 databases and their relevant migration techniques, so it
can be extended further by adding more number of databases for the migration.
Conclusion:
On our project basis using JAVA technology we have developed “MULTIPLE DATA
BASE MANAGER” software tool.
Our project helps in converting one database to another database.
Anyone can access this software tool and can convert one database to another.
Aizza College of Engineering & Technology Page 66
Main Project Report Multiple Database Manager
GLOSSARY
DFD - Data Flow Diagram
UML - Unified Modeling Language
IDE – Integrated Development Environment
J2EE – Java 2.0 Enterprise Edition
Aizza College of Engineering & Technology Page 67
Main Project Report Multiple Database Manager
BIBLIOGRAPHY
Text Books:
[1]Grady Booch, James Rumbaugh, Ivar Jacobson,
The unified modeling language user guide, 1997,81-7808-169-5,91.
[2] Baris Beizer, Dreamtech, 2nd Edition,
Software testing techniques, 6th edition,2006,92-7005-23-7,375.
[3] James sem,
System Analysis design
[4] Roger.S.Pressman, 6th Edition,
Software engineering, a practitioner’s approach, 7th edition,2010,13:978-007,482.
[5] Derek C, Ashmore The J2EE™ Architect’s Handbook, 4.
Aizza College of Engineering & Technology Page 68
Top Related