提交 da206bee authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 893746ad
...@@ -15,10 +15,10 @@ H2 Database Engine ...@@ -15,10 +15,10 @@ H2 Database Engine
<h1>Downloads</h1> <h1>Downloads</h1>
<h3>Version 1.0.67 (2008-03-14, Current)</h3> <h3>Version 1.0.67 (2008-03-15, Current)</h3>
<p> <p>
<a href="http://www.h2database.com/h2-setup-2008-03-14.exe">Windows Installer</a><br /> <a href="http://www.h2database.com/h2-setup-2008-03-15.exe">Windows Installer</a><br />
<a href="http://www.h2database.com/h2-2008-03-14.zip">Platform-Independent Zip</a><br /> <a href="http://www.h2database.com/h2-2008-03-15.zip">Platform-Independent Zip</a><br />
</p> </p>
<h3>Version 1.0.66 (2008-02-22, Last Stable)</h3> <h3>Version 1.0.66 (2008-02-22, Last Stable)</h3>
......
...@@ -31,17 +31,17 @@ Welcome to H2, the free SQL database. The main feature of H2 are: ...@@ -31,17 +31,17 @@ Welcome to H2, the free SQL database. The main feature of H2 are:
<table style="border: 0px; margin: 5px; background-color: #eee;"> <table style="border: 0px; margin: 5px; background-color: #eee;">
<tr><td style="border: 0px; background-color: #eee;" colspan="2"> <tr><td style="border: 0px; background-color: #eee;" colspan="2">
<h3>Download</h3> <h3>Download</h3>
Version 1.0.68 (2008-03-14): Version 1.0.68 (2008-03-15):
</td></tr> </td></tr>
<tr><td style="border: 0px; background-color: #eee;"> <tr><td style="border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-setup-2008-03-14.exe"><img border="1" src="images/download.png" alt="download" /></a> <a href="http://www.h2database.com/h2-setup-2008-03-15.exe"><img border="1" src="images/download.png" alt="download" /></a>
</td><td style="vertical-align: middle; border: 0px; background-color: #eee;"> </td><td style="vertical-align: middle; border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-setup-2008-03-14.exe">Windows Installer (2.9 MB)</a> <a href="http://www.h2database.com/h2-setup-2008-03-15.exe">Windows Installer (2.9 MB)</a>
</td></tr> </td></tr>
<tr><td style="border: 0px; background-color: #eee;"> <tr><td style="border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-2008-03-14.zip"><img border="1" src="images/download.png" alt="download" /></a> <a href="http://www.h2database.com/h2-2008-03-15.zip"><img border="1" src="images/download.png" alt="download" /></a>
</td><td style="vertical-align: middle; border: 0px; background-color: #eee;"> </td><td style="vertical-align: middle; border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-2008-03-14.zip">All platforms (zip, 4.1 MB)</a> <a href="http://www.h2database.com/h2-2008-03-15.zip">All platforms (zip, 4.1 MB)</a>
</td></tr> </td></tr>
<tr><td style="border: 0px; background-color: #eee;" colspan="2"> <tr><td style="border: 0px; background-color: #eee;" colspan="2">
<a href="download.html">All Downloads</a> <a href="download.html">All Downloads</a>
......
...@@ -1754,7 +1754,7 @@ Function tables did not work with views and EXPLAIN. Fixed. ...@@ -1754,7 +1754,7 @@ Function tables did not work with views and EXPLAIN. Fixed.
Downloads Downloads
@download_1001_h3 @download_1001_h3
Version 1.0.67 (2008-03-14, Current) Version 1.0.67 (2008-03-15, Current)
@download_1002_a @download_1002_a
Windows Installer Windows Installer
...@@ -4232,7 +4232,7 @@ JDBC and (partial) ODBC API; Web Client application ...@@ -4232,7 +4232,7 @@ JDBC and (partial) ODBC API; Web Client application
Download Download
@mainWeb_1007_td @mainWeb_1007_td
Version 1.0.68 (2008-03-14): Version 1.0.68 (2008-03-15):
@mainWeb_1008_a @mainWeb_1008_a
Windows Installer (2.9 MB) Windows Installer (2.9 MB)
......
...@@ -1756,7 +1756,7 @@ Centralリポジトリの利用 ...@@ -1756,7 +1756,7 @@ Centralリポジトリの利用
ダウンロード ダウンロード
@download_1001_h3 @download_1001_h3
#Version 1.0.67 (2008-03-14, Current) #Version 1.0.67 (2008-03-15, Current)
@download_1002_a @download_1002_a
Windows Installer Windows Installer
...@@ -4234,7 +4234,7 @@ JDBC、 (部分的な) ODBC API; Web クライアントアプリケーション ...@@ -4234,7 +4234,7 @@ JDBC、 (部分的な) ODBC API; Web クライアントアプリケーション
ダウンロード ダウンロード
@mainWeb_1007_td @mainWeb_1007_td
#Version 1.0.68 (2008-03-14): #Version 1.0.68 (2008-03-15):
@mainWeb_1008_a @mainWeb_1008_a
#Windows Installer (2.9 MB) #Windows Installer (2.9 MB)
...@@ -7316,1237 +7316,3 @@ Javaアプリケーション内からインデックスを呼び出すことも ...@@ -7316,1237 +7316,3 @@ Javaアプリケーション内からインデックスを呼び出すことも
@tutorial_1162_p @tutorial_1162_p
#Variables that are not set evaluate to NULL. The data type of a user defined variable is the data type of the value assigned to it, that means it is not necessary (or possible) to declare variable names before using them. There are no restrictions on the assigned values, large objects (LOBs) are supported as well. #Variables that are not set evaluate to NULL. The data type of a user defined variable is the data type of the value assigned to it, that means it is not necessary (or possible) to declare variable names before using them. There are no restrictions on the assigned values, large objects (LOBs) are supported as well.
@~advanced_1064_h2
クラスタリング / 高可用性
@~advanced_1065_p
このデータベースは簡単なクラスタリング / 高可用性メカニズムをサポートしています。 アーキテクチャ: 二つのデータベースサーバーは二つの異なったコンピューター上で動作し、 両方のコンピューターは同じデータベースのコピーです。もし両方のサーバーが動いたら、 それぞれのデータベース操作は両方のコンピューター上で実行されます。ひとつのサーバーがおちたら (電源、ハードウェア、またはネットワーク障害)、他のサーバーはまだ動作を続行します。 このポイントから、操作は他のサーバーがバックアップされるまで、ひとつのサーバー上で実行されます。
@~advanced_1068_li
データベースを作成する
@~advanced_1072_h3
CreateClusterツールを使用する
@~advanced_1073_p
クラスタリングがどのように機能するか理解するために、 次の例を試してみて下さい。この例では、二つのデータベースは同じコンピューター内に属していますが、 通常は、データベースは異なるサーバー内にあります。
@~advanced_1074_li
二つのディレクトリを作成します: server1 と server2 です。それぞれのディレクトリは コンピューター上のディレクトリをシミュレートします。
@~advanced_1081_h3
クラスタリングアルゴリズムと制限
@~advanced_1082_p
読み取り専用クエリーは、最初のクラスタノードに対してのみ 実行されますが、他の全てのステートメントは全てのノードに対して実行されます。 現在、トランザクションの問題を回避するように作られたロードバランシングは存在しません。 次の関数は、異なったクラスタノード上で異なった結果をもたらすので、実行には注意して下さい: RANDOM_UUID()、SECURE_RAND()、SESSION_ID()、MEMORY_FREE()、 MEMORY_USED()、CSVREAD()、CSVWRITE()、RAND() [seed を使用していない時] 直接ステートメントを変更する際に、これらの関数を使用してはなりません (例: INSERT、 UPDATE、または MERGE)。しかし、読み取り専用ステートメントでは使用でき、 結果はステートメントを変更するために使用することができます。
@~advanced_1083_h2
2フェーズコミット
@~advanced_1084_p
2フェーズコミットプロトコルがサポートされています。 2フェーズコミットは次のように機能します:
@~advanced_1085_li
オートコミットはOFFの状態であることが必要です
@~advanced_1093_h2
互換性
@~advanced_1094_p
このデータベースは (ある程度までは)、HSQLDB、MySQL や PostgreSQLのような 他のデータベースと互換性があります。H2が互換性のないある一定の領域があります。
@~advanced_1095_h3
オートコミットがONの時のトランザクションコミット
@~advanced_1096_p
この時、このデータベースエンジンは 結果が返ってくる直前にトランザクションをコミットします (オートコミットがONの場合)。 クエリーにとって、アプリケーションがresult setを通してスキャンする前や、result setが閉じられる前でさえも、 トランザクションはコミットされるということを意味しています。このケースでは、他のデータベースエンジンは result setが閉じられる時、トランザクションをコミットします。
@~advanced_1097_h3
キーワード / 予約語
@~advanced_1098_p
引用 (二重引用符で囲まれる) されない限り、識別子 (テーブル名、カラム名など) として使用できないキーワードのリストがあります。 現在のリスト:
@~advanced_1101_h2
Windowsサービスとして実行する
@~advanced_1102_p
ネイティブラッパー / アダプタを使用して、JavaアプリケーションはWindowsサービスとして実行できます。これを実行するために、様々なツールが有効です。Tanuki Software, Inc. (<a href="http://wrapper.tanukisoftware.org/">http://wrapper.tanukisoftware.org/</a>) のJavaサービスラッパーはインストールが含まれています。H2データベースエンジンサービスのインストール、起動、終了とアンインストールのためのバッチファイルが添付されます。このサービスは、TCPサーバーとH2コンソールWebアプリケーションが含まれます。バッチファイルは、H2/service ディレクトリに配置されています。
@~advanced_1103_h3
サービスをインストールする
@~advanced_1104_p
サービスは、最初にWindowsサービスとして登録することが必要です。 これを行うために、1_install_service.bat をダブルクリックします。 成功すれば、コマンドプロンプトウィンドウが開き、すぐに消えます。失敗したらメッセージが現れます。
@~advanced_1105_h3
サービスを起動する
@~advanced_1106_p
Windowsのサービスマネージャを使用するか、2_start_service.bat をダブルクリックして H2データベースエンジンサービスを起動することができます。サービスがインストールされていなければ、 バッチファイルはエラーメッセージを表示しないということに注意して下さい。
@~advanced_1107_h3
H2コンソールに接続する
@~advanced_1108_p
サービスのインストールと起動後、ブラウザを使用してH2コンソールアプリケーションに 接続することができます。3_start_browser.bat をダブルクリックして実行します。 デフォルトのポート (8082) はバッチファイルでハードコード化されているものです。
@~advanced_1109_h3
サービスを終了する
@~advanced_1110_p
サービスを終了するには、4_stop_service.bat をダブルクリックします。 サービスがインストール、または開始されていなければ、 バッチファイルはエラーメッセージを表示しないということに注意して下さい。
@~advanced_1111_h3
サービスのアンインストール
@~advanced_1112_p
サービスをアンインストールするには、5_uninstall_service.bat をダブルクリックします。成功すれば、コマンドプロンプトウィンドウが開き、すぐに消えます。 失敗したらメッセージが現れます。
@~advanced_1113_h2
ODBCドライバ
@~advanced_1114_p
このデータベースは現時点で、自身のODBCドライバと共に動作しませんが、PostgreSQLネットワークプロトコルをサポートしています。そのため、PostgreSQL ODBCドライバが使用可能です。PostgreSQLネットワークプロトコルのサポートは非常に新しく、試験的なものとして見なされます。製品アプリケーションで使用されるべきではありません。
@~advanced_1116_h3
ODBCインストール
@~advanced_1117_p
まず、ODBCドライバがインストールされていなければなりません。最近のいずれのPostgreSQL ODBCドライバでも動作しますが、バージョン 8.2.4 以降のものを推奨します。PostgreSQL ODBCドライバのWindowsバージョンは <a href="http://www.postgresql.org/ftp/odbc/versions/msi">http://www.postgresql.org/ftp/odbc/versions/msi</a> から利用可能です。
@~advanced_1118_h3
サーバーの起動
@~advanced_1119_p
ODBCドライバのインストール後、コマンドラインを使用してH2サーバーを起動します:
@~advanced_1123_h3
ODBC設定
@~advanced_1124_p
ドライバのインストール後、新しいデータソースを追加しなければなりません。Windowsでは、データソースAdministratorを開くために、<code>odbcad32.exe</code> を実行します。"Add..." をクリックし、PostgreSQL Unicode driverを選択します。そして、"Finish" をクリックします。接続プロパティを変更することが可能です:
@~advanced_1125_th
プロパティ
@~advanced_1128_td
Data Source
@~advanced_1154_p
この後、このデータソースを使用できます。
@~advanced_1155_h3
PGプロトコルサポートの制限
@~advanced_1156_p
現時点では、PostgreSQLネットワークプロトコルのサブセットのみ実装されています。また、カタログ、またはテキストエンコーディングでのSQLレベル上の互換性問題がある可能性があります。問題は発見されたら修正されます。現在、PGプロトコルが使用されている時、ステートメントはキャンセルされません。
@~advanced_1158_h3
セキュリティ考慮
@~advanced_1159_p
現在、PGサーバーはchallenge response、またはパスワードの暗号化をサポートしていません。パスワードが読みやすいため、アタッカーがODBCドライバとサーバー間でのデータ転送を傾聴できる場合、これは問題になるでしょう。また、暗号化SSL接続も現在使用不可能です。そのため、ODBCドライバはセキュリティが重視される場面においては使用されるべきではありません。
@~advanced_1160_h2
ACID
@~advanced_1161_p
データベースの世界では、ACIDとは以下を表しています:
@~advanced_1162_li
Atomicity (原子性) : トランザクションはアトミックでなければならず、全てのタスクが実行されたか、実行されないかの どちらかであるという意味です。
@~advanced_1166_h3
Atomicity (原子性)
@~advanced_1167_p
このデータベースでのトランザクションは常にアトミックです。
@~advanced_1168_h3
Consistency (一貫性)
@~advanced_1169_p
このデータベースは常に一貫性のある状態です。 参照整合性のルールは常に実行されます。
@~advanced_1170_h3
Isolation (独立性 / 分離性)
@~advanced_1171_p
H2は、他の多くのデータベースシステムと同様に、デフォルトの分離レベルは "read committed" です。これはより良いパフォーマンスを提供しますが、トランザクションは完全に分離されていないということも意味します。H2はトランザクション分離レベル "serializable"、"read committed"、"read uncommitted" をサポートしています。
@~advanced_1172_h3
Durability (永続性)
@~advanced_1173_p
このデータベースは、全てのコミットされたトランザクションが電源異常に耐えられるということを保証しません。全てのデータベースが電源異常の状況において、一部トランザクションが失われるということをテストは示しています (詳細は下記をご覧下さい)。トランザクションが失われることを容認できない場面では、ノートパソコン、またはUPS (無停電電源装置) を使用します。永続性がハードウェア異常の起こり得る全ての可能性に対して必要とされるのであれば、H2クラスタリングモードのようなクラスタリングが使用されるべきです。
@~advanced_1174_h2
永続性問題
@~advanced_1175_p
完全な永続性とは、全てのコミットされたトランザクションは電源異常に耐えられる、ということを意味します。 いくつかのデータベースは、永続性を保証すると主張していますが、このような主張は誤っています。 永続性テストはH2、HSQLDB、PostgreSQL、Derbyに対して実行されました。これらの全てのデータベースは、 時々コミットされたトランザクションを失います。このテストはH2ダウンロードに含まれています。 org.h2.test.poweroff.Test をご覧下さい。
@~advanced_1176_h3
永続性を実現する (しない) 方法
@~advanced_1177_p
失われなかったコミット済みトランザクションは、最初に思うよりもより複雑だということを理解して下さい。 完全な永続性を保障するためには、データベースは、コミットの呼び出しが返ってくる前に ログレコードがハードドライブ上にあることを確実にしなければなりません。 これを行うために、データベースは異なったメソッドを使用します。ひとつは "同期書き込み" ファイルアクセスモードを使用することです。Javaでは、RandomAccessFile はモード "rws" と "rwd" を サポートしています:
@~advanced_1178_li
rwd: それぞれのファイル内容の更新は、元になるストレージデバイスと同時に書き込まれます。
@~advanced_1180_p
この特徴はDerbyで使用されています。それらのモードのうちのひとつは、テスト (org.h2.test.poweroff.TestWrite) において、毎秒およそ5万件の書き込み操作を実現します。オペレーティングシステムのライトバッファーが無効の時でさえも、 書き込み速度は毎秒およそ5万件です。この特徴はディスクを交換させるというものではありません。 なぜなら、全てのバッファーをフラッシュするのではないからです。テストはファイル内の同じバイトを何度も更新しました。 もしハードドライブがこの速度での書き込みが可能なら、ディスクは少なくても毎秒5万回転か、 または300万 RPM (revolutions per minute 回転毎分) を行う必要があります。 そのようなハードドライブは存在しません。テストで使用されたハードドライブは、およそ7200 RPM、または 毎秒120回転です。これがオーバーヘッドなので、最大書き込み速度はこれより低くなくてはなりません。
@~advanced_1182_li
FileDescriptor.sync() ドキュメンテーションには、これは強制的に全てのシステムバッファーに基本となる デバイスとの同期を取らせる、と書かれています。このFileDescriptorに関連するバッファーのインメモリでの 変更コピーが全て物理メディアに書かれた後、Syncは返ることになっています。
@~advanced_1184_p
デフォルトでは、MySQLはそれぞれのコミットごとに fsync を呼びます。それらのメソッドのうちひとつを使用している時、 毎秒およそ60件だけが実行され、使用されているハードドライブのRPM速度と一貫性があります。 残念ながら、FileDescriptor.sync() または FileChannel.force() を呼んだ時でさえも データは常にハードドライブに存続するとは限りません。なぜなら、多くのハードドライブは fsync() に従わないからです: http://hardware.slashdot.org/article.pl?sid=05/05/13/0529252 内の"Your Hard Drive Lies to You" をご覧下さい。Mac OS X では、fsync はハードドライブバッファーをフラッシュしません: http://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html そのため状況は混乱していて、 問題があることをテストは証明しています。
@~advanced_1187_h3
永続性テストを実行する
@~advanced_1188_p
このデータベースと他のデータベースの、永続性 / 非永続性テストを行うために、 パッケージ内 org.h2.test.poweroff のテストアプリケーションを使用することができます。 ネットワーク接続の二つのコンピューターがこのテストを実行するのに必要です。 ひとつのコンピューターは、他のコンピューター上でテストアプリケーションが実行されている間 (電源は切られています) ただ聞いています。リスナーアプリケーションのコンピューターは TCP/IP ポートを開き、 次の接続のために聞きます。二つ目のコンピューターは最初リスナーに接続し、データベースを作成して レコードの挿入を開始します。この接続は "autocommit" に設定されます。それぞれのレコード挿入後のコミットが 自動的に行われるという意味です。その後、テストコンピューターはこのレコードの挿入に成功したということを リスナーに通知します。リスナーコンピューターは10秒ごとに最後に挿入されたレコードを表示します。 電源を手動でOFFにしてコンピューターを再起動し、アプリケーションを再び実行します。 多くのケースで、リスナーコンピューターが知る全てのレコードを含むデータベースはないということがわかります。 詳細は、リスナーのソースコードとテストアプリケーションを参照して下さい。
@~advanced_1189_h2
リカバーツールを使用する
@~advanced_1190_p
リカバーツールはデータベースが破損している場合においても、 データファイルのコンテンツを復元するために使用されます。現段階では、ログファイルのコンテンツ、 または大きなオブジェクト (CLOB または BLOB) は復元しません。 このツールを実行するには、このコマンドラインをタイプして下さい:
@~advanced_1192_h2
ファイルロックプロトコル
@~advanced_1193_p
データベースが開かれるときはいつも、データベースが使用中であると他のプロセスに合図するためにロックファイルが作成されます。もしデータベースが閉じられるか、データベースを開いたプロセスが終了するなら、ロックファイルは削除されます。
@~advanced_1195_h3
ファイルロックメソッド "File"
@~advanced_1196_p
データベースファイルロックのデフォルトメソッドは "Fileメソッド" です。アルゴリズム:
@~advanced_1197_li
ロックファイルが存在しない時は、作成されます (アトミックオペレーション File.createNewFile を使用する)。 その時、プロセスは少し (20ms) 待機し、再びファイルをチェックします。 もしファイルがこの間に変更されたら、オペレーションは中止されます。 ロックファイルを作成したすぐ後にプロセスがロックファイルを削除する時、 これはレースコンディションから保護し、三番目のプロセスはファイルを再び作成します。 二つのライターしか存在しなければ、これは起こりません。
@~advanced_1200_p
このアルゴリズムは100以上の並列スレッドでテストされました。いくつかのケースでは、 データベースをロックしようとする多数の並列スレッドが存在する時、それらはしばらくお互いをブロックします (それらのうちどれかがファイルをロックすることができないことを意味します)。 しかし、ファイルは同時に二つのスレッドによってロックされることは決してありません。 しかし、多数の並列スレッド / プロセスを使用することは一般的な使用ケースではありません。 通常、データベースを開くことができなかったり、(速い)ループのやり直しができなかったりした場合、 アプリケーションはユーザーにエラーを投げるべきです。
@~advanced_1201_h3
ファイルロックメソッド "Socket"
@~advanced_1202_p
実行される二つ目のロックメカニズムがありますが、 デフォルトでは使用不可です。アルゴリズムは:
@~advanced_1203_li
ロックファイルが存在しない時は、作成されます。その時、サーバーソケットは定義されたポートで開かれ、 開かれた状態を保ちます。開かれたデータベースのプロセスのポートとIPアドレスはロックファイルの中に書かれています。
@~advanced_1206_p
このメソッドは、活発に毎秒同じファイルをポーリングする (読み込む) watchdogスレッドを必要としていません。 このメソッドの問題は、ファイルがネットワークシェアに保存されたら、二つのプロセスは (異なるコンピューターで実行中の)、 TCP/IP接続を直接保持していなければ、同じデータベースファイルを開くことができます。
@~advanced_1207_h2
SQLインジェクションに対する防御
@~advanced_1208_h3
SQLインジェクションとは
@~advanced_1209_p
このデータベースエンジンは "SQLインジェクション" として知られる セキュリティ脆弱性の解決策を備えています。 これは、SQLインジェクションの意味とは何か、 についての短い説明です。いくつかのアプリケーションは、エンベッドユーザーがこのように入力する SQLステートメントを構築します:
@~advanced_1212_h3
リテラルを無効にする
@~advanced_1213_p
ユーザー入力が直接SQLステートメントに組み込まれなければ、 SQLインジェクションは不可能です。上記の問題の簡単な解決方法は、PreparedStatementを使用することです:
@~advanced_1216_h3
定数を使用する
@~advanced_1217_p
リテラルを無効にするということは、ハードコード化された "定数" リテラルを無効にする、 ということも意味します。このデータベースは、CREATE CONSTANT コマンドを使用して定数を定義することをサポートしています。 定数はリテラルが有効であるときのみ定義することができますが、リテラルが無効の時でも使用することができます。 カラム名の名前の衝突を避けるために、定数は他のスキーマで定義できます:
@~advanced_1219_h3
ZERO() 関数を使用する
@~advanced_1220_p
組み込み関数 ZERO() がすでにあるため、 数値 0 のための定数を作る必要はありません:
@~advanced_1221_h2
#Restricting Class Loading and Usage
@~advanced_1222_p
#By default there is no restriction on loading classes and executing Java code for admins. That means an admin may call system functions such as System.setProperty by executing:
@~advanced_1225_h2
セキュリティプロトコル
@~advanced_1226_p
次の文章は、このデータベースで使用されている セキュリティプロトコルのドキュメントです。これらの記述は非常に専門的で、 根本的なセキュリティの基本をすでに知っているセキュリティ専門家のみを対象としています。
@~advanced_1227_h3
ユーザーパスワードの暗号化
@~advanced_1228_p
ユーザーがデータベースに接続しようとする時、ユーザー名の組み合わせ、@、パスワードは SHA-256 を使用してハッシュ化され、このハッシュ値はデータベースに送信されます。 この手順は、クライアントとサーバー間の転送をアタッカーが聞ける (非暗号化できる) のであれば、 再使用する値からのアタッカーを試みることはありません。しかし、パスワードはクライアントとサーバー間で 暗号化されていない接続を使用している時でさえも、プレーンテキストで送信されることはありません これはもしユーザーが、異なる場面で同じパスワードを再利用しても、このパスワードはある程度まで保護されます。 詳細は"RFC 2617 - HTTP Authentication: Basic and Digest Access Authentication" もご覧下さい。
@~advanced_1231_h3
ファイル暗号化
@~advanced_1232_p
データベースファイルは二つの異なるアルゴリズムを使用して、暗号化されます: AES-128 と XTEA です (32 ラウンドを使用)。 XTEAをサポートする理由はパフォーマンス (XTEAはAESのおよそ二倍の速さです) と、AESが突然壊れた場合、代わりとなるアルゴリズムを 持っているからです。
@~advanced_1241_h3
SSL/TLS 接続
@~advanced_1242_p
遠隔SSL/TLS接続は、Java Secure Socket Extension (SSLServerSocket / SSLSocket) の使用をサポートしています。デフォルトでは、匿名のSSLは使用可能です。デフォルトの暗号化パッケージソフトは SSL_DH_anon_WITH_RC4_128_MD5 です。
@~advanced_1243_h3
HTTPS 接続
@~advanced_1244_p
webサーバーは、SSLServerSocketを使用したHTTP と HTTPS接続をサポートします。 簡単に開始できるように、デフォルトの自己認証された証明書がありますが、 カスタム証明書も同様にサポートされています。
@~advanced_1245_h2
汎用一意識別子 (UUID)
@~advanced_1246_p
このデータベースはUUIDをサポートしています。 また、暗号化強力疑似乱数ジェネレーターを使用して新しいUUIDを作成する関数をサポートしています。 同じ値をもつ二つの無作為なUUIDが存在する可能性は、確率論を使用して計算されることができます。 "Birthday Paradox" もご覧下さい。標準化された無作為に生成されたUUIDは、122の無作為なビットを保持しています。 4ビットはバージョン(無作為に生成されたUUID) に、2ビットはバリアント (Leach-Salz) に使用されます。 このデータベースは組み込み関数 RANDOM_UUID() を使用してこのようなUUIDを生成することをサポートしています。 ここに、値の数字が生成された後、二つの 同一のUUIDが生じる可能性を見積もる小さなプログラムがあります:
@~advanced_1249_h2
システムプロパティから読み込まれた設定
@~advanced_1250_p
いくつかのデータベースの設定は、-DpropertyName=value を使用してコマンドラインで設定することができます。 通常、これらの設定は手動で変更することは必要とされていません。設定は大文字と小文字を区別しています。 例:
@~advanced_1253_h2
#Setting the Server Bind Address
@~advanced_1254_p
#Usually server sockets accept connections on any/all local addresses. This may be a problem on multi-homed hosts. To bind only to one address, use the system property h2.bindAddress. This setting is used for both regular server sockets and for SSL server sockets. IPv4 and IPv6 address formats are supported.
@~advanced_1255_h2
用語集とリンク
@~advanced_1256_th
用語
@~advanced_1258_td
AES-128
@~advanced_1269_a
Wikipedia: Block cipher modes of operation
@~advanced_1270_td
Salt
@~changelog_1002_h2
#Version 1.0.67 (2008-02-22)
@~changelog_1003_h2
#Version 1.0.67 (2008-02-22)
@~changelog_1003_li
#New function FILE_READ to read a file or from an URL. Both binary and text data is supported.
@~changelog_1004_h2
#Version 1.0.67 (2008-02-22)
@~changelog_1004_li
#New function FILE_READ to read a file or from an URL. Both binary and text data is supported.
@~changelog_1015_h2
#Version 1.0.67 (2008-02-22)
@~changelog_1015_li
#The value cache is now a soft reference cache. This should help save memory.
@~changelog_1022_h2
#Version 1.0.67 (2008-02-22)
@~changelog_1022_li
#The H2 Console has been translated to Dutch. Thanks a lot to Remco Schoen!
@~changelog_1025_li
#Connecting to a TCP server and at shutting it down at the same time could cause a Java level deadlock.
@~changelog_1026_h2
#Version 1.0.66 (2008-02-02)
@~changelog_1027_h2
#Version 1.0.66 (2008-02-02)
@~changelog_1027_li
#There is a new online error analyzer tool.
@~changelog_1038_h2
#Version 1.0.66 (2008-02-02)
@~changelog_1038_li
#Calling EXTRACT(HOUR FROM ...) or EXTRACT(HH FROM ...) returned the wrong values (0 to 11 instead of 0 to 23). All other tested databases return values from 0 to 23. Please check if your application relies on the old behavior before upgrading.
@~changelog_1043_h2
#Version 1.0.65 (2008-01-18)
@~changelog_1044_h2
#Version 1.0.65 (2008-01-18)
@~changelog_1044_li
#The build (ant) now automatically switches the source code to the correct version (JDK 1.4/1.5 or 1.6).
@~changelog_1045_h2
#Version 1.0.66 (2008-02-02)
@~changelog_1045_li
#The cache size was not correctly calculated for tables with large objects (specially if compression is used). This could lead to out-of-memory exceptions.
@~changelog_1048_li
#CHAR data type equals comparison was case insensitive instead of case sensitive.
@~changelog_1055_h2
#Version 1.0.65 (2008-01-18)
@~changelog_1055_li
#The bind IP address can now be set when using multi-homed host (if multiple network adapters are available) using the system property h2.bindAddress.
@~changelog_1062_h2
#Version 1.0.65 (2008-01-18)
@~changelog_1062_li
#CALL statements can now be used in batch updates and called using Statement.executeUpdate.
@~changelog_1065_li
#The performance for DROP and DROP ALL OBJECTS has been improved.
@~changelog_1066_h2
#Version 1.0.64 (2007-12-27)
@~changelog_1067_h2
#Version 1.0.64 (2007-12-27)
@~changelog_1067_li
#3-way union queries with prepared statement or views could return the wrong results. Fixed.
@~changelog_1078_h2
#Version 1.0.64 (2007-12-27)
@~changelog_1078_li
#New built-in functions RPAD and LPAD.
@~changelog_1085_h2
#Version 1.0.64 (2007-12-27)
@~changelog_1085_li
#The FTP server now supports a event listener. Thanks Fulvio Biondi for the help!
@~changelog_1088_li
#CSV tool: some escape/separator character combinations did not work. Fixed.
@~changelog_1092_h2
#Version 1.0.63 (2007-12-02)
@~changelog_1093_h2
#Version 1.0.63 (2007-12-02)
@~changelog_1093_li
#The SecurePassword example has been improved.
@~changelog_1103_h2
#Version 1.0.62 (2007-11-25)
@~changelog_1104_h2
#Version 1.0.63 (2007-12-02)
@~changelog_1104_li
#Large updates and deletes are now supported by buffering data to disk if required. The threshold is currently set to 100'000 bytes and can be changed using SET MAX_OPERATION_MEMORY or using by appending ;MAX_OPERATION_MEMORY=.. to the database URL. See also the docs.
@~changelog_1111_h2
#Version 1.0.63 (2007-12-02)
@~changelog_1111_li
#The H2 Console has been translated to Ukrainian by Igor Dobrovolskyi. Thanks a lot!
@~changelog_1114_li
#The native fulltext search was not working properly after re-connecting.
@~changelog_1115_h2
#Version 1.0.62 (2007-11-25)
@~changelog_1115_li
#The performance of large CSV operations has been improved.
@~changelog_1122_h2
#Version 1.0.61 (2007-11-10)
@~changelog_1122_li
#The console did not display multiple embedded spaces in text correctly. Fixed.
@~changelog_1123_h2
#Version 1.0.61 (2007-11-10)
@~changelog_1123_li
#The Lucene Fulltext implementation is now compiled and included in the h2.jar. Requires Lucene 2.2.
@~changelog_1125_li
#Referential integrity checks didn't lock the referenced table, and thus could read uncommitted rows of other connections. In that way the referential constraints could get violated (except when using MVCC).
@~changelog_1134_h2
#Version 1.0.61 (2007-11-10)
@~changelog_1134_li
#Descending indexes are now supported. This is useful when sorting columns descending, for example by creation date.
@~changelog_1137_h2
#Version 1.0.60 (2007-10-20)
@~changelog_1138_h2
#Version 1.0.60 (2007-10-20)
@~changelog_1138_li
#JdbcXAConnection: starting a transaction before getting the connection didn't switch off autocommit.
@~changelog_1141_h2
#Version 1.0.61 (2007-11-10)
@~changelog_1141_li
#INSTR, LOCATE: backward searching is not supported by using a negative start position.
@~changelog_1144_li
#ResultSetMetaData.getColumnDisplaySize was calculated as the longest display size for the given result set, but should be the maximum size that fits in the column. Fixed.
@~changelog_1149_h2
#Version 1.0.59 (2007-10-03)
@~changelog_1149_li
#CSVREAD, RUNSCRIPT and so on now support URLs as well, using URL.openStream(). Example: select * from csvread('jar:file:///c:/temp/test.jar!/test.csv');
@~changelog_1150_h2
#Version 1.0.59 (2007-10-03)
@~changelog_1150_li
#When the data type was unknown in a subquery, sometimes the wrong exception (ArrayIndexOutOfBounds) was thrown. Fixed.
@~changelog_1156_h2
#Version 1.0.60 (2007-10-20)
@~changelog_1156_li
#CSV: New methods to set the escape character and field delimiter in the Csv tool and the CSVWRITE and CSVREAD methods.
@~changelog_1159_li
#Server.shutdownTcpServer was blocked when first called with force=false and then force=true. Now documentation is improved, and it is no longer blocked.
@~changelog_1161_h2
#Version 1.0.59 (2007-10-03)
@~changelog_1161_li
#REGEXP compatibility: So far String.matches was used, but for compatibility with MySQL, now Matcher.find is used.
@~changelog_1165_h2
#Version 1.0.58 (2007-09-15)
@~changelog_1166_h2
#Version 1.0.58 (2007-09-15)
@~changelog_1166_li
#System.exit is no longer called by the WebServer, the Console and the Server tool (except to set the exit code if required). This is important when using OSGi.
@~changelog_1168_h2
#Version 1.0.59 (2007-10-03)
@~changelog_1168_li
#Fulltext search is now documented (in the Tutorial).
@~changelog_1171_li
#Multi-threaded kernel (MULTI_THREADED=1): A synchronization problem has been fixed.
@~changelog_1177_h2
#Version 1.0.58 (2007-09-15)
@~changelog_1177_li
#About 230 bytes per database was leaked. This is a problem for applications opening and closing many thousand databases. The main problem: a shutdown hook was added but never removed. Fixed. In JDK 1.4, there is an additionally problem, see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4197876. A workaround has been implemented.
@~changelog_1184_h2
#Version 1.0.58 (2007-09-15)
@~changelog_1184_li
#The default value for MAX_MEMORY_UNDO is now 100000.
@~changelog_1187_li
#The explain plan now says: /* direct lookup query */ if the query can be processed directly without reading rows, for example when using MIN(indexed column), MAX(indexed column), or COUNT(*).
@~changelog_1190_h2
#Version 1.0.57 (2007-08-25)
@~changelog_1191_h2
#Version 1.0.57 (2007-08-25)
@~changelog_1191_li
#New experimental feature MVCC (multi version concurrency control). Can be set as a option when opening the database (jdbc:h2:test;MVCC=TRUE) or as a system property (-Dh2.mvcc=true). This is work-in-progress, use it at your own risk. Feedback is welcome.
@~changelog_1202_h2
#Version 1.0.57 (2007-08-25)
@~changelog_1202_li
#Check and foreign key constraints now checks if the existing data is consistent (this can be disabled by appending NOCHECK). It is also possible to check existing data when re-enabling referential integrity for a table.
@~changelog_1209_h2
#Version 1.0.57 (2007-08-25)
@~changelog_1209_li
#Rights checking for dynamic tables (SELECT * FROM (SELECT ...)) did not work. Fixed.
@~changelog_1212_li
#The backup tool (org.h2.tools.Backup) did not work. The restore tool did not work when the -db parameter was used. Fixed. The documentation of the backup tool has been changed: only one database may be backed up at any time.
@~changelog_1217_h2
#Version 1.0.56 (2007-08-02)
@~changelog_1218_h2
#Version 1.0.56 (2007-08-02)
@~changelog_1218_li
#A new tool to help translation has been implemented: src/tools/org/h2/tools/i18n/PrepareTranslation. This tool can detect delta changes in the original (English) and prepends '#' in translation if the original text was changed. It can also extract text from the user documentation (however, it is incomplete).
@~changelog_1229_h2
#Version 1.0.56 (2007-08-02)
@~changelog_1229_li
#The SysTray tool has been removed, because JDK 1.6 has native support for system tray icons. Use the Console tool (org.h2.tools.Console) automatically installs a system tray icon if JDK 1.6 is used.
@~changelog_1236_h2
#Version 1.0.56 (2007-08-02)
@~changelog_1236_li
#The experimental H2 ODBC driver has been removed.
@~changelog_1239_li
#Part of the documentation has been translated to Japanese by Yusuke Fukushima.
@~links_1001_h2
#Books
@~links_1002_a
#Seam In Action
@~links_1003_h2
#Extensions
@~links_1004_a
#Spatial capabilities
@~links_1005_h2
#Blogs
@~links_1006_a
#Testing your JDBC data access layer with DBUnit and H2 (2007-09-18)
@~links_1013_h2
#Project Pages
@~links_1014_a
#Ohloh
@~links_1020_h2
#Products and Projects
@~links_1021_a
#Apache Cayenne
@~links_1022_p
#Open source persistence framework providing object-relational mapping (ORM) and remoting services.
@~links_1023_a
#Apache Jackrabbit
@~links_1024_p
#Open source implementation of the Java Content Repository API (JCR).
@~links_1025_a
#Apache OpenJPA
@~links_1026_p
#Open source implementation of the Java Persistence API (JPA).
@~links_1027_a
#AppFuse
@~links_1028_p
#Helps building web applications.
@~links_1029_a
#Blojsom
@~links_1030_p
#Java-based multi-blog, multi-user software package (Mac OS X Weblog Server)
@~links_1031_a
#Bookmarks Portlet
@~links_1032_p
#JSR168 compliant bookmarks management portlet application.
@~links_1033_a
#Claros inTouch
@~links_1034_p
#Ajax communication suite with mail, addresses, notes, IM, and rss reader.
@~links_1035_a
#CrashPlan PRO Server
@~links_1036_p
#Easy and cross platform backup solution for business and service providers.
@~links_1037_a
#DB Solo
@~links_1038_p
#SQL query tool.
@~links_1039_a
#DbVisualizer
@~links_1040_p
#Database tool.
@~links_1041_a
#Execute Query
@~links_1042_p
#Database utility written in Java.
@~links_1043_a
#Golden T Studios
@~links_1044_p
#Fun-to-play games with a simple interface.
@~links_1045_a
#HA-JDBC
@~links_1046_p
#High-Availability JDBC: A JDBC proxy that provides light-weight, transparent, fault tolerant clustering capability to any underlying JDBC driver.
@~links_1047_a
#HenPlus
@~links_1048_p
#HenPlus is a SQL shell written in Java.
@~links_1049_a
#Hibernate
@~links_1050_p
#Relational persistence for idiomatic Java (O-R mapping tool).
@~links_1051_a
#Hibicius
@~links_1052_p
#Online Banking Client for the HBCI protocol
@~links_1053_a
#H2 Spatial
@~links_1054_p
#A project to add spatial functions to H2 database.
@~links_1055_a
#JAMWiki
@~links_1056_p
#Java-based Wiki engine.
@~links_1057_a
#Jala
@~links_1058_p
#Open source collection of JavaScript modules
@~links_1059_a
#JavaPlayer
@~links_1060_p
#Pure Java MP3 player.
@~links_1061_a
#JMatter
@~links_1062_p
#Framework for constructing workgroup business applications based on the Naked Objects Architectural Pattern.
@~links_1063_a
#JPOX
@~links_1064_p
#Java persistent objects.
@~links_1065_a
#Liftweb
@~links_1066_p
#A Scala-based, secure, developer friendly web framework
@~links_1067_a
#LiquiBase
@~links_1068_p
#A tool to manage database changes and refactorings.
@~links_1069_a
#Luntbuild
@~links_1070_p
#Build automation and management tool.
@~links_1071_a
#MiniConnectionPoolManager
@~links_1072_p
#A lightweight standalone JDBC connection pool manager.
@~links_1073_a
#Mr. Persister
@~links_1074_p
#Simple, small and fast object relational mapping.
@~links_1075_a
#Myna Application Server
@~links_1076_p
#Java web app that provides dynamic web content and Java libraries access from JavaScript.
@~links_1077_a
#MyTunesRss
@~links_1078_p
#MyTunesRSS lets you listen to your music wherever you are.
@~links_1079_a
#NCGC CurveFit
@~links_1080_p
#From: NIH Chemical Genomics Center, National Institutes of Health, USA. An open source application in the life sciences research field. This application handles chemical structures and biological responses of thousands of compounds with the potential to handle million+ compounds. It utilizes an embedded H2 database to enable flexible query/retrieval of all data including advanced chemical substructure and similarity searching. The application highlights an automated curve fitting and classification algorithm that outperforms commercial packages in the field. Commercial alternatives are typically small desktop software that handle a few dose response curves at a time. A couple of commercial packages that do handle several thousand curves are very expensive tools (&gt;60k USD) that require manual curation of analysis by the user; require a license to Oracle; lack advanced query/retrieval; and the ability to handle chemical structures.
@~links_1081_a
#Orion
@~links_1082_p
#J2EE Application Server.
@~links_1083_a
#PolePosition
@~links_1084_p
#Open source database benchmark.
@~links_1085_a
#Scriptella
@~links_1086_p
#ETL (Extract-Transform-Load) and script execution tool.
@~links_1087_a
#Sesar
@~links_1088_p
#Dependency Injection Container with Aspect Oriented Programming
@~links_1089_a
#SemmleCode
@~links_1090_p
#Eclipse plugin to help you improve software quality.
@~links_1091_a
#Shellbook
@~links_1092_p
#Desktop publishing application.
@~links_1093_a
#Signsoft intelliBO
@~links_1094_p
#Persistence middleware supporting the JDO specification.
@~links_1095_a
#SmartFoxServer
@~links_1096_p
#Platform for developing multiuser applications and games with Macromedia Flash.
@~links_1097_a
#SQL Developer
@~links_1098_p
#Universal Database Frontend.
@~links_1099_a
#SQL Workbench/J
@~links_1100_p
#Free DBMS-independent SQL tool.
@~links_1101_a
#SQuirreL SQL Client
@~links_1102_p
#Graphical tool to view the structure of a database, browse the data, issue SQL commands etc.
@~links_1103_a
#SQuirreL DB Copy Plugin
@~links_1104_p
#Tool to copy data from one database to another.
@~links_1105_a
#StorYBook
@~links_1106_p
#A summary-based tool for novelist and script writers. It helps to keep the overview over the various traces a story has.
@~links_1107_a
#StreamCruncher
@~links_1108_p
#Event (stream) processing kernel.
@~links_1109_a
#Tamava
@~links_1110_p
#Newsgroups Reader.
@~links_1111_a
#Tune Backup
@~links_1112_p
#Easy-to-use backup solution for your iTunes library.
@~links_1113_a
#Web of Web
@~links_1114_p
#Collaborative and realtime interactive media platform for the web.
@~links_1115_a
#Werkzeugkasten
@~links_1116_p
#Minimum Java Toolset.
@~links_1117_a
#Volunteer database
@~links_1118_p
#A database front end to register volunteers, partnership and donation for a Non Profit organization.
@~mainWeb_1022_p
二種類から選べます: <a href="http://www.h2database.com/html/newsfeed-atom.xml" target="_blank">フルテキスト (Atom)</a>
または <a href="http://www.h2database.com/html/newsfeed-rss.xml" target="_blank">ヘッダーのみ (RSS)</a>.
@~mainWeb_1023_b
Email ニュースレター:
@~mainWeb_1024_p
<a href="http://groups.google.com/group/h2database-news/subscribe">
H2 データベース ニュース</a> (Googleアカウントが必要です)
に署名し、ニューリリースについての情報を入手して下さい。
あなたのemailアドレスはこのコンテンツでのみ使用されます。
@~mainWeb_1025_td
&nbsp;
@~mainWeb_1026_h3
寄稿する
@~mainWeb_1027_p
H2の発展のため、フィードバックやバグ報告を送ったり、H2コンソールアプリケーション (ファイル h2/src/main/org/h2/server/web/res/_text_*.properties)を訳すなど、 投稿することができます。また、下にある PayPal ボタンをクリックすることで 寄付することもできます。 支援者として、あなたの名前が載ります:
@~mainWeb_1028_td
&nbsp;
@~mainWeb_1029_h3
フィードバック
@~mainWeb_1030_td
質問や要望、その他あらゆるフィードバックはこちらから送信して下さい:
@~mainWeb_1031_p
Email (任意):
@~mainWeb_1032_form
メッセージ:
@~roadmap_1358_h2
#Not Planned
@~roadmap_1359_h2
#Not Planned
@~roadmap_1359_li
#HSQLDB (did) support this: select id i from test where i>0 (other databases don't). Supporting it may break compatibility.
@~roadmap_1361_h2
#Not Planned
@~roadmap_1361_li
#String.intern (so that Strings can be compared with ==) will not be used because some VMs have problems when used extensively.
@~roadmap_1362_li
#HSQLDB (did) support this: select id i from test where i>0 (other databases don't). Supporting it may break compatibility.
@~tutorial_1057_p
ドライバの追加はJavaバージョンのみでサポートされています (この特徴はネイティブバージョンではサポートされていません)。
@~tutorial_1058_h3
アプリケーションを使用する
@~tutorial_1059_p
アプリケーションは3つのメインパネルを保持しています。上部のツールバー、左側のツリーとクエリ、右側の結果表示パネルです。データベースオブジェクト (例; テーブル) は左側のパネルに一覧表示されます。クエリパネルにSQLコマンドを打ち、 'Run' をクリックします。 コマンドの結果は、コマンドのすぐ下に表示されます。
@~tutorial_1060_h3
テーブル名、またはカラム名をインサートする
@~tutorial_1061_p
テーブル名やカラム名は、ツリー内のテーブル名、カラム名をクリックすることによってスクリプトにインサートすることができます。クエリが空の時にテーブルをクリックすると、 'SELECT * FROM ...' も同様に追加されます。 クエリを入力している間、使用されているテーブルはツリー内で自動的に拡張されます。例えば、 'SELECT * FROM TEST T WHERE T.' と入力すると、ツリー内のTESTテーブルは自動的に拡張されます。
@~tutorial_1062_h3
切断とアプリケーションの終了
@~tutorial_1064_p
サーバーを止めるためには、システムトレイアイコンを右クリックし、 [Exit] を選択します。もしアイコンが表示されていないのであれば、 (別の方法で実行した場合) サーバーが実行されたコンソール上で [Ctrl]+[C] を押すか (Windowsの場合)、コンソールウィンドウを閉じます。
@~tutorial_1065_h2
JDBCを使用してデータベースに接続
@~tutorial_1067_p
このコードは最初にドライバをロードして (Class.forName())、 接続を開始します (DriverManager.getConnection())。 このドライバの名前は全てのケースにおいて "org.h2.Driver" です。 データベースに認識されるため、データベースのURLは常に jdbc:h2: から始まります。 getConnection() 内の2番目のパラメーターはユーザ名を指しています ('sa' はこの場合、システム管理者を表しています)。3番目のパラメーターはパスワードです。このデータベースでは、ユーザ名は大文字と小文字を区別していませんが、パスワードは大文字と小文字を区別しています。
@~tutorial_1068_h2
新しいデータベースを作成する
@~tutorial_1069_p
初期設定では、データベースの指定されたURLがまだ存在しない場合、自動的に新しい (空の) データベースが作られます。
@~tutorial_1070_h2
サーバーを使用する
@~tutorial_1071_p
H2は現在、3つのサーバーをサポートしています: Webサーバー、TCPサーバー、ODBCサーバーです。 これらのサーバーは異なった方法で起動します。
@~tutorial_1072_h3
コマンドラインから起動する
@~tutorial_1075_p
異なったポートの使用が可能なオプションや、サーバーの一部を起動、終了させるオプションなどがあります。 詳細はサーバーツールのAPIドキュメントをご覧下さい。
@~tutorial_1076_h3
TCPサーバーに接続する
@~tutorial_1077_p
データベースへリモート接続するためには、TCPサーバーを使用します。次のドライバとデータベースURLを利用します:
@~tutorial_1079_li
データベースURL: jdbc:h2:tcp://localhost/~/test
@~tutorial_1080_p
データベースURLについての詳細は、特徴内のページをご覧下さい。
@~tutorial_1081_h3
アプリケーション内で起動する
@~tutorial_1082_p
アプリケーション内からサーバーを起動、終了することも可能です。 以下はサンプルコードです:
@~tutorial_1083_h3
他の過程からTCPサーバーを終了する
@~tutorial_1086_p
この機能はサーバー上の System.exit を呼んでいます。この機能は、データベースが次回起動された時のリカバリーを回避するため、データベースへの全ての接続が切断された後に呼ばれます。リモートサーバーを終了するには、サーバー上でリモート接続が可能である必要があります。
@~tutorial_1087_h3
サーバーの制限
@~tutorial_1088_p
現在、サーバーやクラスターモードを使用する時にいくつかの制限があります:
@~tutorial_1089_li
Statement.cancel() はエンベッドモードのみサポートされています。接続はサーバー、またはクラスターモードで1度にひとつのオペレーションで実行され、 このオペレーションが終了するまで接続は遮断されます。
@~tutorial_1090_h2
Hibernateを使用する
@~tutorial_1091_p
このデータベースはHibernate version 3.1 と以降の新しいバージョンをサポートしています。 HSQLDB Dialect、または H2 Dialectは src/tools/org/h2/tools/hibernate/H2Dialect.txt ファイル内で使用可能です。 H2 dialectは Hibernateのより新しいバージョンに含まれています。H2 dialectが含まれていないバージョンでは、 src\org\hibernate\dialect (Hibernate 3.1の場合) フォルダ内のファイルをコピーし、 H2Dialect.java にファイル名を変更し、 Hibernateを再びコンパイルします。
@~tutorial_1092_h2
Webアプリケーションで データベースを使用する
@~tutorial_1093_p
Webアプリケーション内からデータベースに接続するには様々な方法があります。 以下はTomcatかJBossを使用の場合のいくつかの例です。
@~tutorial_1094_h3
エンベッドモード
@~tutorial_1095_p
(現在)最も簡単なソリューションはエンベッドモードでデータベースを使用することです。 それは、アプリケーションが起動する時や (良いソリューションは Servletリスナーを使用します。下記参照)、セッションが起動する時、アプリケーションにおける接続が開始するということを意味します。データベースは、セッションやアプリケーションが同じ過程で実行している限り、多様なセッションやアプリケーションから同時に接続されることが可能です。 多くのServletコンテナは (例; Tomcat) ただひとつのプロセスで利用されるので、問題はありません。 (Tomcatをクラスターモードで起動している場合を除いて)。 Tomcatはマルチスレッドとマルチクラスローダーを使用しています。もし複数のアプリケーションが同じデータベースに同時にアクセスする場合、データベースjarをshared/lib、またはserver/libディレクトリに置く必要があります。 webアプリケーションが起動した時にデータベースを開き、webアプリケーションが終了した時にデータベースを閉じるのが良い方法です。もし複数のアプリケーションを使用する場合、そのうちひとつのアプリケーションをこのように動作することが必要です。アプリケーションでは、セッションごとにひとつの接続を使うか、リクエスト(アクション)ごとにひとつの接続を使うという概念があります。これらの接続はできる限り、使用後に終了させます(しかし、終了させなくても悪くはありません)。
@~tutorial_1096_h3
サーバーモード
@~tutorial_1097_p
サーバーモードは類似していますが、他のプロセスでサーバーを起動させることを許可しています。
@~tutorial_1098_h3
データベースの起動と終了にServletリスナーを使用する
@~tutorial_1100_p
データベースへのアクセス方法についての詳細は、DbStarter.javaコードをご覧下さい。
@~tutorial_1101_h2
CSV (Comma Separated Values) サポート
@~tutorial_1102_p
データベースにCSVREADとCSVWRITEの関数を使用することで、 CSVファイルサポートを使用することができ、スタンドアロンツールとしてデータベースの外でCSVライブラリを使用することができます。
@~tutorial_1103_h3
データベース内からCSVファイルに書き込む
@~tutorial_1104_p
クエリからCSVファイルを作成するのに、組込み関数 CSVWRITEを使用することができます。例:
@~tutorial_1105_h3
データベース内からCSVファイルを読み込む
@~tutorial_1106_p
CSVREAD関数を使用してCSVファイルを読み込むことができます。 例:
@~tutorial_1107_h3
JavaアプリケーションからCSVファイルに書き込む
@~tutorial_1108_p
データベースを全く使用しなくても、JavaアプリケーションでCSVツールを使用することができます。 例:
@~tutorial_1109_h3
JavaアプリケーションからCSVファイルを読み込む
@~tutorial_1110_p
データベースを開かなくてもCSVファイルを読み込むことができます。 例:
@~tutorial_1111_h2
アップグレード、 バックアップ、修復
@~tutorial_1112_h3
データベースのアップグレー
@~tutorial_1113_p
あるバージョンのデータベースエンジンを次のバージョンにアップグレードする際の推奨する方法は、 古いエンジンを使って(SQLスクリプトのフォームでの)データベースのバックアップを作成し、新しいエンジンを使ってSQLスクリプトを実行します。
@~tutorial_1114_h3
バックアップ
@~tutorial_1116_p
オプションについての情報は、SQLコマンドスクリプトをご覧下さい。バックアップは遠隔で行えますが、ファイルはサーバー側に作られます。サーバーからファイルを取るのに、ビルトインFTPサーバーを使用することができます。データベースのバックアップを作るのに、SQLコマンドスクリプトを 使用することもできます。
@~tutorial_1117_h3
修復
@~tutorial_1119_p
オプションについての情報は、SQLコマンド RUNSCRIPTをご覧下さい。修復は遠隔で行えますが、サーバー側にファイルが存在する必要があります。サーバーからファイルをコピーするのに、ビルトインFTPサーバーを使用することができます。SQLスクリプトを実行するために、 SQLコマンド RUNSCRIPTを使用することができます。SQLスクリプトファイルには、RUNSCRIPTコマンドのフォーム内に他のスクリプトファイルのリファレンスが含まれています。しかしながら、サーバーモードを使用している時、リファレンススクリプトファイルはサーバー側で利用可能であることが必要です。
@~tutorial_1120_h3
オンラインバックアップ
@~tutorial_1122_p
バックアップツール (org.h2.tools.Backup) はオンラインバックアップを作成するために利用されません; このプログラムが実行されている間、データベースは使用されてはいけません。
@~tutorial_1123_h2
OpenOffice Baseを使用する
@~tutorial_1124_p
OpenOffice.org Base はJDBC API上のデータベースアクセスをサポートしています。 OpenOffice Baseを使ってH2データベースに接続するためには、最初にOpenOfficeにJDBCドライバを追加する必要があります。H2データベースに接続する手順:
@~tutorial_1130_li
JDBCドライバクラス: org.h2.Driver
@~tutorial_1131_h2
Java Web Start / JNLP
@~tutorial_1131_p
これで、C:/temp ディレクトリ内に格納されているデータベースにアクセス可能です。
@~tutorial_1132_h2
Java Web Start / JNLP
@~tutorial_1132_p
Java Web Start / JNLP (Java Network Launch Protocol) を使用している時、パーミッションタグは.jnlp ファイルに設定され、application.jarファイルは署名されていなければなりません。そうでなければ、ファイルシステムに書き込もうとした時、次の例外が発生するでしょう: java.security.AccessControlException: access denied (java.io.FilePermission ... read) パーミッションタグの例:
@~tutorial_1133_h2
フルテキストサーチ
@~tutorial_1133_p
Java Web Start / JNLP (Java Network Launch Protocol) を使用している時、パーミッションタグは.jnlp ファイルに設定され、application.jarファイルは署名されていなければなりません。そうでなければ、ファイルシステムに書き込もうとした時、次の例外が発生するでしょう: java.security.AccessControlException: access denied (java.io.FilePermission ... read) パーミッションタグの例:
@~tutorial_1134_h2
フルテキストサーチ
@~tutorial_1134_p
H2はLuceneフルテキストサーチとnativeフルテキストサーチの実装をサポートしています。
@~tutorial_1135_h3
Nativeフルテキストサーチを使用する
@~tutorial_1135_p
H2はLuceneフルテキストサーチとnativeフルテキストサーチの実装をサポートしています。
@~tutorial_1136_h3
Nativeフルテキストサーチを使用する
@~tutorial_1136_p
初期化するには、次を呼び出します:
@~tutorial_1138_p
PUBLICはスキーマ、TESTはテーブル名です。カラム名のリスト (分離されたカラム) はオプションです。このケースでは、全てのカラムがインデックスです。インデックスはリードタイムに更新されます。インデックスを検索するには、次のクエリーを使用します:
@~tutorial_1139_p
Javaアプリケーション内からインデックスを呼び出すことも可能です:
@~tutorial_1140_h3
Luceneフルテキストサーチを使用する
@~tutorial_1140_p
Javaアプリケーション内からインデックスを呼び出すことも可能です:
@~tutorial_1141_h3
Luceneフルテキストサーチを使用する
@~tutorial_1142_p
#You need to initialize it in each database where you want to use it. Afterwards, you can create a full text index for a table using:
@~tutorial_1143_p
PUBLICはスキーマ、TESTはテーブル名です。カラム名のリスト (分離されたカラム) はオプションです。このケースでは、全てのカラムがインデックスです。インデックスはリードタイムに更新されます。インデックスを検索するには、次のクエリーを使用します:
@~tutorial_1145_p
Javaアプリケーション内からインデックスを呼び出すことも可能です:
@~tutorial_1146_h2
#User Defined Variables
@~tutorial_1147_p
#It is also possible to change a value using the SET() method. This is useful in queries:
@~tutorial_1149_p
#Variables that are not set evaluate to NULL. The data type of a user defined variable is the data type of the value assigned to it, that means it is not necessary (or possible) to declare variable names before using them. There are no restrictions on the assigned values, large objects (LOBs) are supported as well.
@~~changelog_1122_h2
#Version 1.0.62 (2007-11-25)
@~~changelog_1149_h2
#Version 1.0.60 (2007-10-20)
...@@ -583,7 +583,7 @@ changelog_1263_li=In the H2 Console, result sets could not be modified because t ...@@ -583,7 +583,7 @@ changelog_1263_li=In the H2 Console, result sets could not be modified because t
changelog_1264_li=Views using UNION did not work correctly. Fixed. changelog_1264_li=Views using UNION did not work correctly. Fixed.
changelog_1265_li=Function tables did not work with views and EXPLAIN. Fixed. changelog_1265_li=Function tables did not work with views and EXPLAIN. Fixed.
download_1000_h1=Downloads download_1000_h1=Downloads
download_1001_h3=Version 1.0.67 (2008-03-14, Current) download_1001_h3=Version 1.0.67 (2008-03-15, Current)
download_1002_a=Windows Installer download_1002_a=Windows Installer
download_1003_a=Platform-Independent Zip download_1003_a=Platform-Independent Zip
download_1004_h3=Version 1.0.66 (2008-02-22, Last Stable) download_1004_h3=Version 1.0.66 (2008-02-22, Last Stable)
...@@ -1409,7 +1409,7 @@ mainWeb_1003_li=Written in Java; can be compiled with GCJ (Linux) ...@@ -1409,7 +1409,7 @@ mainWeb_1003_li=Written in Java; can be compiled with GCJ (Linux)
mainWeb_1004_li=Embedded, Server and Cluster modes mainWeb_1004_li=Embedded, Server and Cluster modes
mainWeb_1005_li=JDBC and (partial) ODBC API; Web Client application mainWeb_1005_li=JDBC and (partial) ODBC API; Web Client application
mainWeb_1006_h3=Download mainWeb_1006_h3=Download
mainWeb_1007_td=Version 1.0.68 (2008-03-14)\: mainWeb_1007_td=Version 1.0.68 (2008-03-15)\:
mainWeb_1008_a=Windows Installer (2.9 MB) mainWeb_1008_a=Windows Installer (2.9 MB)
mainWeb_1009_a=All platforms (zip, 4.1 MB) mainWeb_1009_a=All platforms (zip, 4.1 MB)
mainWeb_1010_a=All Downloads mainWeb_1010_a=All Downloads
......
...@@ -75,7 +75,7 @@ package org.h2.engine; ...@@ -75,7 +75,7 @@ package org.h2.engine;
public class Constants { public class Constants {
public static final int BUILD_ID = 68; public static final int BUILD_ID = 68;
private static final String BUILD = "2008-03-14"; private static final String BUILD = "2008-03-15";
public static final int VERSION_MAJOR = 1; public static final int VERSION_MAJOR = 1;
public static final int VERSION_MINOR = 0; public static final int VERSION_MINOR = 0;
......
...@@ -11,7 +11,7 @@ INSERT INTO CHANNEL VALUES('H2 Database Engine' , ...@@ -11,7 +11,7 @@ INSERT INTO CHANNEL VALUES('H2 Database Engine' ,
CREATE TABLE ITEM(ID INT PRIMARY KEY, TITLE VARCHAR, ISSUED TIMESTAMP, DESC VARCHAR); CREATE TABLE ITEM(ID INT PRIMARY KEY, TITLE VARCHAR, ISSUED TIMESTAMP, DESC VARCHAR);
INSERT INTO ITEM VALUES(38, INSERT INTO ITEM VALUES(38,
'New version available: 1.0.68 (2008-03-14)', '2008-03-14 12:00:00', 'New version available: 1.0.68 (2008-03-15)', '2008-03-15 12:00:00',
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>. 'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
(You may have to click ''Refresh''). (You may have to click ''Refresh'').
<br /> <br />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论