このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


一時期/支部 1. Running and Using HyperSQL

一時期/支部 1. Running and Using HyperSQL

Fred Toussi

The HSQL 開発 Group

$Revision: 6787 $

Copyright 2002-2024 Fred Toussi. 許可 is 認めるd to 分配する this 文書 without any alteration under the 条件 of the HSQLDB license. 付加 許可 is 認めるd to the HSQL 開発 Group to 分配する this 文書 with or without alterations under the 条件 of the HSQLDB license.

2024-10-25

(米)棚上げする/(英)提議する of Contents

Introduction
The HSQLDB Jar
Running Database 接近 道具s
A HyperSQL Database
In-過程 接近 to Database Catalogs
Server 方式s
HyperSQL HSQL Server
HyperSQL HTTP Server
HyperSQL HTTP Servlet
Connecting to a Database Server
安全 Considerations
Using 多重の Databases
接近ing the Data
の近くにing the Database
Creating a New Database

Introduction

HyperSQL Database (HSQLDB) is a modern relational database system. 見解/翻訳/版 2.7.4 is the 最新の 解放(する) of the all-new 見解/翻訳/版 2 code. Written from ground up to follow the international ISO SQL:2023 基準, it supports the 完全にする 始める,決める of the classic features of the SQL 基準, together with optional features such as 蓄える/店d 手続きs and 誘発する/引き起こすs.

HyperSQL 見解/翻訳/版 2.7.4 is 両立できる with Java 11 or later and supports the Java module system. A 見解/翻訳/版 of the HSQLDB jar 収集するd with JDK 8 is also 含むd in the download zip 一括. These jars are also 利用できる from Maven repositories.

HyperSQL is used for 開発, 実験(する)ing and (軍隊などの)展開,配備 of database 使用/適用s.

SQL 基準 同意/服従 is the most unique characteristic of HyperSQL.

There are several other 独特の features. HyperSQL can 供給する database 接近 within the 使用者's 使用/適用 過程, within an 使用/適用 server, or as a separate server 過程. HyperSQL can run 完全に in memory using a 急速な/放蕩な memory structure. HyperSQL can use disk persistence in a 柔軟な way, with reliable 衝突,墜落-回復. HyperSQL is the only open-source relational database 管理/経営 system with a high-業績/成果 献身的な 高く弓形に打ち返す 貯蔵 system, suitable for gigabytes of 高く弓形に打ち返す data. It is also the only relational database that can create and 接近 large comma delimited とじ込み/提出するs as SQL (米)棚上げする/(英)提議するs. HyperSQL supports three live switchable 処理/取引 支配(する)/統制する models, 含むing fully multi-threaded MVCC, and is suitable for high 業績/成果 処理/取引 過程ing 使用/適用s. HyperSQL is also suitable for 商売/仕事 知能, ETL and other 使用/適用s that 過程 large data 始める,決めるs. HyperSQL has a wide 範囲 of 企業 (軍隊などの)展開,配備 選択s, such as XA 処理/取引s, 関係 pooling data sources and remote authentication.

New SQL syntax compatibility 方式s have been 追加するd to HyperSQL. These 方式s 許す a high degree of compatibility with several other database systems which use 非,不,無-基準 SQL syntax.

HyperSQL is written in the Java programming language and runs in a Java 事実上の machine (JVM). It supports the JDBC interface for database 接近.

The ODBC driver for PostgreSQL can be used with HSQLDB.

This guide covers the database engine features, SQL syntax and different 方式s of 操作/手術. The JDBC interfaces, pooling and XA 構成要素s are 文書d in the JavaDoc. 公共事業(料金)/有用性s such as SqlTool and DatabaseManagerSwing are covered in a separate 公共事業(料金)/有用性s Guide.

The HSQLDB Jar

The HSQLDB jar 一括, hsqldb.jar, is 位置を示すd in the /lib directory of the ZIP 一括 and 含む/封じ込めるs several 構成要素s and programs.

構成要素s of the HSQLDB jar 一括

  • HyperSQL RDBMS Engine (HSQLDB)

  • HyperSQL JDBC Driver

  • DatabaseManagerSwing GUI database 接近 道具

The HyperSQL RDBMS and JDBC Driver 供給する the 核心 functionality. DatabaseManagerSwing is a database 接近 道具 that can be used with any database engine that has a JDBC driver.

An 付加 jar, sqltool.jar, 含む/封じ込めるs SqlTool, a 命令(する) line database 接近 道具 that can also be used with other database engines.

Running Database 接近 道具s

The 接近 道具s are used for interactive 使用者 接近 to databases, 含むing 創造 of a database, 挿入するing or 修正するing data, or querying the database. All 道具s are run in the normal way for Java programs. In the に引き続いて example the Swing 見解/翻訳/版 of the Database 経営者/支配人 is 遂行する/発効させるd. The hsqldb.jar is 位置を示すd in the directory ../lib 親族 to the 現在の directory.

 java -cp ../lib/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing

If hsqldb.jar is in the 現在の directory, the 命令(する) would change to:

 java -cp hsqldb.jar org.hsqldb.util.DatabaseManagerSwing

Main class for the HSQLDB 道具s

  • org.hsqldb.util.DatabaseManagerSwing

When a 道具 is up and running, you can connect to a database (may be a new database) and use SQL 命令(する)s to 接近 and 修正する the data.

道具s can use 命令(する) line arguments. You can 追加する the 命令(する) line argument --help to get a 名簿(に載せる)/表(にあげる) of 利用できる arguments for these 道具s.

二塁打 clicking the HSQLDB jar will start the DatabaseManagerSwing 使用/適用.

A HyperSQL Database

Each HyperSQL database is called a catalog. There are three types of catalog depending on how the data is 蓄える/店d.

Types of catalog data

  • mem: 蓄える/店d 完全に in RAM - without any persistence beyond the JVM 過程's life

  • とじ込み/提出する: 蓄える/店d in とじ込み/提出する system

  • res: 蓄える/店d in a Java 資源, such as a Jar and always read-only

All-in-memory mem: catalogs can be used for 実験(する) data or as sophisticated (武器などの)隠匿場所s for an 使用/適用. These databases do not have any とじ込み/提出するs.

A とじ込み/提出する: catalog consists of between 2 to 6 とじ込み/提出するs, all 指名するd the same but with different 拡張s, 位置を示すd in the same directory. For example, the database 指名するd "testdb" consists of the に引き続いて とじ込み/提出するs:

  • testdb.所有物/資産/財産s

  • testdb.script

  • testdb.スピードを出す/記録につける

  • testdb.data

  • testdb.backup

  • testdb.高く弓形に打ち返すs

The 所有物/資産/財産s とじ込み/提出する 含む/封じ込めるs a few settings about the database. The script とじ込み/提出する 含む/封じ込めるs the 鮮明度/定義 of (米)棚上げする/(英)提議するs and other database 反対するs, 加える the data for memory (米)棚上げする/(英)提議するs. The スピードを出す/記録につける とじ込み/提出する 含む/封じ込めるs 最近の changes to the database. The data とじ込み/提出する 含む/封じ込めるs the data for (武器などの)隠匿場所d (米)棚上げする/(英)提議するs and the backup とじ込み/提出する is used to 逆戻りする to the last known 一貫した 明言する/公表する of the data とじ込み/提出する. All these とじ込み/提出するs are 必須の and should never be 削除するd. For some catalogs, the testdb.data and testdb.backup とじ込み/提出するs will not be 現在の. In 新規加入 to those とじ込み/提出するs, a HyperSQL database may link to any formatted text とじ込み/提出するs, such as CSV 名簿(に載せる)/表(にあげる)s, anywhere on the disk.

While the "testdb" catalog is open, a testdb.スピードを出す/記録につける とじ込み/提出する is used to 令状 the changes made to data. This とじ込み/提出する is 除去するd at a normal SHUTDOWN. さもなければ (with 異常な shutdown) this とじ込み/提出する is used at the next startup to redo the changes. A testdb.lck とじ込み/提出する is also used to 記録,記録的な/記録する the fact that the database is open. This is 削除するd at a normal SHUTDOWN.

[Note]公式文書,認める

When the engine の近くにs the database at a shutdown, it creates 一時的な とじ込み/提出するs with the 拡張 .new which it then 改名するs to those 名簿(に載せる)/表(にあげる)d above. These とじ込み/提出するs should not be 削除するd by the 使用者. At the time of the next startup, all such とじ込み/提出するs will be 改名するd or 削除するd by the database engine. In some circumstances, a testdb.data.xxx.old is created and 削除するd afterwards by the database engine. The 使用者 can 削除する these testdb.data.xxx.old とじ込み/提出するs.

A res: catalog consists of the とじ込み/提出するs for a small, read-only database that can be 蓄える/店d inside a Java 資源 such as a ZIP or JAR 古記録 and 分配するd as part of a Java 使用/適用 program.

In-過程 接近 to Database Catalogs

In general, JDBC is used for all 接近 to databases. This is done by making a 関係 to the database, then using さまざまな methods of the java.sql.関係 反対する that is returned to 接近 the data. 接近 to an in-過程 database is started from JDBC, with the database path 明示するd in the 関係 URL. For example, if the とじ込み/提出する: database 指名する is "testdb" and its とじ込み/提出するs are 位置を示すd in the same directory as where the 命令(する) to run your 使用/適用 was 問題/発行するd, the に引き続いて code is used for the 関係:

 関係 c = DriverManager.getConnection("jdbc:hsqldb:とじ込み/提出する:testdb", "SA", "");

The database とじ込み/提出する path 判型 can be 明示するd using 今後 削除するs in Windows hosts 同様に as Linux hosts. So 親族 paths or paths that 言及する to the same directory on the same 運動 can be 同一の. For example if your database directory in Linux is /選ぶ/db/ 含む/封じ込めるing a database testdb (with とじ込み/提出するs 指名するd testdb.*), then the database とじ込み/提出する path is /選ぶ/db/testdb. If you create an 同一の directory structure on the C: 運動 of a Windows host, you can use the same URL in both Windows and Linux:

 関係 c = DriverManager.getConnection("jdbc:hsqldb:とじ込み/提出する:/選ぶ/db/testdb", "SA", "");

When using 親族 paths, these paths will be taken 親族 to the directory in which the 爆撃する 命令(する) to start the Java 事実上の Machine was 遂行する/発効させるd. 言及する to the Javadoc for JDBCConnection for more 詳細(に述べる)s.

Paths and database 指名するs for とじ込み/提出する databases are 扱う/治療するd as 事例/患者-極度の慎重さを要する when the database is created or the first 関係 is made to the database. But if a second 関係 is made to an open database, using a path and 指名する that 異なるs only in 事例/患者, then the 関係 is made to the 存在するing open database. This 手段 is necessary because in Windows the two paths are 同等(の).

A mem: database is 明示するd by the mem: 議定書. For mem: databases, the path is 簡単に a 指名する. Several mem: databases can 存在する at the same time and distinguished by their 指名するs. In the example below, the database is called "mymemdb":

 関係 c = DriverManager.getConnection("jdbc:hsqldb:mem:mymemdb", "SA", "");

A res: database, is 明示するd by the res: 議定書. As it is a Java 資源, the database path is a Java URL (類似の to the path to a class). In the example below, "resdb" is the root 指名する of the database とじ込み/提出するs, which 存在するs in the directory "org/my/path" within the classpath (probably in a Jar). A Java 資源 is 蓄える/店d in a compressed 判型 and is decompressed in memory when it is used. For this 推論する/理由, a res: database should not 含む/封じ込める large 量s of data and is always read-only.

 関係 c = DriverManager.getConnection("jdbc:hsqldb:res:org.my.path.resdb", "SA", "");

The first time in-過程 関係 is made to a database, some general data structures are initialised and a helper thread is started. After this, 創造 of 関係s and calls to JDBC methods of the 関係s 遂行する/発効させる as if they are part of the Java 使用/適用 that is making the calls. When the SQL 命令(する) "SHUTDOWN" is 遂行する/発効させるd, the 全世界の structures and helper thread for the database are destroyed.

公式文書,認める that only one Java 過程 at a time can make in-過程 関係s to a given とじ込み/提出する: database. However, if the とじ込み/提出する: database has been made read-only, or if 関係s are made to a res: database, then it is possible to make in-過程 関係s from 多重の Java 過程s.

Server 方式s

For most 使用/適用s, in-過程 接近 is faster, as the data is not 変えるd and sent over the 網状組織. The main drawback is that it is not possible by default to connect to the database from outside your 使用/適用. As a result you cannot check the contents of the database with 外部の 道具s such as Database 経営者/支配人 while your 使用/適用 is running.

Server 方式s 供給する the 最大限 accessibility. The database engine runs in a JVM and opens one or more in-過程 catalogs. It listens for 関係s from programs on the same computer or other computers on the 網状組織. It translates these 関係s into in-過程 関係s to the databases.

Several different programs can connect to the server and retrieve or update (警察などへの)密告,告訴(状). 使用/適用s programs ((弁護士の)依頼人s) connect to the server using the HyperSQL JDBC driver. In most server 方式s, the server can serve an 制限のない number of databases that are 明示するd at the time of running the server, or optionally, as a 関係 request is received.

A 切断する 方式 is also the preferred 方式 of running the database during 開発. It 許すs you to query the database from a separate database 接近 公共事業(料金)/有用性 while your 使用/適用 is running.

There are three server 方式s, based on the 議定書 used for communications between the (弁護士の)依頼人 and server. They are 簡潔に discussed below. More 詳細(に述べる)s on servers is 供給するd in the HyperSQL 網状組織 Listeners (Servers) 一時期/支部.

HyperSQL HSQL Server

This is the preferred way of running a database server and the fastest one. A proprietary communications 議定書 is used for this 方式. A 命令(する) 類似の to those used for running 道具s and 述べるd above is used for running the server. The に引き続いて example of the 命令(する) for starting the server starts the server with one (default) database with とじ込み/提出するs 指名するd "mydb.*" and the public 指名する of "xdb". The public 指名する hides the とじ込み/提出する 指名するs from 使用者s.

 java -cp ../lib/hsqldb.jar org.hsqldb.server.Server --database.0 とじ込み/提出する:mydb --dbname.0 xdb

The 命令(する) line argument --help can be used to get a 名簿(に載せる)/表(にあげる) of 利用できる arguments. 関係s are made using an hsql: URL.

 関係 c = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/xdb", "SA", "");

HyperSQL HTTP Server

This method of 接近 is used when the computer hosting the database server is 制限するd to the HTTP 議定書. The only 推論する/理由 for using this method of 接近 is 制限s 課すd by firewalls on the (弁護士の)依頼人 or server machines and it should not be used where there are no such 制限s. The HyperSQL HTTP Server is a special web server that 許すs JDBC (弁護士の)依頼人s to connect 経由で HTTP. The server can also 行為/法令/行動する as a small general-目的 web server for static pages.

To run an HTTP server, 取って代わる the main class for the server in the example 命令(する) line above with WebServer:

 java -cp ../lib/hsqldb.jar org.hsqldb.server.WebServer --database.0 とじ込み/提出する:mydb --dbname.0 xdb

The 命令(する) line argument --help can be used to get a 名簿(に載せる)/表(にあげる) of 利用できる arguments. 関係s are made using an http: URL.

 関係 c = DriverManager.getConnection("jdbc:hsqldb:http://localhost/xdb", "SA", "");

HyperSQL HTTP Servlet

This method of 接近 also uses the HTTP 議定書. It is used when a servlet engine (or 使用/適用 server) such as Tomcat or Resin 供給するs 接近 to the database. The Servlet 方式 cannot be started 独立して from the servlet engine. The Servlet class, in the HSQLDB jar, should be 任命する/導入するd on the 使用/適用 server to 供給する the 関係. The database とじ込み/提出する path is 明示するd using an 使用/適用 server 所有物/資産/財産. 言及する to the source とじ込み/提出する src/org/hsqldb/server/Servlet.java to see the 詳細(に述べる)s.

Both HTTP Server and Servlet 方式s can be 接近d using the JDBC driver at the (弁護士の)依頼人 end. They do not 供給する a web 前線 end to the database. The Servlet 方式 can serve 多重の databases.

Please 公式文書,認める that you do not 普通は use this 方式 if you are using the database engine in an 使用/適用 server. In this 状況/情勢, 関係s to a catalog are usually made in-過程, or using the hsql: 議定書 to an HSQL Server

Connecting to a Database Server

When a HyperSQL server is running, (弁護士の)依頼人 programs can connect to it using the HSQLDB JDBC Driver 含む/封じ込めるd in hsqldb.jar. 十分な (警察などへの)密告,告訴(状) on how to connect to a server is 供給するd in the Java Documentation for JDBCConnection (位置を示すd in the /doc/apidocs directory of HSQLDB 配当). A ありふれた example is 関係 to the default port (9001) used for the hsql: 議定書 on the same machine:

Example 1.1. Java code to connect to the 地元の hsql Server

 try {
     Class.forName("org.hsqldb.jdbc.JDBCDriver" );
 } catch (Exception e) {
     System.err.println("ERROR: failed to 負担 HSQLDB JDBC driver.");
     e.printStackTrace();
     return;
 }

 関係 c = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/xdb", "SA", "");

If the HyperSQL HTTP server is used, the 議定書 is http: and the URL will be different:

Example 1.2. Java code to connect to the 地元の http Server

 関係 c = DriverManager.getConnection("jdbc:hsqldb:http://localhost/xdb", "SA", "");

公式文書,認める in the above 関係 URL, there is no について言及する of the database とじ込み/提出する, as this was 明示するd when running the server. Instead, the public 指名する defined for dbname.0 is used. Also, see the HyperSQL 網状組織 Listeners (Servers) 一時期/支部 for the 関係 URL when there is more than one database per server instance.

安全 Considerations

When a HyperSQL server is run, 網状組織 接近 should be adequately 保護するd. Source IP 演説(する)/住所s may be 制限するd by use of our 接近 支配(する)/統制する 名簿(に載せる)/表(にあげる) feature, 網状組織 filtering ソフトウェア, firewall ソフトウェア, or standalone firewalls. Only 安全な・保証する passwords should be used-- most importantly, the password for the default system 使用者 should be changed from the default empty string. If you are purposefully 供給するing data to the public, then the wide-open public 網状組織 関係 should be used 排他的に to 接近 the public data 経由で read-only accounts. (i.e., neither 安全な・保証する data nor 特権d accounts should use this 関係). These considerations also 適用する to HyperSQL servers run with the HTTP 議定書.

HyperSQL 供給するs two optional 安全 機械装置s. The encrypted SSL 議定書, and 接近 支配(する)/統制する 名簿(に載せる)/表(にあげる)s. Both 機械装置s can be 明示するd when running the Server or WebServer. On the (弁護士の)依頼人, the URL to connect to an SSL server is わずかに different:

Example 1.3. Java code to connect to the 地元の 安全な・保証する SSL hsqls: and https: Servers

 関係 c = DriverManager.getConnection("jdbc:hsqldb:hsqls://localhost/xdb", "SA", "");
 関係 c = DriverManager.getConnection("jdbc:hsqldb:https://localhost/xdb", "SA", "");


The 安全 features are discussed in 詳細(に述べる) in the HyperSQL 網状組織 Listeners (Servers) 一時期/支部.

Using 多重の Databases

A server can 供給する 関係s to more than one database. In the examples above, more than one 始める,決める of database 指名するs can be 明示するd on the 命令(する) line. It is also possible to 明示する all the databases in a .所有物/資産/財産s とじ込み/提出する, instead of the 命令(する) line. These 能力s are covered in the HyperSQL 網状組織 Listeners (Servers) 一時期/支部

接近ing the Data

As shown so far, a java.sql.関係 反対する is always used to 接近 the database. But 業績/成果 depends on the type of 関係 and how it is used.

設立するing a 関係 and の近くにing it has some 総計費s, therefore it is not good practice to create a new 関係 to 成し遂げる a small number of 操作/手術s. A 関係 should be 再使用するd as much as possible and の近くにd only when it is not going to be used again for a long while.

再使用する is more important for server 関係s. A server 関係 uses a TCP port for communications. Each time a 関係 is made, a port is 配分するd by the operating system and deallocated after the 関係 is の近くにd. If many 関係s are made from a 選び出す/独身 (弁護士の)依頼人, the operating system may not be able to keep up and may 辞退する the 関係 試みる/企てる.

A java.sql.関係 反対する has some methods that return その上の java.sql.* 反対するs. All these 反対するs belong to the 関係 that returned them and are の近くにd when the 関係 is の近くにd. These 反対するs, 名簿(に載せる)/表(にあげる)d below, can be 再使用するd. But if they are not needed after 成し遂げるing the 操作/手術s, they should be の近くにd.

A java.sql.DatabaseMetaData 反対する is used to get metadata for the database.

A java.sql.声明 反対する is used to 遂行する/発効させる queries and data change 声明s. A 選び出す/独身 java.sql.声明 can be 再使用するd to 遂行する/発効させる a different 声明 each time.

A java.sql.PreparedStatement 反対する is used to 遂行する/発効させる a 選び出す/独身 声明 繰り返して. The SQL 声明 usually 含む/封じ込めるs parameters, which can be 始める,決める to new values before each 再使用する. When a java.sql.PreparedStatement 反対する is created, the engine keeps the 収集するd SQL 声明 for 再使用する, until the java.sql.PreparedStatement 反対する is の近くにd. As a result, repeated use of a java.sql.PreparedStatement is much faster than using a java.sql.声明 反対する.

A java.sql.CallableStatement 反対する is used to 遂行する/発効させる an SQL CALL 声明. The SQL CALL 声明 may 含む/封じ込める parameters, which should be 始める,決める to new values before each 再使用する. 類似の to java.sql.PreparedStatement, the engine keeps the 収集するd SQL 声明 for 再使用する, until the java.sql.CallableStatement 反対する is の近くにd.

A java.sql.関係 反対する also has some methods for 処理/取引 支配(する)/統制する.

The commit() method 成し遂げるs a COMMIT while the rollback() method 成し遂げるs a ROLLBACK SQL 声明.

The setSavepoint(String 指名する) method 成し遂げるs a SAVEPOINT <指名する> SQL 声明 and returns a java.sql.Savepoint 反対する. The rollback(Savepoint 指名する) method 成し遂げるs a ROLLBACK TO SAVEPOINT <指名する> SQL 声明.

The Javadoc for JDBCConnection, JDBCDriver, JDBCDatabaseMetadata, JDBCResultSet, JDBCStatement, JDBCPreparedStatement 名簿(に載せる)/表(にあげる) all the supported JDBC methods together with (警察などへの)密告,告訴(状) that is 明確な/細部 to HSQLDB.

の近くにing the Database

All databases running in different 方式s can be の近くにd with the SHUTDOWN 命令(する), 問題/発行するd as an SQL 声明.

When SHUTDOWN is 問題/発行するd, all active 処理/取引s are rolled 支援する. The catalog とじ込み/提出するs are then saved in a form that can be opened quickly the next time the catalog is opened.

A special form of の近くにing the database is 経由で the SHUTDOWN COMPACT 命令(する). This 命令(する) rewrites the .data とじ込み/提出する that 含む/封じ込めるs the (警察などへの)密告,告訴(状) 蓄える/店d in CACHED (米)棚上げする/(英)提議するs and compacts it to its 最小限 size. This 命令(する) should be 問題/発行するd periodically, 特に when lots of 挿入するs, updates, or 削除するs have been 成し遂げるd on the (武器などの)隠匿場所d (米)棚上げする/(英)提議するs. Changes to the structure of the database, such as dropping or 修正するing 居住させるd CACHED (米)棚上げする/(英)提議するs or 索引s also create large 量s of 未使用の とじ込み/提出する space that can be 埋め立てるd using this 命令(する).

Databases are not の近くにd when the last 関係 to the database is explicitly の近くにd 経由で JDBC. A 関係 所有物/資産/財産, shutdown=true, can be 明示するd on the first 関係 to the database (the 関係 that opens the database) to 軍隊 a shutdown when the last 関係 の近くにs.

Example 1.4. 明示するing a 関係 所有物/資産/財産 to shutdown the database when the last 関係 is の近くにd

 関係 c = DriverManager.getConnection(
         "jdbc:hsqldb:とじ込み/提出する:/選ぶ/db/testdb;shutdown=true", "SA", "");


This feature is useful for running 実験(する)s, where it may not be practical to shutdown the database after each 実験(する). But it is not recommended for 使用/適用 programs.

Creating a New Database

When a server instance is started, or when a 関係 is made to an in-過程 database, a new, empty database is created if no database 存在するs at the given path.

With HyperSQL 2.0 the 使用者 指名する and password that are 明示するd for the 関係 are used for the new database. Both the 使用者 指名する and password are 事例/患者-極度の慎重さを要する. (The exception is the default SA 使用者, which is not 事例/患者-極度の慎重さを要する). If no 使用者 指名する or password is 明示するd, the default SA 使用者 and an empty password are used.

This feature has a 味方する 影響 that can 混乱させる new 使用者s. If a mistake is made in 明示するing the path for connecting to an 存在するing database, a 関係 is にもかかわらず 設立するd to a new database. For troubleshooting 目的s, you can 明示する a 関係 所有物/資産/財産 ifexists=true to 許す 関係 to an 存在するing database only and 避ける creating a new database. In this 事例/患者, if the database does not 存在する, the getConnection() method will throw an exception.

Example 1.5. 明示するing a 関係 所有物/資産/財産 to disallow creating a new database

 関係 c = DriverManager.getConnection(
         "jdbc:hsqldb:とじ込み/提出する:/選ぶ/db/testdb;ifexists=true", "SA", "");


A database has many optional 所有物/資産/財産s, 述べるd in the System 管理/経営 一時期/支部. You can 明示する most of these 所有物/資産/財産s on the URL or in the 関係 所有物/資産/財産s for the first 関係 that creates the database. See the 所有物/資産/財産s 一時期/支部.


$Revision: 6787 $