130 likes | 146 Views
Java III. Class 5. Assignment. Prepare for SHORT Quiz QUIZ postponed until May 1 Work on Project Review JDBC Tutorial http://java.sun.com/docs/books/tutorial/jdbc/index.html. Latest Tomcat- JDBC – et.al. http://java.sun.com/webservices/downloads/webservicespack.html. Last week’s Quiz.
E N D
Java III Class 5
Assignment • Prepare for SHORT Quiz • QUIZ postponed until May 1 • Work on Project • Review JDBC Tutorial • http://java.sun.com/docs/books/tutorial/jdbc/index.html
Latest Tomcat- JDBC – et.al. • http://java.sun.com/webservices/downloads/webservicespack.html
Last week’s Quiz • Review
JDBC • Goals • Design • Java API for SQL • Driver Manager • Driver Types • 1 JDBC <-> ODBC • 2 Java + Native Code • 3 Java - DB Independent • 4 Java – DB Specific
JDBC • Relationship to ODBC • Many vs. few comands • Void * • Safe programming • Uses • Applet • Application • 3 (or more) Tier
SQL • Select • From • Where • Like • Update • Set • Insert • Values • Create Table
Installing • Basic should be there • DB Specific Drivers • Mysql • URL Connection • Examples
JDBC Commands • Con.createStatement() • Stmt.executeUpdate(SQL_CMd) • AutoCommit • Grouping • Rollback • Insert – Update - Delete • Stmt.executeQuery(SQL_Query) • PreparedStatement • Con.preparedStatement • Pstmt.setXxx
JDBC Commands • ResultSet • Rs.next • Rs.GetXX • Col • name or number • ID start w/ 1
JDBC Metadata • Rs.getMeteData • GetColumnCount • GetColumnLabel(i) • GetTables
Advanced Result Set • TYPE_FORWARD_ONLY • TYPE_SCROLL_INSENSITIVE • TYPE_SCROLL_SENSITIVE • CONCUR_READ_ONLY • CONCUR_UPDATEABLE • getWarnings • getType • GetConcurrency • UpdateXX – UpdateRow()
Blobs – Clobs • Long binary/character data • Extra-credit for Final Project