1. Create a JDBC project with Oracle data source to retrieve and display rows from the COURSE table.
What will be an ideal response?
```
package oracle;
import java.sql.*;
import java.io.*;
import javax.swing.*;
public class Connect {
public static void main(String[] args)
throws SQLException, IOException{
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch (ClassNotFoundException e) {
System.out.println("Could not load driver");
}
String userName, passWord;
userName = JOptionPane.showInputDialog("Oracle username: ").trim();
passWord = JOptionPane.showInputDialog("Oracle password: ").trim();
Connection conn = DriverManager.getConnection
("jdbc:odbc:shah_ora", userName, passWord);
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery
("SELECT CourseId, Title, Credits,
NVL(PreReq, ‘none’) FROM Course");
while (rset.next()) {
System.out.println(rset.getInt(1)+"\t"+rset.getString(2)+
"\t"+rset.getInt(3)+"\t"+rset.getString(4));
}
stmt.close();
conn.close();
}
}
```
You might also like to view...
With the overflow property, a value of ____ instructs browsers to increase the height of an element to fit the overflow content.
A. hidden B. visible C. scroll D. auto
Fill in the code below in the underline:
``` public class Test { public static void main(String[] args) { Test test = new Test(); System.out.println(test.setAction3(_____________)); } public double setAction3(T3 t) { return t.m(5.5); } } interface T3 { public double m(Double d); }``` a. () -> e * 2 b. (e) -> e * 2 c. e -> e * 2 d. (e) -> {e * 2;}
A(n) ________ is an item such as a graphic, chart, or spreadsheet that can be inserted into a Word document
Fill in the blank(s) with correct word
Which tool does NOT identify flaws in the design of the database?
A) Database Documenter B) Performance Analyzer C) Table Analyzer D) Document Splitter