JDBCのメタデータは、データベース(RDB)の(データでなく)定義自体を扱う。 メタデータを利用して、テーブルの項目一覧だとか属性だとかを取得することが出来る。 DatabaseMetaDataはConnectionから取得できる。 ResultSetMetaDataはResultSetから取得できる。 テーブルの項目一覧 プライマリキー項目 レコード一意識別項目 項目の型の取得 [2009-04-10] PreparedStatementの項目の型 [2009-10-25] 自動採番値の取得 [/2010-07-24] テーブルの項目一覧を取得する例 import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; Connection conn = ~; DatabaseM
Java Database Connectivity[1] (JDBC)は、Java と関係データベースの接続のためのAPI。ODBCをベースにサン・マイクロシステムズおよび DataDirect が共同で開発していると言われている。そのためドライバのデフォルトの自動コミットの有効化など似ている点も多々ある。 Java においてSQLを使用して、関係データベース管理システム (RDBMS) などと接続する機能を標準化(抽象化)している。 元はJDK 1.0の拡張APIという位置付けであったが、JDK 1.1で正式にJavaの基本SDKに同梱されるようになった。標準的な機能 (API) は Java SE に含まれている。JDBCの規格は Java SDK とは独立して行われており、APIのアップデートは随時行われている。 JDBCを利用する為には、100% Pure Java 製の Apa
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く