Advanced Topics in JDBC - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Advanced Topics in JDBC

Description:

Cursor Updates and Prepared Statements. Data Type Mapping ... SQL types to Java mapping. What you can do with DatabaseMetaData ... – PowerPoint PPT presentation

Number of Views:51
Avg rating:3.0/5.0
Slides: 7
Provided by: patrick99
Category:

less

Transcript and Presenter's Notes

Title: Advanced Topics in JDBC


1
Advanced Topics in JDBC
2
What Well Cover
  • Data type mapping
  • DatabaseMetaData
  • Cursor Updates and Prepared Statements

3
Data Type Mapping
  • Char types map to Strings - size is unimportant
  • BINARY, VARBINARY, and LONGVARBINARY map to
    byte
  • DATE, TIME TIMESTAMP have sql Classes
  • DECIMAL NUMERIC are not supported in Java 1.1.6

4
DatabaseMetaData
  • getSQLKeyWords()
  • getTables()
  • getTypeInfo()
  • getUserName()
  • getURL()
  • isReadOnly()

5
Cursor Updates and PreparedStatements
  • Positioned Cursor Update
  • Check if Database supports it
  • Get the cursor (FOR UPDATE)
  • Set the value (WHERE CURRENT OF)
  • PreparedStatement
  • Less overhead than multiple Statements
  • Fill in the attributes with setXXX commands

6
What We Covered
  • SQL types to Java mapping
  • What you can do with DatabaseMetaData
  • Cursor Updates and Prepared Statements
Write a Comment
User Comments (0)
About PowerShow.com