You are on page 1of 33

MGM’s POLYTECHNIC, AURANGABAD

2022-2023
Micro Project Report
On

“QUERY CREATOR APPLICATION”

Submitted in partial fulfillment for ‘I’ scheme fifth semester


Diploma in
COMPUTER ENGINEERING
By
33131 – SOFIYAN SHAIKH (2015010163)
33150 – OM KATHAR (2015010184)
33162 – SHASHANK UMAREKAR (2015010197)

Under the guidance of

Prof. DESHMUKH R. R.
(Lecturer)
In Pursuit of Excellence

Maharashtra State Board of Technical Education, Mumbai


(Autonomous) (ISO-9001-2008) (ISO/IEC 27001:2013)
Maharashtra State
Board of Technical Education, Mumbai

Certificate of Completion
This is to certify that Sofiyan Shakih, Om kathar, Shashank Umarekar with Enrollment No

2015010163, 2015010184, 2015010197 has successfully completed their Micro-Project entitled

"Query Creator Application” in the Subject of "Advanced Java Programming" in the fifth

semester during their tenure of completing the Diploma programme in Computer Engineering

From MGM's Polytechnic institute with institute code 1501.

Prof. Deshmukh R. R. Prof. Rathi S. R.


Guide HOD
Computer Department Computer Department

Dr. Patil B. M.
Principal
INDEX

Sr. No. Content Page No.

Micro-Project Proposal

1.0 Rational 1

2.0 Literature Review 1

3.0 Proposed methodology 1

4.0 Action plan 2

5.0 Resources Required 2

Micro-Project Report

1.0 Rational 3

2.0 Course Outcomes Integrated 3

3.0 Literature Review 3

4.0 Actual Procedure Followed 5

5.0 Actual Resources Used 28

6.0 Outputs of the Micro-Projects 28

7.0 Skill Developed / Learning outcomes of this Micro-Project 30

8.0 Applications of this Micro-project 30

9.0 Area of Future improvement 30


Annexure –I B
PART A
Query Creator Application

1.0 Rationale
In this project, we are going to make a query creator application using java.
The query creator application is a desktop system that provides a simple way to create
a query.Query Creator are used to easily create SQL queries that help you to get fast
and accurate results without any knowledge of SQL or coding. The query builder
takes input parameters from the user and then generate a query. This application is
used to make the query of create table, insert, update, delete data using a simple way.

2.0 Literature Review


Storing large amounts of data can be a problem for companies today. The most
common way to store data is to use databases. To extend the possibilities to store data,
the database is often partitioned. That means that the database is divided into smaller
parts.
A database is a solution to store information digitally. This project will
provide necessary knowledge on databases and partitioned databases. It will include
knowledge on how to communicate with a database, what a query creator is and
literature studies.
To communicate with a database and access data it is common to use request
statements, called a query or queries. A query is used as a question against a database.
The most commonly used query language is SQL (Structured Query Language). A
program that builds a query from a set of parameters is called a query creator.

3.0 Proposed Methodology


Firstly we understand the concept of database and the queries related to SQL.
Then, we collect the information about queries and their syntax, its operations. We
refer the different books of Java to get more information about our project. We take
help form different websites. In this way we collect our topic and we start the project
under the guidance of the teacher. We divided the project task/module and assigned it
to each member in the group. Hence, We successfully completed the project.

1
4.0 Action Plan

Planned
S. Planned Name of Responsible
Details of activity Finish
No. Start date Team Members
date
1 Select the topic as per the subject
and Study the Concept of SQL 22/08/22 27/08/22
and AWT components.

2 Search and Collect the


information related to SQL 12/09/22 19/09/22
Sofiyan Shaikh
queries and AWT components.
Om Kathar
3 First we Developed GUI using
Shashank Umarekar
different Components and apply 26/09/22 04/10/22
events on it.
4 As per the teacher guides, we
make report from collected 01/11/22 10/11/22
information.

5.0 Resources Required


S. Name of Specifications Qty Remarks
No. Resource/material
Any Desktop PC with
1 Computer System 1
basic Configuration

2 Software Jdk 1.8 1

The Complete Reference


3 Reference Book 2
SQL Programming
www.diva-portal.org
4 Web-sites www.java.com 3
www.javatpoint.com

*************

2
Annexure –II B
PART B
Query Creator Application

1.0 Rationale
In this project, we are going to make a query creator application using java.
The query creator application is a desktop system that provides a simple way to create
a query. Query Creator are used to easily create SQL queries that help you to get fast
and accurate results without any knowledge of SQL or coding. The query builder
takes input parameters from the user and then generate a query. This application is
used to make the query of create table, insert, update, delete data using a simple way.

2.0 Course Outcomes Integrated


 Develop Program using GUI Framework.
 Develop Program to handle events in Java Programming.
 Handle event of AWT components.

3.0 Literature Review .


To communicate with a database and access data it is common to use request
statements, called a query or queries. QUERY form is one of the most widely used
user interfaces for querying databases. Traditional query forms are designed and
predefined by developers or DBA in various information management systems. With
the rapid development of web information and scientific databases, modern databases
become very large and complex.
A query is used as a question against a database. The most commonly used
query language is SQL (Structured Query Language). A program that builds a query
from a set of parameters is called a query builder. Query Builder is an application
which provides a graphical user interface (GUI) for working with queries in various
database.
For developing this application we use AWT components. Java
AWT (Abstract Window Toolkit) is an API to develop Graphical User Interface
(GUI) or windows-based applications in Java. Java AWT components are platform-
dependent i.e. components are displayed according to the view of operating system.

3
AWT is heavy weight i.e. its components are using the resources of underlying
operating system (OS).

 Following are the components that are used in our project :-

1. Label :-
It is called a passive control as it does not create any event when it is
accessed. To create a label, we need to create the object of Label class.
2. TextField :-
The object of a TextField class is a text component that allows a user
to enter a single line text and edit it. It inherits TextComponent class,
which further inherits Component class.
3. Button :-
A button is basically a control component with a label that generates an
event when pushed. The Button class is used to create a labeled button that
has platform independent implementation. The application result in some
action when the button is pushed.

 Following are the Classes and Interfaces that are used for hanling the AWT
components

ActionListener Interface :-
The Java ActionListener is notified whenever you click on the button
or menu item. It is notified against ActionEvent. The ActionListener interface
is found in java.awt.event package

It has only one method: actionPerformed().

Syntax :- public abstract void actionPerformed(ActionEvent e);

4
4.0 Actual Procedure Followed.

Program : -

import java.awt.*;
import java.awt.event.*;

// Home Page //

class QueryCreator extends Frame


{
Font f1 = new Font("SansSerif" , Font.BOLD , 50);
Font f2 = new Font("SansSerif" , Font.BOLD , 30);
Button table,insert,delete,update;
public QueryCreator()
{
setLayout(null);
setBackground(Color.YELLOW);

Label lb1 = new Label("Query Creator Application");


add(lb1);
lb1.setBounds(500,100,700,60);
lb1.setFont(f1);

table = new Button("Create Table Query");


table.setBounds(200,340,300,100);
table.setFont(f2);
add(table);

insert = new Button("Create Insert Query");


insert.setBounds(550,340,300,100);
insert.setFont(f2);

5
add(insert);

update = new Button("Create Update Query");


update.setBounds(900,340,300,100);
update.setFont(f2);
add(update);

delete = new Button("Create Delete Query");


delete.setBounds(1250,340,300,100);
delete.setFont(f2);
add(delete);

table.addActionListener(new NewFrame());
insert.addActionListener(new NewFrame());
update.addActionListener(new NewFrame());
delete.addActionListener(new NewFrame());
}

class NewFrame implements ActionListener


{
public void actionPerformed(ActionEvent ae)
{
Object ob = ae.getSource();

if(ob == table)
{
TableCreator tc = new TableCreator();
tc.setSize(1900,1000);
setVisible(false);
tc.setVisible(true);
}
if(ob == insert)
{

6
InsertQuery iq = new InsertQuery();
iq.setSize(1900,1000);
setVisible(false);
iq.setVisible(true);
}
if(ob == update)
{
UpdateQuery uq = new UpdateQuery();
uq.setSize(1900,1000);
setVisible(false);
uq.setVisible(true);
}
if(ob == delete)
{
DeleteQuery dq = new DeleteQuery();
dq.setSize(1900,1000);
setVisible(false);
dq.setVisible(true);
}
}
}

public static void main(String ar[])


{
QueryCreator qs = new QueryCreator();
qs.setSize(1900,1000);
qs.setVisible(true);
}
}

//Create Table
class TableCreator extends Frame
{
TextField tbname;

7
TextField attr[] = new TextField[5];
TextField datatype[] = new TextField[5];
Button add[] = new Button[5];
Button ct,back;
Label query;
int num = 0;
int i;
String res;
int attrspace = 460;
int btnpos = 540;
Font f = new Font("SansSerif" ,Font.BOLD,45);
Font f1 = new Font("Arial" , Font.BOLD , 25);
Font font = new Font("SansSerif" , Font.BOLD ,18);
Font f2 = new Font("SansSerif" , Font.BOLD , 26);

public TableCreator()
{
setLayout(null);
setBackground(Color.YELLOW);

back = new Button("Back");


back.setBounds(100,100,100,40);
back.setFont(f1);
add(back);

Label lb = new Label("Create Table Query");


add(lb);
lb.setBounds(500,100,700,60);
lb.setFont(f);

Label lb1 = new Label("Table Name :- ");


add(lb1);
lb1.setBounds(100,200,200,40);
lb1.setFont(f1);

8
tbname = new TextField(15);
tbname.setBounds(320,200,250,40);
tbname.setFont(f1);
add(tbname);

Label lb2 = new Label("Attribute Name");


add(lb2);
lb2.setBounds(100,300,200,40);
lb2.setFont(f1);

attr[num] = new TextField(15);


attr[num].setBounds(100,380,250,40);
attr[num].setFont(f1);
add(attr[num]);

Label lb3 = new Label("Datatype");


add(lb3);
lb3.setBounds(450,300,200,40);
lb3.setFont(f1);

datatype[num] = new TextField(15);


datatype[num].setBounds(450,380,250,40);
datatype[num].setFont(f1);
add(datatype[num]);

add[num] = new Button(" + ");


add[num].setBounds(850,380,50,40);
add[num].setFont(f1);
add(add[num]);

ct = new Button("Create Table Query");


ct.setBounds(350,460,200,40);
ct.setFont(font);

9
add(ct);

query = new Label("");


query.setBounds(10,850,1700,60);
query.setFont(f2);
query.setForeground(Color.red);
add(query);

ct.addActionListener(new CreateQuery());
add[num].addActionListener(new AttributeCreator());
back.addActionListener(new Back());
}

class AttributeCreator implements ActionListener


{
public void actionPerformed(ActionEvent ae)
{
attrCreator();
}
}

public void attrCreator()


{
num = num + 1;

attr[num] = new TextField(15);


attr[num].setBounds(100,attrspace,250,40);
attr[num].setFont(f1);
add(attr[num]);

datatype[num] = new TextField(15);


datatype[num].setBounds(450,attrspace,250,40);
datatype[num].setFont(f1);
add(datatype[num]);

10
add[num] = new Button(" + ");
add[num].setBounds(850,attrspace,50,40);
add[num].setFont(f1);
add(add[num]);

ct.setBounds(350,btnpos,200,40);
attrspace = attrspace + 80;
btnpos = btnpos + 80;

add[num].addActionListener(new AttributeCreator());
}

class Back implements ActionListener


{
public void actionPerformed(ActionEvent ae)
{
setVisible(false);
QueryCreator qs = new QueryCreator();
qs.setSize(1900,1000);
qs.setVisible(true);
}
}

class CreateQuery implements ActionListener


{
String[] ab = new String[5];
String[] dt = new String[5];

public void actionPerformed(ActionEvent ae)


{

String tname = tbname.getText();

11
for(i = 0 ; i <= num ; i++)
{
ab[i] = attr[i].getText();
dt[i] = datatype[i].getText();
}

if(num == 0)
{
res = "Your Query Result = CREATE TABLE " +
tname + "( " + ab[0] + " " + dt[0] + ");" ;
}
if(num == 1)
{
res = "Your Query Result = CREATE TABLE " +
tname + "( " + ab[0] + " " + dt[0] + ", " + ab[1] + " " +
dt[1] + ");" ;
}
if(num == 2)
{
res = "Your Query Result = CREATE TABLE " +
tname + "( " + ab[0] + " " + dt[0] + ", " + ab[1] + " " +
dt[1] + ", " + ab[2] + " " + dt[2] + ");" ;
}

if(num == 3)
{
res = "Your Query Result = CREATE TABLE " +
tname + "( " + ab[0] + " " + dt[0] + ", " + ab[1] + " " +
dt[1] + ", " + ab[2] + " " + dt[2] + ", "+ ab[3] + " " +
dt[3] +");" ;
}
if(num == 4)
{

12
res = "Your Query Result = CREATE TABLE " +
tname + "( " + ab[0] + " " + dt[0] + ", " + ab[1] + " " +
dt[1] + ", " + ab[2] + " " + dt[2] + ", "+ ab[3] + " " +
dt[3] + ", " + ab[4] + " " + dt[4] +");" ;
}

query.setText(res);
}
}
}

// Insert Query Window


class InsertQuery extends Frame
{
TextField tbname;
TextField attr[] = new TextField[5];
TextField value[] = new TextField[5];
Button add[] = new Button[5];
Button ins,back;
Label query;
int num = 0;
int i;
String res;
int attrspace = 460;
int btnpos = 540;
Font f = new Font("SansSerif" ,Font.BOLD,45);
Font f1 = new Font("Arial" , Font.BOLD , 25);
Font font = new Font("SansSerif" , Font.BOLD ,18);
Font f2 = new Font("SansSerif" , Font.BOLD , 26);

public InsertQuery()
{
setLayout(null);
setBackground(Color.YELLOW);

13
back = new Button("Back");
back.setBounds(100,100,100,40);
back.setFont(f1);
add(back);

Label lb = new Label("Create Insert Query");


add(lb);
lb.setBounds(500,100,700,60);
lb.setFont(f);

Label lb1 = new Label("Table Name :- ");


add(lb1);
lb1.setBounds(100,200,200,40);
lb1.setFont(f1);

tbname = new TextField(15);


tbname.setBounds(320,200,250,40);
tbname.setFont(f1);
add(tbname);

Label lb2 = new Label("Attribute Name");


add(lb2);
lb2.setBounds(100,300,200,40);
lb2.setFont(f1);

attr[num] = new TextField(15);


attr[num].setBounds(100,380,250,40);
attr[num].setFont(f1);
add(attr[num]);

Label lb3 = new Label("Values");


add(lb3);
lb3.setBounds(450,300,200,40);

14
lb3.setFont(f1);

value[num] = new TextField(15);


value[num].setBounds(450,380,250,40);
value[num].setFont(f1);
add(value[num]);

add[num] = new Button(" + ");


add[num].setBounds(850,380,50,40);
add[num].setFont(f1);
add(add[num]);

ins = new Button("Create Insert Query");


ins.setBounds(350,460,200,40);
ins.setFont(font);
add(ins);

query = new Label("");


query.setBounds(10,850,1700,60);
query.setFont(f2);
query.setForeground(Color.red);
add(query);

ins.addActionListener(new CreateInsertQuery());
add[num].addActionListener(new AttributeCreator());
back.addActionListener(new Back());
}

class AttributeCreator implements ActionListener


{
public void actionPerformed(ActionEvent ae)
{
attrCreator();
}

15
}

public void attrCreator()


{
num = num + 1;

attr[num] = new TextField(15);


attr[num].setBounds(100,attrspace,250,40);
attr[num].setFont(f1);
add(attr[num]);

value[num] = new TextField(15);


value[num].setBounds(450,attrspace,250,40);
value[num].setFont(f1);
add(value[num]);

add[num] = new Button(" + ");


add[num].setBounds(850,attrspace,50,40);
add[num].setFont(f1);
add(add[num]);

ins.setBounds(350,btnpos,200,40);
attrspace = attrspace + 80;
btnpos = btnpos + 80;

add[num].addActionListener(new AttributeCreator());
}

class Back implements ActionListener


{
public void actionPerformed(ActionEvent ae)
{
setVisible(false);
QueryCreator qs = new QueryCreator();

16
qs.setSize(1900,1000);
qs.setVisible(true);
}
}

class CreateInsertQuery implements ActionListener


{

String[] ab = new String[5];


String[] val = new String[5];

public void actionPerformed(ActionEvent ae)


{

String tname = tbname.getText();

for(i = 0 ; i <= num ; i++)


{
ab[i] = attr[i].getText();
val[i] = value[i].getText();
}

if(num == 0)
{
res = "Your Query Result = INSERT INTO " + tname
+ " (" + ab[0] + " )" + " VALUES (" + val[0] + " );" ;
}
if(num == 1)
{
res = "Your Query Result = INSERT INTO " + tname
+ " (" + ab[0] + ", " + ab[1] + " )" + " VALUES (" +
val[0] + ", " + val[1] + " );" ;
}

17
if(num == 2)
{
res = "Your Query Result = INSERT INTO " + tname
+ " (" + ab[0] + ", " + ab[1] + ", " + ab[2] + " )" + "
VALUES (" + val[0] + ", " + val[1] + ", " + val[2] + "
);" ;
}
if(num == 3)
{
res = "Your Query Result = INSERT INTO " + tname
+ " (" + ab[0] + ", " + ab[1] + ", " + ab[2] + ", " + ab[3]
+ " )" + " VALUES (" + val[0] + ", " + val[1] + ", " +
val[2] + ", " + val[3] + " );" ;
}
if(num == 4)
{
res = "Your Query Result = INSERT INTO " + tname
+ " (" + ab[0] + ", " + ab[1] + ", " + ab[2] + ", " + ab[3]
+ ", " + ab[4] + " )" + " VALUES (" + val[0] + ", " +
val[1] + ", " + val[2] + ", " + val[3] + ", " + val[4] + "
);" ;
}
query.setText(res);
}
}
}

// Update Query Window


class UpdateQuery extends Frame
{
TextField tbname,condition_attr,condition_val;
TextField attr[] = new TextField[5];
TextField values[] = new TextField[5];

18
Button add[] = new Button[5];
Button updt,back;
Label query;
int num = 0;
int i;
String res;
int attrspace = 460;
int btnpos = 540;
Font f = new Font("SansSerif" ,Font.BOLD,45);
Font f1 = new Font("Arial" , Font.BOLD , 25);
Font font = new Font("SansSerif" , Font.BOLD ,18);
Font f2 = new Font("SansSerif" , Font.BOLD , 26);

public UpdateQuery()
{
setLayout(null);
setBackground(Color.YELLOW);

back = new Button("Back");


back.setBounds(100,100,100,40);
back.setFont(f1);
add(back);

Label lb = new Label("Create Update Query");


add(lb);
lb.setBounds(500,100,700,60);
lb.setFont(f);

Label lb1 = new Label("Table Name :- ");


add(lb1);
lb1.setBounds(100,200,200,40);
lb1.setFont(f1);

tbname = new TextField(15);

19
tbname.setBounds(320,200,250,40);
tbname.setFont(f1);
add(tbname);

Label con = new Label("Condition :- ");


add(con);
con.setBounds(650,200,150,40);
con.setFont(f1);

Label c_ab = new Label("Condition Attribute :- ");


add(c_ab);
c_ab.setBounds(800,200,250,40);
c_ab.setFont(f1);

condition_attr = new TextField(15);


condition_attr.setBounds(1100,200,250,40);
condition_attr.setFont(f1);
add(condition_attr);

Label c_val = new Label("Condition Value :- ");


add(c_val);
c_val.setBounds(800,280,250,40);
c_val.setFont(f1);

condition_val = new TextField(15);


condition_val.setBounds(1100,280,250,40);
condition_val.setFont(f1);
add(condition_val);

Label lb2 = new Label("Attribute Name");


add(lb2);
lb2.setBounds(100,300,200,40);
lb2.setFont(f1);

20
attr[num] = new TextField(15);
attr[num].setBounds(100,380,250,40);
attr[num].setFont(f1);
add(attr[num]);

Label lb3 = new Label("value is to SET");


add(lb3);
lb3.setBounds(450,300,200,40);
lb3.setFont(f1);

values[num] = new TextField(15);


values[num].setBounds(450,380,250,40);
values[num].setFont(f1);
add(values[num]);

add[num] = new Button(" + ");


add[num].setBounds(850,380,50,40);
add[num].setFont(f1);
add(add[num]);

updt = new Button("Create Table");


updt.setBounds(350,460,200,40);
updt.setFont(font);
add(updt);

query = new Label("");


query.setBounds(10,800,1700,60);
query.setFont(f2);
query.setForeground(Color.red);
add(query);

updt.addActionListener(new CreateQuery());
add[num].addActionListener(new AttributeCreator());
back.addActionListener(new Back());

21
}

class AttributeCreator implements ActionListener


{
public void actionPerformed(ActionEvent ae)
{
attrCreator();
}
}

class Back implements ActionListener


{
public void actionPerformed(ActionEvent ae)
{
setVisible(false);
QueryCreator qs = new QueryCreator();
qs.setSize(1900,1000);
qs.setVisible(true);
}
}

class CreateQuery implements ActionListener


{
String[] ab = new String[5];
String[] val = new String[5];

public void actionPerformed(ActionEvent ae)


{

String tname = tbname.getText();


String con_ab = condition_attr.getText();
String con_val = condition_val.getText();

22
for(i = 0 ; i <= num ; i++)
{
ab[i] = attr[i].getText();
val[i] = values[i].getText();
}

if(num == 0)
{
res = "Your Query Result = UPDATE " +
tname + " SET " + ab[0] + " = " + val[0] + "
WHERE " + con_ab + " = " + con_val + " ;" ;
}
if(num == 1)
{
res = "Your Query Result = UPDATE " + tname + "
SET " + ab[0] + " = " + val[0] + ", " + ab[1] + " = " +
val[1] + " WHERE " + con_ab + " = " + con_val + " ;" ;
}
if(num == 2)
{
res = "Your Query Result = UPDATE " + tname + "
SET " + ab[0] + " = " + val[0] + ", " + ab[1] + " = " +
val[1] + ", " + ab[2] + " = " + val[2] + " WHERE " +
con_ab + " = " + con_val + " ;" ;
}
if(num == 3)
{
res = "Your Query Result = UPDATE " + tname + "
SET " + ab[0] + " = " + val[0] + ", " + ab[1] + " = " + val[1] +
", " + ab[2] + " = " + val[2] + ", " + ab[3] + " = " + val[3] + "
WHERE " + con_ab + " = " + con_val + " ;" ;
}
if(num == 4)

23
{
res = "Your Query Result = UPDATE " + tname + "
SET " + ab[0] + " = " + val[0] + ", " + ab[1] + " = " +
val[1] + ", " + ab[2] + " = " + val[2] + ", " + ab[3] + " =
" + val[3] + ", " + ab[4] + " = " + val[4] + " WHERE " +
con_ab + " = " + con_val + " ;" ; }
query.setText(res);
}
}

public void attrCreator()


{
num = num + 1;

attr[num] = new TextField(15);


attr[num].setBounds(100,attrspace,250,40);
attr[num].setFont(f1);
add(attr[num]);

values[num] = new TextField(15);


values[num].setBounds(450,attrspace,250,40);
values[num].setFont(f1);
add(values[num]);

add[num] = new Button(" + ");


add[num].setBounds(850,attrspace,50,40);
add[num].setFont(f1);
add(add[num]);

updt.setBounds(350,btnpos,200,40);
attrspace = attrspace + 80;
btnpos = btnpos + 80;

add[num].addActionListener(new AttributeCreator());

24
}
}

// Delete Query Window


class DeleteQuery extends Frame
{
TextField tbname;
TextField attr,value;
Button del,back;
Label query;
String res;
Font f = new Font("SansSerif" ,Font.BOLD,45);
Font f1 = new Font("Arial" , Font.BOLD , 25);
Font font = new Font("SansSerif" , Font.BOLD ,18);
Font f2 = new Font("SansSerif" , Font.BOLD , 26);

public DeleteQuery()
{
setLayout(null);
setBackground(Color.YELLOW);

back = new Button("Back");


back.setBounds(100,100,100,40);
back.setFont(f1);
add(back);

Label lb = new Label("Create Delete Query");


add(lb);
lb.setBounds(500,100,700,60);
lb.setFont(f);

Label lb1 = new Label("Table Name :- ");


add(lb1);

25
lb1.setBounds(100,200,200,40);
lb1.setFont(f1);

tbname = new TextField(15);


tbname.setBounds(320,200,250,40);
tbname.setFont(f1);
add(tbname);

Label lb2 = new Label("Attribute Name");


add(lb2);
lb2.setBounds(100,300,200,40);
lb2.setFont(f1);

attr = new TextField(15);


attr.setBounds(100,380,250,40);
attr.setFont(f1);
add(attr);

Label lb3 = new Label("Value");


add(lb3);
lb3.setBounds(450,300,200,40);
lb3.setFont(f1);

value = new TextField(15);


value.setBounds(450,380,250,40);
value.setFont(f1);
add(value);

del = new Button("Create Delete Query");


del.setBounds(350,460,200,40);
del.setFont(font);
add(del);

query = new Label("");

26
query.setBounds(10,800,1700,60);
query.setFont(f2);
query.setForeground(Color.red);
add(query);

del.addActionListener(new DeleteQueryCreator());
back.addActionListener(new Back());
}

class Back implements ActionListener


{
public void actionPerformed(ActionEvent ae)
{
setVisible(false);
QueryCreator qs = new QueryCreator();
qs.setSize(1900,1000);
qs.setVisible(true);
}
}

class DeleteQueryCreator implements ActionListener


{
public void actionPerformed(ActionEvent ae)
{

String tname = tbname.getText();


String ab = attr.getText();
String val = value.getText();

res = "Your Query Result = DELETE FROM " + tname + "


WHERE " + ab + " = " + val + " ;" ;
query.setText(res);
}

27
}
}

5.0 Actual Resources Used

S. Name of
Specifications Qty Remarks
No. Resource/material
1 Computer System Any Desktop PC with
1
basic Configuration
2 Software Jdk 1.8 1

3 Reference Book The Complete Reference


2
SQL Programming
4 Web-sites www.diva-portal.org
www.java.com
3
www.javatpoint.com

6.0 Outputs of the Micro-Projects

 Home Page :-

28
 Create Table Query Page :-

 Create Insert Query Page :-

 Create Update Query Page :-

29
 Create Delete Query Page :-

7.0 Skill Developed / learning out of this Micro-Project


 To developed the basic knowledge about database and SQL queries.
 To understand the concept of database and queries.
 Managing and Designing the GUI using java Components.

8.0 Applications of this Micro-Project


 Provides fast and comprehensive code analysis
 It helps to manage and create query efficiently.
 It can be used to simplify code creation.
 The basic advantage of this application is that the user can work with the
databases without having the basic knowledge of forming the query.

9.0 Area of Future Improvement

In this paper we propose a dynamic query form generation approach which helps
users dynamically generate query forms. As future work, we will study how our approach
can be extended to non-relational data and how we connect to all databases with our
application. As for the future work, we plan to develop multiple methods to capture the user’s
interest for the queries besides the click feedback. Also we make it more user friendly.

30

You might also like