Question

Can you please upload the video to step by step with eclipse and mysql workbench.please.............

Can you please upload the video to step by step with eclipse and mysql workbench.please................................

Part 1

Design the database using the ER approach. Then using Java and SQL, implement the following

functionality:

1. Implement a button called “Initialize Database” . When a user clicks it, all necessary tables will be created (or recreated) automatically, with each table be populated with at least 10 tuples so that each query below will return some results. All students should use the database name “sampledb”, username “john”, and password “pass1234”.

2. Create the functionality to assign three reviewers to a paper.

Your system must be web-based. Some simple GUI interfaces are required for each functionality. All functionality must be performed via the interface of your system, direct SQL statement execution via any tools (MySQL workbench) is not allowed.

How to submit:

All files (source codes, class files, bat, and txt) should be contained in a war file called

csc4710_xx_part1.war or csc4710_xx_part2.war which should be uploaded to Canvas.

The following files must be contained in the submission:

Readme.txt, which lists the ids, names, emails of your group members.

Detailed instructions regarding how to compile and run your program and

user’s guide are part of this file.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1 import java.awt.*; 2 import java.sql.*; 3 import java.awt.event.*; 4 import javax.swing.*; 5 import java.util.Vector; 6 imp

emp.sql

create table paperconf
(
    papid int primary key autoincrement, FU varchar2(20), Lu varchar2(20), umail varchar2(30),
    tilte varchar2(20), adstract varchar2(20), pdf varchar2(20), pcid int forien key references pc
);

create table pc
(
    pcid int autoincrement, report id int autoincrement, reviewrep varchar2(80), papid int forien key references papercof );

Then the java program to be run which works as the requirment: first give Initialize Database button to fetch

the database then give user interface to insert the query to the database.

import java.awt.*;
import java.sql.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.Vector;
import javax.swing.table.DefaultTableModel;

public class confereencepaper extends JFrame implements ActionListener {

JFrame jframe1;
JComboBox JComb;
JLabel jlabela, jlabelb, labeld;

JButton butt, butt2;

Connection con;

ResultSet res0, rs1;

Statement s1, st1;

PreparedStatement pst;

String ids;

static JTable tab;

String[] cfields = {papid , "FU" , "Lu" , "umail" ," tilte", "adstract" , "pdf" };

String from;

Paperdisplay() {

jlabela = new JLabel("Coference paper submition");

jlabela.setForeground(Color.blue);

jlabela.setFont(new Font("Serif", Font.BOLD, 20));

//l1 = new JLabel("Select name");

butt = new JButton("Initialize Database");
  

jlabela.setBounds(100, 50, 350, 40);

jlabelb.setBounds(75, 110, 75, 20);

butt.setBounds(150, 150, 150, 20);
butt.addActionListener(this);
  

  
  

setTitle("Fetching paper detailis DataBase");

setLayout(null);

setVisible(true);

setSize(500, 500);

setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

add(jlabela);

add(jlabelb);;

add(butt);

try {

Class.forName("oracle.jdbc.driver.OracleDriver");

con = DriverManager.getConnection("sampledb", "john", "pass1234");

s1 = con.createStatement();

res0 = s1.executeQuery("select * from conference");

Vector v = new Vector();

while (res0.next()) {

ids = res0.getString(1);

v.add(ids);

}

JComb = new JComboBox(v);

JComb.setBounds(150, 110, 150, 20);

add(JComb);

s1.close();

res0.close();

} catch (Exception e) {

}

}
labeld = new JLabel("select paper id");

butt2 = new JButton("submit");
labeld.setBounds(100, 50, 350, 40);

labeld.setBounds(75, 110, 75, 20);

butt2.setBounds(150, 150, 150, 20);

butt2.addActionListener(this);
setTitle("Fetching paper detailis DataBase");

setLayout(null);

setVisible(true);

setSize(500, 500);

setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

add(jlabela);

add(jlabelb);;

add(butt);

try {

Class.forName("oracle.jdbc.driver.OracleDriver");

con = DriverManager.getConnection("sampledb", "john", "pass1234");

s1 = con.createStatement();

  
res0 = s1.executeQuery("select uname from emp");

Vector v = new Vector();

while (res0.next()) {

ids = res0.getString(1);

v.add(ids);

}

JComb = new JComboBox(v);

JComb.setBounds(150, 110, 150, 20);

add(JComb);

s1.close();

res0.close();

} catch (Exception e) {

}

}

public void actionPerformed(ActionEvent ae) {

if (ae.getSource() == butt) {

showTableData();

}

}

public void showTableData() {

jframe1 = new JFrame("Detail of all the papers");

jframe1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

jframe1.setLayout(new BorderLayout());

//TableModel tm = new TableModel();

DefaultTableModel model = new DefaultTableModel();

model.setColumnIdentifiers(fields);

//DefaultTableModel model = new DefaultTableModel(tm.getData1(), tm.getColumnNames());

//table = new JTable(model);

tab = new JTable();

tab.setModel(model);

tab.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);

tab.setFillsViewportHeight(true);

JScrollPane scroll = new JScrollPane(tab);

scroll.setHorizontalScrollBarPolicy(

JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);

scroll.setVerticalScrollBarPolicy(

JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);

from = (String) JComb.getSelectedItem();

//String textvalue = textbox.getText();

String paperid = "";

String authername = "";
String affiliation = "";
String email = "";
String title = "";
String abstracts = "";
String pdfatt = "";

String reviewreport = "";

try {

pst = con.prepareStatement("select * from emp where UNAME='" + from + "'");

ResultSet res0 = pst.executeQuery();

int i = 0;

if (res0.next()) {

uname = res0.getString("papid");

email = res0.getString("Fu");

pass = res0.getString("Lu");

cou = res0.getString("email");

model.addRow(new Object[]{uname, email, pass, cou});

i++;

}

if (i < 1) {

JOptionPane.showMessageDialog(null, "No Record Found", "Error", JOptionPane.ERROR_MESSAGE);

}

if (i == 1) {

System.out.println(i + " Record Found");

} else {

System.out.println(i + " Records Found");

}

} catch (Exception ex) {

JOptionPane.showMessageDialog(null, ex.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);

}

jframe1.add(scroll);

jframe1.setVisible(true);

jframe1.setSize(400, 300);

}

public static void main(String args[]) {

new Paperdisplay();

}

}

Add a comment
Know the answer?
Add Answer to:
Can you please upload the video to step by step with eclipse and mysql workbench.please.............
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can you please upload the video to step by step with eclipse and mysql workbench.please................................ Part...

    Can you please upload the video to step by step with eclipse and mysql workbench.please................................ Part 1 Design the database using the ER approach. Then using Java and SQL, implement the following functionality: 1. Implement a button called “Initialize Database” . When a user clicks it, all necessary tables will be created (or recreated) automatically, with each table be populated with at least 10 tuples so that each query below will return some results. All students should use the database...

  • Q.5] Answer the following questions based on the company database (based on the homework assignment 2) y dat...

    Q.5] Answer the following questions based on the company database (based on the homework assignment 2) y database (based on the homework assignment 2) 3 IPage 1. For each department whose average employee salary is more than $30,000, write a SQL statement to retrieve the department name and the number of employees working for that department 2. Write a SQL statement to retrieve first name, last name, and address of each employee who lives in Houston, TX. 3. Write a...

  • Use MySQL Workbench for these questions. Do NOT use Lucidchart. MySQL Workbench has more capability than...

    Use MySQL Workbench for these questions. Do NOT use Lucidchart. MySQL Workbench has more capability than Lucidchart, as it allows creation of DDL SQL from the model. Turn in 1 Workbench file , 1 document with the forward-engineered sql statements, and a Word document with your inserted data. This problem mimics the one from the previous assignment. Model it in Workbench, then forward-engineer the database script and import into your database. If the import fails, fix it in the model,...

  • You need to implement a web application that is split in three parts, namely, Webpage, PHP and My...

    You need to implement a web application that is split in three parts, namely, Webpage, PHP and MySQL. Each of them will be used accordingly to solve a simple problem described below. Remember to implement the logic in the most secure way of your knowledge. PHP Implement a PHP function that reads in input a string from the user and store it in a table (e.g., in a field called "Content Name"). The function should be able to read the...

  • You need to implement a queue based on the doubly linked list. (In C++) **PLEASE follow...

    You need to implement a queue based on the doubly linked list. (In C++) **PLEASE follow the format** **Don't worry about the readme.txt** THANK YOU SO SO MUCH! You have to implement the doubly linked list in DList.h and DList.cpp and the queue in the LinkedQueue.h and LinkedQueue.cpp; all as template classes. You have to provide the main.cpp file as we discussed in class to allow the user to interact with your queue using enqueue, dequeue, front, back, size, empty,...

  • Through the remaining assignments due in this course, you will be creating a simple database for...

    Through the remaining assignments due in this course, you will be creating a simple database for tracking information about volunteers working and raising money for a community organization. This assignment requires that you create the initial table, called PERSON, to hold basic information about volunteers. You will be redefining the design and building the database in the upcoming unit assignments. 1.Use the mysqldump.exe command line tool to backup the data in your volunteer database. To access the mysqldump.exe tool, start...

  • Desperately need help with this one thank you and I'll rate you up after thanks : ) Please let me know if any clarif...

    Desperately need help with this one thank you and I'll rate you up after thanks : ) Please let me know if any clarification or additional information is needed. Compliance with the outlined project requirements is crucial. In this question you should program something of your choice but if possible our professor said to make a program that store account number and balance thank you Project: Programming a project of your choice in C++. Step 1- Program must implement a...

  • Step 3: How would you write this script in C? It needs to do the things...

    Step 3: How would you write this script in C? It needs to do the things required in step 3. 1. You have received a new batch of distinguished users; their basic information is located in newusers.tar. Inside of the tar file, there is a file called "newusers.txt" which contains a colon-separated entry for each user: the username, the uid, the GECOS information, and the user's preferred shell. Also in the tar file you will find a public key for...

  • Put all of your SQL code in a file named grades.sql and submit it below. Download...

    Put all of your SQL code in a file named grades.sql and submit it below. Download the starter code, which contains import_grades.sql and the grades.csv file. Using he import_grades, sql file, create your database and table. - 0 eded. 1 T Une Modify the LOAD DATA INFILE to correct the path to load the grades.csv file, and add/remove LOCAL he only modification you may make to the import_grades.sql or the grades.csv files. The data represents grades for assignments in a...

  • Overview: Database management plays an integral role in nearly every area of business. Databases house customer, accoun...

    Overview: Database management plays an integral role in nearly every area of business. Databases house customer, accounting, and employee data, and these different data sets must all be efficiently managed in order to make the data accessible. Companies rely on database engineers to ensure that their records are accurate, updated, and tracked in real time. This course covers structured query language (SQL) and how it can be used to manage database schemas, manipulate data, and analyze data. For your final...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT