提交 04db103b authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation.

上级 b33146d3
......@@ -228,8 +228,8 @@ Selectivity 100 means values are unique, 10 means every distinct value appears 1
SET DEFAULT changes the default value of a column.
SET NULL sets a column to allow NULL. The row may not be part of a primary key or
multi-column hash index. Single column indexes on this column are dropped.
SET NULL sets a column to allow NULL. The row may not be part of a primary key.
Single column indexes on this column are dropped.
SET NOT NULL sets a column to not allow NULL. Rows may not contains NULL in this column.
......@@ -448,9 +448,10 @@ ON tableName ( indexColumn [,...] )
Creates a new index.
This command commits an open transaction.
Hash indexes are kept in memory. They can only test for equality, and do not support
range queries (similar to a hash table). They do support non-unique keys.
A multi-column hash index is only used if all column values are known.
Hash indexes are meant for in-memory databases and memory tables (CREATE MEMORY TABLE).
For other tables, or if the index contains multiple columns, the HASH keyword is ignored.
Hash indexes can only test for equality, and do not support range queries (similar to a hash table).
Non-unique keys are supported.
","
CREATE INDEX IDXNAME ON TEST(NAME)
"
......@@ -528,16 +529,16 @@ name { { ( { columnDefinition | constraint } [,...] ) [ AS select ] }
","
Creates a new table.
Cached tables (the default) are persistent, and the number
of rows is not limited by the main memory. Memory tables are persistent, but the
index data is kept in main memory, that means memory tables should not get too
large.
Cached tables (the default) are persistent, and the number of rows is not limited by the main memory.
Memory tables are persistent, but the index data is kept in main memory,
that means memory tables should not get too large.
Tables with the NOT PERSISTENT modifier are kept fully in memory, and all
rows are lost when the database is closed. Temporary tables are not persistent.
Temporary tables can be global (accessible by all connections) or local (only
accessible by the current connection). The default is for temporary tables is
global.
rows are lost when the database is closed.
Temporary tables are not persistent. Temporary tables can be global (accessible by all connections)
or local (only accessible by the current connection). The default is for temporary tables is global.
This command commits an open transaction.
","
......
......@@ -39,6 +39,8 @@ Frequently Asked Questions
Why is Opening my Database Slow?</a><br />
<a href="#column_names_incorrect">
Column Names are Incorrect?</a><br />
<a href="#float_is_double">
Float is Double?</a><br />
<a href="#gcj">
Is the GCJ Version Stable? Faster?</a><br />
<a href="#translate">
......@@ -210,6 +212,19 @@ This also applies to DatabaseMetaData calls that return a result set.
The columns in the JDBC API are column labels, not column names.
</p>
<h3 id="float_is_double">Float is Double?</h3>
<p>
For a table defined as <code>CREATE TABLE TEST(X FLOAT)</code> the method
<code>ResultSet.getObject()</code> returns a <code>java.lang.Double</code>, I expect it to
return a <code>java.lang.Float</code>. What's wrong?
</p>
<p>
This is not a bug. According the the JDBC specification, the JDBC data type <code>FLOAT</code>
is equivalent to <code>DOUBLE</code>, and both are mapped to <code>java.lang.Double</code>.
See also
<a href="http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/mapping.html#1055162">
Mapping SQL and Java Types - 8.3.10 FLOAT</a>.</p>
<h3 id="slow_open">Why is Opening my Database Slow?</h3>
<p>
To find out what the problem is, use the H2 Console and click on "Test Connection"
......
......@@ -368,9 +368,9 @@ encrypted using AES-256 and XTEA encryption algorithms
<h3>Derby and HSQLDB</h3>
<p>
After an unexpected process termination (for example power failure), H2 can recover safely and
automatically without any user interaction. For Derby and HSQLDB, some manual steps are required
('Another instance of Derby may have already booted the database' /
After an unexpected process termination (for example power failure), H2 can usually
recover safely and automatically without any user interaction. For Derby and HSQLDB,
some manual steps are required ('Another instance of Derby may have already booted the database' /
'The database is already in use by another process').
</p>
......@@ -830,6 +830,10 @@ are synchronized. That means an application can use multiple threads that access
at the same time, however if one thread executes a long running query, the other threads
need to wait.
</p>
<p>
An application should normally use one connection per thread. This database synchronizes
access to the same connection, but other databases may not do this.
</p>
<h3>Locking, Lock-Timeout, Deadlocks</h3>
<p>
......
......@@ -360,6 +360,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>RunScript should be able to read from system in (or quite mode for Shell).
</li><li>Natural join: support select x from dual natural join dual.
</li><li>Natural join: somehow support this: select a.x, b.x, x from dual a natural join dual b
</li><li>Use the Java service provider mechanism to register file systems and function libraries.
</li><li>MySQL compatibility: for auto_increment columns, convert 0 to next value (as when inserting NULL).
</li><li>Optimization for multi-column IN: use an index if possible. Example: (A, B) IN((1, 2), (2, 3)).
</li><li>Optimization for EXISTS: convert to inner join or IN(..) if possible.
......@@ -470,7 +471,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Issue 163: Allow to create foreign keys on metadata types.
</li><li>Logback: write a native DBAppender.
</li><li>Cache size: don't use more cache than what is available.
</li><li>Use the Java service provider mechanism to register file systems and function libraries.
</li><li>Tree index: Instead of an AVL tree, use a general balanced trees or a scapegoat tree.
</li><li>User defined functions: allow to store the bytecode (of just the class, or the jar file of the extension) in the database.
</li><li>Compatibility: ResultSet.getObject() on a CLOB (TEXT) should return String for PostgreSQL and MySQL.
......
......@@ -639,3 +639,4 @@ census genealogy scapegoat gov compacted migrating dies typtypmod latch await
counting dtest fallback infix places formal extern destination stdout memmove
stdio printf jchar sizeof stdlib jbyte jint uint ujlong typedef jdouble stdint
jfloat wchar hotspot jvoid std ujint jlong vars jboolean calloc argc strlen
equivalent synchronizes
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论