2009/11/20 09:00

JDBC 핵심 인터페이스 자바닥 탐독

자바에서 가장 많이 사용되는 인터페이스 중 하나인 JDBC 관련 인터페이스의 자바닥(javadoc)을 탐독해봤습니다.
바쁜 현대인을 위해 그 중 한 번은 상기해봐야 하는 내용만 단문 형태로 추려봤습니다.

  • javax.sql.DataSource

factory for connections ...

An alternative to the DriverManager ...

implemented by a driver vendor...

three types of implementations... 1. Basic implementation ...  2. Connection pooling implementation ... 3. Distributed transaction implementation ...

  • java.sql.Connection

A connection (session) with a specific database.

SQL statements are executed and results are returned within the ... connection.

By default ...in auto-commit mode... automatically commits changes after executing each statement.

auto-commit mode .. disabled ..commit must be called explicitly ...

  • java.sql.PreparedStatement

An object that represents a precompiled SQL statement.

... precompiled and stored ... efficiently ...multiple times.

  • java.sql.CallableStatement

... execute SQL stored procedures ...

  • java.sql.ResultSet

A table of data representing a database result set.
... maintains a cursor ...

... default ... not updatable ... moves forward only.

... set of updater methods ... JDBC 2.0 API (JDK 1.2). used two ways ... 1. ... update column value ... 2. insert column value ...

... provides getter methods ... retrieving column values from the current row

... index number of the column or the name of the column ...

Column names ... case insensitive.

... first matching ... returned.

... numbered from 1.

... automatically closed ... Statement ... closed, re-executed, or used to retrieve the next result ...

  • java.sql.SQLException

... provides information on a database access error ...

... "SQLstate" strings ...XOPEN SQLstate conventions or the SQL 99 conventions ...

... integer error code ... specific to each vendor ...

... chain ... next exception ...

 

  • SQLWarning

... provides information on database access warnings ...

retrieved from Connection, Statement, ResultSet objects .

이 글은 스프링노트에서 작성되었습니다.

Trackback 0 Comment 0