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

翻訳前ページへ


一時期/支部 13. Compatibility With Other DBMS

一時期/支部 13. Compatibility With Other DBMS

Fred Toussi

The HSQL 開発 Group

$Revision: 3096 $

Copyright 2010-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

Compatibility Overview
PostgreSQL Compatibility
MySQL Compatibility
Firebird Compatibility
Apache Derby Compatibility
Oracle Compatibility
DB2 Compatibility
MS SQLServer and Sybase Compatibility

Compatibility Overview

HyperSQL is used more than any other database engine for 使用/適用 実験(する)ing and 開発 的d at other databases. Over the years, this usage resulted in developers finding and 報告(する)/憶測ing many obscure bugs and 適切な時期s for enhancements in HyperSQL. The bugs were all 直す/買収する,八百長をするd すぐに after the 報告(する)/憶測s and enhancements were 追加するd in later 見解/翻訳/版s.

HyperSQL 2.x has been written to the SQL 基準 and 避けるs the 罠(にかける)s 原因(となる)d by superficial imitation of the 基準 by some other RDBMS. The SQL 基準 has 存在するd since 1989 and has been 拡大するd over the years in several 改正s. HyperSQL follows SQL:2023, which still stays almost fully 両立できる with SQL-92. The X-Open specification has also defined a number of SQL 機能(する)/行事s which are 器具/実施するd by most RDBMS.

HyperSQL has many 所有物/資産/財産 settings that relax conformance to the 基準 ーするために 許す compatibility with other RDBMS, without breaking the 核心 正直さ of the database. These 所有物/資産/財産s are 修正するd with SET DATABASE SQL 声明s 述べるd in the SQL Conformance Settings section of 管理/経営 一時期/支部.

HyperSQL is very 柔軟な and 供給するs some other 所有物/資産/財産s which define a preference の中で さまざまな valid choices. For example, the ability to 始める,決める the 処理/取引 model of the database, or the ability to define the 規模 of the data type of the result of integer 分割 or 普通の/平均(する) 計算/見積り (SET DATABASE SQL AVG SCALE).

Each major RDBMS supports 付加 機能(する)/行事s that are not covered by the 基準. Some RDBMS use 非,不,無-基準 syntax for some 操作/手術s that are 現実に covered by the 基準. Although most popular RDBMS 製品s have introduced better compatibility with the 基準 in their 最近の 見解/翻訳/版s, there are still some portability 問題/発行するs. HyperSQL 打ち勝つs the potability 問題/発行するs using these 戦略s

  • An 広範囲にわたる 始める,決める of 機能(する)/行事s cover the SQL 基準, X-Open, and most of the useful 機能(する)/行事s that other RDBMS support.

  • Database 所有物/資産/財産s, which can be 明示するd on the URL or as SQL 声明s, relax conformance to the 基準 ーするために 許す 非,不,無-基準 comparisons and assignments 許すd by other RDBMS.

  • 明確な/細部 SQL syntax compatibility 方式s 許す syntax and type 指名するs that are supported by some popular RDBMS.

  • 使用者-defined types and 機能(する)/行事s, 含むing aggregate 機能(する)/行事s, 許す any type or 機能(する)/行事 that is supported by some RDBMS to be defined and used.

Support for compatibility with other RDBMS has been 延長するd with each 見解/翻訳/版 of HyperSQL. This 一時期/支部 名簿(に載せる)/表(にあげる)s some of the 非,不,無-基準 features of database servers, their SQL 基準 同等(の)s or the support 供給するd by HyperSQL for those features.

PostgreSQL Compatibility

PostgreSQL is 公正に/かなり 両立できる with the 基準, but uses some 非,不,無-基準 features.

  • Use SET DATABASE SQL SYNTAX PGS TRUE or the 同等(の) URL 所有物/資産/財産 sql.syntax_pgs=true to enable the PostgreSQL's 非,不,無-基準 features. 言及/関連s to SERIAL, BIGSERIAL, TEXT and UUID data types, 同様に as sequence 機能(する)/行事s, are translated into HyperSQL 同等(の)s.

  • The 事例/患者 of unquoted identifiers is 非,不,無-基準 in PostgreSQL, which 蓄える/店s these identifiers in lowercase instead of uppercase. Use SET DATABASE SQL LOWER CASE IDENTIFIER or the URL 所有物/資産/財産 sql.lowercase_ident=true to change the 事例/患者 of unquoted identifiers ((米)棚上げする/(英)提議する 指名するs and column 指名するs) to lowercase in ResultSetMetaData.

  • Use SET DATABASE TRANSACTION CONTROL MVCC only if your 使用/適用 is multi-使用者.

  • Many PostgreSQL 機能(する)/行事s are supported, 含むing STRING_AGG.

  • For 身元 columns, PostgreSQL uses a 非,不,無-基準 結合,連鎖 with an 外部の 身元 sequence. In most 事例/患者s, this can be 変えるd to GENERATED BY DEFAULT AS IDENTITY. In those 事例/患者s where the 身元 sequence needs to be 株d by 多重の (米)棚上げする/(英)提議するs, you can use a new HyperSQL feature, GENERATED BY DEFAULT AS SEQUENCE <sequence 指名する>, which is the 同等(の) of the PostgreSQL 実施.

  • In CREATE TABLE 声明s, the SERIAL and BIGSERIAL types are translated into INTEGER or BIGINT, with GENERATED BY DEFAULT AS IDENTITY. Usage of DEFAULT NEXTVAL(<sequence 指名する>) is supported so long as the <sequence 指名する> 言及するs to an 存在するing sequence. This usage is translated into GENERATED BY DEFAULT AS SEQUENCE <sequence 指名する>.

  • In SELECT and other 声明s, the NEXTVAL(<sequence 指名する>) and LASTVAL() 機能(する)/行事s are supported and translated into HyperSQL's NEXT VALUE FOR <sequence 指名する> and IDENTITY() 表現s.

  • PostgreSQL uses a 非,不,無-基準 表現, SELECT 'A 実験(する) String' to return a 選び出す/独身 列/漕ぐ/騒動 (米)棚上げする/(英)提議する. The 基準 form is VALUES('A 実験(する) String'). In PGS syntax 方式, this type of SELECT is supported.

  • HyperSQL supports SQL 基準 ARRAY types. PostgreSQL also supports this, but not 完全に によれば the 基準.

  • SQL 決まりきった仕事s are portable, but some syntax elements are different and 要求する changes.

  • You may need to use SET DATABASE SQL TDC { DELETE | UPDATE } FALSE 声明s, as PostgreSQL does not 施行する the subtle 支配するs of the 基準 for foreign 重要な cascading 削除するs and updates. PostgreSQL 許すs cascading 操作/手術s to update a field value 多重の times with different values, the 基準 disallows this.

MySQL Compatibility

HyperSQL 見解/翻訳/版 2.7 is 高度に 両立できる with MySQL and supports most of its 非,不,無-基準 syntax. The 最新の 見解/翻訳/版s of MySQL have introduced better 基準 compatibility but some of these features have to be turned on 経由で 所有物/資産/財産s. You should therefore check the 現在の 基準 compatibility settings of your MySQL database and use the 利用できる HyperSQL 所有物/資産/財産s to 達成する closer results. If you 避ける the few anti-基準 features of MySQL, you can port your databases to HyperSQL and make it easier to port to other database engines.

Using HyperSQL during 開発 and 実験(する)ing of MySQL apps helps to 避ける data 正直さ 問題/発行するs that MySQL may ignore.

HyperSQL does not have the に引き続いて 非,不,無-基準 制限s of MySQL.

  • With HyperSQL, an UPDATE 声明 can update UNIQUE and PRIMARY KEY columns of a (米)棚上げする/(英)提議する without 原因(となる)ing an exception 予定 to 一時的な 違反 of 強制s. These 強制s are checked at the end of 死刑執行, therefore there is no need for an ORDER BY 条項 in an UPDATE 声明.

  • MySQL foreign 重要な 強制s are not 施行するd by the MyISAM engine. Be aware of the 可能性 of data 存在 拒絶するd by HyperSQL 予定 to these 強制s.

  • With HyperSQL INSERT or UPDATE 声明s either 後継する or fail 予定 to 強制 違反. MySQL has the 非,不,無-基準 IGNORE 無視/無効 to ignore 違反s and alter the data, which is not 受託するd by HyperSQL.

  • Unlike MySQL, HyperSQL 許すs you to 修正する a (米)棚上げする/(英)提議する with an INSERT, UPDATE or DELETE 声明 which selects from the same (米)棚上げする/(英)提議する in a subquery.

Follow the 指導基準s below for 変えるing MySQL databases and 使用/適用s.

  • Use SET DATABASE SQL SYNTAX MYS TRUE or the 同等(の) URL 所有物/資産/財産 sql.syntax_mys=true to enable support for MySQL features.

  • The 事例/患者 of unquoted identifiers is 非,不,無-基準 in MySQL, which 蓄える/店s these identifiers in the 初めの 事例/患者 but compares them 関わりなく 事例/患者. If you use lower-事例/患者 unquoted identifiers in MySQL, use SET DATABASE SQL LOWER CASE IDENTIFIER or the URL 所有物/資産/財産 sql.lowercase_ident=true to change the 事例/患者 of unquoted identifiers ((米)棚上げする/(英)提議する 指名するs and column 指名するs) to lowercase in ResultSetMetaData.

  • Use MVCC with SET DATABASE TRANSACTION CONTROL MVCC if your 使用/適用 is multi-使用者.

  • 避ける 蓄える/店ing 無効の values, for example 無効の dates such as '0000-00-00' or '2001-00-00' which are 拒絶するd by HyperSQL.

  • 避ける the MySQL feature that 削減するs spaces at the end of CHAR values.

  • In MySQL, a database is the same as a schema. In HyperSQL, several schemas can 存在する in the same database and 接近d transparently. In 新規加入, a HyperSQL server supports 多重の separate databases.

  • In MySQL, older, 非,不,無-基準, forms of database 反対する 指名する 事例/患者-sensitivity make is difficult to port 使用/適用s. The modern form, which encloses 事例/患者-極度の慎重さを要する 指名するs in 二塁打 引用するs, follows the SQL 基準 and is supported by HyperSQL. Use of the backtick character for 事例/患者-極度の慎重さを要する 指名するs, only 許すd by MySQL, is also supported and is translated to 二塁打 引用するs.

  • Almost all MySQL 機能(する)/行事s are supported, 含むing GROUP_CONCAT.

  • For 罰金 支配(する)/統制する over type 転換, check the settings for SET DATABASE SQL CONVERT TRUNCATE FALSE

  • 避ける using concatenation of かもしれない NULL values in your select 声明s. If you have to, change the setting with the SET DATABASE SQL CONCAT NULLS FALSE

  • If your 使用/適用 relies on MySQL behaviour for ordering of nulls in SELECT 声明s with ORDER BY, use both SET DATABASE SQL NULLS FIRST FALSE and SET DATABASE SQL NULLS ORDER FALSE to change the defaults.

  • In CREATE TABLE, MySQL syntax for KEYS, INDEX, COMMENT and some other features is supported.

  • MySQL supports most SQL 基準 types (except INTERVAL types), 同様に as 非,不,無-基準 types, which are also supported by HyperSQL. Supported types 含む SMALLINT, INT, BIGINT, DOUBLE, FLOAT, DECIMAL, NUMERIC, VARCHAR, CHAR, BINARY, VARBINARY, BLOB, DATE, TIMESTAMP (all 基準 SQL). 非,不,無 基準 types such as AUTO_INCREMENT, TINYINT, DATETIME, TEXT, TINYLOB, MEDIUMLOB are also supported. UNSIGNED types are 変えるd to 調印するd. These type 鮮明度/定義s are translated into HyperSQL 同等(の)s.

  • In MYS syntax compatibility 方式, HyperSQL translates MySQL's ENUM data type to VARCHAR with a check 強制 on the enum values.

  • In MYS syntax compatibility 方式, HyperSQL supports MySQL's 非,不,無-基準 見解/翻訳/版 of INTERVAL symbols such as DAY_HOUR and DAY_SECOND in DATEADD and DATESUB 機能(する)/行事s. The SQL 基準 form is DAY TO HOUR or DAY TO SECOND.

  • MySQL uses a 非,不,無-基準 表現, SELECT 'A 実験(する) String' to return a 選び出す/独身 列/漕ぐ/騒動 (米)棚上げする/(英)提議する. The 基準 form is VALUES('A 実験(する) String'). In MYS syntax 方式, this type of SELECT is supported.

  • 索引s defined inside CREATE TABLE 声明s are 受託するd and created. The 索引 指名するs must be unique within the schema.

  • HyperSQL supports ON UPDATE CURRENT_TIMESTAMP for column 鮮明度/定義s in CREATE TABLE 声明s.

  • HyperSQL supports and translates INSERT IGNORE, REPLACE and ON DUPLICATE KEY UPDATE variations of INSERT into predictable and error-解放する/自由な 操作/手術s. These MySQL variations do not throw an exception if any of the 挿入するd 列/漕ぐ/騒動s would 侵害する/違反する a PRIMARY KEY or UNIQUE 強制, and take a different 活動/戦闘 instead.

    When INSERT IGNORE is used, if any of the 挿入するd 列/漕ぐ/騒動s would 侵害する/違反する a PRIMARY KEY or UNIQUE 強制, that 列/漕ぐ/騒動 is not 挿入するd. With multi-列/漕ぐ/騒動 挿入するs, the 残り/休憩(する) of the 列/漕ぐ/騒動s are then 挿入するd only if there is no other 違反 such as long strings or type mismatch, さもなければ the appropriate error is returned.

    When REPLACE or ON DUPLICATE KEY UPDATE is used, the 列/漕ぐ/騒動s that need 取って代わるing or updating are updated with the given values. This 作品 正確に/まさに like an UPDATE 声明 for those 列/漕ぐ/騒動s. Referential 強制s and other 正直さ checks are 施行するd and update 誘発する/引き起こすs are 活動させる/戦時編成するd. The 列/漕ぐ/騒動 count returned is 簡単に the total number of 列/漕ぐ/騒動s 挿入するd and updated.

    With all the above 声明s, unique 索引s are not considered the same as unique 強制s for the 代案/選択肢 活動/戦闘 and an exception is thrown if there is 違反 of a unique 索引. It is 一般に better to create a unique 強制 instead of a unique 索引.

  • MySQL 使用者-defined 機能(する)/行事 and 手続き syntax is very 類似の to SQL 基準 syntax supported by HSQLDB. A few changes may still be 要求するd.

Firebird Compatibility

Firebird 一般に follows the SQL 基準. 使用/適用s can be ported to HyperSQL without difficulty.

Apache Derby Compatibility

Apache Derby supports a smaller subset of the SQL 基準 compared to HyperSQL. 使用/適用s can be ported to HyperSQL without difficulty.

  • Use MVCC with SET DATABASE TRANSACTION CONTROL MVCC if your 使用/適用 is multi-使用者.

  • HyperSQL supports Java language 機能(する)/行事s and 蓄える/店d 手続きs with the SQL 基準 syntax, which is 類似の to the way Derby supports these features.

Oracle Compatibility

最近の 見解/翻訳/版s of Oracle support 基準 SQL syntax for outer joins and many other 操作/手術s. In 新規加入, HyperSQL features a setting to support Oracle syntax and semantics for the most 広範囲にわたって used 非,不,無-基準 features.

  • Use SET DATABASE SQL SYNTAX ORA TRUE or the 同等(の) URL 所有物/資産/財産 sql.syntax_ora=true to enable support for some 非,不,無-基準 syntax of Oracle.

  • Use MVCC with SET DATABASE TRANSACTION CONTROL MVCC if your 使用/適用 is multi-使用者.

  • 罰金 支配(する)/統制する over MVCC 行き詰まる avoidance is 供給するd by the SET DATABASE TRANSACTION ROLLBACK ON CONFLICT FALSE and the corresponding hsqldb.tx_conflict_rollback 関係 所有物/資産/財産.

  • If your 使用/適用 relies on Oracle behaviour for nulls in multi-column UNIQUE 強制s, use SET DATABASE SQL UNIQUE NULLS FALSE to change the default.

  • If your 使用/適用 relies on Oracle behaviour for ordering of nulls in SELECT 声明s with ORDER BY, without NULLS FIRST or NULLS LAST, use both SET DATABASE SQL NULLS FIRST FALSE and SET DATABASE SQL NULLS ORDER FALSE to change the defaults.

  • If you use the 非,不,無-基準 concatenation of かもしれない NULL values in your select 声明s, you may need to change the setting for SET DATABASE SQL CONCAT NULLS FALSE.

  • You may want to use SET DATABASE COLLATION SQL_TEXT NO PAD to take into account differences in 追跡するing spaces in string comparisons.

  • Many Oracle 機能(する)/行事s are supported, 含むing no-arg 機能(する)/行事s such as SYSDATE and SYSTIMESTAMP and more コンビナート/複合体 ones such as TO_DATE and TO_CHAR.

  • 非,不,無-基準 data type 鮮明度/定義s such as NUMBER, VARCHAR2, NVARCHAR2, BINARY_DOUBLE, BINARY_FLOAT, LONG, RAW are translated into the closest SQL 基準 同等(の) in ORA 方式.

  • 非,不,無-基準 column DEFAULT 鮮明度/定義s in CREATE TABLE, such as the use of DUAL with a SEQUENCE 機能(する)/行事 are supported and translated in ORA syntax 方式.

  • The DATE type is 解釈する/通訳するd as TIMESTAMP(0) in ORA syntax 方式.

  • The DUAL (米)棚上げする/(英)提議する and the 表現s, ROWNUM, CURRVAL, NEXTVAL are supported in ORA syntax 方式.

  • HyperSQL natively supports 操作/手術s 伴う/関わるing datetime and interval values. These features are based on the SQL 基準.

  • Many subtle (a)自動的な/(n)自動拳銃 type 転換s, syntax refinements and other ありふれた features are supported.

  • SQL 決まりきった仕事s in PL/SQL are 一般に portable, but some changes are 要求するd.

  • More 前進するd compatibility is 申し込む/申し出d by HyperXtremeSQL, which is a 製品 based on HyperSQL. It supports more 機能(する)/行事 compatibility, the PL/HXSQL language with a 類似の syntax to PL/SQL, 広範囲にわたる support for 付加 aggregate 機能(する)/行事s, window analytic 機能(する)/行事s with OVER(PARTITION ... ORDER ... ROWS | RANGE ...) and WITHIN GROUP (ORDER BY).

DB2 Compatibility

DB2 is 高度に 両立できる with the SQL 基準 (except for its 欠如(する) of support for the INFORMATION_SCHEMA). 使用/適用s can be ported to HyperSQL without difficulty.

  • Use SET DATABASE SQL SYNTAX DB2 TRUE or the 同等(の) URL 所有物/資産/財産 sql.syntax_db2=true to enable support for some 非,不,無-基準 syntax of DB2.

  • Use MVCC with SET DATABASE TRANSACTION CONTROL MVCC if your 使用/適用 is multi-使用者.

  • HyperSQL supports almost the entire syntax of DB2 together with many of the 機能(する)/行事s. Even 地元の 一時的な (米)棚上げする/(英)提議するs using the SESSION pseudo schema are supported.

  • The DB2 binary type 鮮明度/定義 FOR BIT DATA, 同様に as empty 鮮明度/定義 of column default values are supported in DB2 syntax 方式.

  • Many DB2 機能(する)/行事s are supported.

  • The DUAL (米)棚上げする/(英)提議する and the 表現s, ROWNUM, CURRVAL, NEXTVAL are supported in DB2 syntax 方式.

  • SQL 決まりきった仕事s are 高度に portable with 極小の change.

  • More 前進するd compatibility is 申し込む/申し出d by HyperXtremeSQL, which is a 製品 based on HyperSQL. It has 広範囲にわたる support for 付加 aggregate 機能(する)/行事s, window analytic 機能(する)/行事s with OVER(PARTITION ... ORDER BY ... ROWS | RANGE ...) and WITHIN GROUP (ORDER BY ...).

MS SQLServer and Sybase Compatibility

SQLServer has some incompatibilities with the 基準 syntax. The most 重要な is the use of square brackets instead of 二塁打 引用するs for 事例/患者-極度の慎重さを要する column 指名するs.

  • Use SET DATABASE SQL SYNTAX MSS TRUE or the 同等(の) URL 所有物/資産/財産 sql.syntax_mss=true to enable support for the CONVERT(<type 鮮明度/定義>, <表現) 機能(する)/行事 with switched order of arguments

  • Use MVCC with SET DATABASE TRANSACTION CONTROL MVCC if your 使用/適用 is multi-使用者.

  • If you use the 非,不,無-基準 concatenation of かもしれない NULL values in your select 声明s, you may need to change the setting for SET DATABASE SQL CONCAT NULLS FALSE.

  • HyperSQL supports + for string concatenation.

  • SQLServer uses a 非,不,無-基準 表現, SELECT 'A 実験(する) String' to return a 選び出す/独身 列/漕ぐ/騒動 (米)棚上げする/(英)提議する. The 基準 form is VALUES('A 実験(する) String'). In MSS syntax 方式, this type of SELECT is supported.

  • SQLServer's 非,不,無-基準 data types, MONEY, UNIQUEIDENTIFIER, DATETIME2, DATETIMEOFFSET, IMAGE, TEXT, NTEXT, are translated to their SQL 基準 同等(の)s.

  • HyperSQL 2.7 supports several datetime 機能(する)/行事s in MSS compatibility 方式. These 含む DATEPART, DATENAME, EOMONTH and 両立できる DATEADD and DATEDIFF behaviour.

  • SQL 決まりきった仕事s need やめる a lot of changes.

  • More 前進するd compatibility is 申し込む/申し出d by HyperXtremeSQL, which is a 製品 based on HyperSQL. It has 広範囲にわたる support for 付加 aggregate 機能(する)/行事s, window analytic 機能(する)/行事s with OVER(PARTITION ... ORDER BY ... ROWS | RANGE ...) and WITHIN GROUP (ORDER BY ...).


$Revision: 6787 $