提交 7051dafc authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation.

上级 2e9fffe4
...@@ -1152,6 +1152,7 @@ If IGNORECASE is enabled, text columns in newly created tables will be ...@@ -1152,6 +1152,7 @@ If IGNORECASE is enabled, text columns in newly created tables will be
case-insensitive. Already existing tables are not affected. The effect of case-insensitive. Already existing tables are not affected. The effect of
case-insensitive columns is similar to using a collation with strength PRIMARY. case-insensitive columns is similar to using a collation with strength PRIMARY.
Case-insensitive columns are compared faster than when using a collation. Case-insensitive columns are compared faster than when using a collation.
String literals and parameters are however still considered case sensitive even if this option is set.
Admin rights are required to execute this command, as it affects all connections. Admin rights are required to execute this command, as it affects all connections.
This command commits an open transaction. This command commits an open transaction.
......
...@@ -401,6 +401,8 @@ MEMORY_FREE(), MEMORY_USED(), CSVREAD(), CSVWRITE(), RAND()</code> [when not usi ...@@ -401,6 +401,8 @@ MEMORY_FREE(), MEMORY_USED(), CSVREAD(), CSVWRITE(), RAND()</code> [when not usi
Those functions should not be used directly in modifying statements Those functions should not be used directly in modifying statements
(for example <code>INSERT, UPDATE, MERGE</code>). However, they can be used (for example <code>INSERT, UPDATE, MERGE</code>). However, they can be used
in read-only statements and the result can then be used for modifying statements. in read-only statements and the result can then be used for modifying statements.
Using auto-increment and identity columns is currently not supported.
Instead, sequence values need to be manually requested and then used to insert data (using two statements).
</p> </p>
<p> <p>
When using the cluster modes, result sets are read fully in memory by the client, so that When using the cluster modes, result sets are read fully in memory by the client, so that
...@@ -483,6 +485,13 @@ is included in the installation. Batch files are provided to install, start, sto ...@@ -483,6 +485,13 @@ is included in the installation. Batch files are provided to install, start, sto
H2 Database Engine Service. This service contains the TCP Server and the H2 Console web application. H2 Database Engine Service. This service contains the TCP Server and the H2 Console web application.
The batch files are located in the directory <code>h2/service</code>. The batch files are located in the directory <code>h2/service</code>.
</p> </p>
<p>
When running the database as a service, absolute path should be used.
Using <code>~</code> in the database URL is problematic in this case,
because it means to use the home directory of the current user.
The service might run without or with the wrong user, so that
the database files might end up in an unexpected place.
</p>
<h3>Install the Service</h3> <h3>Install the Service</h3>
<p> <p>
...@@ -1409,7 +1418,8 @@ and the recursion needs to be on the second part of the query. ...@@ -1409,7 +1418,8 @@ and the recursion needs to be on the second part of the query.
No tables or views with the name of the table expression may exist. No tables or views with the name of the table expression may exist.
Different table expression names need to be used when using multiple distinct table Different table expression names need to be used when using multiple distinct table
expressions within the same transaction and for the same session. expressions within the same transaction and for the same session.
All columns of the table expression are of type <code>VARCHAR</code>. All columns of the table expression are of type <code>VARCHAR</code>,
and may need to be cast to the required data type.
Views with recursive queries are not supported. Views with recursive queries are not supported.
Subqueries and <code>INSERT INTO ... FROM</code> with recursive queries are not supported. Subqueries and <code>INSERT INTO ... FROM</code> with recursive queries are not supported.
Parameters are only supported within the last <code>SELECT</code> statement Parameters are only supported within the last <code>SELECT</code> statement
......
...@@ -300,6 +300,13 @@ H2 1.3, ...@@ -300,6 +300,13 @@ H2 1.3,
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
</tr><tr> </tr><tr>
<td>Window Functions</td>
<td class="compareN">No *15</td>
<td class="compareN">No *15</td>
<td class="compareN">No</td>
<td class="compareY">Yes</td>
<td class="compareN">No</td>
</tr><tr>
<td>Temporary Tables</td> <td>Temporary Tables</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes *4</td> <td class="compareY">Yes *4</td>
...@@ -366,6 +373,7 @@ H2 1.3, ...@@ -366,6 +373,7 @@ H2 1.3,
*12 Derby doesn't support the <code>EXPLAIN</code> statement, but it supports runtime statistics and retrieving statement execution plans.<br /> *12 Derby doesn't support the <code>EXPLAIN</code> statement, but it supports runtime statistics and retrieving statement execution plans.<br />
*13 Derby doesn't support the syntax <code>LIMIT .. [OFFSET ..]</code>, however it supports <code>FETCH FIRST .. ROW[S] ONLY</code>.<br /> *13 Derby doesn't support the syntax <code>LIMIT .. [OFFSET ..]</code>, however it supports <code>FETCH FIRST .. ROW[S] ONLY</code>.<br />
*14 Using collations. *14 Using collations.
*15 Derby and H2 support <code>ROW_NUMBER() OVER()</code>.
</p> </p>
<h3>DaffodilDb and One$Db</h3> <h3>DaffodilDb and One$Db</h3>
...@@ -969,11 +977,10 @@ without problems. ...@@ -969,11 +977,10 @@ without problems.
<h3>Backup</h3> <h3>Backup</h3>
<p> <p>
When the database is closed, it is possible to backup the database files. Please note that index When the database is closed, it is possible to backup the database files.
files do not need to be backed up, because they contain redundant data, and will be recreated
automatically if they don't exist.
</p><p> </p><p>
To backup data while the database is running, the SQL command <code>SCRIPT</code> can be used. To backup data while the database is running,
the SQL commands <code>SCRIPT</code> and <code>BACKUP</code> can be used.
</p> </p>
<h2 id="logging_recovery">Logging and Recovery</h2> <h2 id="logging_recovery">Logging and Recovery</h2>
......
...@@ -555,6 +555,8 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -555,6 +555,8 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Sybase / MS SQL Server compatibility: CONVERT(..) parameters are swapped. </li><li>Sybase / MS SQL Server compatibility: CONVERT(..) parameters are swapped.
</li><li>Index conditions: WHERE AGE>1 should not scan through all rows with AGE=1. </li><li>Index conditions: WHERE AGE>1 should not scan through all rows with AGE=1.
</li><li>PHP support: H2 should support PDO, or test with PostgreSQL PDO. </li><li>PHP support: H2 should support PDO, or test with PostgreSQL PDO.
</li><li>Outer joins: if no column of the outer join table is referenced, the outer join table could be removed from the query.
</li><li>Cluster: allow using auto-increment and identity columns by ensuring executed in lock-step.
</li></ul> </li></ul>
<h2>Not Planned</h2> <h2>Not Planned</h2>
......
...@@ -954,10 +954,10 @@ and then execute the SQL script using the new engine. ...@@ -954,10 +954,10 @@ and then execute the SQL script using the new engine.
<h3>Backup using the Script Tool</h3> <h3>Backup using the Script Tool</h3>
<p> <p>
There are different ways to backup a database. For example, it is possible to copy the database files. The recommended way to backup a database is to create a compressed SQL script file.
However, this is not recommended while the database is in use. Also, the database files are not human readable This will result in a small, human readable, and database version independent backup.
and quite large. The recommended way to backup a database is to create a compressed SQL script file. Creating the script will also verify the checksums of the database file.
This can be done using the <code>Script</code> tool: The <code>Script</code> tool is ran as follows:
</p> </p>
<pre> <pre>
java org.h2.tools.Script -url jdbc:h2:~/test -user sa -script test.zip -options compression zip java org.h2.tools.Script -url jdbc:h2:~/test -user sa -script test.zip -options compression zip
...@@ -989,7 +989,7 @@ need to be available on the server side. ...@@ -989,7 +989,7 @@ need to be available on the server side.
<h3>Online Backup</h3> <h3>Online Backup</h3>
<p> <p>
The <code>BACKUP</code> SQL statement and the <code>Backup</code> tool both create a zip file The <code>BACKUP</code> SQL statement and the <code>Backup</code> tool both create a zip file
with all database files. However, the contents of this file are not human readable. with the database file. However, the contents of this file are not human readable.
</p><p> </p><p>
The resulting backup is transactionally consistent, meaning the consistency and atomicity rules apply. The resulting backup is transactionally consistent, meaning the consistency and atomicity rules apply.
</p> </p>
...@@ -1002,8 +1002,8 @@ the database must not be in use while running this program. ...@@ -1002,8 +1002,8 @@ the database must not be in use while running this program.
</p> </p>
<p> <p>
Creating a backup by copying the database files while the database is running is not supported, Creating a backup by copying the database files while the database is running is not supported,
except if the file systems support creating snapshots. The problem is that it can't except if the file systems support creating snapshots.
be guaranteed that the data is copied in the right order. With other file systems, it can't be guaranteed that the data is copied in the right order.
</p> </p>
<h2 id="command_line_tools">Command Line Tools</h2> <h2 id="command_line_tools">Command Line Tools</h2>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论