advanced_1000_h1=Advanced Topics advanced_1001_a=Result Sets advanced_1002_a=Large Objects advanced_1003_a=Linked Tables advanced_1004_a=Transaction Isolation advanced_1005_a=Clustering / High Availability advanced_1006_a=Two Phase Commit advanced_1007_a=Compatibility advanced_1008_a=Run as Windows Service advanced_1009_a=ODBC Driver advanced_1010_a=ACID advanced_1011_a=Durability Problems advanced_1012_a=Using the Recover Tool advanced_1013_a=File Locking Protocols advanced_1014_a=Protection against SQL Injection advanced_1015_a=Security Protocols advanced_1016_a=Universally Unique Identifiers (UUID) advanced_1017_a=Settings Read from System Properties advanced_1018_a=Glossary and Links advanced_1019_h2=Result Sets advanced_1020_h3=Limiting the Number of Rows advanced_1021_p=Before the result is returned to the application, all rows are read by the database. Server side cursors are not supported currently. If only the first few rows are interesting for the application, then the result set size should be limited to improve the performance. This can be done using LIMIT in a query (example\: SELECT * FROM TEST LIMIT 100), or by using Statement.setMaxRows(max). advanced_1022_h3=Large Result Sets and External Sorting advanced_1023_p=For result set larger than 1000 rows, the result is buffered to disk. If ORDER BY is used, the sorting is done using an external sort algorithm. In this case, each block of rows is sorted using quick sort, then written to disk; when reading the data, the blocks are merged together. advanced_1024_h2=Large Objects advanced_1025_h3=Storing and Reading Large Objects advanced_1026_p=If it is possible that the objects don't fit into memory, then the data type CLOB (for textual data) or BLOB (for binary data) should be used. For these data types, the objects are not fully read into memory, by using streams. To store a BLOB, use PreparedStatement.setBinaryStream. To store a CLOB, use PreparedStatement.setCharacterStream. To read a BLOB, use ResultSet.getBinaryStream, and to read a CLOB, use ResultSet.getCharacterStream. If the client/server mode is used, the BLOB and CLOB data is fully read into memory when accessed. In this case, the size of a BLOB or CLOB is limited by the memory. advanced_1027_h2=Linked Tables advanced_1028_p=This database supports linked tables, which means tables that don't exist in the current database but are just links to another database. To create such a link, use the CREATE LINKED TABLE statement\: advanced_1029_p=It is then possible to access the table in the usual way. There is a restriction when inserting data to this table\: When inserting or updating rows into the table, NULL and values that are not set in the insert statement are both inserted as NULL. This may not have the desired effect if a default value in the target table is other than NULL. advanced_1030_p=For each linked table a new connection is opened. This can be a problem for some databases when using many linked tables. For Oracle XE, the maximum number of connection can be increased. Oracle XE needs to be restarted after changing these values\: advanced_1031_h2=Transaction Isolation advanced_1032_p=This database supports the following transaction isolation levels\: advanced_1033_b=Read Committed advanced_1034_li=This is the default level. Read locks are released immediately. Higher concurrency is possible when using this level. advanced_1035_li=To enable, execute the SQL statement 'SET LOCK_MODE 3' advanced_1036_li=or append ;LOCK_MODE\=3 to the database URL\: jdbc\:h2\:~/test;LOCK_MODE\=3 advanced_1037_b=Serializable advanced_1038_li=To enable, execute the SQL statement 'SET LOCK_MODE 1' advanced_1039_li=or append ;LOCK_MODE\=1 to the database URL\: jdbc\:h2\:~/test;LOCK_MODE\=1 advanced_1040_b=Read Uncommitted advanced_1041_li=This level means that transaction isolation is disabled. advanced_1042_li=To enable, execute the SQL statement 'SET LOCK_MODE 0' advanced_1043_li=or append ;LOCK_MODE\=0 to the database URL\: jdbc\:h2\:~/test;LOCK_MODE\=0 advanced_1044_p=When using the isolation level 'serializable', dirty reads, non-repeatable reads, and phantom reads are prohibited. advanced_1045_b=Dirty Reads advanced_1046_li=Means a connection can read uncommitted changes made by another connection. advanced_1047_li=Possible with\: read uncommitted advanced_1048_b=Non-Repeatable Reads advanced_1049_li=A connection reads a row, another connection changes a row and commits, and the first connection re-reads the same row and gets the new result. advanced_1050_li=Possible with\: read uncommitted, read committed advanced_1051_b=Phantom Reads advanced_1052_li=A connection reads a set of rows using a condition, another connection inserts a row that falls in this condition and commits, then the first connection re-reads using the same condition and gets the new row. advanced_1053_li=Possible with\: read uncommitted, read committed advanced_1054_h3=Table Level Locking advanced_1055_p=The database allows multiple concurrent connections to the same database. To make sure all connections only see consistent data, table level locking is used. This mechanism does not allow high concurrency, but is very fast. Shared locks and exclusive locks are supported. Before reading from a table, the database tries to add a shared lock to the table (this is only possible if there is no exclusive lock on the object by another connection). If the shared lock is added successfully, the table can be read. It is allowed that other connections also have a shared lock on the same object. If a connection wants to write to a table (update or delete a row), an exclusive lock is required. To get the exclusive lock, other connection must not have any locks on the object. After the connection commits, all locks are released. This database keeps all locks in memory. advanced_1056_h3=Lock Timeout advanced_1057_p=If a connection cannot get a lock on an object, the connection waits for some amount of time (the lock timeout). During this time, hopefully the connection holding the lock commits and it is then possible to get the lock. If this is not possible because the other connection does not release the lock for some time, the unsuccessful connection will get a lock timeout exception. The lock timeout can be set individually for each connection. advanced_1058_h2=Clustering / High Availability advanced_1059_p=This database supports a simple clustering / high availability mechanism. The architecture is\: two database servers run on two different computers, and on both computers is a copy of the same database. If both servers run, each database operation is executed on both computers. If one server fails (power, hardware or network failure), the other server can still continue to work. From this point on, the operations will be executed only on one server until the other server is back up. advanced_1060_p=Clustering can only be used in the server mode (the embedded mode does not support clustering). It is possible to restore the cluster without stopping the server, however it is critical that no other application is changing the data in the first database while the second database is restored, so restoring the cluster is currently a manual process. advanced_1061_p=To initialize the cluster, use the following steps\: advanced_1062_li=Create a database advanced_1063_li=Use the CreateCluster tool to copy the database to another location and initialize the clustering. Afterwards, you have two databases containing the same data. advanced_1064_li=Start two servers (one for each copy of the database) advanced_1065_li=You are now ready to connect to the databases with the client application(s) advanced_1066_h3=Using the CreateCluster Tool advanced_1067_p=To understand how clustering works, please try out the following example. In this example, the two databases reside on the same computer, but usually, the databases will be on different servers. advanced_1068_li=Create two directories\: server1 and server2. Each directory will simulate a directory on a computer. advanced_1069_li=Start a TCP server pointing to the first directory. You can do this using the command line\: advanced_1070_li=Start a second TCP server pointing to the second directory. This will simulate a server running on a second (redundant) computer. You can do this using the command line\: advanced_1071_li=Use the CreateCluster tool to initialize clustering. This will automatically create a new, empty database if it does not exist. Run the tool on the command line\: advanced_1072_li=You can now connect to the databases using an application or the H2 Console using the JDBC URL jdbc\:h2\:tcp\://localhost\:9101,localhost\:9102/test advanced_1073_li=If you stop a server (by killing the process), you will notice that the other machine continues to work, and therefore the database is still accessible. advanced_1074_li=To restore the cluster, you first need to delete the database that failed, then restart the server that was stopped, and re-run the CreateCluster tool. advanced_1075_h3=Clustering Algorithm and Limitations advanced_1076_p=Read-only queries are only executed against the first cluster node, but all other statements are executed against all nodes. There is currently no load balancing made to avoid problems with transactions. The following functions may yield different results on different cluster nodes and must be executed with care\: RANDOM_UUID(), SECURE_RAND(), SESSION_ID(), MEMORY_FREE(), MEMORY_USED(), CSVREAD(), CSVWRITE(), RAND() [when not using a seed]. Those functions should not be used directly in modifying statements (for example INSERT, UPDATE, or MERGE). However, they can be used in read-only statements and the result can then be used for modifying statements. advanced_1077_h2=Two Phase Commit advanced_1078_p=The two phase commit protocol is supported. 2-phase-commit works as follows\: advanced_1079_li=Autocommit needs to be switched off advanced_1080_li=A transaction is started, for example by inserting a row advanced_1081_li=The transaction is marked 'prepared' by executing the SQL statement PREPARE COMMIT transactionName advanced_1082_li=The transaction can now be committed or rolled back advanced_1083_li=If a problem occurs before the transaction was successfully committed or rolled back (for example because a network problem occurred), the transaction is in the state 'in-doubt' advanced_1084_li=When re-connecting to the database, the in-doubt transactions can be listed with SELECT * FROM INFORMATION_SCHEMA.IN_DOUBT advanced_1085_li=Each transaction in this list must now be committed or rolled back by executing COMMIT TRANSACTION transactionName or ROLLBACK TRANSACTION transactionName advanced_1086_li=The database needs to be closed and re-opened to apply the changes advanced_1087_h2=Compatibility advanced_1088_p=This database is (up to a certain point) compatible to other databases such as HSQLDB, MySQL and PostgreSQL. There are certain areas where H2 is incompatible. advanced_1089_h3=Transaction Commit when Autocommit is On advanced_1090_p=At this time, this database engine commits a transaction (if autocommit is switched on) just before returning the result. For a query, this means the transaction is committed even before the application scans through the result set, and before the result set is closed. Other database engines may commit the transaction in this case when the result set is closed. advanced_1091_h3=Keywords / Reserved Words advanced_1092_p=There is a list of keywords that can't be used as identifiers (table names, column names and so on), unless they are quoted (surrounded with double quotes). The list is currently\: advanced_1093_p=CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE, CROSS, DISTINCT, EXCEPT, EXISTS, FROM, FOR, FALSE, FULL, GROUP, HAVING, INNER, INTERSECT, IS, JOIN, LIKE, MINUS, NATURAL, NOT, NULL, ON, ORDER, PRIMARY, ROWNUM, SELECT, SYSDATE, SYSTIME, SYSTIMESTAMP, TODAY, TRUE, UNION, WHERE advanced_1094_p=Certain words of this list are keywords because they are functions that can be used without '()' for compatibility, for example CURRENT_TIMESTAMP. advanced_1095_h2=Run as Windows Service advanced_1096_p=Using a native wrapper / adapter, Java applications can be run as a Windows Service. There are various tools available to do that. The Java Service Wrapper from Tanuki Software, Inc. ( http\://wrapper.tanukisoftware.org ) is included in the installation. Batch files are provided to install, start, stop and uninstall the H2 Database Engine Service. This service contains the TCP Server and the H2 Console web application. The batch files are located in the directory H2/service. advanced_1097_h3=Install the Service advanced_1098_p=The service needs to be registered as a Windows Service first. To do that, double click on 1_install_service.bat. If successful, a command prompt window will pop up and disappear immediately. If not, a message will appear. advanced_1099_h3=Start the Service advanced_1100_p=You can start the H2 Database Engine Service using the service manager of Windows, or by double clicking on 2_start_service.bat. Please note that the batch file does not print an error message if the service is not installed. advanced_1101_h3=Connect to the H2 Console advanced_1102_p=After installing and starting the service, you can connect to the H2 Console application using a browser. Double clicking on 3_start_browser.bat to do that. The default port (8082) is hard coded in the batch file. advanced_1103_h3=Stop the Service advanced_1104_p=To stop the service, double click on 4_stop_service.bat. Please note that the batch file does not print an error message if the service is not installed or started. advanced_1105_h3=Uninstall the Service advanced_1106_p=To uninstall the service, double click on 5_uninstall_service.bat. If successful, a command prompt window will pop up and disappear immediately. If not, a message will appear. advanced_1107_h2=ODBC Driver advanced_1108_p=This database does not come with its own ODBC driver at this time, but it supports the PostgreSQL network protocol. Therefore, the PostgreSQL ODBC driver can be used. Support for the PostgreSQL network protocol is quite new and should be viewed as experimental. It should not be used for production applications. advanced_1109_p=At this time, the PostgreSQL ODBC driver does not work on 64 bit versions of Windows. For more information, see\: ODBC Driver on Windows 64 bit advanced_1110_h3=ODBC Installation advanced_1111_p=First, the ODBC driver must be installed. Any recent PostgreSQL ODBC driver should work, however version 8.2.4 or newer is recommended. The Windows version of the PostgreSQL ODBC driver is available at http\://www.postgresql.org/ftp/odbc/versions/msi . advanced_1112_h3=Starting the Server advanced_1113_p=After installing the ODBC driver, start the H2 Server using the command line\: advanced_1114_p=The PG Server (PG for PostgreSQL protocol) is started as well. By default, databases are stored in the current working directory where the server is started. Use -baseDir to save databases in another directory, for example the user home directory\: advanced_1115_p=The PG server can be started and stopped from within a Java application as follows\: advanced_1116_p=By default, only connections from localhost are allowed. To allow remote connections, use -pgAllowOthers true when starting the server. advanced_1117_h3=ODBC Configuration advanced_1118_p=After installing the driver, a new Data Source must be added. In Windows, run odbcad32.exe to open the Data Source Administrator. Then click on 'Add...' and select the PostgreSQL Unicode driver. Then click 'Finish'. You will be able to change the connection properties\: advanced_1119_th=Property advanced_1120_th=Example advanced_1121_th=Remarks advanced_1122_td=Data Source advanced_1123_td=H2 Test advanced_1124_td=The name of the ODBC Data Source advanced_1125_td=Database advanced_1126_td=test advanced_1127_td=The database name. Only simple names are supported at this time; advanced_1128_td=relative or absolute path are not supported in the database name. advanced_1129_td=By default, the database is stored in the current working directory advanced_1130_td=where the Server is started except when the -baseDir setting is used. advanced_1131_td=The name must be at least 3 characters. advanced_1132_td=Server advanced_1133_td=localhost advanced_1134_td=The server name or IP address. advanced_1135_td=By default, only remote connections are allowed advanced_1136_td=User Name advanced_1137_td=sa advanced_1138_td=The database user name. advanced_1139_td=SSL Mode advanced_1140_td=disabled advanced_1141_td=At this time, SSL is not supported. advanced_1142_td=Port advanced_1143_td=5435 advanced_1144_td=The port where the PG Server is listening. advanced_1145_td=Password advanced_1146_td=sa advanced_1147_td=The database password. advanced_1148_p=Afterwards, you may use this data source. advanced_1149_h3=PG Protocol Support Limitations advanced_1150_p=At this time, only a subset of the PostgreSQL network protocol is implemented. Also, there may be compatibility problems on the SQL level, with the catalog, or with text encoding. Problems are fixed as they are found. Currently, statements can not be cancelled when using the PG protocol. advanced_1151_h3=Security Considerations advanced_1152_p=Currently, the PG Server does not support challenge response or encrypt passwords. This may be a problem if an attacker can listen to the data transferred between the ODBC driver and the server, because the password is readable to the attacker. Also, it is currently not possible to use encrypted SSL connections. Therefore the ODBC driver should not be used where security is important. advanced_1153_h2=ACID advanced_1154_p=In the database world, ACID stands for\: advanced_1155_li=Atomicity\: Transactions must be atomic, meaning either all tasks are performed or none. advanced_1156_li=Consistency\: All operations must comply with the defined constraints. advanced_1157_li=Isolation\: Transactions must be isolated from each other. advanced_1158_li=Durability\: Committed transaction will not be lost. advanced_1159_h3=Atomicity advanced_1160_p=Transactions in this database are always atomic. advanced_1161_h3=Consistency advanced_1162_p=This database is always in a consistent state. Referential integrity rules are always enforced. advanced_1163_h3=Isolation advanced_1164_p=For H2, as with most other database systems, the default isolation level is 'read committed'. This provides better performance, but also means that transactions are not completely isolated. H2 supports the transaction isolation levels 'serializable', 'read committed', and 'read uncommitted'. advanced_1165_h3=Durability advanced_1166_p=This database does not guarantee that all committed transactions survive a power failure. Tests show that all databases sometimes lose transactions on power failure (for details, see below). Where losing transactions is not acceptable, a laptop or UPS (uninterruptible power supply) should be used. If durability is required for all possible cases of hardware failure, clustering should be used, such as the H2 clustering mode. advanced_1167_h2=Durability Problems advanced_1168_p=Complete durability means all committed transaction survive a power failure. Some databases claim they can guarantee durability, but such claims are wrong. A durability test was run against H2, HSQLDB, PostgreSQL, and Derby. All of those databases sometimes lose committed transactions. The test is included in the H2 download, see org.h2.test.poweroff.Test. advanced_1169_h3=Ways to (Not) Achieve Durability advanced_1170_p=Making sure that committed transaction are not lost is more complicated than it seems first. To guarantee complete durability, a database must ensure that the log record is on the hard drive before the commit call returns. To do that, databases use different methods. One is to use the 'synchronous write' file access mode. In Java, RandomAccessFile supports the modes "rws" and "rwd"\: advanced_1171_li=rwd\: Every update to the file's content is written synchronously to the underlying storage device. advanced_1172_li=rws\: In addition to rwd, every update to the metadata is written synchronously. advanced_1173_p=This feature is used by Derby. A test (org.h2.test.poweroff.TestWrite) with one of those modes achieves around 50 thousand write operations per second. Even when the operating system write buffer is disabled, the write rate is around 50 thousand operations per second. This feature does not force changes to disk because it does not flush all buffers. The test updates the same byte in the file again and again. If the hard drive was able to write at this rate, then the disk would need to make at least 50 thousand revolutions per second, or 3 million RPM (revolutions per minute). There are no such hard drives. The hard drive used for the test is about 7200 RPM, or about 120 revolutions per second. There is an overhead, so the maximum write rate must be lower than that. advanced_1174_p=Buffers can be flushed by calling the function fsync. There are two ways to do that in Java\: advanced_1175_li=FileDescriptor.sync(). The documentation says that this forces all system buffers to synchronize with the underlying device. Sync is supposed to return after all in-memory modified copies of buffers associated with this FileDescriptor have been written to the physical medium. advanced_1176_li=FileChannel.force() (since JDK 1.4). This method is supposed to force any updates to this channel's file to be written to the storage device that contains it. advanced_1177_p=By default, MySQL calls fsync for each commit. When using one of those methods, only around 60 write operations per second can be achieved, which is consistent with the RPM rate of the hard drive used. Unfortunately, even when calling FileDescriptor.sync() or FileChannel.force(), data is not always persisted to the hard drive, because most hard drives do not obey fsync()\: see 'Your Hard Drive Lies to You' at http\://hardware.slashdot.org/article.pl?sid\=05/05/13/0529252. In Mac OS X fsync does not flush hard drive buffers\: http\://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html. So the situation is confusing, and tests prove there is a problem. advanced_1178_p=Trying to flush hard drive buffers hard, and if you do the performance is very bad. First you need to make sure that the hard drive actually flushes all buffers. Tests show that this can not be done in a reliable way. Then the maximum number of transactions is around 60 per second. Because of those reasons, the default behavior of H2 is to delay writing committed transactions. advanced_1179_p=In H2, after a power failure, a bit more than one second of committed transactions may be lost. To change the behavior, use SET WRITE_DELAY and CHECKPOINT SYNC. Most other databases support commit delay as well. In the performance comparison, commit delay was used for all databases that support it. advanced_1180_h3=Running the Durability Test advanced_1181_p=To test the durability / non-durability of this and other databases, you can use the test application in the package org.h2.test.poweroff. Two computers with network connection are required to run this test. One computer just listens, while the test application is run (and power is cut) on the other computer. The computer with the listener application opens a TCP/IP port and listens for an incoming connection. The second computer first connects to the listener, and then created the databases and starts inserting records. The connection is set to 'autocommit', which means after each inserted record a commit is performed automatically. Afterwards, the test computer notifies the listener that this record was inserted successfully. The listener computer displays the last inserted record number every 10 seconds. Now, switch off the power manually, then restart the computer, and run the application again. You will find out that in most cases, none of the databases contains all the records that the listener computer knows about. For details, please consult the source code of the listener and test application. advanced_1182_h2=Using the Recover Tool advanced_1183_p=The recover tool can be used to extract the contents of a data file, even if the database is corrupted. At this time, it does not extract the content of the log file or large objects (CLOB or BLOB). To run the tool, type on the command line\: advanced_1184_p=For each database in the current directory, a text file will be created. This file contains raw insert statement (for the data) and data definition (DDL) statement to recreate the schema of the database. This file cannot be executed directly, as the raw insert statements don't have the correct table names, so the file needs to be pre-processed manually before executing. advanced_1185_h2=File Locking Protocols advanced_1186_p=Whenever a database is opened, a lock file is created to signal other processes that the database is in use. If database is closed, or if the process that opened the database terminates, this lock file is deleted. advanced_1187_p=In special cases (if the process did not terminate normally, for example because there was a blackout), the lock file is not deleted by the process that created it. That means the existence of the lock file is not a safe protocol for file locking. However, this software uses a challenge-response protocol to protect the database files. There are two methods (algorithms) implemented to provide both security (that is, the same database files cannot be opened by two processes at the same time) and simplicity (that is, the lock file does not need to be deleted manually by the user). The two methods are 'file method' and 'socket methods'. advanced_1188_h3=File Locking Method 'File' advanced_1189_p=The default method for database file locking is the 'File Method'. The algorithm is\: advanced_1190_li=When the lock file does not exist, it is created (using the atomic operation File.createNewFile). Then, the process waits a little bit (20ms) and checks the file again. If the file was changed during this time, the operation is aborted. This protects against a race condition when a process deletes the lock file just after one create it, and a third process creates the file again. It does not occur if there are only two writers. advanced_1191_li=If the file can be created, a random number is inserted together with the locking method ('file'). Afterwards, a watchdog thread is started that checks regularly (every second once by default) if the file was deleted or modified by another (challenger) thread / process. Whenever that occurs, the file is overwritten with the old data. The watchdog thread runs with high priority so that a change to the lock file does not get through undetected even if the system is very busy. However, the watchdog thread does use very little resources (CPU time), because it waits most of the time. Also, the watchdog only reads from the hard disk and does not write to it. advanced_1192_li=If the lock file exists, and it was modified in the 20 ms, the process waits for some time (up to 10 times). If it was still changed, an exception is thrown (database is locked). This is done to eliminate race conditions with many concurrent writers. Afterwards, the file is overwritten with a new version (challenge). After that, the thread waits for 2 seconds. If there is a watchdog thread protecting the file, he will overwrite the change and this process will fail to lock the database. However, if there is no watchdog thread, the lock file will still be as written by this thread. In this case, the file is deleted and atomically created again. The watchdog thread is started in this case and the file is locked. advanced_1193_p=This algorithm is tested with over 100 concurrent threads. In some cases, when there are many concurrent threads trying to lock the database, they block each other (meaning the file cannot be locked by any of them) for some time. However, the file never gets locked by two threads at the same time. However using that many concurrent threads / processes is not the common use case. Generally, an application should throw an error to the user if it cannot open a database, and not try again in a (fast) loop. advanced_1194_h3=File Locking Method 'Socket' advanced_1195_p=There is a second locking mechanism implemented, but disabled by default. The algorithm is\: advanced_1196_li=If the lock file does not exist, it is created. Then a server socket is opened on a defined port, and kept open. The port and IP address of the process that opened the database is written into the lock file. advanced_1197_li=If the lock file exists, and the lock method is 'file', then the software switches to the 'file' method. advanced_1198_li=If the lock file exists, and the lock method is 'socket', then the process checks if the port is in use. If the original process is still running, the port is in use and this process throws an exception (database is in use). If the original process died (for example due to a blackout, or abnormal termination of the virtual machine), then the port was released. The new process deletes the lock file and starts again. advanced_1199_p=This method does not require a watchdog thread actively polling (reading) the same file every second. The problem with this method is, if the file is stored on a network share, two processes (running on different computers) could still open the same database files, if they do not have a direct TCP/IP connection. advanced_1200_h2=Protection against SQL Injection advanced_1201_h3=What is SQL Injection advanced_1202_p=This database engine provides a solution for the security vulnerability known as 'SQL Injection'. Here is a short description of what SQL injection means. Some applications build SQL statements with embedded user input such as\: advanced_1203_p=If this mechanism is used anywhere in the application, and user input is not correctly filtered or encoded, it is possible for a user to inject SQL functionality or statements by using specially built input such as (in this example) this password\: ' OR ''\='. In this case the statement becomes\: advanced_1204_p=Which is always true no matter what the password stored in the database is. For more information about SQL Injection, see Glossary and Links. advanced_1205_h3=Disabling Literals advanced_1206_p=SQL Injection is not possible if user input is not directly embedded in SQL statements. A simple solution for the problem above is to use a PreparedStatement\: advanced_1207_p=This database provides a way to enforce usage of parameters when passing user input to the database. This is done by disabling embedded literals in SQL statements. To do this, execute the statement\: advanced_1208_p=Afterwards, SQL statements with text and number literals are not allowed any more. That means, SQL statement of the form WHERE NAME\='abc' or WHERE CustomerId\=10 will fail. It is still possible to use PreparedStatements and parameters as described above. Also, it is still possible to generate SQL statements dynamically, and use the Statement API, as long as the SQL statements do not include literals. There is also a second mode where number literals are allowed\: SET ALLOW_LITERALS NUMBERS. To allow all literals, execute SET ALLOW_LITERALS ALL (this is the default setting). Literals can only be enabled or disabled by an administrator. advanced_1209_h3=Using Constants advanced_1210_p=Disabling literals also means disabling hard-coded 'constant' literals. This database supports defining constants using the CREATE CONSTANT command. Constants can be defined only when literals are enabled, but used even when literals are disabled. To avoid name clashes with column names, constants can be defined in other schemas\: advanced_1211_p=Even when literals are enabled, it is better to use constants instead of hard-coded number or text literals in queries or views. With constants, typos are found at compile time, the source code is easier to understand and change. advanced_1212_h3=Using the ZERO() Function advanced_1213_p=It is not required to create a constant for the number 0 as there is already a built-in function ZERO()\: advanced_1214_h2=Security Protocols advanced_1215_p=The following paragraphs document the security protocols used in this database. These descriptions are very technical and only intended for security experts that already know the underlying security primitives. advanced_1216_h3=User Password Encryption advanced_1217_p=When a user tries to connect to a database, the combination of user name, @, and password hashed using SHA-256, and this hash value is transmitted to the database. This step does not try to an attacker from re-using the value if he is able to listen to the (unencrypted) transmission between the client and the server. But, the passwords are never transmitted as plain text, even when using an unencrypted connection between client and server. That means if a user reuses the same password for different things, this password is still protected up to some point. See also 'RFC 2617 - HTTP Authentication\: Basic and Digest Access Authentication' for more information. advanced_1218_p=When a new database or user is created, a new cryptographically secure random salt value is generated. The size of the salt is 64 bit. Using the random salt reduces the risk of an attacker pre-calculating hash values for many different (commonly used) passwords. advanced_1219_p=The combination of user-password hash value (see above) and salt is hashed using SHA-256. The resulting value is stored in the database. When a user tries to connect to the database, the database combines user-password hash value with the stored salt value and calculated the hash value. Other products use multiple iterations (hash the hash value again and again), but this is not done in this product to reduce the risk of denial of service attacks (where the attacker tries to connect with bogus passwords, and the server spends a lot of time calculating the hash value for each password). The reasoning is\: if the attacker has access to the hashed passwords, he also has access to the data in plain text, and therefore does not need the password any more. If the data is protected by storing it on another computer and only remotely, then the iteration count is not required at all. advanced_1220_h3=File Encryption advanced_1221_p=The database files can be encrypted using two different algorithms\: AES-128 and XTEA (using 32 rounds). The reasons for supporting XTEA is performance (XTEA is about twice as fast as AES) and to have an alternative algorithm if AES is suddenly broken. advanced_1222_p=When a user tries to connect to an encrypted database, the combination of the word 'file', @, and the file password is hashed using SHA-256. This hash value is transmitted to the server. advanced_1223_p=When a new database file is created, a new cryptographically secure random salt value is generated. The size of the salt is 64 bit. The combination of the file password hash and the salt value is hashed 1024 times using SHA-256. The reason for the iteration is to make it harder for an attacker to calculate hash values for common passwords. advanced_1224_p=The resulting hash value is used as the key for the block cipher algorithm (AES-128 or XTEA with 32 rounds). Then, an initialization vector (IV) key is calculated by hashing the key again using SHA-256. This is to make sure the IV is unknown to the attacker. The reason for using a secret IV is to protect against watermark attacks. advanced_1225_p=Before saving a block of data (each block is 8 bytes long), the following operations are executed\: First, the IV is calculated by encrypting the block number with the IV key (using the same block cipher algorithm). This IV is combined with the plain text using XOR. The resulting data is encrypted using the AES-128 or XTEA algorithm. advanced_1226_p=When decrypting, the operation is done in reverse. First, the block is decrypted using the key, and then the IV is calculated combined with the decrypted text using XOR. advanced_1227_p=Therefore, the block cipher modes of operation is CBC (Cipher-block chaining), but each chain is only one block long. The advantage over the ECB (Electronic codebook) mode is that patterns in the data are not revealed, and the advantage over multi block CBC is that flipped cipher text bits are not propagated to flipped plaintext bits in the next block. advanced_1228_p=Database encryption is meant for securing the database while it is not in use (stolen laptop and so on). It is not meant for cases where the attacker has access to files while the database is in use. When he has write access, he can for example replace pieces of files with pieces of older versions and manipulate data like this. advanced_1229_p=File encryption slows down the performance of the database engine. Compared to unencrypted mode, database operations take about 2.2 times longer when using XTEA, and 2.5 times longer using AES (embedded mode). advanced_1230_h3=SSL/TLS Connections advanced_1231_p=Remote SSL/TLS connections are supported using the Java Secure Socket Extension (SSLServerSocket / SSLSocket). By default, anonymous SSL is enabled. The default cipher suite is SSL_DH_anon_WITH_RC4_128_MD5 . advanced_1232_h3=HTTPS Connections advanced_1233_p=The web server supports HTTP and HTTPS connections using SSLServerSocket. There is a default self-certified certificate to support an easy starting point, but custom certificates are supported as well. advanced_1234_h2=Universally Unique Identifiers (UUID) advanced_1235_p=This database supports the UUIDs. Also supported is a function to create new UUIDs using a cryptographically strong pseudo random number generator. With random UUIDs, the chance of two having the same value can be calculated using the probability theory. See also 'Birthday Paradox'. Standardized randomly generated UUIDs have 122 random bits. 4 bits are used for the version (Randomly generated UUID), and 2 bits for the variant (Leach-Salz). This database supports generating such UUIDs using the built-in function RANDOM_UUID(). Here is a small program to estimate the probability of having two identical UUIDs after generating a number of values\: advanced_1236_p=Some values are\: advanced_1237_p=To help non-mathematicians understand what those numbers mean, here a comparison\: One's annual risk of being hit by a meteorite is estimated to be one chance in 17 billion, that means the probability is about 0.000'000'000'06. advanced_1238_h2=Settings Read from System Properties advanced_1239_p=Some settings of the database can be set on the command line using -DpropertyName\=value. It is usually not required to change those settings manually. The settings are case sensitive. Example\: advanced_1240_p=The current value of the settings can be read in the table INFORMATION_SCHEMA.SETTINGS advanced_1241_th=Setting advanced_1242_th=Default advanced_1243_th=Description advanced_1244_td=h2.check advanced_1245_td=true advanced_1246_td=Assertions in the database engine advanced_1247_td=h2.check2 advanced_1248_td=false advanced_1249_td=Additional assertions advanced_1250_td=h2.clientTraceDirectory advanced_1251_td=trace.db/ advanced_1252_td=Directory where the trace files of the JDBC client are stored (only for client / server) advanced_1253_td=h2.emergencySpaceInitial advanced_1254_td=1048576 advanced_1255_td=Size of 'reserve' file to detect disk full problems early advanced_1256_td=h2.emergencySpaceMin advanced_1257_td=131072 advanced_1258_td=Minimum size of 'reserve' file advanced_1259_td=h2.lobCloseBetweenReads advanced_1260_td=false advanced_1261_td=Close LOB files between read operations advanced_1262_td=h2.lobFilesInDirectories advanced_1263_td=false advanced_1264_td=Store LOB files in subdirectories advanced_1265_td=h2.lobFilesPerDirectory advanced_1266_td=256 advanced_1267_td=Maximum number of LOB files per directory advanced_1268_td=h2.logAllErrors advanced_1269_td=false advanced_1270_td=Write stack traces of any kind of error to a file advanced_1271_td=h2.logAllErrorsFile advanced_1272_td=h2errors.txt advanced_1273_td=File name to log errors advanced_1274_td=h2.maxFileRetry advanced_1275_td=16 advanced_1276_td=Number of times to retry file delete and rename advanced_1277_td=h2.multiThreadedKernel advanced_1278_td=false advanced_1279_td=Allow multiple sessions to run concurrently advanced_1280_td=h2.objectCache advanced_1281_td=true advanced_1282_td=Cache commonly used objects (integers, strings) advanced_1283_td=h2.objectCacheMaxPerElementSize advanced_1284_td=4096 advanced_1285_td=Maximum size of an object in the cache advanced_1286_td=h2.objectCacheSize advanced_1287_td=1024 advanced_1288_td=Size of object cache advanced_1289_td=h2.optimizeEvaluatableSubqueries advanced_1290_td=true advanced_1291_td=Optimize subqueries that are not dependent on the outer query advanced_1292_td=h2.optimizeIn advanced_1293_td=true advanced_1294_td=Optimize IN(...) comparisons advanced_1295_td=h2.optimizeMinMax advanced_1296_td=true advanced_1297_td=Optimize MIN and MAX aggregate functions advanced_1298_td=h2.optimizeSubqueryCache advanced_1299_td=true advanced_1300_td=Cache subquery results advanced_1301_td=h2.overflowExceptions advanced_1302_td=true advanced_1303_td=Throw an exception on integer overflows advanced_1304_td=h2.recompileAlways advanced_1305_td=false advanced_1306_td=Always recompile prepared statements advanced_1307_td=h2.redoBufferSize advanced_1308_td=262144 advanced_1309_td=Size of the redo buffer (used at startup when recovering) advanced_1310_td=h2.runFinalizers advanced_1311_td=true advanced_1312_td=Run finalizers to detect unclosed connections advanced_1313_td=h2.scriptDirectory advanced_1314_td=Relative or absolute directory where the script files are stored to or read from advanced_1315_td=h2.serverCachedObjects advanced_1316_td=64 advanced_1317_td=TCP Server\: number of cached objects per session advanced_1318_td=h2.serverSmallResultSetSize advanced_1319_td=100 advanced_1320_td=TCP Server\: result sets below this size are sent in one block advanced_1321_h2=Glossary and Links advanced_1322_th=Term advanced_1323_th=Description advanced_1324_td=AES-128 advanced_1325_td=A block encryption algorithm. See also\: Wikipedia\: AES advanced_1326_td=Birthday Paradox advanced_1327_td=Describes the higher than expected probability that two persons in a room have the same birthday. Also valid for randomly generated UUIDs. See also\: Wikipedia\: Birthday Paradox advanced_1328_td=Digest advanced_1329_td=Protocol to protect a password (but not to protect data). See also\: RFC 2617\: HTTP Digest Access Authentication advanced_1330_td=GCJ advanced_1331_td=GNU Compiler for Java. http\://gcc.gnu.org/java/ and http\://nativej.mtsystems.ch/ (not free any more) advanced_1332_td=HTTPS advanced_1333_td=A protocol to provide security to HTTP connections. See also\: RFC 2818\: HTTP Over TLS advanced_1334_td=Modes of Operation advanced_1335_a=Wikipedia\: Block cipher modes of operation advanced_1336_td=Salt advanced_1337_td=Random number to increase the security of passwords. See also\: Wikipedia\: Key derivation function advanced_1338_td=SHA-256 advanced_1339_td=A cryptographic one-way hash function. See also\: Wikipedia\: SHA hash functions advanced_1340_td=SQL Injection advanced_1341_td=A security vulnerability where an application generates SQL statements with embedded user input. See also\: Wikipedia\: SQL Injection advanced_1342_td=Watermark Attack advanced_1343_td=Security problem of certain encryption programs where the existence of certain data can be proven without decrypting. For more information, search in the internet for 'watermark attack cryptoloop' advanced_1344_td=SSL/TLS advanced_1345_td=Secure Sockets Layer / Transport Layer Security. See also\: Java Secure Socket Extension (JSSE) advanced_1346_td=XTEA advanced_1347_td=A block encryption algorithm. See also\: Wikipedia\: XTEA build_1000_h1=Build build_1001_a=Portability build_1002_a=Environment build_1003_a=Building the Software build_1004_a=Using Maven 2 build_1005_h2=Portability build_1006_p=This database is written in Java and therefore works on many platforms. It can also be compiled to a native executable using GCJ. build_1007_h2=Environment build_1008_p=To build the database executables, the following software stack was used. In most cases, newer version or compatible software works too. build_1009_li=Windows XP build_1010_li=Sun JDK Version 1.4 or 1.5 build_1011_li=Apache Ant Version 1.6.5 build_1012_li=Mozilla Firefox 1.5 build_1013_li=Eclipse Version 3.2.2 build_1014_li=YourKit Java Profiler build_1015_h2=Building the Software build_1016_p=On the command line, go to the directory src and execute the following command\: build_1017_p=You will get a list of targets. If you want to build the jar files, execute\: build_1018_p=To create a jar file with the JDBC API and the classes required to connect to a server only, use the target jarClient\: build_1019_p=The other targets may be used as well. build_1020_h2=Using Maven 2 build_1021_h3=Using a Central Repository build_1022_p=You can include the database in your Maven 2 project as a dependency. Example\: build_1023_h3=Using Snapshot Version build_1024_p=To build a 'snapshot' H2 .jar file and upload it the to the local Maven 2 repository, execute the following command\: build_1025_p=Afterwards, you can include the database in your Maven 2 project as a dependency\: download_1000_h1=Downloads download_1001_h3=Version 1.0.58 (2007-09-15, Current) download_1002_a=Windows Installer download_1003_a=Platform-Independent Zip download_1004_h3=Version 1.0 / 2007-03-04 (Last Stable) download_1005_a=Windows Installer download_1006_a=Platform-Independent Zip download_1007_h3=Download Mirror download_1008_a=Platform-Independent Zip download_1009_h3=Subversion Source Repository download_1010_a=Google Code download_1011_p=For details about changes, see the Change Log . faq_1000_h1=Frequently Asked Questions faq_1001_a=Are there any known bugs? When is the next release? faq_1002_a=Is this Database Engine Open Source? faq_1003_a=My query is slow faq_1004_a=How to Create a New Database? faq_1005_a=How to Connect to a Database? faq_1006_a=Where are the Database Files Stored? faq_1007_a=What is the Size Limit (maximum size) of a Database? faq_1008_a=Is it Reliable? faq_1009_a=Is the GCJ version stable? Faster? faq_1010_a=How to Translate this Project? faq_1011_h3=Are there any known bugs? When is the next release? faq_1012_p=Usually, bugs get fixes as they are found. There is a release every few weeks. Here is the list of known and confirmed issues as of 2007-09-15\: faq_1013_li=Some problems have been found with right outer join. Internally, it is converted to left outer join, which does not always produce the same results as other databases when used in combination with other joins. faq_1014_h3=Is this Database Engine Open Source? faq_1015_p=Yes. It is free to use and distribute, and the source code is included. See also under license. faq_1016_h3=My query is slow faq_1017_p=Slow SELECT (or DELETE, UPDATE, MERGE) statement can have multiple reasons. Follow this checklist\: faq_1018_li=Run ANALYSE (see documentation for details). faq_1019_li=Run the query with EXPLAIN and check if indexes are used (see documentation for details). faq_1020_li=If required, create additional indexes and try again using ANALYZE and EXPLAIN. faq_1021_li=If it doesn't help please report the problem. faq_1022_h3=How to Create a New Database? faq_1023_p=By default, a new database is automatically created if it does not yet exist. faq_1024_h3=How to Connect to a Database? faq_1025_p=The database driver is org.h2.Driver , and the database URL starts with jdbc\:h2\: . To connect to a database using JDBC, use the following code\: faq_1026_h3=Where are the Database Files Stored? faq_1027_p=When using database URLs like jdbc\:h2\:~/test, the database is stored in the user directory. For Windows, this is usually C\:\\Documents and Settings\\<userName>. If the base directory is not set (as in jdbc\:h2\:test), the database files are stored in the directory where the application is started (the current working directory). When using the H2 Console application from the start menu, this is [Installation Directory]/bin. The base directory can be set in the database URL. A fixed or relative path can be used. When using the URL jdbc\:h2\:file\:data/sample, the database is stored in the directory data (relative to the current working directory). The directory must exist. It is also possible to use the fully qualified directory (and for Windows, drive) name. Example\: jdbc\:h2\:file\:C\:/data/test faq_1028_h3=What is the Size Limit (maximum size) of a Database? faq_1029_p=The theoretical limit is currently 256 GB for the data. This number is excluding BLOB and CLOB data\: Every CLOB or BLOB can be up to 256 GB as well. The size limit of the index data is 256 GB as well. faq_1030_p=The maximum file size for FAT or FAT32 file systems is 4 GB. So if you use FAT or FAT32, the limit is 4 GB for the data. faq_1031_h3=Is it Reliable? faq_1032_p=That is not easy to say. It is still a quite new product. A lot of tests have been written, and the code coverage of these tests is very high. Randomized stress tests are run regularly. But as this is a relatively new product, there are probably some problems that have not yet been found. Areas that are not 100% tested\: faq_1033_li=Platforms other than Windows XP and the Sun JVM 1.4 and 1.5 faq_1034_li=Data types BLOB, CLOB, VARCHAR_IGNORECASE, OTHER faq_1035_li=Cluster mode, 2-Phase Commit, Savepoints faq_1036_li=Server mode (well tested, but not as well as Embedded mode) faq_1037_li=Multi-Threading and using multiple connections faq_1038_li=Updatable result sets faq_1039_li=Referential integrity and check constraints, Triggers faq_1040_li=ALTER TABLE statements, Views, Linked Tables, Schema, UNION faq_1041_li=Not all built-in functions are completely tested faq_1042_li=The Optimizer may not always select the best plan faq_1043_li=24/7 operation and large databases (500 MB and up) faq_1044_li=Wide indexes with large VARCHAR or VARBINARY columns and / or with a lot of columns faq_1045_p=Areas considered Experimental\: faq_1046_li=ODBC driver and the GCJ native version on Windows faq_1047_li=Linear Hash Index faq_1048_li=Compatibility modes for other databases (only some features are implemented) faq_1049_li=The ARRAY data type and related functionality. faq_1050_h3=Is the GCJ version stable? Faster? faq_1051_p=The GCJ version is not as stable as the Java version. When running the regression test with the GCJ version, sometimes the application just stops at what seems to be a random point without error message. Currently, the GCJ version is also slower than when using the Sun VM. However, the startup of the GCJ version is faster than when using a VM. faq_1052_h3=How to Translate this Project? faq_1053_p=The following files can be translated at the moment\: features_1000_h1=Features features_1001_a=Feature List features_1002_a=Comparison to Other Database Engines features_1003_a=Products that Work with H2 features_1004_a=Connection Modes features_1005_a=Database URL Overview features_1006_a=Connecting to a Database with File Encryption features_1007_a=Database File Locking features_1008_a=Opening a Database Only if it Already Exists features_1009_a=Closing the Database features_1010_a=Log Index Changes features_1011_a=Custom File Access Mode features_1012_a=Multiple Connections features_1013_a=Database File Layout features_1014_a=Logging and Recovery features_1015_a=Compatibility Modes features_1016_a=Using the Trace Options features_1017_a=Read Only Databases features_1018_a=Binary and Text Storage Formats features_1019_a=Graceful Handling of Low Disk Space Situations features_1020_a=Computed Columns / Function Based Index features_1021_a=Multi-Dimensional Indexes features_1022_a=Using Passwords features_1023_a=User Defined Functions and Stored Procedures features_1024_a=Triggers features_1025_a=Compacting a Database features_1026_a=Cache Settings features_1027_a=Why Java features_1028_h2=Feature List features_1029_h3=Main Features features_1030_li=Very fast database engine features_1031_li=Free, with source code features_1032_li=Written in Java features_1033_li=Supports standard SQL, JDBC API features_1034_li=Embedded and Server mode, Clustering support features_1035_li=Strong security features features_1036_li=Experimental native version (GCJ) and ODBC drivers features_1037_h3=Additional Features features_1038_li=Disk based or in-memory databases and tables, read-only database support, temporary tables features_1039_li=Transaction support (read committed and serializable transaction isolation), 2-phase-commit features_1040_li=Multiple connections, table level locking features_1041_li=Cost based optimizer, using a genetic algorithm for complex queries, zero-administration features_1042_li=Scrollable and updatable result set support, large result set, external result sorting, functions can return a result set features_1043_li=Encrypted database (AES or XTEA), SHA-256 password encryption, encryption functions, SSL features_1044_h3=SQL Support features_1045_li=Support for multiple schemas, information schema features_1046_li=Referential integrity / foreign key constraints with cascade, check constraints features_1047_li=Inner and outer joins, subqueries, read only views and inline views features_1048_li=Triggers and Java functions / stored procedures features_1049_li=Many built-in functions, including XML and lossless data compression features_1050_li=Wide range of data types including large objects (BLOB/CLOB) and arrays features_1051_li=Sequence and autoincrement columns, computed columns (can be used for function based indexes) features_1052_li=ORDER BY, GROUP BY, HAVING, UNION, LIMIT, TOP features_1053_li=Collation support, users, roles features_1054_li=Compatibility modes for HSQLDB, MySQL and PostgreSQL features_1055_h3=Security Features features_1056_li=Includes a solution for the SQL injection problem features_1057_li=User password authenticated uses SHA-256 and salt features_1058_li=User passwords are never transmitted in plain text over the network (even when using insecure connections) features_1059_li=All database files (including script files that can be used to backup data) can be encrypted using AES-256 and XTEA encryption algorithms features_1060_li=The remote JDBC driver supports TCP/IP connections over SSL/TLS features_1061_li=The built-in web server supports connections over SSL/TLS features_1062_li=Passwords can be sent to the database using char arrays instead of Strings features_1063_h3=Other Features and Tools features_1064_li=Small footprint (smaller than 1 MB), low memory requirements features_1065_li=Multiple index types (b-tree, tree, hash, linear hash) features_1066_li=Support for multi-dimensional indexes features_1067_li=CSV (comma separated values) file support features_1068_li=Support for linked tables, and a built-in virtual 'range' table features_1069_li=EXPLAIN PLAN support, sophisticated trace options features_1070_li=Database closing can be delayed or disabled to improve the performance features_1071_li=Web-based Console application (English, German, partially French and Spanish) with autocomplete features_1072_li=The database can generate SQL script files features_1073_li=Contains a recovery tool that can dump the contents of the data file features_1074_li=Automatic re-compilation of prepared statements features_1075_li=Uses a small number of database files, binary and text storage formats, graceful handling of low disk space situations features_1076_li=Uses a checksum for each record and log entry for data integrity features_1077_li=Well tested (high code coverage, randomized stress tests) features_1078_h2=Comparison to Other Database Engines features_1079_th=Feature features_1080_th=H2 features_1081_th=Derby features_1082_th=HSQLDB features_1083_th=MySQL features_1084_th=PostgreSQL features_1085_td=Embedded Mode (Java) features_1086_td=Yes features_1087_td=Yes features_1088_td=Yes features_1089_td=No features_1090_td=No features_1091_td=Pure Java features_1092_td=Yes features_1093_td=Yes features_1094_td=Yes features_1095_td=No features_1096_td=No features_1097_td=Performance (Embedded) features_1098_td=Fast features_1099_td=Slow features_1100_td=Fast features_1101_td=N/A features_1102_td=N/A features_1103_td=Transaction Isolation features_1104_td=Yes features_1105_td=Yes features_1106_td=No features_1107_td=Yes features_1108_td=Yes features_1109_td=Cost Based Optimizer features_1110_td=Yes features_1111_td=Yes features_1112_td=No features_1113_td=Yes features_1114_td=Yes features_1115_td=Clustering features_1116_td=Yes features_1117_td=No features_1118_td=No features_1119_td=Yes features_1120_td=Yes features_1121_td=Encrypted Database features_1122_td=Yes features_1123_td=Yes features_1124_td=No features_1125_td=No features_1126_td=No features_1127_td=Files per Database features_1128_td=Few features_1129_td=Many features_1130_td=Few features_1131_td=Many features_1132_td=Many features_1133_td=Footprint (jar/dll size) features_1134_td=~ 1 MB features_1135_td=~ 2 MB features_1136_td=~ 600 KB features_1137_td=~ 4 MB features_1138_td=~ 6 MB features_1139_h3=Derby and HSQLDB features_1140_p=After an unexpected process termination (for example power failure), H2 can recover safely and automatically without any user interaction. For Derby and HSQLDB, there are some manual steps required ('Another instance of Derby may have already booted the database' / 'The database is already in use by another process'). features_1141_h3=DaffodilDb and One$Db features_1142_p=It looks like the development of this database has stopped. The last release was February 2006. features_1143_h3=McKoi features_1144_p=It looks like the development of this database has stopped. The last release was August 2004 features_1145_h2=Products that Work with H2 features_1146_th=Product features_1147_th=Description features_1148_a=Apache Jackrabbit features_1149_td=Open source implementation of the Java Content Repository API (JCR). features_1150_a=Apache OpenJPA features_1151_td=Open source implementation of the Java Persistence API (JPA). features_1152_a=AppFuse features_1153_td=Helps building web applications. features_1154_a=Blojsom features_1155_td=Java-based multi-blog, multi-user software package (Mac OS X Weblog Server) features_1156_a=Bookmarks Portlet features_1157_td=JSR168 compliant bookmarks management portlet application. features_1158_a=DB Solo features_1159_td=SQL query tool. features_1160_a=DbVisualizer features_1161_td=Database tool. features_1162_a=Execute Query features_1163_td=Database utility written in Java. features_1164_a=Golden T Studios features_1165_td=Fun-to-play games with a simple interface. features_1166_a=Hibernate features_1167_td=Relational persistence for idiomatic Java (O-R mapping tool). features_1168_a=H2 Spatial features_1169_td=A project to add spatial functions to H2 database. features_1170_a=JAMWiki features_1171_td=Java-based Wiki engine. features_1172_a=JavaPlayer features_1173_td=Pure Java MP3 player. features_1174_a=JPOX features_1175_td=Java persistent objects. features_1176_a=LiquiBase features_1177_td=A tool to manage database changes and refactorings. features_1178_a=Luntbuild features_1179_td=Build automation and management tool. features_1180_a=Mr. Persister features_1181_td=Simple, small and fast object relational mapping. features_1182_a=MyTunesRss features_1183_td=MyTunesRSS lets you listen to your music wherever you are. features_1184_a=PolePosition features_1185_td=Open source database benchmark. features_1186_a=Scriptella features_1187_td=ETL (Extract-Transform-Load) and script execution tool. features_1188_a=SemmleCode features_1189_td=Eclipse plugin to help you improve software quality. features_1190_a=Shellbook features_1191_td=Desktop publishing application. features_1192_a=Signsoft intelliBO features_1193_td=Persistence middleware supporting the JDO specification. features_1194_a=SQL Workbench/J features_1195_td=Free DBMS-independent SQL tool. features_1196_a=SQuirreL SQL Client features_1197_td=Graphical tool to view the structure of a database, browse the data, issue SQL commands etc. features_1198_a=SQuirreL DB Copy Plugin features_1199_td=Tool to copy data from one database to another. features_1200_a=StreamCruncher features_1201_td=Event (stream) processing kernel. features_1202_a=Tamava features_1203_td=Newsgroups Reader. features_1204_a=Tune Backup features_1205_td=Easy-to-use backup solution for your iTunes library. features_1206_a=Web of Web features_1207_td=Collaborative and realtime interactive media platform for the web. features_1208_h2=Connection Modes features_1209_p=The following connection modes are supported\: features_1210_li=Local connections using JDBC (embedded) features_1211_li=Remote connections using JDBC over TCP/IP (client/server) features_1212_li=Remote connections using ODBC over TCP/IP (client/server) features_1213_li=In-Memory databases (private and shared) features_1214_h2=Database URL Overview features_1215_p=This database does support multiple connection modes and features when connecting to a database. This is achieved using different database URLs. The settings in the URLs are not case sensitive. features_1216_th=Topic features_1217_th=URL Format and Examples features_1218_td=Embedded (local) connection features_1219_td=jdbc\:h2\:[file\:][<path>]<databaseName> features_1220_td=jdbc\:h2\:~/test features_1221_td=jdbc\:h2\:file\:/data/sample features_1222_td=jdbc\:h2\:file\:C\:/data/sample (Windows only) features_1223_td=In-Memory (private) features_1224_td=jdbc\:h2\:mem\: features_1225_td=In-Memory (named) features_1226_td=jdbc\:h2\:mem\:<databaseName> features_1227_td=jdbc\:h2\:mem\:test_mem features_1228_td=Remote using TCP/IP features_1229_td=jdbc\:h2\:tcp\://<server>[\:<port>]/<databaseName> features_1230_td=jdbc\:h2\:tcp\://localhost/test features_1231_td=jdbc\:h2\:tcp\://dbserv\:8084/sample features_1232_td=Remote using SSL/TLS features_1233_td=jdbc\:h2\:ssl\://<server>[\:<port>]/<databaseName> features_1234_td=jdbc\:h2\:ssl\://secureserv\:8085/sample; features_1235_td=Using Encrypted Files features_1236_td=jdbc\:h2\:<url>;CIPHER\=[AES|XTEA] features_1237_td=jdbc\:h2\:ssl\://secureserv/testdb;CIPHER\=AES features_1238_td=jdbc\:h2\:file\:~/secure;CIPHER\=XTEA features_1239_td=File Locking Methods features_1240_td=jdbc\:h2\:<url>;FILE_LOCK\={NO|FILE|SOCKET} features_1241_td=jdbc\:h2\:file\:~/quickAndDirty;FILE_LOCK\=NO features_1242_td=jdbc\:h2\:file\:~/private;CIPHER\=XTEA;FILE_LOCK\=SOCKET features_1243_td=Only Open if it Already Exists features_1244_td=jdbc\:h2\:<url>;IFEXISTS\=TRUE features_1245_td=jdbc\:h2\:file\:~/sample;IFEXISTS\=TRUE features_1246_td=Don't Close the Database when the VM Exits features_1247_td=jdbc\:h2\:<url>;DB_CLOSE_ON_EXIT\=FALSE features_1248_td=User Name and/or Password features_1249_td=jdbc\:h2\:<url>[;USER\=<username>][;PASSWORD\=<value>] features_1250_td=jdbc\:h2\:file\:~/sample;USER\=sa;PASSWORD\=123 features_1251_td=Log Index Changes features_1252_td=jdbc\:h2\:<url>;LOG\=2 features_1253_td=jdbc\:h2\:file\:~/sample;LOG\=2 features_1254_td=Debug Trace Settings features_1255_td=jdbc\:h2\:<url>;TRACE_LEVEL_FILE\=<level 0..3> features_1256_td=jdbc\:h2\:file\:~/sample;TRACE_LEVEL_FILE\=3 features_1257_td=Ignore Unknown Settings features_1258_td=jdbc\:h2\:<url>;IGNORE_UNKNOWN_SETTINGS\=TRUE features_1259_td=Custom File Access Mode features_1260_td=jdbc\:h2\:<url>;ACCESS_MODE_LOG\=rws;ACCESS_MODE_DATA\=rws features_1261_td=Changing Other Settings features_1262_td=jdbc\:h2\:<url>;<setting>\=<value>[;<setting>\=<value>...] features_1263_td=jdbc\:h2\:file\:~/sample;TRACE_LEVEL_SYSTEM_OUT\=3 features_1264_h3=Connecting to an Embedded (Local) Database features_1265_p=The database URL for connecting to a local database is jdbc\:h2\:[file\:][<path>]<databaseName> . The prefix file\: is optional. If no or only a relative path is used, then the current working directory is used as a starting point. The case sensitivity of the path and database name depend on the operating system, however it is suggested to use lowercase letters only. The database name must be at least three characters long (a limitation of File.createTempFile). To point to the user home directory, use ~/, as in\: jdbc\:h2\:~/test. features_1266_h3=Memory-Only Databases features_1267_p=For certain use cases (for example\: rapid prototyping, testing, high performance operations, read-only databases), it may not be required to persist (changes to) the data at all. This database supports the memory-only mode, where the data is not persisted. features_1268_p=In some cases, only one connection to a memory-only database is required. This means the database to be opened is private. In this case, the database URL is jdbc\:h2\:mem\: Opening two connections within the same virtual machine means opening two different (private) databases. features_1269_p=Sometimes multiple connections to the same memory-only database are required. In this case, the database URL must include a name. Example\: jdbc\:h2\:mem\:db1 . Accessing the same database in this way only works within the same virtual machine and class loader environment. features_1270_p=It is also possible to access a memory-only database remotely (or from multiple processes in the same machine) using TCP/IP or SSL/TLS. An example database URL is\: jdbc\:h2\:tcp\://localhost/mem\:db1 (using private database remotely is also possible). features_1271_h2=Connecting to a Database with File Encryption features_1272_p=To use file encryption, it is required to specify the encryption algorithm (the 'cipher') and the file password. The algorithm needs to be specified using the connection parameter. Two algorithms are supported\: XTEA and AES. The file password is specified in the password field, before the user password. A single space needs to be added between the file password and the user password; the file password itself may not contain spaces. File passwords (as well as user passwords) are case sensitive. Here is an example to connect to a password encrypted database\: features_1273_h2=Database File Locking features_1274_p=Whenever a database is opened, a lock file is created to signal other processes that the database is in use. If database is closed, or if the process that opened the database terminates, this lock file is deleted. features_1275_p=The following file locking methods are implemented\: features_1276_li=The default method is 'file' and uses a watchdog thread to protect the database file. The watchdog reads the lock file each second. features_1277_li=The second method is 'socket' and opens a server socket. The socket method does not require reading the lock file every second. The socket method should only be used if the database files are only accessed by the one (and always the same) computer. features_1278_li=It is also possible to open the database without file locking; in this case it is up to the application to protect the database files. features_1279_p=To open the database with a different file locking method, use the parameter 'FILE_LOCK'. The following code opens the database with the 'socket' locking method\: features_1280_p=The following code forces the database to not create a lock file at all. Please note that this is unsafe as another process is able to open the same database, possibly leading to data corruption\: features_1281_p=For more information about the algorithms please see in Advanced Topics under File Locking Protocol. features_1282_h2=Opening a Database Only if it Already Exists features_1283_p=By default, when an application calls DriverManager.getConnection(url,...) and the database specified in the URL does not yet exist, a new (empty) database is created. In some situations, it is better to restrict creating new database, and only open the database if it already exists. This can be done by adding ;ifexists\=true to the URL. In this case, if the database does not already exist, an exception is thrown when trying to connect. The connection only succeeds when the database already exists. The complete URL may look like this\: features_1284_h2=Closing the Database features_1285_h3=Delayed Database Closing features_1286_p=Usually, the database is closed when the last connection to it is closed. In some situations this slows down the application, for example when it is not possible leave the connection open. The automatic closing of the database can be delayed or disabled with the SQL statement SET DB_CLOSE_DELAY <seconds>. The seconds specifies the number of seconds to keep a database open after the last connection to it was closed. For example the following statement will keep the database open for 10 seconds\: features_1287_p=The value -1 means the database is never closed automatically. The value 0 is the default and means the database is closed when the last connection is closed. This setting is persistent and can be set by an administrator only. It is possible to set the value in the database URL\: jdbc\:h2\:~/test;DB_CLOSE_DELAY\=10 . features_1288_h3=Don't Close the Database when the VM Exits features_1289_p=By default, a database is closed when the last connection is closed. However, if it is never closed, the database is closed when the virtual machine exits normally. This is done using a shutdown hook. In some situations, the database should not be closed in this case, for example because the database is still used at virtual machine shutdown (to store the shutdown process in the database for example). For those cases, the automatic closing of the database can be disabled in the database URL. The first connection (the one that is opening the database) needs to set the option in the database URL (it is not possible to change the setting afterwards). The database URL to disable database closing on exit is\: features_1290_h2=Log Index Changes features_1291_p=Usually, changes to the index file are not logged for performance. If the index file is corrupt or missing when opening a database, it is re-created from the data. The index file can get corrupt when the database is not shut down correctly, because of power failure or abnormal program termination. In some situations, for example when using very large databases (over a few hundred MB), re-creating the index file takes very long. In these situations it may be better to log changes to the index file, so that recovery from a corrupted index file is fast. To enable log index changes, add LOG\=2 to the URL, as in jdbc\:h2\:~/test;LOG\=2 This setting should be specified when connecting. The update performance of the database will be reduced when using this option. features_1292_h3=Ignore Unknown Settings features_1293_p=Some applications (for example OpenOffice.org Base) pass some additional parameters when connecting to the database. Why those parameters are passed is unknown. The parameters PREFERDOSLIKELINEENDS and IGNOREDRIVERPRIVILEGES are such examples, they are simply ignored to improve the compatibility with OpenOffice.org. If an application passes other parameters when connecting to the database, usually the database throws an exception saying the parameter is not supported. It is possible to ignored such parameters by adding ;IGNORE_UNKNOWN_SETTINGS\=TRUE to the database URL. features_1294_h3=Changing Other Settings when Opening a Connection features_1295_p=In addition to the settings already described (cipher, file_lock, ifexists, user, password), other database settings can be passed in the database URL. Adding setting\=value at the end of an URL is the same as executing the statement SET setting value just after connecting. For a list of settings supported by this database please see the SQL grammar documentation. features_1296_h2=Custom File Access Mode features_1297_p=Usually, the database opens log, data and index files with the access mode 'rw', meaning read-write (except for read only databases, where the mode 'r' is used). Also supported are 'rws' and 'rwd'. The access mode used for log files is set via ACCESS_MODE_LOG; for data and index files use ACCESS_MODE_DATA. These settings must be specified in the database URL\: features_1298_p=For more information see Durability Problems . On many operating systems the access mode 'rws' does not guarantee that the data is written to the disk. features_1299_h2=Multiple Connections features_1300_h3=Opening Multiple Databases at the Same Time features_1301_p=An application can open multiple databases at the same time, including multiple connections to the same database. The number of open database is only limited by the memory available. features_1302_h3=Multiple Connections to the Same Database\: Client/Server features_1303_p=If you want to access the same database at the same time from different processes or computers, you need to use the client / server mode. In this case, one process acts as the server, and the other processes (that could reside on other computers as well) connect to the server via TCP/IP (or SSL/TLS over TCP/IP for improved security). features_1304_h3=Multithreading Support features_1305_p=This database is multithreading-safe. That means, if an application is multi-threaded, it does not need o worry about synchronizing the access to the database. Internally, most requests to the same database are synchronized. That means an application can use multiple threads all accessing the same database at the same time, however if one thread executes a long running query, the other threads need to wait. features_1306_h3=Locking, Lock-Timeout, Deadlocks features_1307_p=The database uses table level locks to give each connection a consistent state of the data. There are two kinds of locks\: read locks (shared locks) and write locks (exclusive locks). If a connection wants to reads from a table, and there is no write lock on the table, then a read lock is added to the table. If there is a write lock, then this connection waits for the other connection to release the lock. If connection cannot get a lock for a specified time, then a lock timeout exception is thrown. features_1308_p=Usually, SELECT statement will generate read locks. This includes subqueries. Statements that modify data use write locks. It is also possible to lock a table exclusively without modifying data, using the statement SELECT ... FOR UPDATE. The statements COMMIT and ROLLBACK releases all open locks. The commands SAVEPOINT and ROLLBACK TO SAVEPOINT don't affect locks. The locks are also released when the autocommit mode changes, and for connections with autocommit set to true (this is the default), locks are released after each statement. Here is an overview on what statements generate what type of lock\: features_1309_th=Type of Lock features_1310_th=SQL Statement features_1311_td=Read features_1312_td=SELECT * FROM TEST features_1313_td=CALL SELECT MAX(ID) FROM TEST features_1314_td=SCRIPT features_1315_td=Write features_1316_td=SELECT * FROM TEST WHERE 1\=0 FOR UPDATE features_1317_td=Write features_1318_td=INSERT INTO TEST VALUES(1, 'Hello') features_1319_td=INSERT INTO TEST SELECT * FROM TEST features_1320_td=UPDATE TEST SET NAME\='Hi' features_1321_td=DELETE FROM TEST features_1322_td=Write features_1323_td=ALTER TABLE TEST ... features_1324_td=CREATE INDEX ... ON TEST ... features_1325_td=DROP INDEX ... features_1326_p=The number of seconds until a lock timeout exception is thrown can be set separately for each connection using the SQL command SET LOCK_TIMEOUT <milliseconds>. The initial lock timeout (that is the timeout used for new connections) can be set using the SQL command SET DEFAULT_LOCK_TIMEOUT <milliseconds>. The default lock timeout is persistent. features_1327_h2=Database File Layout features_1328_p=There are a number of files created for persistent databases. Other than some databases, not every table and/or index is stored in its own file. Instead, usually only the following files are created\: A data file, an index file, a log file, and a database lock file (exists only while the database is in use). In addition to that, a file is created for each large object (CLOB/BLOB), a file for each linear index, and temporary files for large result sets. Then the command SCRIPT can create script files. If the database trace option is enabled, trace files are created. The following files can be created by the database\: features_1329_th=File Name features_1330_th=Description features_1331_th=Number of Files features_1332_td=test.data.db features_1333_td=Data file features_1334_td=Contains the data for all tables features_1335_td=Format\: <database>.data.db features_1336_td=1 per database features_1337_td=test.index.db features_1338_td=Index file features_1339_td=Contains the data for all (btree) indexes features_1340_td=Format\: <database>.index.db features_1341_td=1 per database features_1342_td=test.0.log.db features_1343_td=Log file features_1344_td=The log file is used for recovery features_1345_td=Format\: <database>.<id>.log.db features_1346_td=0 or more per database features_1347_td=test.lock.db features_1348_td=Database lock file features_1349_td=Exists only if the database is open features_1350_td=Format\: <database>.lock.db features_1351_td=1 per database features_1352_td=test.trace.db features_1353_td=Trace file features_1354_td=Contains trace information features_1355_td=Format\: <database>.trace.db features_1356_td=If the file is too big, it is renamed to <database>.trace.db.old features_1357_td=1 per database features_1358_td=test.14.15.lob.db features_1359_td=Large object features_1360_td=Contains the data for BLOB or CLOB features_1361_td=Format\: <database>.<tableid>.<id>.lob.db features_1362_td=1 per object features_1363_td=test.123.temp.db features_1364_td=Temporary file features_1365_td=Contains a temporary blob or a large result set features_1366_td=Format\: <database>.<session id>.<object id>.temp.db features_1367_td=1 per object features_1368_td=test.7.hash.db features_1369_td=Hash index file features_1370_td=Contains the data for a linear hash index features_1371_td=Format\: <database>.<object id>.hash.db features_1372_td=1 per linear hash index features_1373_h3=Moving and Renaming Database Files features_1374_p=Database name and location are not stored inside the database names. features_1375_p=While a database is closed, the files can be moved to another directory, and they can be renamed as well (as long as all files start with the same name). features_1376_p=As there is no platform specific data in the files, they can be moved to other operating systems without problems. features_1377_h3=Backup features_1378_p=When the database is closed, it is possible to backup the database files. Please note that index files do not need to be backed up, because they contain redundant data, and will be recreated automatically if they don't exist. features_1379_p=To backup data while the database is running, the SQL command SCRIPT can be used. features_1380_h2=Logging and Recovery features_1381_p=Whenever data is modified in the database and those changes are committed, the changes are logged to disk (except for in-memory objects). The changes to the data file itself are usually written later on, to optimize disk access. If there is a power failure, the data and index files are not up-to-date. But because the changes are in the log file, the next time the database is opened, the changes that are in the log file are re-applied automatically. features_1382_p=Please note that index file updates are not logged by default. If the database is opened and recovery is required, the index file is rebuilt from scratch. features_1383_p=There is usually only one log file per database. This file grows until the database is closed successfully, and is then deleted. Or, if the file gets too big, the database switches to another log file (with a higher id). It is possible to force the log switching by using the CHECKPOINT command. features_1384_p=If the database file is corrupted, because the checksum of a record does not match (for example, if the file was edited with another application), the database can be opened in recovery mode. In this case, errors in the database are logged but not thrown. The database should be backed up to a script and re-built as soon as possible. To open the database in the recovery mode, use a database URL must contain RECOVER\=1, as in jdbc\:h2\:~/test;RECOVER\=1. Indexes are rebuilt in this case, and the summary (object allocation table) is not read in this case, so opening the database takes longer. features_1385_h2=Compatibility Modes features_1386_p=All database engines behave a little bit different. For certain features, this database can emulate the behavior of specific databases. Not all features or differences of those databases are implemented. Currently, this feature is mainly used for randomized comparative testing (where random statements are executed against multiple databases and the results are compared). The mode can be changed by specifying the mode in the database URL, or using the SQL statement SET MODE. To use the HSQLDB mode, you can use the database URL jdbc\:h2\:~/test;MODE\=HSQLDB or the SQL statement SET MODE HSQLDB . Here is the list of currently supported modes and the difference to the regular mode\: features_1387_th=Mode features_1388_th=Differences features_1389_td=PostgreSQL features_1390_td=Concatenation of a NULL with another value results in NULL. Usually, the NULL is treated as an empty string if only one of the operators is NULL, and NULL is only returned if both values are NULL. features_1391_td=MySQL features_1392_td=When inserting data, if a column is defined to be NOT NULL and NULL is inserted, then a 0 (or empty string, or the current timestamp for timestamp columns) value is used. Usually, this operation is not allowed and an exception is thrown. features_1393_td=HSQLDB features_1394_td=When converting the scale of decimal data, the number is only converted if the new scale is smaller then current scale. Usually, the scale is converted and 0s are added if required. features_1395_h2=Using the Trace Options features_1396_p=To find problems in an application, it is sometimes good to see what database operations where executed. This database offers the following trace features\: features_1397_li=Trace to System.out and/or a file features_1398_li=Support for trace levels OFF, ERROR, INFO, and DEBUG features_1399_li=The maximum size of the trace file can be set features_1400_li=The Java code generation is possible features_1401_li=Trace can be enabled at runtime by manually creating a file features_1402_h3=Trace Options features_1403_p=The simplest way to enable the trace option is setting it in the database URL. There are two settings, one for System.out (TRACE_LEVEL_SYSTEM_OUT) tracing, and one for file tracing (TRACE_LEVEL_FILE). The trace levels are 0 for OFF, 1 for ERROR (the default), 2 for INFO and 3 for DEBUG. A database URL with both levels set to DEBUG is\: features_1404_p=The trace level can be changed at runtime by executing the SQL command SET TRACE_LEVEL_SYSTEM_OUT level (for System.out tracing) or SET TRACE_LEVEL_FILE level (for file tracing). Example\: features_1405_h3=Setting the Maximum Size of the Trace File features_1406_p=When using a high trace level, the trace file can get very big quickly. The size of the file can be limited by executing the SQL statement SET TRACE_MAX_FILE_SIZE maximumFileSizeInMB . If the log file exceeds the limit, the file is renamed to .old and a new file is created. If another .old file exists, it is deleted. The default setting is 16 MB. Example\: features_1407_h3=Java Code Generation features_1408_p=When setting the trace level to INFO or DEBUG, Java source code is generated as well, so that problem can be reproduced more easily. The trace file looks like this\: features_1409_p=You need to filter out the lines without /**/ to get the Java source code. In Windows, a simple way to do that is\: features_1410_p=Afterwards, you need to complete the file Trace.java before it can be compiled, for example with\: features_1411_p=Also, the user name and password needs to be set, because they are not listed in the trace file. features_1412_h3=Enabling the Trace Option at Runtime by Manually Creating a File features_1413_p=Sometimes, you can't or don't want to change the application or database URL. There is still a way to enable the trace mode in these cases, even at runtime (while the database connection is open). You only need to create a special file in the directory where the database files are stored. The database engine checks every 4 seconds if this file exists (only while executing a statement). The file name is the database name plus '.trace.db.start'. This feature is disabled if the database is encrypted. features_1414_p=Example\: if a database is called 'test', then the file to start tracing is 'test.trace.db.start'. The database engine tries to delete this file when it detects it. If trace is enabled using the start file, the trace level is not persistent to the database, and trace is switched back to the level that was set before when connecting to the database. However, if the start file is read only, the database engine cannot delete the file and will always enable the trace mode when connecting. features_1415_h2=Read Only Databases features_1416_p=If the database files are read-only, then the database is read-only as well. It is not possible to create new tables, add or modify data in this database. Only SELECT statements are allowed. To create a read-only database, close the database so that the log file gets smaller. Do not delete the log file. Then, make the database files read-only using the operating system. When you open the database now, it is read-only. There are two ways an application can find out a database is read-only\: By calling Connection.isReadOnly() or by executing the SQL statement CALL READONLY(). features_1417_h2=Binary and Text Storage Formats features_1418_p=This database engine supports both binary and text storage formats. The binary format is faster, but the text storage format can be useful as well, for example to debug the database engine. If a database already exists, the storage format is recognized automatically. New databases are created in the binary storage format by default. To create a new database in the text storage format, the database URL must contain the parameter STORAGE\=TEXT. Example URL\: jdbc\:h2\:~/test;STORAGE\=TEXT features_1419_h2=Graceful Handling of Low Disk Space Situations features_1420_p=The database is able to deal with situations where the disk space available is running low. Whenever the database starts, an 'emergency space' file is created (size is 1 MB), and if there is no more space available, the file will shrink. If the space available is lower than 128 KB, the database will go into a special read only mode, where writing operations are no longer allowed\: All writing operations will throw the exception 'No disk space available' from this point on. To go back to the normal operating mode, all connections to the database need to be closed first, and space needs to be freed up. features_1421_p=It is possible to install a database event listener to detect low disk space situations early on (when only 1 MB if space is available). To do this, use the SQL statement SET DATABASE_EVENT_LISTENER. The listener can also be set at connection time, using an URL of the form jdbc\:h2\:~/test;DATABASE_EVENT_LISTENER\='com.acme.DbListener' (the quotes around the class name are required). See also the DatabaseEventListener API. features_1422_h3=Opening a Corrupted Database features_1423_p=If a database can not be opened because the boot info (the SQL script that is run at startup) is corrupted, then the database can be opened by specifying a database event listener. The exceptions are logged, but opening the database will continue. features_1424_h2=Computed Columns / Function Based Index features_1425_p=Function indexes are not directly supported by this database, but they can be easily emulated by using computed columns. For example, if an index on the upper-case version of a column is required, just create a computed column with the upper-case version of the original column, and index this column\: features_1426_p=When inserting data, it is not required (better\: not allowed) to specify a value for the upper-case version of the column, because the value is generated. But you can use the column when querying the table\: features_1427_h2=Multi-Dimensional Indexes features_1428_p=A tool is provided to execute efficient multi-dimension (spatial) range queries. This database does not support a specialized spatial index (R-Tree or similar). Instead, the B-Tree index is used. For each record, the multi-dimensional key is converted (mapped) to a single dimensional (scalar) value. This value specifies the location on a space-filling curve. features_1429_p=Currently, Z-order (also called N-order or Morton-order) is used; Hilbert curve could also be used, but the implementation is more complex. The algorithm to convert the multi-dimensional value is called bit-interleaving. The scalar value is indexed using a B-Tree index (usually using a computed column). features_1430_p=The method can result in a drastic performance improvement over just using an index on the first column. Depending on the data and number of dimensions, the improvement is usually higher than factor 5. The tool generates a SQL query from a specified multi-dimensional range. The method used is not database dependent, and the tool can easily be ported to other databases. For an example how to use the tool, please have a look at the sample code provided in TestMultiDimension.java. features_1431_h2=Using Passwords features_1432_h3=Using Secure Passwords features_1433_p=Remember that weak passwords can be broken no matter of the encryption and security protocol. Don't use passwords that can be found in a dictionary. Also appending numbers does not make them secure. A way to create good passwords that can be remembered is, take the first letters of a sentence, use upper and lower case characters, and creatively include special characters. Example\: features_1434_p=i'sE2rtPiUKtT (it's easy to remember this password if you know the trick) features_1435_h3=Passwords\: Using Char Arrays instead of Strings features_1436_p=Java Strings are immutable objects and cannot be safely 'destroyed' by the application. After creating a String, it will remain in the main memory of the computer at least until it is garbage collected. The garbage collection cannot be controlled by the application, and even if it is garbage collected the data may still remain in memory. It might also be possible that the part of memory containing the password is swapped to disk (because not enough main memory is available). features_1437_p=An attacker might have access to the swap file of the operating system. It is therefore a good idea to use char arrays instead of Strings to store passwords. Char arrays can be cleared (filled with zeros) after use, and therefore the password will not be stored in the swap file. features_1438_p=This database supports using char arrays instead of String to pass user and file passwords. The following code can be used to do that\: features_1439_p=In this example, the password is hard code in the application, which is not secure of course. However, Java Swing supports a way to get passwords using a char array (JPasswordField). features_1440_h3=Passing the User Name and/or Password in the URL features_1441_p=Instead of passing the user name as a separate parameter as in Connection conn \= DriverManager. getConnection("jdbc\:h2\:~/test", "sa", "123"); the user name (and/or password) can be supplied in the URL itself\: Connection conn \= DriverManager. getConnection("jdbc\:h2\:~/test;USER\=sa;PASSWORD\=123"); The settings in the URL override the settings passed as a separate parameter. features_1442_h2=User Defined Functions and Stored Procedures features_1443_p=In addition to the built-in functions, this database supports user defined Java functions. In this database, Java functions can be used as stored procedures as well. A function must be declared (registered) before it can be used. Only static Java methods are supported; both the class and the method must be public. Example Java method\: features_1444_p=The Java function must be registered in the database by calling CREATE ALIAS\: features_1445_p=For a complete sample application, see src/test/org/h2/samples/Function.java. features_1446_h3=Function Data Type Mapping features_1447_p=Functions that accept non-nullable parameters such as 'int' will not be called if one of those parameters is NULL. In this case, the value NULL is used as the result. If the function should be called in this case, you need to use 'java.lang.Integer' instead of 'int'. features_1448_h3=Functions that require a Connection features_1449_p=If the first parameter in a Java function is a java.sql.Connection, then the connection to database is provided. This connection does not need to be closed before returning. features_1450_h3=Functions throwing an Exception features_1451_p=If a function throws an Exception, then the current statement is rolled back and the exception is thrown to the application. features_1452_h3=Functions returning a Result Set features_1453_p=Functions may returns a result set. Such a function can be called with the CALL statement\: features_1454_h3=Using SimpleResultSet features_1455_p=A function that returns a result set can create this result set from scratch using the SimpleResultSet tool\: features_1456_h3=Using a Function as a Table features_1457_p=A function returning a result set can be like a table. However, in this case the function is called at least twice\: First while parsing the statement to collect the column names (with parameters set to null where not known at compile time). And then, while executing the statement to get the data (may be repeatedly if this is a join). If the function is called just to get the column list, the URL of the connection passed to the function is jdbc\:columnlist\:connection. Otherwise, the URL of the connection is jdbc\:default\:connection. features_1458_h2=Triggers features_1459_p=This database supports Java triggers that are called before or after a row is updated, inserted or deleted. Triggers can be used for complex consistency checks, or to update related data in the database. It is also possible to use triggers to simulate materialized views. For a complete sample application, see src/test/org/h2/samples/TriggerSample.java. A Java trigger must implement the interface org.h2.api.Trigger\: features_1460_p=The connection can be used to query or update data in other tables. The trigger then needs to be defined in the database\: features_1461_p=The trigger can be used to veto a change, by throwing a SQL Exception. features_1462_h2=Compacting a Database features_1463_p=Empty space in the database file is re-used automatically. To re-build the indexes, the most simple way is to delete the .index.db file while the database is closed. However in some situations (for example after deleting a lot of data in a database), one sometimes wants to shrink the size of the database (compact a database). Here is a sample function to do this\: features_1464_p=See also the sample application org.h2.samples.Compact. The commands SCRIPT / RUNSCRIPT can be used as well to create the a backup of a database and re-build the database from the script. features_1465_h2=Cache Settings features_1466_p=The database keeps most frequently used data and index pages in the main memory. The amount of memory used for caching can be changed using the setting CACHE_SIZE. This setting can be set in the database connection URL (jdbc\:h2\:~/test;CACHE_SIZE\=131072), or it can be changed at runtime using SET CACHE_SIZE size. features_1467_p=This database supports two cache page replacement algorithms\: LRU (the default) and 2Q. For LRU, the pages that were least frequently used are removed from the cache if it becomes full. The 2Q algorithm is a bit more complicated, basically two queues are used. The 2Q algorithm is more resistant to table scans, however the overhead is a bit higher compared to the LRU. To use the cache algorithm 2Q, use a database URL of the form jdbc\:h2\:~/test;CACHE_TYPE\=TQ. The cache algorithm can not be changed once the database is open. features_1468_p=To get information about page reads and writes, and the current caching algorithm in use, call SELECT * FROM INFORMATION_SCHEMA.SETTINGS. The number of pages read / written is listed for the data and index file. features_1469_h2=Why Java features_1470_p=A few reasons using a Java database are\: features_1471_li=Very simple to integrate in Java applications features_1472_li=Support for many different platforms features_1473_li=More secure than native applications (no buffer overflows) features_1474_li=User defined functions (or triggers) run very fast features_1475_li=Unicode support features_1476_p=Some people think that Java is still too slow for low level operations, but this is not the case (not any more). In general, the code can be written a lot faster than using C or C++. Like that, it is possible to concentrate on improving the algorithms (that make the application faster) rather than porting the code and dealing with low level stuff (such as memory management or dealing with threads). Garbage collection is now probably faster than manual memory management. features_1477_p=A lot of features are already built in (for example Unicode, network libraries). It is very easy to write secure code because buffer overflows and such problems can be detected very easily. Some features such as the reflection mechanism can be used for randomized testing. features_1478_p=Java is also future proof\: A lot of companies support Java, and it is now open source. features_1479_p=This software does not rely on many Java libraries or other software, to increase the portability and ease of use, and for performance reasons. For example, the encryption algorithms and many library functions are implemented in the database instead of using the existing libraries. Libraries that are not available in open source Java implementations (such as Swing) are not used or only used for specific features. frame_1000_p=H2 (for 'Hypersonic 2') is free a Java SQL DBMS. Clustering, embedded and server mode, transactions, referential integrity, views, subqueries, triggers, encryption, and disk based or in-memory operation are supported. A browser based console application is included. If you see this page your browser does not support frames. Please click here to view the index . history_1000_h1=History and Roadmap history_1001_a=History of this Database Engine history_1002_a=Change Log history_1003_a=Roadmap history_1004_a=Supporters history_1005_h2=History of this Database Engine history_1006_p=The development of H2 was started in May 2004, but it was first published on December 14th 2005. The author of H2, Thomas Mueller, is also the original developer of Hypersonic SQL. In 2001, he joined PointBase Inc. where he created PointBase Micro. At that point, he had to discontinue Hypersonic SQL, but then the HSQLDB Group was formed to continued to work on the Hypersonic SQL codebase. The name H2 stands for Hypersonic 2; however H2 does not share any code with Hypersonic SQL or HSQLDB. H2 is built from scratch. history_1007_h2=Change Log history_1008_h3=Version 1.0 (Current) history_1009_h3=Version 1.0.59 (2007-09-TODO) history_1010_li=A PreparedStatement that was cancelled could not be reused. Fixed. history_1011_li=H2 Console\: Progress information when logging into a H2 embedded database (useful when opening a database is slow). history_1012_li=When the database was closed while logging was disabled (LOG 0), re-opening the database was slow. Fixed. history_1013_li=Fulltext search is now documented (in the Tutorial). history_1014_li=The Console did not refresh the table list if the CREATE TABLE statement started with a comment. Fixed. history_1015_li=When creating a table using CREATE TABLE .. AS SELECT, the precision for some data types (for example VARCHAR) was set to the default precision. Fixed. history_1016_li=When using the (undocumented) in-memory file system (jdbc\:h2\:memFS\:x or jdbc\:h2\:memLZF\:x), and using multiple connections, a ConcurrentModificationException could occur. Fixed. history_1017_li=REGEXP compatibility\: So far String.matches was used, but for compatibility with MySQL, now Matcher.find is used. history_1018_li=SCRIPT\: the SQL statements in the result set now include the terminating semicolon as well. Simplifies copy and paste. history_1019_li=When using a subquery with group by as a table, some columns could not be used in the where condition in the outer query. Example\: SELECT * FROM (SELECT ID, COUNT(*) C FROM TEST) WHERE C > 100. Fixed. history_1020_li=Views with subqueries as tables and queries with nested subqueries as tables did not always work. Fixed. history_1021_li=Compatibility\: comparing columns with constants that are out of range does not throw an exception. history_1022_h3=Version 1.0.58 (2007-09-15) history_1023_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. history_1024_li=Optimization for independent subqueries. For example, this query can now an index\: SELECT * FROM TEST WHERE ID \= (SELECT MAX(ID) FROM TEST) This can be disabled by setting the system property h2.optimizeSubqueryCache to false. history_1025_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(*). history_1026_li=When using IFNULL, NULLIF, COALESCE, LEAST, or GREATEST, and the first parameter was ?, an exception was thrown. Now the highest data type of all parameters is used. history_1027_li=When comparing TINYINT or SMALLINT columns against constants, the index was not used. Fixed. history_1028_li=Maven 2\: new version are now automatically synced with the central repositories. history_1029_li=The default value for MAX_MEMORY_UNDO is now 100000. history_1030_li=The documentation indexer does no longer index Japanese pages. If somebody knows how to split Japanese into words please post it. history_1031_li=Oracle compatibility\: SYSDATE now returns a timestamp. CHR(..) is now an alias for CHAR(..). history_1032_li=After deleting data, empty space in the database files was not efficiently reused (but it was reused when opening the database). This has been fixed. history_1033_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. history_1034_li=Optimization for COLUMN IN(.., NULL) if the column does not allow NULL values. history_1035_li=Using spaces in column and table aliases was not supported when used inside a view or temporary view. history_1036_li=The version (build) number is now included in the manifest file. history_1037_li=In some systems, SecureRandom.generateSeed is very slow (taking one minute or more). For those cases, an alternative method is used that takes less than one second. history_1038_li=The database file sizes are now increased at most 32 MB at any time. history_1039_li=New method DatabaseEventListener.opened that is called just after opening a database. history_1040_li=When using the Console with Internet Explorer 6.0 or 7.0, a Javascript error was thrown after clearing the query. history_1041_li=A database can now be opened even if class of a user defined function is not in the classpath. Trying to call the function will throws an exception. history_1042_li=User defined functions and constants may not overload built-in functions and constants. This didn't work before, but now trying to create such an object will fail. history_1043_li=Improved MultiDimension tool (for spatial queries)\: in the last few releases the tool was actually slower than using a regular query (because index lookup got faster, and because the tool didn't support prepared statements) Now the tool generates prepared statements, and the performance is better again (about 5 times faster for a reasonable amount of data). history_1044_li=Adding a foreign key or when re-enabling referential integrity for a table failed when checking was enabled and the reference contained NULL. history_1045_li=For PgServer, character encoding other than UTF-8 did not work correctly. Fixed. history_1046_li=Using a function in a GROUP BY expression that is used in a view as a condition did not always work. history_1047_h3=Version 1.0.57 (2007-08-25) history_1048_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. history_1049_li=The version number is now major.minor.micro where micro is the build number. Not all version are public, so there may be gaps in the micro. The minor changes when there is a file format change. history_1050_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. history_1051_li=Opening large read-only databases was very slow. Fixed. history_1052_li=New Japanese translation of the error messages thanks to Ikemoto Masahiro. Thanks a lot\! history_1053_li=Disabling / enabling referential integrity for a table can now be used inside a transaction. history_1054_li=Rights checking for dynamic tables (SELECT * FROM (SELECT ...)) did not work. Fixed. history_1055_li=Creating more than 10 views that depend on each other was very slow. Reconnecting was slow as well. Fixed. history_1056_li=When used as as Servlet, the H2 Console did not work with SSL (using Tomcat). Fixed. history_1057_li=When altering a table with foreign key constraint, if there was no manual index created for the referenced columns, the automatically created index was dropped while still being used. Fixed. history_1058_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. history_1059_li=Some unit tests failed on Linux because the file system works differently. The unit tests are fixed and should work now. history_1060_li=Can now incrementally translate the documentation. See also FAQ. history_1061_li=Improved error messages\: some tools can't show the root cause of an exception. Adding the message of the root cause to the message of the thrown exception now where it makes sense. history_1062_li=The H2 Console can now connect to databases using JNDI. The driver class name must be a javax.naming.Context, (for example javax.naming.InitialContext), and the URL the resource name (for example java\:comp/env/jdbc/Test). This should also work for linked tables. history_1063_li=Google translate did not work for the H2 homepage. It should be fixed now. history_1064_li=The CONVERT function did not work with views when using UNION. history_1065_li=The build now issues a warning if the source code is switched to the wrong version. history_1066_li=The default lock mode is now read committed instead of serialized. history_1067_li=PG server\: data was truncated when reading large VARCHAR columns and decimal columns. history_1068_li=PG server\: when the same database was accessed multiple times using the PostgreSQL ODBC driver, the pg_catalog schema update failed, and connecting to the database was not possible. Fixed. history_1069_li=Some file operations didn't work for files in the root directory. Fixed. history_1070_li=In the Restore tool, the parameter -file did not work. Fixed. history_1071_li=Two-phase commit\: commit with transaction name was only supported in the recovery scan. Now it is always supported. history_1072_li=The column name C_CURRENT_TIMESTAMP did not work in the last release. history_1073_li=OpenOffice compatibility\: support database name in column names. history_1074_h3=Version 1.0.56 (2007-08-02) history_1075_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). history_1076_li=The error messages (src/main/org/h2/res/_*.*) can now be translated. history_1077_li=Part of the documentation has been translated to Japanese by Yusuke Fukushima. history_1078_li=Some Unicode characters where not supported as identifier name. Thanks Yusuke Fukushima for reporting this problem. history_1079_li=The default value DEFAULT_MAX_LENGTH_INPLACE_LOB has been changed from 128 to 1024. history_1080_li=A server that implements the PostgreSQL protocol is now included and documented. That means, the PostgreSQL ODBC driver can be used to access a H2 database. See in the documentation for details. history_1081_li=The experimental H2 ODBC driver has been removed. history_1082_li=The default value for h2.defaultMaxMemoryUndo is now 50000. This avoids out of memory problems when using large transactions, however large transactions are slower because they are buffered to disk. To disable, use -Dh2.defaultMaxMemoryUndo\=2000000000. history_1083_li=Support for regular expression function REGEXP_REPLACE(expression, regex, replacement) and regular expression LIKE\: expression REGEXP matchExpression. However, indexes are not yet used. history_1084_li=The old view implementation has been removed. history_1085_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. history_1086_li=H2 Console\: In the last release, the shutdown button did not work. Fixed. history_1087_li=Referential integrity can now be disabled using SET REFERENTIAL_INTEGRITY FALSE. It can also be disable only for one table using ALTER TABLE SET REFERENTIAL_INTEGRITY FALSE. history_1088_li=The Backup and Restore tools, and the BACKUP command did not back up LOBs when h2.lobFilesInDirectories was enabled. Fixed. history_1089_li=Calculation of cache memory usage has been improved. history_1090_li=In some situations record were released too late from the cache. Fixed. history_1091_li=The cache size is now measured in KB instead of blocks of 128 byte. history_1092_li=CREATE TABLE ... AS SELECT now needs less memory. While inserting the rows, the undo log is temporarily disabled. This avoid out of memory problems when creating large tables. history_1093_li=The per session undo log can now be disabled. This setting is useful for bulk operations that don't need to be atomic, like bulk delete or update. history_1094_li=The database file could get corrupted when there was an OutOfMemoryException in the middle of inserting a row. history_1095_li=Optimization for WHERE NOT(...) and WHERE [NOT] booleanFlagColumn. This can be disabled using the system property h2.optimizeNot. history_1096_li=Optimization for conditions like WHERE A\=B AND B\=X (A\=X is added). This often appears in joins. This can be disabled using the system property h2.optimizeTwoEquals. history_1097_li=Documentation\: the source code in 'Compacting a Database' was incorrect. Fixed. history_1098_li=In the H2 Console, result sets could not be modified because the default result set type is now forward only. For H2, now uses scrollable result sets. Also for other databases, but only when the query starts with @EDIT. history_1099_li=Views using UNION did not work correctly. Fixed. history_1100_li=Function tables did not work with views and EXPLAIN. Fixed. history_1101_h3=Version 1.0.55 (2007-07-12) history_1102_li=Support for the system property baseDir. This works for embedded databases as well. The setting is supported by the H2 Console using -Dh2.baseDir or -baseDir history_1103_li=LIKE ESCAPE did not work correctly if the pattern was % or _, followed by an escape character, followed by %. Fixed. history_1104_li=PostgreSQL compatibility\: SET SEARCH_PATH, SERIAL, CURRENT_USER, E'text', $1. history_1105_li=In some situations, when many tables with LOB columns were modified (ALTER TABLE), large objects were deleted. Fixed. history_1106_li=CREATE TABLE AS SELECT .. UNION .. did not work. Fixed. history_1107_li=New column ID for INFORMATION_SCHEMA.INDEXES, SEQUENCES, USERS, ROLES, RIGHTS, FUNCTION_ALIASES, SCHEMATA, VIEWS, CONSTRAINTS, CONSTANTS, DOMAINS, TRIGGERS. history_1108_li=If large result sets (backed by a temporary file) where not closed, the file was not deleted. Now, the default result set type is FETCH_FORWARD. This means temp files are deleted automatically (without having to close the result set explicitly). But it also means ResultSet.beforeFirst can only be called for scrollable result sets. To create a scrollable result set, use Statement stat \= conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY). history_1109_li=PreparedStatement.getMetaData is now implemented. history_1110_li=Now PreparedStatement.setBigDecimal(..) can be called with an object of a derived class if the system property h2.allowBigDecimalExtensions is set to true. history_1111_li=The default database name in the documentation is now jdbc\:h2\:~/test. Like this, the database is stored in the user home directory (system property user.home). Of course storing the database in the current working directory (as in jdbc\:h2\:test) still works. Using the user directory avoids the problem that the database is not found if the application runs in another directory than the console. history_1112_li=The SQL statement SET ASSERT has been deprecated, because Constants.CHECK is now final. To disable assertions (and improve performance), the system property h2.check can be used. Executing SET ASSERT still works, but has no effect. history_1113_li=In the READ_COMMITTED mode, when the multi-threaded kernel is enabled, read locks are now acquired but released immediately after a query. history_1114_li=The default trace level for JdbcDataSourceFactory was DEBUG, so when using data sources a trace file was always created. Now the default trace level is ERROR, and the file is only created if necessary. history_1115_li=PooledConnection.getConnection took a long time if only one connection was open at any time. Fixed. history_1116_li=Referential integrity violation\: Two different SQL states are now used for missing parent / existing child. history_1117_li=DatabaseEventListener.exceptionThrown has a new parameter\: SQL history_1118_li=For compatibility reasons, the catalog name can now be used in queries\: SELECT * FROM TESTDB.PUBLIC.TEST history_1119_li=If SHUTDOWN IMMEDIATELY was called, then the connection was not closed and the database opened from somebody else at the same time, in some cases this could result in errors with LOB files. Fixed. history_1120_li=The new view implementation is now enabled by default. To use the old implementation, set the system property 'h2.indexOld' to true (java -Dh2.indexOld\=true ..., or in source code Constants.INDEX_OLD \= true). If no problems are found, the old implementation will be removed in the next release. The old implementation does not work with multi-level nested temporary views (select * from (select * from (select * from test))). history_1121_li=The new view implementation did not work with < and <\= comparison, and did not allow conditions on aggregates or grouped columns (HAVING). Fixed.. Fixed. history_1122_li=Both view implementations did not work with multiple levels of nested temporary views (FROM (SELECT...)). Fixed. history_1123_li=The H2 Console can now be run as a standalone web application, or it can be embedded as a servlet into any existing web application. To build the 'H2 Console' web application, execute 'ant warConsole'. See src/tools/org/h2/server/web and src/tools/WEB-INF for details. This web application has been tested with Tomcat and Jetty. history_1124_li=Deleting database files didn't work for Windows if the database was on the root directory of a drive. history_1125_li=The Polish translation is available. Thanks a lot to Tomek\! history_1126_li=Windows service\: the CLASSPATH was not included when starting the service. Fixed. history_1127_h3=Version 1.0.50 (2007-06-17) history_1128_li=File names starting with ~ are now in the user directory (Java system property user.home) history_1129_li=New Console starter application uses the JDK 1.6 system tray functionality if available, or a simple AWT frame for other platforms. To try it out, execute java org.h2.tools.Console. Feedback is welcome. This console starter application is not the default yet, but the plan is to remove the SysTray tool in the future. history_1130_li=New method Csv.write(Writer writer, ResultSet rs) history_1131_li=If a Reader or InputStream of a LOB is not closed, the LOB can not be deleted (embedded mode only). The exception is typically 'Error while renaming file'). As a workaround, set the system property 'h2.lobCloseBetweenReads' to true to close the LOB files between read operations. However this slows down reading. history_1132_li=Server mode\: the server stack trace was included in SQLException messages. Fixed. history_1133_li=Views support has been partially re-implemented. Views are up to 6 times faster. Compared to regular queries, only 20% overhead. Because this is a bigger change, it is not enabled by default. To enable it, set the system property 'h2.indexNew' to true (java -Dh2.indexNew\=true ..., or in source code Constants.INDEX_NEW \= true). If no problems are found, this will be enabled by default in the next release. history_1134_li=In INSERT and MERGE statements, each column may only be specified once now. history_1135_li=For most IOExceptions now the file name is included in the error message. history_1136_li=A java.util.Date object is now converted to a TIMESTAMP in the JDBC API. Previously it was converted to a DATE. history_1137_li=After calling SHUTDOWN and closing the connection and a superfluous error message appeared in the trace file. Fixed. history_1138_li=In many situations, views did not use an index if they could have. Fixed. Also the explain plan for views works now. history_1139_li=The table id (important for LOB files) is now included in INFORMATION_SCHEMA.TABLES. history_1140_li=When using DISTINCT, ORDER BY a function works now as long as it is in the column list. history_1141_li=Support for the data type CHAR. The difference to VARCHAR is\: trailing spaces are ignored. This data type is supported for compatibility with other databases and older applications. history_1142_li=The aggregate function COUNT(...) now returns a long instead of an int. history_1143_li=The 'ordering' of data types was not always correct, for example an operation involving REAL and DOUBLE produced a result of type REAL. Fixed. history_1144_li=CSV tool\: If the same instance was used for reading and writing, the tool wrote the column names twice. Fixed. history_1145_li=Compatibility\: Support for the data type notation CHARACTER VARYING. history_1146_li=Can now ORDER BY -1 (meaning order by first column, descending), and ORDER BY ? (parameterized column number). history_1147_li=Databases with invalid linked tables (for example, because the target database is not accessible) can now be opened. Old table links don't work however. history_1148_li=There was a small memory leak in the trace module. One object per opened connection was kept in a hash map. history_1149_li=Linked tables can now emit UPDATE statements if 'EMIT UPDATES' is specified in the CREATE LINKED TABLE statement. So far, updating a row always deleted the old row and then inserted the new row. history_1150_li=In the last release, the H2 Console opened two connection when logging into a database, and only closed one connection when logging out. Fixed. history_1151_li=New functions LEAST and GREATEST to get the smallest or largest value from a list. history_1152_h3=Version 1.0.46 (2007-04-29) history_1153_li=Unnamed private in-memory database (jdbc\:h2\:mem\:) were not 'private' as documented. Fixed. history_1154_li=Autocomplete in the Console application\: now the result frame scrolls to the top when the list is updated. history_1155_li=GROUP BY expressions did not work correctly in subqueries. Fixed. history_1156_li=New function TABLE to define ad-hoc (temporary) tables in a query. This also solves problems with variable-size IN(...) queries\: instead of SELECT * FROM TEST WHERE ID IN(?, ?, ...) you can now write\: SELECT * FROM TABLE(ID INT\=?) X, TEST WHERE X.ID\=TEST.ID In this case, the index is used. history_1157_li=New data type ARRAY. Actually it was there before, but is now documented and better tested (however it must still be considered experimental). The java.sql.Array implementation is incomplete, but setObject(1, new Object[]{...}) and getObject(..) can be used. New functions ARRAY_GET and ARRAY_LENGTH. history_1158_li=SimpleResultSet now has some basic data type conversion features. history_1159_li=When using JDK 1.5 or later, and switching on h2.lobFilesInDirectories, the performance for creating LOBs was bad. This has been fixed, however creating lots of LOBs it is still faster when the setting is switched off. history_1160_li=A problem with multiple unnamed dynamic tables (FROM (SELECT...)) has been fixed. history_1161_li=Appending 'Z' to a timestamp did not have an effect. Now it is interpreted as +00\:00 (GMT). history_1162_li=The BACKUP command is better tested and documented. This means hot backup (online backup) is now possible. history_1163_li=The old 'Backup' tool is now called 'Script' (as the SQL statement). history_1164_li=There are new 'Backup' and 'Restore' tools that work with database files directly. history_1165_li=The complete syntax for referential and check constraints is now supported when written as part of the column definition, behind PRIMARY KEY. history_1166_li=CASE WHEN ... returned the wrong result when the condition evaluated to NULL. history_1167_li=The new function LINK_SCHEMA simplifies linking all tables of a schema. history_1168_li=SCRIPT DROP now also drops aliases (Java functions) if they exist. history_1169_li=For encrypted databases, the trace option can no longer be enabled manually by creating a file. history_1170_li=For linked tables, NULL in the unique key is now supported. history_1171_li=For read-only databases, temp files are now created in the default temp directory instead of the database directory. history_1172_li=Sending CLOB data was slow in some systems when using the server version. Fixed. history_1173_li=CSVWRITE now returns the number of rows written. history_1174_li=The data type of NULLIF was NULL if the first expression was a column. Now the data type is set correctly. history_1175_li=Indexes (and other related objects) for local temporary tables where not dropped when the session was closed. Fixed. history_1176_li=ALTER TABLE did not work for tables with computed columns. history_1177_li=SQLException.getCause of the now works for JDK 1.4 and higher. history_1178_li=If the index file was deleted, an error was logged in the .trace.db file. This is no longer done. history_1179_li=The Portuguese (Europe) translation is available. Thanks a lot to Antonio Casqueiro\! history_1180_li=The error message for invalid views has been improved (the root cause is included in the message now). history_1181_li=IN(SELECT ...) was not working correctly if the subquery returned a NULL value. Fixed. history_1182_li=DROP ALL OBJECTS did not drop constants. history_1183_li=DROP ALL OBJECTS dropped the role PUBLIC, which was wrong. Fixed. history_1184_li=CASE was parsed as a function if the expression was in (). Fixed. history_1185_li=When ORDER BY was used together with DISTINCT, it was required to type the column name exactly in the select list and the order list exactly in the same way. This is not required any longer. history_1186_h3=Version 1.0.44 (2007-03-04) history_1187_li=System sequences (automatically created sequences for IDENTITY or AUTO_INCREMENT columns) are now random (UUIDs) to avoid clashes when merging databases using RUNSCRIPT. history_1188_li=The precision for linked tables was not correct for some data types, for example VARCHAR. Fixed. history_1189_li=Many problems and bugs in the XA support (package javax.sql) have been fixed. history_1190_li=Now the server tool (org.h2.tools.Server) terminates with an exit code if a problem occured. history_1191_li=The JDBC driver is now loaded if the JdbcDataSource class is loaded. history_1192_li=After renaming a user the password becomes invalid. This is now documented. history_1193_li=XAResource.recover didn't work. Fixed. history_1194_li=XAResource.recover did throw an exception with the code XAER_OUTSIDE if there was no connection. Now the code is XAER_RMERR. history_1195_li=SCRIPT did not work correctly with BLOB or CLOB data. Fixed. history_1196_li=BACKUP TO 'test.zip' now works with encrypted databases and CLOB and BLOB data. history_1197_li=The function CASE WHEN ... didn't convert the returned value to the same data type, resulting in unexpected behavior in many cases. Fixed. history_1198_li=Truncating a table is now allowed if the table references another table (but still not allowed if the table is references by another table). history_1199_li=ORDER BY picked the wrong column if the same column name (but with a different table name) was used twice in the select list. history_1200_li=When a subquery was used in the select list of a query, and GROUP BY was used at the same time, a NullPointerException could occur. Fixed. history_1201_li=ORDER BY did not work when DISTINCT was used at the same time in some situations. Fixed. history_1202_li=When using IN(...) on a case insensitive column (VARCHAR_IGNORECASE), an incorrect optimization was made and the result was wrong sometimes. history_1203_h3=Version 1.0.41 (2007-01-30) history_1204_li=Experimental online backup feature using the SQL statement BACKUP TO 'fileName'. This creates a backup in the form of a zip file. Unlike the SCRIPT TO command, the data tables are not locked. history_1205_li=When using the server mode, temporary files for large LOB values are now deleted when the result set is closed. This also means that LOBs become unavailable after closing the result, however this is according to the specs. history_1206_li=It was possible that SUM throws a class cast exception if the parameter was a conditional expression. history_1207_li=Benchmark\: Added a multi-client test case, BenchB (similar to TPC-B). history_1208_li=Compatibility\: SCHEMA_NAME.SEQUENCE_NAME.NEXTVAL now works as expected. history_1209_li=The Console is now translated to Hungarian thanks to Andras Hideg, and to Indonesian thanks to Joko Yuliantoro history_1210_li=XAConnection\: A NullPointerException was thrown if addConnectionEventListener was called before opening the connection. history_1211_li=In case the result set of a subquery was re-used, an exception was throws if the subquery result did not fit in memory. Now the result is not re-used in this case. Generally, large subqueries should be avoided for performance reasons. history_1212_li=The command "drop all objects delete files" did not work on linux if the database name was lower case. history_1213_li=When setting the URL to an empty string the DataSource now throws an better exception. history_1214_li=Parsing of LIKE .. ESCAPE did not stop at the expected point. Fixed. history_1215_li=Can now use UUID columns as generated key values. However, the UUID column must be the primary key. history_1216_li=Improved the Javadoc documentation. Now unsupported features are marked with [Not supported], and partially supported features are [Partially supported]. history_1217_li=The forum subscriptions (the emails sent from the forum) now works. history_1218_h3=Version 1.0.40 (2007-01-17) history_1219_li=Setting the collation (SET COLLATOR) was very slow on some systems (up to 24 seconds). Thanks a lot to Martina Nissler for finding this problem\! history_1220_li=The Console is now translated to Japanese thanks to IKEMOTO, Masahiro (ikeyan (at) arizona (dot) ne (dot) jp) history_1221_li=The database engine can now be compiled with JDK 1.3 using ant codeswitch. There are still some limitations, and the ant script to build the jar does not work yet. history_1222_li=Fixed a problem where data in the log file was not written to the data file (recovery failure) after a crash, if an index was deleted previously. history_1223_li=SCRIPT NODATA now writes the row count for each table (this simplifies comparing databases). history_1224_li=Selecting a column using the syntax schemaName.tableName.columnName did not work in all cases. history_1225_li=Can now parse timestamps with timezone information (Z or +/-hh\:mm) and dates before year 1. However dates before year 1 are not formatted correctly (this is a Java problem). history_1226_li=When stopping the TCP server from an application and immediately afterwards staring it again using a different TCP password, an exception was thrown sometimes. history_1227_li=Now PreparedStatement.setBigDecimal(..) can only be called with an object of type java.math.BigDecimal. Derived classes are not allowed any more. Many thanks to Maciej Wegorkiewicz for finding this problem. history_1228_li=It was possible to manipulate values in the byte array after calling PreparedStatement.setBytes, and this could lead to problems if the same byte array was used again. Now the byte array is copied if required. history_1229_li=Date, time and timestamp objects were cloned in cases where it was not required. Fixed. history_1230_h3=Version 1.0.36 (2007-01-02) history_1231_li=It was possible to drop the sequence of a temporary tables with DROP ALL OBJECTS, resulting in a null pointer exception afterwards. history_1232_li=Prepared statements with non-constant functions such as CURRENT_TIMESTAMP() did not get re-evaluated if the result of the function changed. Fixed. history_1233_li=The (relative or absolute) directory where the script files are stored or read can now be changed using the system property h2.scriptDirectory history_1234_li=Client trace files now created in the directory 'trace.db' and no longer the application directory. This can be changed using the system property h2.clientTraceDirectory. history_1235_li=In some situations the log file got corrupt if the process was terminated while the database was opening. history_1236_li=Using ;RECOVER\=1 in the database URL threw a syntax exception. Fixed. history_1237_li=If a CLOB or BLOB was deleted in a transaction and the database crashed before the transaction was committed or rolled back, the object was lost if it was large. Fixed. history_1238_li=Now using ant-build.properties. The jdk is automatically updated when using ant codeswitch... history_1239_li=Cluster\: Now the server can detect if a query is read-only, and in this case the result is only read from the first cluster node. However, there is currently no load balancing made to avoid problems with transactions / locking. history_1240_li=Many settings are now initialized from system properties and can be changed on the command line without having recompile the database. See Advances / Settings Read from System Properties. history_1241_li=H2 is now available in Maven. The groupId is com.h2database, the artifactId h2 and the version 1.0.20061217. To create the maven artifacts yourself, use 'ant mavenUploadLocal' and 'ant mavenBuildCentral'. history_1242_h3=Version 1.0.25 (2006-08-31) history_1243_li=In some situations, wide b-tree indexes (with large VARCHAR columns for example) could get corrupted. Fixed. history_1244_li=ORDER BY was broken in the last release when using table aliases. Fixed. history_1245_h3=Version 0.9 (2005-12-13) history_1246_li=First public release. history_1247_h2=Roadmap history_1248_h3=Highest Priority history_1249_li=Improve test code coverage history_1250_li=More fuzz tests history_1251_li=Test very large databases and LOBs (up to 256 GB) history_1252_li=Test multi-threaded in-memory db access history_1253_h3=In Version 1.1 history_1254_li=Add version number. Install directory\: h2-1.0, jar file\: h2-1.0.jar. Micro version\: use build number, staring with 1.1.100 history_1255_li=Automatic upgrade if there is a file format change history_1256_li=ALTER TABLE on a table with a LOB could result in 'Cannot delete file' on some systems. Fixed. history_1257_li=Change Constants.DEFAULT_MAX_MEMORY_UNDO to 10000 (and change the docs). Test. history_1258_li=Enable and document optimizations, LOB files in directories history_1259_li=Special methods for DataPage.writeByte / writeShort and so on history_1260_li=Index organized tables CREATE TABLE...(...) ORGANIZATION INDEX (store in data file) (probably file format changes are required for rowId) history_1261_li=Change the default for NULL || 'x' to NULL history_1262_h3=Priority 1 history_1263_li=MVCC (Multi Version Concurrency Control) history_1264_li=Read-only databases inside a jar (splitting large files to speed up random access) history_1265_li=RECOVER\=1 should automatically recover, \=2 should run the recovery tool if required history_1266_li=More tests with MULTI_THREADED\=1 history_1267_li=Improve performance for create table (if this is possible) history_1268_li=Test with Spatial DB in a box / JTS (http\://docs.codehaus.org/display/GEOS/SpatialDBBox) history_1269_li=Document how to use H2 with PHP (generic database API) history_1270_li=Optimization\: result set caching (like MySQL) history_1271_li=Server side cursors history_1272_li=Row level locking history_1273_li=System table\: open sessions and locks of a database history_1274_li=Function in management db\: list open connections and databases of a (TCP) server history_1275_li=Fix right outer joins history_1276_li=Full outer joins history_1277_li=Long running queries / errors / trace system table history_1278_li=Migrate database tool (also from other database engines) history_1279_li=Shutdown compact history_1280_li=Optimization of distinct with index\: select distinct name from test history_1281_li=Document server mode, embedded mode, web app mode, dual mode (server+embedded) history_1282_li=Stop the server\: close all open databases first history_1283_li=SET variable { TO | \= } { value | 'value' | DEFAULT } history_1284_li=Running totals\: select @running\:\=if(@previous\=t.ID,@running,0)+t.NUM as TOTAL, @previous\:\=t.ID history_1285_li=Better support large transactions, large updates / deletes\: use less memory history_1286_li=Better support large transactions, large updates / deletes\: allow tables without primary key history_1287_li=Support Oracle RPAD and LPAD(string, n[, pad]) (truncate the end if longer) history_1288_li=Allow editing NULL values in the Console history_1289_li=Updatable result sets\: DatabaseMetaData.ownUpdatesAreVisible \= true (for insert, delete, update) Simple solution\: automatically calls 'refresh' when the result was changed. Compare with other databases. history_1290_h3=Priority 2 history_1291_li=Support OSGi\: http\://oscar-osgi.sourceforge.net, http\://incubator.apache.org/felix/index.html history_1292_li=Procedural language / script language (Javascript) history_1293_li=Change LOB mechanism (less files, keep index of lob files, point to files and row, delete unused files earlier, maybe bundle files into a tar file) history_1294_li=Set the database in an 'exclusive' mode (restrict to one user at a time) history_1295_li=Clustering\: recovery needs to becomes fully automatic. Global write lock feature. history_1296_li=Deferred integrity checking (DEFERRABLE INITIALLY DEFERRED) history_1297_li=Groovy Stored Procedures (http\://groovy.codehaus.org/Groovy+SQL) history_1298_li=System table / function\: cache usage history_1299_li=User defined aggregate functions history_1300_li=Add a migration guide (list differences between databases) history_1301_li=Optimization\: automatic index creation suggestion using the trace file? history_1302_li=Compression performance\: don't allocate buffers, compress / expand in to out buffer history_1303_li=Connection pool manager history_1304_li=Implement Statement.cancel for server connections history_1305_li=Start / stop server with database URL history_1306_li=Rebuild index functionality (other than delete the index file) history_1307_li=Don't use deleteOnExit (bug 4513817\: File.deleteOnExit consumes memory) history_1308_li=Console\: add accesskey to most important commands (A, AREA, BUTTON, INPUT, LABEL, LEGEND, TEXTAREA) history_1309_li=Feature\: a setting to delete the the log or not (for backup) history_1310_li=Test with Sun ASPE1_4; JEE Sun AS PE1.4 history_1311_li=Test performance again with SQL Server, Oracle, DB2 history_1312_li=Test with dbmonster (http\://dbmonster.kernelpanic.pl/) history_1313_li=Test with dbcopy (http\://dbcopyplugin.sourceforge.net) history_1314_li=Find a tool to view a text file >100 MB, with find, page up and down (like less) history_1315_li=Implement, test, document XAConnection and so on history_1316_li=Web site\: meta keywords, description, get rid of frame set history_1317_li=Pluggable data type (for compression, validation, conversion, encryption) history_1318_li=CHECK\: find out what makes CHECK\=TRUE slow, move to CHECK2 history_1319_li=Improve recovery\: improve code for log recovery problems (less try/catch) history_1320_li=Log linear hash index changes, fast open / close history_1321_li=Index usage for (ID, NAME)\=(1, 'Hi'); document history_1322_li=Suggestion\: include jetty as Servlet Container (like LAMP) history_1323_li=Trace shipping to server history_1324_li=Performance / server mode\: use UDP optionally? history_1325_li=Version check\: docs / web console (using javascript), and maybe in the library (using TCP/IP) history_1326_li=Aggregates\: support MEDIAN history_1327_li=Web server classloader\: override findResource / getResourceFrom history_1328_li=Cost for embedded temporary view is calculated wrong, if result is constant history_1329_li=Comparison\: pluggable sort order\: natural sort history_1330_li=Count index range query (count(*) where id between 10 and 20) history_1331_li=Eclipse plugin history_1332_li=iReport to support H2 history_1333_li=Implement missing JDBC API (CallableStatement,...) history_1334_li=Compression of the cache history_1335_li=Run H2 Console inside servlet (pass-through servlet of fix the JSP / app) history_1336_li=Include SMPT (mail) server (at least client) (alert on cluster failure, low disk space,...) history_1337_li=Make the jar more modular history_1338_li=Drop with restrict (currently cascade is the default) history_1339_li=JSON parser and functions history_1340_li=Option for Java functions\: constant/isDeterministic to allow early evaluation when all parameters are constant history_1341_li=Automatic collection of statistics (auto ANALYZE) history_1342_li=Server\: client ping from time to time (to avoid timeout - is timeout a problem?) history_1343_li=Copy database\: Tool with config GUI and batch mode, extensible (example\: compare) history_1344_li=Document, implement tool for long running transactions using user defined compensation statements history_1345_li=Support SET TABLE DUAL READONLY history_1346_li=Linked schema using CSV files\: one schema for a directory of files; support indexes for CSV files history_1347_li=Don't write stack traces for common exceptions like duplicate key to the log by default history_1348_li=Setting for MAX_QUERY_TIME (default no limit?) history_1349_li=GCJ\: what is the state now? history_1350_li=Convert large byte[]/Strings to streams in the JDBC API (asap). history_1351_li=Use Janino to convert Java to C++ history_1352_li=Reduce disk space usage (Derby uses less disk space?) history_1353_li=Events for\: Database Startup, Connections, Login attempts, Disconnections, Prepare (after parsing), Web Server (see http\://docs.openlinksw.com/virtuoso/fn_dbev_startup.html) history_1354_li=Optimization\: Log compression history_1355_li=Compatibility\: in MySQL, HSQLDB, /0.0 is NULL; in PostgreSQL, Derby\: Division by zero history_1356_li=Functional tables should accept parameters from other tables (see FunctionMultiReturn) SELECT * FROM TEST T, P2C(T.A, T.R) history_1357_li=Custom class loader to reload functions on demand history_1358_li=Test http\://mysql-je.sourceforge.net/ history_1359_li=Close all files when closing the database (including LOB files that are open on the client side) history_1360_li=Test Connection Pool http\://jakarta.apache.org/commons/dbcp history_1361_li=Profiler option or profiling tool to find long running and often repeated queries (using DatabaseEventListener API) history_1362_li=Function to read/write a file from/to LOB history_1363_li=Allow custom settings (@PATH for RUNSCRIPT for example) history_1364_li=Performance test\: read the data (getString) and use column names to get the data history_1365_li=EXE file\: maybe use http\://jsmooth.sourceforge.net history_1366_li=SELECT ... FOR READ WAIT [maxMillisToWait] history_1367_li=Automatically delete the index file if opening it fails history_1368_li=Performance\: Automatically build in-memory indexes if the whole table is in memory history_1369_li=H2 Console\: The webclient could support more features like phpMyAdmin. history_1370_li=The HELP information schema can be directly exposed in the Console history_1371_li=Maybe use the 0x1234 notation for binary fields, see MS SQL Server history_1372_li=KEY_COLUMN_USAGE (http\://dev.mysql.com/doc/refman/5.0/en/information-schema.html, http\://www.xcdsql.org/Misc/INFORMATION_SCHEMA%20With%20Rolenames.gif) history_1373_li=Support Oracle CONNECT BY in some way\: http\://www.adp-gmbh.ch/ora/sql/connect_by.html, http\://philip.greenspun.com/sql/trees.html history_1374_li=SQL 2003 (http\://www.wiscorp.com/sql_2003_standard.zip) history_1375_li=http\://www.jpackage.org history_1376_li=Version column (number/sequence and timestamp based) history_1377_li=Optimize getGeneratedKey\: send last identity after each execute (server). history_1378_li=Date\: default date is '1970-01-01' (is it 1900-01-01 in the standard / other databases?) history_1379_li=Test and document UPDATE TEST SET (ID, NAME) \= (SELECT ID*10, NAME || '\!' FROM TEST T WHERE T.ID\=TEST.ID); history_1380_li=Better space re-use in the files after deleting data (shrink the files) history_1381_li=Max memory rows / max undo log size\: use block count / row size not row count history_1382_li=Index summary is only written if log\=2; maybe write it also when log\=1 and everything is fine (and no in doubt transactions) history_1383_li=Support 123L syntax as in Java; example\: SELECT (2000000000*2) history_1384_li=Implement point-in-time recovery history_1385_li=Memory database\: add a feature to keep named database open until 'shutdown' history_1386_li=Use the directory of the first script as the default directory for any scripts run inside that script history_1387_li=Include the version name in the jar file name history_1388_li=Optimize IN(...), IN(select), ID\=? OR ID\=?\: create temp table and use join history_1389_li=LIKE\: improved version for larger texts (currently using naive search) history_1390_li=Auto-reconnect on lost connection to server (even if the server was re-started) except if autocommit was off and there was pending transaction history_1391_li=The Script tool should work with other databases as well history_1392_li=Automatically convert to the next 'higher' data type whenever there is an overflow. history_1393_li=Throw an exception when the application calls getInt on a Long (optional) history_1394_li=Default date format for input and output (local date constants) history_1395_li=Cache collation keys for performance history_1396_li=Convert OR condition to UNION or IN if possible history_1397_li=ValueInt.convertToString and so on (remove Value.convertTo) history_1398_li=Support custom Collators history_1399_li=Document ROWNUM usage for reports\: SELECT ROWNUM, * FROM (subquery) history_1400_li=Clustering\: Reads should be randomly distributed or to a designated database on RAM history_1401_li=Clustering\: When a database is back alive, automatically synchronize with the master history_1402_li=Standalone tool to get relevant system properties and add it to the trace output. history_1403_li=Support mixed clustering mode (one embedded, the other server mode) history_1404_li=Support 'call proc($1\=value)' (PostgreSQL, Oracle) history_1405_li=HSQLDB compatibility\: "INSERT INTO TEST(name) VALUES(?); SELECT IDENTITY()" history_1406_li=Shutdown lock (shutdown can only start if there are no logins pending, and logins are delayed until shutdown ends) history_1407_li=Automatically delete the index file if opening it fails history_1408_li=DbAdapters http\://incubator.apache.org/cayenne/ history_1409_li=JAMon (proxy jdbc driver) history_1410_li=Console\: Allow setting Null value; Alternative display format two column (for copy and paste as well) history_1411_li=Console\: Improve editing data (Tab, Shift-Tab, Enter, Up, Down, Shift+Del?) history_1412_li=Console\: Autocomplete Ctrl+Space inserts template history_1413_li=Google Code http\://code.google.com/p/h2database/issues/list\# history_1414_li=Simplify translation ('Donate a translation') history_1415_li=Option to encrypt .trace.db file history_1416_li=Write Behind Cache on SATA leads to data corruption See also http\://sr5tech.com/write_back_cache_experiments.htm and http\://www.jasonbrome.com/blog/archives/2004/04/03/writecache_enabled.html history_1417_li=Functions with unknown return or parameter data types\: serialize / deserialize history_1418_li=Test if idle TCP connections are closed, and how to disable that history_1419_li=Try using a factory for Row, Value[] (faster?), http\://javolution.org/, alternative ObjectArray / IntArray history_1420_li=Auto-Update feature for database, .jar file history_1421_li=ResultSet SimpleResultSet.readFromURL(String url)\: id varchar, state varchar, released timestamp history_1422_li=RANK() and DENSE_RANK(), Partition using OVER() history_1423_li=ROW_NUMBER (not the same as ROWNUM) history_1424_li=Partial indexing (see PostgreSQL) history_1425_li=BUILD should fail if ant test fails history_1426_li=http\://rubyforge.org/projects/hypersonic/ history_1427_li=DbVisualizer profile for H2 history_1428_li=Add comparator (x \=\=\= y) \: (x \= y or (x is null and y is null)) history_1429_li=Try to create trace file even for read only databases history_1430_li=Add a sample application that runs the H2 unit test and writes the result to a file (so it can be included in the user app) history_1431_li=Count on a column that can not be null would be optimized to COUNT(*) history_1432_li=Table order\: ALTER TABLE TEST ORDER BY NAME DESC (MySQL compatibility) history_1433_li=Backup tool should work with other databases as well history_1434_li=Console\: -ifExists doesn't work for the console. Add a flag to disable other dbs history_1435_li=Maybe use Fowler Noll Vo hash function history_1436_li=Improved full text search (supports LOBs, reader / tokenizer / filter). history_1437_li=Performance\: Update in-place history_1438_li=Check if 'FSUTIL behavior set disablelastaccess 1' improves the performance (fsutil behavior query disablelastaccess) history_1439_li=Java static code analysis\: http\://pmd.sourceforge.net/ history_1440_li=Java static code analysis\: http\://www.eclipse.org/tptp/ history_1441_li=Compatibility for CREATE SCHEMA AUTHORIZATION history_1442_li=Implement Clob / Blob truncate and the remaining functionality history_1443_li=Maybe close LOBs after closing connection history_1444_li=Tree join functionality history_1445_li=Support alter table add column if table has views defined history_1446_li=Add multiple columns at the same time with ALTER TABLE .. ADD .. ADD .. history_1447_li=Support trigger on the tables information_schema.tables and ...columns history_1448_li=Add H2 to Gem (Ruby install system) history_1449_li=API for functions / user tables history_1450_li=Order conditions inside AND / OR to optimize the performance history_1451_li=Support linked JCR tables history_1452_li=Make sure H2 is supported by Execute Query\: http\://executequery.org/ history_1453_li=Read InputStream when executing, as late as possible (maybe only embedded mode). Problem with re-execute. history_1454_li=Full text search\: min word length; store word positions history_1455_li=FTP Server\: Implement a client to send / receive files to server (dir, get, put) history_1456_li=FTP Server\: Implement SFTP / FTPS history_1457_li=Add an option to the SCRIPT command to generate only portable / standard SQL history_1458_li=Test Dezign for Databases (http\://www.datanamic.com) history_1459_li=Fast library for parsing / formatting\: http\://javolution.org/ history_1460_li=Updatable Views (simple cases first) history_1461_li=Improve create index performance history_1462_li=Support ARRAY data type history_1463_li=Implement more JDBC 4.0 features history_1464_li=H2 Console\: implement a servlet to allow simple web app integration history_1465_li=Support TRANSFORM / PIVOT as in MS Access history_1466_li=Sequence\: PostgreSQL compatibility (rename, create) (http\://www.postgresql.org/docs/8.2/static/sql-altersequence.html) history_1467_li=SELECT * FROM (VALUES (...), (...), ....) AS alias(f1, ...) history_1468_li=Support updatable views with join on primary keys (to extend a table) history_1469_li=File_Read / File_Store funktionen\: FILE_STORE('test.sql', ?), FILE_READ('test.sql') history_1470_li=Public interface for functions (not public static) history_1471_li=Autocomplete\: if I type the name of a table that does not exist (should say\: syntax not supported) history_1472_li=Autocomplete\: schema support\: "Other Grammar","Table Expression","{[schemaName.]tableName | (select)} [[AS] newTableAlias] history_1473_li=Functions\: options readonly, deterministic (pure, always return the same value) history_1474_li=Document FTP server, including -ftpTask option to execute / kill remote processes history_1475_li=Add jdbcx to the javadocs history_1476_li=Shrink the data file without closing the database (if the end of the file is empty) history_1477_li=Delay reading the row if data is not required history_1478_li=Eliminate undo log records if stored on disk (just one pointer per block, not per record) history_1479_li=Feature matrix like here\: http\://www.inetsoftware.de/products/jdbc/mssql/features/default.asp. history_1480_li=Updatable result set on table without primary key or unique index history_1481_li=Use LinkedList instead of ArrayList where applicable history_1482_li=Optimization\: (A\=B AND B\=C) > (A\=B AND B\=C AND A\=C) history_1483_li=Support % operator (modulo) history_1484_li=Large subqueries\: close them when the main query is closed, not earlier (so result can be reused) history_1485_li=Support 1+'2'\=3, '1'+'2'\='12' (MS SQL Server compatibility) history_1486_li=Support nested transactions history_1487_li=Add a benchmark for big databases, and one for many users history_1488_li=Compression in the result set (repeating values in the same column) history_1489_li=Improve command line consistency (+/- options, or true false options) history_1490_li=Allow to use the catalog name in statements\: [[catalog.]schema.]object history_1491_li=Support curtimestamp (like curtime, curdate) history_1492_li=Support ANALYZE {TABLE|INDEX} tableName COMPUTE|ESTIMATE|DELETE STATISTICS ptnOption options history_1493_li=Support Sequoia (Continuent.org) history_1494_li=Dynamic length numbers / special methods for DataPage.writeByte / writeShort / Ronni Nielsen history_1495_li=Pluggable tracing system, ThreadPool, (AvalonDB / deebee / Paul Hammant) history_1496_li=Recursive Queries (see details) history_1497_li=Use index on boolean flag (see details) history_1498_li=Add build for embedded database only history_1499_li=Release locks (shared or exclusive) on demand history_1500_li=Support catalog names history_1501_li=Add object id to metadata tables history_1502_li=Support OUTER UNION history_1503_li=Support Parameterized Views (similar to CSVREAD, but using just SQL for the definition) history_1504_li=Implement a command line SQL utility similar to HenPlus\: http\://henplus.sourceforge.net history_1505_li=A way (JDBC driver) to map an URL (jdbc\:h2map\:c1) to a connection object history_1506_li=Build script for the embedded functionality only (h2embedded.jar) history_1507_li=Option for SCRIPT to only process one or a set of tables, and append to a file history_1508_li=Support using a unique index for IS NULL (including linked tables) history_1509_li=Support linked tables to the current database history_1510_li=Support dynamic linked schema (automatically adding/updating/removing tables) history_1511_li=Compatibility with Derby\: VALUES(1), (2); SELECT * FROM (VALUES (1), (2)) AS myTable(c1) history_1512_li=Compatibility\: \# is the start of a single line comment (MySQL) but date quote (Access). Mode specific history_1513_li=Run benchmarks with JDK 1.5, JDK 1.6, java -server history_1514_li=Optimizations\: Faster hash function for strings, byte arrays, big decimal history_1515_li=Improve trace feature\: add replay functionality history_1516_li=DatabaseEventListener\: callback for all operations (including expected time, RUNSCRIPT) and cancel functionality history_1517_li=H2 Console / large result sets\: use 'streaming' instead of building the page in-memory history_1518_li=Benchmark\: add a graph to show how databases scale (performance/database size) history_1519_li=Implement a SQLData interface to map your data over to a custom object history_1520_li=Extend H2 Console to run tools (show command line as well) history_1521_li=Make DDL (Data Definition) operations transactional history_1522_li=Sequence\: add features [NO] MINVALUE, MAXVALUE, CACHE, CYCLE history_1523_li=Allow execution time prepare for SELECT * FROM CSVREAD(?, 'columnNameString') history_1524_li=Support multiple directories (on different hard drives) for the same database history_1525_li=Server protocol\: use challenge response authentication, but client sends hash(user+password) encrypted with response history_1526_li=Support EXEC[UTE] (doesn't return a result set, compatible to MS SQL Server) history_1527_li=GROUP BY and DISTINCT\: support large groups (buffer to disk), do not keep large sets in memory history_1528_li=Support native XML data type history_1529_li=Support triggers with a string property or option\: SpringTrigger, OSGITrigger history_1530_li=Clustering\: adding a node should be very fast and without interrupting clients (very short lock) history_1531_li=Support materialized views (using triggers) history_1532_li=Store dates in local timezone (portability of database files) history_1533_li=Ability to resize the cache array when resizing the cache history_1534_li=Automatic conversion from WHERE X>10 AND X>20 to X>20 history_1535_li=Time based cache writing (one second after writing the log) history_1536_li=Write a H2 driver for http\://db.apache.org/ddlutils/ history_1537_li=Index usage for REGEXP LIKE. history_1538_li=Add a role DBA (like ADMIN). history_1539_li=Automatic mode\: jdbc\:h2\:auto\: (embedded mode if possible, if not use server mode). Problem\: what to do when server stops while others are connected to it. history_1540_li=Access rights\: remember the owner of an object. COMMENT\: allow owner of object to change it. history_1541_li=Implement INSTEAD OF trigger. history_1542_li=Access rights\: Finer grained access control (grant access for specific functions) history_1543_li=Support N'text' history_1544_li=Support SCOPE_IDENTITY() to avoid problems when inserting rows in a trigger history_1545_li=Support DESCRIBE like MySQL or Oracle (DESC|DESCRIBE {[schema.]object[@connect_identifier]}) history_1546_li=Set a connection read only (Connection.setReadOnly) history_1547_li=In MySQL mode, for AUTO_INCREMENT columns, don't set the primary key history_1548_li=Use JDK 1.4 file locking to create the lock file (but not yet by default); writing a system property to detect concurrent access from the same VM (different classloaders). history_1549_li=Read-only sessions (Connection.setReadOnly) history_1550_li=Support compatibility for jdbc\:hsqldb\:res\: history_1551_li=In the MySQL and PostgreSQL, use lower case identifiers by default (DatabaseMetaData.storesLowerCaseIdentifiers \= true) history_1552_li=Provide a simple, lightweight O/R mapping tool history_1553_li=Provide an Java SQL builder with standard and H2 syntax history_1554_li=Data compression for in-memory database history_1555_li=Trace\: write os, file system, vm,... when opening the database history_1556_li=Trace\: write dangerous operations (set log 0,...) in every case (including when opening the database) history_1557_li=ParameterMetaData should return correct data type where possible (INSERT for example) history_1558_li=Support indexes for views (probably requires materialized views) history_1559_li=Linked tables that point to the same database should share the connection history_1560_li=Use log for rollback history_1561_li=Document SET SEARCH_PATH, BEGIN, EXECUTE, $ parameters history_1562_li=Complete Javadocs for ErrorCode messages and add to docs history_1563_li=Browser\: use Desktop.isDesktopSupported and browse when using JDK 1.6 history_1564_li=Document org.h2.samples.MixedMode history_1565_li=Server\: use one listener (detect if the request comes from an PG or TCP client) history_1566_li=Store dates as 'local'. Existing files use GMT. Use escape syntax for compatibility) history_1567_li=Support data type INTERVAL history_1568_li=NATURAL JOIN\: MySQL and PostgreSQL don't repeat columns when using SELECT * ... history_1569_li=Optimize SELECT MIN(ID), MAX(ID), COUNT(*) FROM TEST WHERE ID BETWEEN 100 AND 200 history_1570_li=Support Oracle functions\: TRUNC, NVL2, TO_CHAR, TO_DATE, TO_NUMBER history_1571_h3=Not Planned history_1572_li=HSQLDB (did) support this\: select id i from test where i>0 (other databases don't) history_1573_li=String.intern (so that Strings can be compared with \=\=) will not be used because some VMs have problems when used extensively history_1574_h2=Supporters history_1575_p=Many thanks for those who helped by finding and reporting bugs, gave valuable feedback, spread the word and have translated this project. Also many thanks to the donors who contributed via PayPal\: history_1576_li=Florent Ramiere, France history_1577_li=Pete Haidinyak, USA history_1578_li=Jun Iyama, Japan history_1579_li=Antonio Casqueiro, Portugal history_1580_li=lumber-mill.co.jp, Japan installation_1000_h1=Installation installation_1001_a=Requirements installation_1002_a=Supported Platforms installation_1003_a=Installing the Software installation_1004_a=Directory Structure installation_1005_h2=Requirements installation_1006_p=To run the database, the following minimum software stack is known to work\: installation_1007_li=Windows XP, MacOS, or Linux installation_1008_li=Recommended Windows file system\: NTFS (FAT32 supports files up to 4 GB) installation_1009_li=Sun JDK 1.4 or newer installation_1010_li=Mozilla Firefox 1.5 or newer installation_1011_h2=Supported Platforms installation_1012_p=As this database is written in Java, it can be run on many different platforms. It is tested with Java 1.4, 1.5, and 1.6 but can also be compiled to native code using GCJ. The source code does not use features of Java 1.5. Currently, the database is developed and tested on Windows XP using the Sun JDK 1.4, but it also works in many other operating systems and using other Java runtime environments. installation_1013_h2=Installing the Software installation_1014_p=To install the software, run the installer or unzip it to a directory of your choice. installation_1015_h2=Directory Structure installation_1016_p=After installing, you should get the following directory structure\: installation_1017_th=Directory installation_1018_th=Contents installation_1019_td=bin installation_1020_td=JAR and batch files installation_1021_td=docs installation_1022_td=Documentation installation_1023_td=docs/html installation_1024_td=HTML pages installation_1025_td=docs/javadoc installation_1026_td=Javadoc files installation_1027_td=odbc installation_1028_td=ODBC drivers and tools installation_1029_td=service installation_1030_td=Tools to run the database as a Windows Service installation_1031_td=src installation_1032_td=Source files license_1000_h1=License license_1001_h2=Summary and License FAQ license_1002_p=This license is a modified version of the MPL 1.1 available at www.mozilla.org/MPL , the changes are license_1003_em=underlined . There is a License FAQ section at the Mozilla web site, most of that is applicable to the H2 License as well. license_1004_li=You can use H2 for free. You can integrate it into your application (including commercial applications), and you can distribute it. license_1005_li=Files containing only your code are not covered by this license (it is 'commercial friendly'). license_1006_li=Modifications to the H2 source code must be published. license_1007_li=You don't need to provide the source code of H2 if you did not modify anything. license_1008_p=However, nobody is allowed to rename H2, modify it a little, and sell it as a database engine without telling the customers it is in fact H2. This happened to HSQLDB, when a company called 'bungisoft' copied HSQLDB, renamed it to 'RedBase', and tried to sell it, hiding the fact that it was, in fact, just HSQLDB. At this time, it seems 'bungisoft' does not exist any more, but you can use the Wayback Machine of http\://www.archive.org and look for old web pages of http\://www.bungisoft.com. license_1009_p=About porting the source code to another language (for example C\# or C++)\: Converted source code (even if done manually) stays under the same copyright and license as the original code. The copyright of the ported source code does not (automatically) go to the person who ported the code. license_1010_h2=H2 License, Version 1.0 license_1011_h3=1. Definitions license_1012_b=1.0.1. "Commercial Use" license_1013_p=means distribution or otherwise making the Covered Code available to a third party. license_1014_b=1.1. "Contributor" license_1015_p=means each entity that creates or contributes to the creation of Modifications. license_1016_b=1.2. "Contributor Version" license_1017_p=means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. license_1018_b=1.3. "Covered Code" license_1019_p=means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. license_1020_b=1.4. "Electronic Distribution Mechanism" license_1021_p=means a mechanism generally accepted in the software development community for the electronic transfer of data. license_1022_b=1.5. "Executable" license_1023_p=means Covered Code in any form other than Source Code. license_1024_b=1.6. "Initial Developer" license_1025_p=means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A . license_1026_b=1.7. "Larger Work" license_1027_p=means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. license_1028_b=1.8. "License" license_1029_p=means this document. license_1030_b=1.8.1. "Licensable" license_1031_p=means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. license_1032_b=1.9. "Modifications" license_1033_p=means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is\: license_1034_p=1.9.a. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. license_1035_p=1.9.b. Any new file that contains any part of the Original Code or previous Modifications. license_1036_b=1.10. "Original Code" license_1037_p=means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. license_1038_b=1.10.1. "Patent Claims" license_1039_p=means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. license_1040_b=1.11. "Source Code" license_1041_p=means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. license_1042_b=1.12. "You" (or "Your") license_1043_p=means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. license_1044_h3=2. Source Code License license_1045_h4=2.1. The Initial Developer Grant license_1046_p=The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims\: license_1047_p=2.1.a. under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and license_1048_p=2.1.b. under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). license_1049_p=2.1.c. the licenses granted in this Section 2.1 ( a ) and ( b ) are effective on the date Initial Developer first distributes Original Code under the terms of this License. license_1050_p=2.1.d. Notwithstanding Section 2.1 ( b ) above, no patent license is granted\: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by\: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. license_1051_h4=2.2. Contributor Grant license_1052_p=Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license license_1053_p=2.2.a. under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and license_1054_p=2.2.b. under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of\: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). license_1055_p=2.2.c. the licenses granted in Sections 2.2 ( a ) and 2.2 ( b ) are effective on the date Contributor first makes Commercial Use of the Covered Code. license_1056_p=2.2.c. Notwithstanding Section 2.2 ( b ) above, no patent license is granted\: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by\: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. license_1057_h3=3. Distribution Obligations license_1058_h4=3.1. Application of License license_1059_p=The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2 . The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1 , and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5 . license_1060_h4=3.2. Availability of Source Code license_1061_p=Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. license_1062_h4=3.3. Description of Modifications license_1063_p=You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. license_1064_h4=3.4. Intellectual Property Matters license_1065_b=3.4.a. Third Party Claims\: license_1066_p=If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2 , Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2 , Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. license_1067_b=3.4.b. Contributor APIs\: license_1068_p=If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the legal file. license_1069_b=3.4.c. Representations\: license_1070_p=Contributor represents that, except as disclosed pursuant to Section 3.4 ( a ) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. license_1071_h4=3.5. Required Notices license_1072_p=You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A . You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. license_1073_h4=3.6. Distribution of Executable Versions license_1074_p=You may distribute Covered Code in Executable form only if the requirements of Sections 3.1 , 3.2 , 3.3 , 3.4 and 3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2 . The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. license_1075_h4=3.7. Larger Works license_1076_p=You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. license_1077_h3=4. Inability to Comply Due to Statute or Regulation. license_1078_p=If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must\: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the legal file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. license_1079_h3=5. Application of this License. license_1080_p=This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. license_1081_h3=6. Versions of the License. license_1082_h4=6.1. New Versions license_1083_p=The license_1084_em=H2 Group may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. license_1085_h4=6.2. Effect of New Versions license_1086_p=Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by the license_1087_em=H2 Group . No one other than the license_1088_em=H2 Group has the right to modify the terms applicable to Covered Code created under this License. license_1089_h4=6.3. Derivative Works license_1090_p=If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases license_1091_em="H2 Group", "H2" or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the license_1092_em=H2 License . (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) license_1093_h3=7. Disclaimer of Warranty license_1094_p=Covered code is provided under this license on an "as is" basis, without warranty of any kind, either expressed or implied, including, without limitation, warranties that the covered code is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the covered code is with you. Should any covered code prove defective in any respect, you (not the initial developer or any other contributor) assume the cost of any necessary servicing, repair or correction. This disclaimer of warranty constitutes an essential part of this license. No use of any covered code is authorized hereunder except under this disclaimer. license_1095_h3=8. Termination license_1096_p=8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. license_1097_p=8.2. If You initiate litigation by asserting a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that\: license_1098_p=8.2.a. such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either\: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. license_1099_p=8.2.b. any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1( b ) and 2.2( b ) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. license_1100_p=8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. license_1101_p=8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. license_1102_h3=9. Limitation of Liability license_1103_p=Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall you, the initial developer, any other contributor, or any distributor of covered code, or any supplier of any of such parties, be liable to any person for any indirect, special, incidental, or consequential damages of any character including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to you. license_1104_h3=10. United States Government End Users license_1105_p=The Covered Code is a "commercial item", as that term is defined in 48 C.F.R. 2.101 (October 1995), consisting of "commercial computer software" and "commercial computer software documentation", as such terms are used in 48 C.F.R. 12.212 (September 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. license_1106_h3=11. Miscellaneous license_1107_p=This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by license_1108_em=Swiss law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in license_1109_em=Switzerland , any litigation relating to this License shall be subject to the jurisdiction of license_1110_em=Switzerland , with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. license_1111_h3=12. Responsibility for Claims license_1112_p=As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. license_1113_h3=13. Multiple-Licensed Code license_1114_p=Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of this or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A . license_1115_h3=Exhibit A mainWeb_1000_h1=H2 Database Engine mainWeb_1001_p=Welcome to H2, the free SQL database. The main feature of H2 are\: mainWeb_1002_li=Very fast, free for everybody, source code is included mainWeb_1003_li=Written Java; can be compiled with GCJ (Linux) mainWeb_1004_li=Embedded, Server and Cluster modes mainWeb_1005_li=JDBC and (partial) ODBC API; Web Client application mainWeb_1006_h3=Download mainWeb_1007_td=Version 1.0.58 (2007-09-15)\: mainWeb_1008_a=Windows Installer (2.7 MB) mainWeb_1009_a=All platforms (zip, 3.8 MB) mainWeb_1010_a=All Downloads mainWeb_1011_td=    mainWeb_1012_h3=Support mainWeb_1013_a=English Google Group mainWeb_1014_a=Japanese Google Group mainWeb_1015_p=Or send an e-mail to\: mainWeb_1016_td=  mainWeb_1017_h3=Performance mainWeb_1018_td=Operations/second (higher is better) - More information about this test mainWeb_1019_td=  mainWeb_1020_h3=News mainWeb_1021_b=Newsfeeds\: mainWeb_1022_p=Two are available\: Full text (Atom) and Header only (RSS) . mainWeb_1023_b=Email Newsletter\: mainWeb_1024_p=Subscribe to H2 Database News (Google account required) to get informed about new releases. Your email address is only used in this context. mainWeb_1025_td=  mainWeb_1026_h3=Contribute mainWeb_1027_p=You can contribute to the development of H2 by sending feedback and bug reports, or translate the H2 Console application (files h2/src/main/org/h2/server/web/res/_text_*.properties). Or click on the PayPal button below to donate money. You will be listed as a supporter\: mainWeb_1028_td=  mainWeb_1029_h3=Feedback mainWeb_1030_td=You may also send questions, feature requests, or feedback of any kind here\: mainWeb_1031_p=Email (optional)\: mainWeb_1032_form=Message\: main_1000_h1=H2 Database Engine main_1001_p=Welcome to H2, the free SQL database engine. main_1002_a=Quickstart main_1003_p=Click here to get a fast overview. main_1004_a=Tutorial main_1005_p=Go through the samples. main_1006_a=Features main_1007_p=See what this database can do and how to use these features. performance_1000_h1=Performance performance_1001_a=Performance Comparison performance_1002_a=Application Profiling performance_1003_a=Performance Tuning performance_1004_h2=Performance Comparison performance_1005_p=In most cases H2 is a lot faster than all other (open source and not open source) database engines. Please note this is mostly a single connection benchmark run on one computer. performance_1006_h3=Embedded performance_1007_th=Test Case performance_1008_th=Unit performance_1009_th=H2 performance_1010_th=HSQLDB performance_1011_th=Derby performance_1012_td=Simple\: Init performance_1013_td=ms performance_1014_td=375 performance_1015_td=578 performance_1016_td=2797 performance_1017_td=Simple\: Query (random) performance_1018_td=ms performance_1019_td=250 performance_1020_td=344 performance_1021_td=1563 performance_1022_td=Simple\: Query (sequential) performance_1023_td=ms performance_1024_td=171 performance_1025_td=250 performance_1026_td=1469 performance_1027_td=Simple\: Update (random) performance_1028_td=ms performance_1029_td=641 performance_1030_td=1609 performance_1031_td=19265 performance_1032_td=Simple\: Delete (sequential) performance_1033_td=ms performance_1034_td=172 performance_1035_td=516 performance_1036_td=6797 performance_1037_td=Simple\: Memory Usage performance_1038_td=MB performance_1039_td=14 performance_1040_td=12 performance_1041_td=12 performance_1042_td=BenchA\: Init performance_1043_td=ms performance_1044_td=391 performance_1045_td=500 performance_1046_td=3750 performance_1047_td=BenchA\: Transactions performance_1048_td=ms performance_1049_td=5468 performance_1050_td=2468 performance_1051_td=16250 performance_1052_td=BenchA\: Memory Usage performance_1053_td=MB performance_1054_td=14 performance_1055_td=15 performance_1056_td=9 performance_1057_td=BenchB\: Init performance_1058_td=ms performance_1059_td=1281 performance_1060_td=2391 performance_1061_td=14938 performance_1062_td=BenchB\: Transactions performance_1063_td=ms performance_1064_td=2094 performance_1065_td=1140 performance_1066_td=3828 performance_1067_td=BenchB\: Memory Usage performance_1068_td=MB performance_1069_td=16 performance_1070_td=11 performance_1071_td=9 performance_1072_td=BenchC\: Init performance_1073_td=ms performance_1074_td=984 performance_1075_td=547 performance_1076_td=5250 performance_1077_td=BenchC\: Transactions performance_1078_td=ms performance_1079_td=2860 performance_1080_td=58219 performance_1081_td=11204 performance_1082_td=BenchC\: Memory Usage performance_1083_td=MB performance_1084_td=19 performance_1085_td=19 performance_1086_td=9 performance_1087_td=Executed Statements performance_1088_td=\# performance_1089_td=594255 performance_1090_td=594255 performance_1091_td=594255 performance_1092_td=Total Time performance_1093_td=ms performance_1094_td=14687 performance_1095_td=68562 performance_1096_td=87111 performance_1097_td=Statement per Second performance_1098_td=\# performance_1099_td=40461 performance_1100_td=8667 performance_1101_td=6821 performance_1102_h3=Client-Server performance_1103_th=Test Case performance_1104_th=Unit performance_1105_th=H2 performance_1106_th=HSQLDB performance_1107_th=Derby performance_1108_th=PostgreSQL performance_1109_th=MySQL performance_1110_td=Simple\: Init performance_1111_td=ms performance_1112_td=3047 performance_1113_td=2547 performance_1114_td=6907 performance_1115_td=4234 performance_1116_td=3594 performance_1117_td=Simple\: Query (random) performance_1118_td=ms performance_1119_td=3547 performance_1120_td=2641 performance_1121_td=8781 performance_1122_td=5375 performance_1123_td=3140 performance_1124_td=Simple\: Query (sequential) performance_1125_td=ms performance_1126_td=3390 performance_1127_td=2531 performance_1128_td=8859 performance_1129_td=4906 performance_1130_td=3016 performance_1131_td=Simple\: Update (random) performance_1132_td=ms performance_1133_td=3235 performance_1134_td=3531 performance_1135_td=22344 performance_1136_td=5828 performance_1137_td=5187 performance_1138_td=Simple\: Delete (sequential) performance_1139_td=ms performance_1140_td=1421 performance_1141_td=1235 performance_1142_td=8219 performance_1143_td=2484 performance_1144_td=1829 performance_1145_td=Simple\: Memory Usage performance_1146_td=MB performance_1147_td=15 performance_1148_td=10 performance_1149_td=15 performance_1150_td=0 performance_1151_td=0 performance_1152_td=BenchA\: Init performance_1153_td=ms performance_1154_td=2687 performance_1155_td=2343 performance_1156_td=6000 performance_1157_td=4000 performance_1158_td=4000 performance_1159_td=BenchA\: Transactions performance_1160_td=ms performance_1161_td=12938 performance_1162_td=9579 performance_1163_td=26610 performance_1164_td=16250 performance_1165_td=10782 performance_1166_td=BenchA\: Memory Usage performance_1167_td=MB performance_1168_td=15 performance_1169_td=16 performance_1170_td=10 performance_1171_td=0 performance_1172_td=0 performance_1173_td=BenchB\: Init performance_1174_td=ms performance_1175_td=9641 performance_1176_td=10094 performance_1177_td=28282 performance_1178_td=17468 performance_1179_td=11344 performance_1180_td=BenchB\: Transactions performance_1181_td=ms performance_1182_td=3984 performance_1183_td=3312 performance_1184_td=6671 performance_1185_td=7797 performance_1186_td=3375 performance_1187_td=BenchB\: Memory Usage performance_1188_td=MB performance_1189_td=16 performance_1190_td=13 performance_1191_td=8 performance_1192_td=0 performance_1193_td=0 performance_1194_td=BenchC\: Init performance_1195_td=ms performance_1196_td=2031 performance_1197_td=1516 performance_1198_td=7391 performance_1199_td=2297 performance_1200_td=3406 performance_1201_td=BenchC\: Transactions performance_1202_td=ms performance_1203_td=9750 performance_1204_td=58734 performance_1205_td=20937 performance_1206_td=11172 performance_1207_td=7469 performance_1208_td=BenchC\: Memory Usage performance_1209_td=MB performance_1210_td=20 performance_1211_td=15 performance_1212_td=14 performance_1213_td=0 performance_1214_td=0 performance_1215_td=Executed Statements performance_1216_td=\# performance_1217_td=594255 performance_1218_td=594255 performance_1219_td=594255 performance_1220_td=594255 performance_1221_td=594255 performance_1222_td=Total Time performance_1223_td=ms performance_1224_td=55671 performance_1225_td=98063 performance_1226_td=151001 performance_1227_td=81811 performance_1228_td=57142 performance_1229_td=Statement per Second performance_1230_td=\# performance_1231_td=10674 performance_1232_td=6059 performance_1233_td=3935 performance_1234_td=7263 performance_1235_td=10399 performance_1236_h3=Benchmark Results and Comments performance_1237_h4=H2 performance_1238_p=Version 1.0 (2007-09-15) was used for the test. For simpler operations, the performance of H2 is about the same as for HSQLDB. For more complex queries, the query optimizer is very important. However H2 is not very fast in every case, certain kind of queries may still be slow. One situation where is H2 is slow is large result sets, because they are buffered to disk if more than a certain number of records are returned. The advantage of buffering is, there is no limit on the result set size. The open/close time is almost fixed, because of the file locking protocol\: The engine waits 20 ms after opening a database to ensure the database files are not opened by another process. performance_1239_h4=HSQLDB performance_1240_p=Version 1.8.0.8 was used for the test. Cached tables are used in this test (hsqldb.default_table_type\=cached), and the write delay is 1 second (SET WRITE_DELAY 1). HSQLDB is fast when using simple operations. HSQLDB is very slow in the last test (BenchC\: Transactions), probably because is has a bad query optimizer. One query where HSQLDB is slow is a two-table join\: performance_1241_p=The PolePosition benchmark also shows that the query optimizer does not do a very good job for some queries. A disadvantage in HSQLDB is the slow startup / shutdown time (currently not listed) when using bigger databases. The reason is, a backup of the database is created whenever the database is opened or closed. performance_1242_h4=Derby performance_1243_p=Version 10.3.1.4 was used for the test. Derby is clearly the slowest embedded database in this test. This seems to be a structural problem, because all operations are really slow. It will not be easy for the developers of Derby to improve the performance to a reasonable level. performance_1244_h4=PostgreSQL performance_1245_p=Version 8.1.4 was used for the test. The following options where changed in postgresql.conf\: fsync \= off, commit_delay \= 1000. PostgreSQL is run in server mode. It looks like the base performance is slower than MySQL, the reason could be the network layer. The memory usage number is incorrect, because only the memory usage of the JDBC driver is measured. performance_1246_h4=MySQL performance_1247_p=Version 5.0.22 was used for the test. MySQL was run with the InnoDB backend. The setting innodb_flush_log_at_trx_commit (found in the my.ini file) was set to 0. Otherwise (and by default), MySQL is really slow (around 140 statements per second in this test) because it tries to flush the data to disk for each commit. For small transactions (when autocommit is on) this is really slow. But many use cases use small or relatively small transactions. Too bad this setting is not listed in the configuration wizard, and it always overwritten when using the wizard. You need to change this setting manually in the file my.ini, and then restart the service. The memory usage number is incorrect, because only the memory usage of the JDBC driver is measured. performance_1248_h4=Firebird performance_1249_p=Firebird 1.5 (default installation) was tested, but the results are not published currently. It is possible to run the performance test with the Firebird database, and any information on how to configure Firebird for higher performance are welcome. performance_1250_h4=Why Oracle / MS SQL Server / DB2 are Not Listed performance_1251_p=The license of these databases does not allow to publish benchmark results. This doesn't mean that they are fast. They are in fact quite slow, and need a lot of memory. But you will need to test this yourself. SQLite was not tested because the JDBC driver doesn't support transactions. performance_1252_h3=About this Benchmark performance_1253_h4=Number of Connections performance_1254_p=This is mostly a single-connection benchmark. BenchB uses multiple connections, the other tests one connection. performance_1255_h4=Real-World Tests performance_1256_p=Good benchmarks emulate real-world use cases. This benchmark includes 3 test cases\: A simple test case with one table and many small updates / deletes. BenchA is similar to the TPC-A test, but single connection / single threaded (see also\: www.tpc.org). BenchB is similar to the TPC-B test, using multiple connections (one thread per connection). BenchC is similar to the TPC-C test, but single connection / single threaded. performance_1257_h4=Comparing Embedded with Server Databases performance_1258_p=This is mainly a benchmark for embedded databases (where the application runs in the same virtual machine than the database engine). However MySQL and PostgreSQL are not Java databases and cannot be embedded into a Java application. For the Java databases, both embedded and server modes are tested. performance_1259_h4=Test Platform performance_1260_p=This test is run on Windows XP with the virus scanner switched off. The VM used is Sun JDK 1.5. performance_1261_h4=Multiple Runs performance_1262_p=When a Java benchmark is run first, the code is not fully compiled and therefore runs slower than when running multiple times. A benchmark should always run the same test multiple times and ignore the first run(s). This benchmark runs three times, the last run counts. performance_1263_h4=Memory Usage performance_1264_p=It is not enough to measure the time taken, the memory usage is important as well. Performance can be improved in databases by using a bigger in-memory cache, but there is only a limited amount of memory available on the system. HSQLDB tables are kept fully in memory by default, this benchmark uses 'disk based' tables for all databases. Unfortunately, it is not so easy to calculate the memory usage of PostgreSQL and MySQL, because they run in a different process than the test. This benchmark currently does not print memory usage of those databases. performance_1265_h4=Delayed Operations performance_1266_p=Some databases delay some operations (for example flushing the buffers) until after the benchmark is run. This benchmark waits between each database tested, and each database runs in a different process (sequentially). performance_1267_h4=Transaction Commit / Durability performance_1268_p=Durability means transaction committed to the database will not be lost. Some databases (for example MySQL) try to enforce this by default by calling fsync() to flush the buffers, but most hard drives don't actually flush all data. Calling fsync() slows down transaction commit a lot, but doesn't always make data durable. When comparing the results, it is important to think about the effect. Many database suggest to 'batch' operations when possible. This benchmark switches off autocommit when loading the data, and calls commit after each 1000 inserts. However many applications need 'short' transactions at runtime (a commit after each update). This benchmark commits after each update / delete in the simple benchmark, and after each business transaction in the other benchmarks. For databases that support delayed commits, a delay of one second is used. performance_1269_h4=Using Prepared Statements performance_1270_p=Wherever possible, the test cases use prepared statements. performance_1271_h4=Currently Not Tested\: Startup Time performance_1272_p=The startup time of a database engine is important as well for embedded use. This time is not measured currently. Also, not tested is the time used to create a database and open an existing database. Here, one (wrapper) connection is opened at the start, and for each step a new connection is opened and then closed. That means the Open/Close time listed is for opening a connection if the database is already in use. performance_1273_h3=PolePosition Benchmark performance_1274_p=The PolePosition is an open source benchmark. The algorithms are all quite simple. It was developed / sponsored by db4o. performance_1275_th=Test Case performance_1276_th=Unit performance_1277_th=H2 performance_1278_th=HSQLDB performance_1279_th=MySQL performance_1280_td=Melbourne write performance_1281_td=ms performance_1282_td=369 performance_1283_td=249 performance_1284_td=2022 performance_1285_td=Melbourne read performance_1286_td=ms performance_1287_td=47 performance_1288_td=49 performance_1289_td=93 performance_1290_td=Melbourne read_hot performance_1291_td=ms performance_1292_td=24 performance_1293_td=43 performance_1294_td=95 performance_1295_td=Melbourne delete performance_1296_td=ms performance_1297_td=147 performance_1298_td=133 performance_1299_td=176 performance_1300_td=Sepang write performance_1301_td=ms performance_1302_td=965 performance_1303_td=1201 performance_1304_td=3213 performance_1305_td=Sepang read performance_1306_td=ms performance_1307_td=765 performance_1308_td=948 performance_1309_td=3455 performance_1310_td=Sepang read_hot performance_1311_td=ms performance_1312_td=789 performance_1313_td=859 performance_1314_td=3563 performance_1315_td=Sepang delete performance_1316_td=ms performance_1317_td=1384 performance_1318_td=1596 performance_1319_td=6214 performance_1320_td=Bahrain write performance_1321_td=ms performance_1322_td=1186 performance_1323_td=1387 performance_1324_td=6904 performance_1325_td=Bahrain query_indexed_string performance_1326_td=ms performance_1327_td=336 performance_1328_td=170 performance_1329_td=693 performance_1330_td=Bahrain query_string performance_1331_td=ms performance_1332_td=18064 performance_1333_td=39703 performance_1334_td=41243 performance_1335_td=Bahrain query_indexed_int performance_1336_td=ms performance_1337_td=104 performance_1338_td=134 performance_1339_td=678 performance_1340_td=Bahrain update performance_1341_td=ms performance_1342_td=191 performance_1343_td=87 performance_1344_td=159 performance_1345_td=Bahrain delete performance_1346_td=ms performance_1347_td=1215 performance_1348_td=729 performance_1349_td=6812 performance_1350_td=Imola retrieve performance_1351_td=ms performance_1352_td=198 performance_1353_td=194 performance_1354_td=4036 performance_1355_td=Barcelona write performance_1356_td=ms performance_1357_td=413 performance_1358_td=832 performance_1359_td=3191 performance_1360_td=Barcelona read performance_1361_td=ms performance_1362_td=119 performance_1363_td=160 performance_1364_td=1177 performance_1365_td=Barcelona query performance_1366_td=ms performance_1367_td=20 performance_1368_td=5169 performance_1369_td=101 performance_1370_td=Barcelona delete performance_1371_td=ms performance_1372_td=388 performance_1373_td=319 performance_1374_td=3287 performance_1375_td=Total performance_1376_td=ms performance_1377_td=26724 performance_1378_td=53962 performance_1379_td=87112 performance_1380_h2=Application Profiling performance_1381_h3=Analyze First performance_1382_p=Before trying to optimize the performance, it is important to know where the time is actually spent. The same is true for memory problems. Premature or 'blind' optimization should be avoided, as it is not an efficient way to solve the problem. There are various ways to analyze the application. In some situations it is possible to compare two implementations and use System.currentTimeMillis() to find out which one is faster. But this does not work for complex applications with many modules, and for memory problems. A very good tool to measure both the memory and the CPU is the YourKit Java Profiler . This tool is also used to optimize the performance and memory footprint of this database engine. performance_1383_h2=Database Performance Tuning performance_1384_h3=Virus Scanners performance_1385_p=Some virus scanners scan files every time they are accessed. It is very important for performance that database files are not scanned for viruses. The database engine does never interprets the data stored in the files as programs, that means even if somebody would store a virus in a database file, this would be harmless (when the virus does not run, it cannot spread). Some virus scanners allow excluding file endings. Make sure files ending with .db are not scanned. performance_1386_h3=Using the Trace Options performance_1387_p=If the main performance hot spots are in the database engine, in many cases the performance can be optimized by creating additional indexes, or changing the schema. Sometimes the application does not directly generate the SQL statements, for example if an O/R mapping tool is used. To view the SQL statements and JDBC API calls, you can use the trace options. For more information, see Using the Trace Options . performance_1388_h3=Index Usage performance_1389_p=This database uses indexes to improve the performance of SELECT, UPDATE and DELETE statements. If a column is used in the WHERE clause of a query, and if an index exists on this column, then the index can be used. Multi-column indexes are used if all or the first columns of the index are used. Both equality lookup and range scans are supported. Indexes are not used to order result sets\: The results are sorted in memory if required. Indexes are created automatically for primary key and unique constraints. Indexes are also created for foreign key constraints, if required. For other columns, indexes need to be created manually using the CREATE INDEX statement. performance_1390_h3=Optimizer performance_1391_p=This database uses a cost based optimizer. For simple and queries and queries with medium complexity (less than 7 tables in the join), the expected cost (running time) of all possible plans is calculated, and the plan with the lowest cost is used. For more complex queries, the algorithm first tries all possible combinations for the first few tables, and the remaining tables added using a greedy algorithm (this works well for most joins). Afterwards a genetic algorithm is used to test at most 2000 distinct plans. Only left-deep plans are evaluated. performance_1392_h3=Expression Optimization performance_1393_p=After the statement is parsed, all expressions are simplified automatically if possible. Operations are evaluated only once if all parameters are constant. Functions are also optimized, but only if the function is constant (always returns the same result for the same parameter values). If the WHERE clause is always false, then the table is not accessed at all. performance_1394_h3=COUNT(*) Optimization performance_1395_p=If the query only counts all rows of a table, then the data is not accessed. However, this is only possible if no WHERE clause is used, that means it only works for queries of the form SELECT COUNT(*) FROM table. performance_1396_h3=Updating Optimizer Statistics / Column Selectivity performance_1397_p=When executing a query, at most one index per joined table can be used. If the same table is joined multiple times, for each join only one index is used. Example\: for the query SELECT * FROM TEST T1, TEST T2 WHERE T1.NAME\='A' AND T2.ID\=T1.ID, two index can be used, in this case the index on NAME for T1 and the index on ID for T2. performance_1398_p=If a table has multiple indexes, sometimes more than one index could be used. Example\: if there is a table TEST(ID, NAME, FIRSTNAME) and an index on each column, then two indexes could be used for the query SELECT * FROM TEST WHERE NAME\='A' AND FIRSTNAME\='B', the index on NAME or the index on FIRSTNAME. It is not possible to use both indexes at the same time. Which index is used depends on the selectivity of the column. The selectivity describes the 'uniqueness' of values in a column. A selectivity of 100 means each value appears only once, and a selectivity of 1 means the same value appears in many or most rows. For the query above, the index on NAME should be used if the table contains more distinct names than first names. performance_1399_p=The SQL statement ANALYZE can be used to automatically estimate the selectivity of the columns in the tables. This command should be run from time to time to improve the query plans generated by the optimizer. quickstartText_1000_h1=Quickstart quickstartText_1001_a=Embedding H2 in an Application quickstartText_1002_a=The H2 Console Application quickstartText_1003_h2=Embedding H2 in an Application quickstartText_1004_p=This database can be used in embedded mode, or in server mode. To use it in embedded mode, you need to\: quickstartText_1005_li=Add h2.jar to the classpath quickstartText_1006_li=Use the JDBC driver class\: org.h2.Driver quickstartText_1007_li=The database URL jdbc\:h2\:~/test opens the database 'test' in your user home directory quickstartText_1008_h2=The H2 Console Application quickstartText_1009_p=The Console lets you access a SQL database using a browser interface. quickstartText_1010_p=If you don't have Windows XP, or if something does not work as expected, please see the detailed description in the Tutorial . quickstartText_1011_h3=Step-by-Step quickstartText_1012_h4=Installation quickstartText_1013_p=Install the software using the Windows Installer (if you did not yet do that). quickstartText_1014_h4=Start the Console quickstartText_1015_p=Click Start , All Programs , H2 , and H2 Console (Command Line) \: quickstartText_1016_p=A new console window appears\: quickstartText_1017_p=Also, a new browser page should open with the URL http\://localhost\:8082. You may get a security warning from the firewall. If you don't want other computers in the network to access the database on your machine, you can let the firewall block these connections. Only local connections are required at this time. quickstartText_1018_h4=Login quickstartText_1019_p=Select Generic H2 and click Connect \: quickstartText_1020_p=You are now logged in. quickstartText_1021_h4=Sample quickstartText_1022_p=Click on the Sample SQL Script \: quickstartText_1023_p=The SQL commands appear in the command area. quickstartText_1024_h4=Execute quickstartText_1025_p=Click Run \: quickstartText_1026_p=On the left side, a new entry TEST is added below the database icon. The operations and results of the statements are shown below the script. quickstartText_1027_h4=Disconnect quickstartText_1028_p=Click on Disconnect \: quickstartText_1029_p=to close the database. quickstartText_1030_h4=End quickstartText_1031_p=Close the console window. For more information, see the Tutorial . search_1000_b=Search\: search_1001_td=Highlight keyword(s) search_1002_a=Home search_1003_a=Quickstart search_1004_a=Installation search_1005_a=Tutorial search_1006_a=Features search_1007_a=Performance search_1008_a=Advanced Topics search_1009_b=Reference search_1010_a=SQL Grammar search_1011_a=Functions search_1012_a=Data Types search_1013_a=Javadoc JDBC API search_1014_a=Documentation as PDF search_1015_b=Appendix search_1016_a=Build search_1017_a=History and Roadmap search_1018_a=FAQ and Known Bugs search_1019_a=License tutorial_1000_h1=Tutorial tutorial_1001_a=Starting and Using the H2 Console tutorial_1002_a=Connecting to a Database using JDBC tutorial_1003_a=Creating New Databases tutorial_1004_a=Using the Server tutorial_1005_a=Using Hibernate tutorial_1006_a=Using Databases in Web Applications tutorial_1007_a=CSV (Comma Separated Values) Support tutorial_1008_a=Upgrade, Backup, and Restore tutorial_1009_a=Using OpenOffice Base tutorial_1010_a=Java Web Start / JNLP tutorial_1011_a=Fulltext Search tutorial_1012_h2=Starting and Using the H2 Console tutorial_1013_p=This application lets you access a SQL database using a browser interface. This can be a H2 database, or another database that supports the JDBC API. tutorial_1014_p=This is a client / server application, so both a server and a client (a browser) are required to run it. tutorial_1015_p=Depending on your platform and environment, there are multiple ways to start the application\: tutorial_1016_th=OS tutorial_1017_th=Start tutorial_1018_td=Windows tutorial_1019_td=Click [Start], [All Programs], [H2], and [H2 Console (Command Line)] tutorial_1020_td=When using the Sun JDK 1.4 or 1.5, a window with the title 'H2 Console ' should appear. When using the Sun JDK 1.6, an icon will be added to the system tray\: tutorial_1021_td=If you don't get the window and the system tray icon, then maybe Java is not installed correctly (in this case, try another way to start the application). A browser window should open and point to the Login page http\://localhost\:8082). tutorial_1022_td=Windows tutorial_1023_td=Open a file browser, navigate to h2/bin, and double click on h2.bat. tutorial_1024_td=A console window appears. If there is a problem, you will see an error message in this window. A browser window will open and point to the Login page (URL\: http\://localhost\:8082). tutorial_1025_td=Any tutorial_1026_td=Open a console window, navigate to the directory 'h2/bin' and type\: tutorial_1027_h3=Firewall tutorial_1028_p=If you start the server, you may get a security warning from the firewall (if you have installed one). If you don't want other computers in the network to access the application on your machine, you can let the firewall block those connections. The connection from the local machine will still work. Only if you want other computers to access the database on this computer, you need allow remote connections in the firewall. tutorial_1029_p=A small firewall is already built into the server\: other computers may not connect to the server by default. To change this, go to 'Preferences' and select 'Allow connections from other computers'. tutorial_1030_h3=Native Version tutorial_1031_p=The native version does not require Java, because it is compiled using GCJ. However H2 does currently not run stable with GCJ on Windows It is possible to compile the software to different platforms. tutorial_1032_h3=Testing Java tutorial_1033_p=To check the Java version you have installed, open a command prompt and type\: tutorial_1034_p=If you get an error message, you may need to add the Java binary directory to the path environment variable. tutorial_1035_h3=Error Message 'Port is in use' tutorial_1036_p=You can only start one instance of the H2 Console, otherwise you will get the following error message\: Port is in use, maybe another ... server already running on... . It is possible to start multiple console applications on the same computer (using different ports), but this is usually not required as the console supports multiple concurrent connections. tutorial_1037_h3=Using another Port tutorial_1038_p=If the port is in use by another application, you may want to start the H2 Console on a different port. This can be done by changing the port in the file .h2.server.properties. This file is stored in the user directory (for Windows, this is usually in "Documents and Settings/<username>"). The relevant entry is webPort. tutorial_1039_h3=Starting Successfully tutorial_1040_p=If starting the server from a console window was successful, a new window will open and display the following text\: tutorial_1041_p=Don't click inside this window; otherwise you might block the application (if you have the Fast-Edit mode enabled). tutorial_1042_h3=Connecting to the Server using a Browser tutorial_1043_p=If the server started successfully, you can connect to it using a web browser. The browser needs to support JavaScript, frames and cascading stylesheets (css). If you started the server on the same computer as the browser, go to http\://localhost\:8082 in the browser. If you want to connect to the application from another computer, you need to provide the IP address of the server, for example\: http\://192.168.0.2\:8082. If you enabled SSL on the server side, the URL needs to start with HTTPS. tutorial_1044_h3=Multiple Concurrent Sessions tutorial_1045_p=Multiple concurrent browser sessions are supported. As that the database objects reside on the server, the amount of concurrent work is limited by the memory available to the server application. tutorial_1046_h3=Application Properties tutorial_1047_p=Starting the server will create a configuration file in you local home directory called .h2.server.properties . For Windows installations, this file will be in the directory C\:\\Documents and Settings\\[username] . This file contains the settings of the application. tutorial_1048_h3=Login tutorial_1049_p=At the login page, you need to provide connection information to connect to a database. Set the JDBC driver class of your database, the JDBC URL, user name and password. If you are done, click [Connect]. tutorial_1050_p=You can save and reuse previously saved settings. The settings are stored in the Application Properties file. tutorial_1051_h3=Error Messages tutorial_1052_p=Error messages in are shown in red. You can show/hide the stack trace of the exception by clicking on the message. tutorial_1053_h3=Adding Database Drivers tutorial_1054_p=Additional database drivers can be registered by adding the Jar file location of the driver to the environment variables H2DRIVERS or CLASSPATH. Example (Windows)\: To add the database driver library C\:\\Programs\\hsqldb\\lib\\hsqldb.jar, set the environment variable H2DRIVERS to C\:\\Programs\\hsqldb\\lib\\hsqldb.jar. tutorial_1055_p=Multiple drivers can be set; each entry needs to be separated with a ';' (Windows) or '\:' (other operating systems). Spaces in the path names are supported. The settings must not be quoted. tutorial_1056_p=Only the Java version supports additional drivers (this feature is not supported by the Native version). tutorial_1057_h3=Using the Application tutorial_1058_p=The application has three main panels, the toolbar on top, the tree on the left and the query / result panel on the right. The database objects (for example, tables) are listed on the left panel. Type in a SQL command on the query panel and click 'Run'. The result of the command appears just below the command. tutorial_1059_h3=Inserting Table Names or Column Names tutorial_1060_p=The table name and column names can be inserted in the script by clicking them in the tree. If you click on a table while the query is empty, a 'SELECT * FROM ...' is added as well. While typing a query, the table that was used is automatically expanded in the tree. For, example if you type 'SELECT * FROM TEST T WHERE T.' then the table TEST is automatically expanded in the tree. tutorial_1061_h3=Disconnecting and Stopping the Application tutorial_1062_p=On the browser, click 'Disconnect' on the toolbar panel. You will be logged out of the database. However, the server is still running and ready to accept new sessions. tutorial_1063_p=To stop the server, right click on the system tray icon and select [Exit]. If you don't have the icon (because you started it in another way), press [Ctrl]+[C] on the console where the server was started (Windows), or close the console window. tutorial_1064_h2=Connecting to a Database using JDBC tutorial_1065_p=To connect to a database, a Java application first needs to load the database driver, and then get a connection. A simple way to do that is using the following code\: tutorial_1066_p=This code first loads the driver ( Class.forName() ) and then opens a connection (using DriverManager.getConnection() ). The driver name is "org.h2.Driver" in every case. The database URL always needs to start with jdbc\:h2\: to be recognized by this database. The second parameter in the getConnection() call is the user name ('sa' for System Administrator in this example). The third parameter is the password. Please note that in this database, user names are not case sensitive, but passwords are case sensitive. tutorial_1067_h2=Creating New Databases tutorial_1068_p=By default, if the database specified in the URL does not yet exist, a new (empty) database is created automatically. The user that created the database automatically becomes the administrator of this database. tutorial_1069_h2=Using the Server tutorial_1070_p=H2 currently supports three servers\: a Web Server, a TCP Server and an ODBC Server. The servers can be started in different ways. tutorial_1071_h3=Starting the Server from Command Line tutorial_1072_p=To start the Server from the command line with the default settings, run tutorial_1073_p=This will start the Server with the default options. To get the list of options and default values, run tutorial_1074_p=There are options available to use a different ports, and start or not start parts of the Server and so on. For details, see the API documentation of the Server tool. tutorial_1075_h3=Connecting to the TCP Server tutorial_1076_p=To remotly connect to a database using the TCP server, use the following driver and database URL\: tutorial_1077_li=JDBC driver class\: org.h2.Driver tutorial_1078_li=Database URL\: jdbc\:h2\:tcp\://localhost/~/test tutorial_1079_p=For details about the database URL, see also in Features. tutorial_1080_h3=Starting the Server within an Application tutorial_1081_p=It is also possible to start and stop a Server from within an application. Sample code\: tutorial_1082_h3=Stopping a TCP Server from Another Process tutorial_1083_p=The TCP Server can be stopped from another process. To stop the server from the command line, run\: tutorial_1084_p=To stop the server from a user application, use the following code\: tutorial_1085_p=This function will call System.exit on the server. This function should be called after all connection to the databases are closed to avoid recovery when the databases are opened the next time. To stop remote server, remote connections must be enabled on the server. tutorial_1086_h3=Limitations of the Server tutorial_1087_p=There currently are a few limitations when using the server or cluster mode\: tutorial_1088_li=Statement.cancel() is only supported in embedded mode. A connection can only execute one operation at a time in server or cluster mode, and is blocked until this operation is finished. tutorial_1089_h2=Using Hibernate tutorial_1090_p=This database supports Hibernate version 3.1 and newer. You can use the HSQLDB Dialect, or the native H2 Dialect that is available in the file src/tools/org/h2/tools/hibernate/H2Dialect.txt. The H2 dialect is included in newer version of Hibernate. For versions where the dialect is missing, you need to copy the file into the folder src\\org\\hibernate\\dialect (Hibernate 3.1), rename it to H2Dialect.java and re-compile hibernate. tutorial_1091_h2=Using Databases in Web Applications tutorial_1092_p=There are multiple ways to access a database from within web applications. Here are some examples if you use Tomcat or JBoss. tutorial_1093_h3=Embedded Mode tutorial_1094_p=The (currently) most simple solution is to use the database in the embedded mode, that means open a connection in your application when it starts (a good solution is using a Servlet Listener, see below), or when a session starts. A database can be accessed from multiple sessions and applications at the same time, as long as they run in the same process. Most Servlet Containers (for example Tomcat) are just using one process, so this is not a problem (unless you run Tomcat in clustered mode). Tomcat uses multiple threads and multiple classloaders. If multiple applications access the same database at the same time, you need to put the database jar in the shared/lib or server/lib directory. It is a good idea to open the database when the web application starts, and close it when the web applications stops. If using multiple applications, only one (any) of them needs to do that. In the application, an idea is to use one connection per Session, or even one connection per request (action). Those connections should be closed after use if possible (but it's not that bad if they don't get closed). tutorial_1095_h3=Server Mode tutorial_1096_p=The server mode is similar, but it allows you to run the server in another process. tutorial_1097_h3=Using a Servlet Listener to Start and Stop a Database tutorial_1098_p=Add the h2.jar file your web application, and add the following snippet to your web.xml file (after context-param and before filter)\: tutorial_1099_p=For details on how to access the database, see the code DbStarter.java tutorial_1100_h2=CSV (Comma Separated Values) Support tutorial_1101_p=The CSV file support can be used inside the database using the functions CSVREAD and CSVWRITE, and the CSV library can be used outside the database as a standalone tool. tutorial_1102_h3=Writing a CSV File from Within a Database tutorial_1103_p=The built-in function CSVWRITE can be used to create a CSV file from a query. Example\: tutorial_1104_h3=Reading a CSV File from Within a Database tutorial_1105_p=A CSV file can be read using the function CSVREAD. Example\: tutorial_1106_h3=Writing a CSV File from a Java Application tutorial_1107_p=The CSV tool can be used in a Java application even when not using a database at all. Example\: tutorial_1108_h3=Reading a CSV File from a Java Application tutorial_1109_p=It is possible to read a CSV file without opening a database. Example\: tutorial_1110_h2=Upgrade, Backup, and Restore tutorial_1111_h3=Database Upgrade tutorial_1112_p=The recommended way to upgrade from one version of the database engine to the next version is to create a backup of the database (in the form of a SQL script) using the old engine, and then execute the SQL script using the new engine. tutorial_1113_h3=Backup using the Script Tool tutorial_1114_p=There are different ways to backup a database. For example, it is possible to copy the database files. However, this is not recommended while the database is in use. Also, the database files are not human readable and quite large. The recommended way to backup a database is to create a compressed SQL script file. This can be done using the Script tool\: tutorial_1115_p=It is also possible to use the SQL command SCRIPT to create the backup of the database. For more information about the options, see the SQL command SCRIPT. The backup can be done remotely, however the file will be created on the server side. The built in FTP server could be used to retrieve the file from the server. tutorial_1116_h3=Restore from a Script tutorial_1117_p=To restore a database from a SQL script file, you can use the RunScript tool\: tutorial_1118_p=For more information about the options, see the SQL command RUNSCRIPT. The restore can be done remotely, however the file needs to be on the server side. The built in FTP server could be used to copy the file to the server. It is also possible to use the SQL command RUNSCRIPT to execute a SQL script. SQL script files may contain references to other script files, in the form of RUNSCRIPT commands. However, when using the server mode, the references script files need to be available on the server side. tutorial_1119_h3=Online Backup tutorial_1120_p=The BACKUP SQL statement and the Backup tool both create a zip file with all database files. However, the contents of this file are not human readable. Other than the SCRIPT statement, the BACKUP statement does not lock the database objects, and therefore does not block other users. The resulting backup is transactionally consistent\: tutorial_1121_p=The Backup tool (org.h2.tools.Backup) can not be used to create a online backup; the database must not be in use while running this program. tutorial_1122_h2=Using OpenOffice Base tutorial_1123_p=OpenOffice.org Base supports database access over the JDBC API. To connect to a H2 database using OpenOffice Base, you first need to add the JDBC driver to OpenOffice. The steps to connect to a H2 database are\: tutorial_1124_li=Stop OpenOffice, including the autostart tutorial_1125_li=Copy h2.jar into the directory <OpenOffice>\\program\\classes tutorial_1126_li=Start OpenOffice Base tutorial_1127_li=Connect to an existing database, select JDBC, [Next] tutorial_1128_li=Example datasource URL\: jdbc\:h2\:c\:/temp/test tutorial_1129_li=JDBC driver class\: org.h2.Driver tutorial_1130_p=Now you can access the database stored in the directory C\:/temp. tutorial_1131_h2=Java Web Start / JNLP tutorial_1132_p=When using Java Web Start / JNLP (Java Network Launch Protocol), permissions tags must be set in the .jnlp file, and the application .jar file must be signed. Otherwise, when trying to write to the file system, the following exception will occur\: java.security.AccessControlException\: access denied (java.io.FilePermission ... read). Example permission tags\: tutorial_1133_h2=Fulltext Search tutorial_1134_p=H2 supports Lucene full text search and native full text search implementation. tutorial_1135_h3=Using the Native Full Text Search tutorial_1136_p=To initialize, call\: tutorial_1137_p=Afterwards, you can create a full text index for a table using\: tutorial_1138_p=PUBLIC is the schema, TEST is the table name. The list of column names (column separated) is optional, in this case all columns are indexed. The index is updated in read time. To search the index, use the following query\: tutorial_1139_p=You can also call the index from within a Java application\: tutorial_1140_h3=Using the Lucene Fulltext Search tutorial_1141_p=To use the Lucene full text search, you first need to rename the file FullTextLucene.java.txt to FullTestLucene.java and compile it. Also, you need the Lucene library in the classpath. To initialize, call\: tutorial_1142_p=Afterwards, you can create a full text index for a table using\: tutorial_1143_p=PUBLIC is the schema, TEST is the table name. The list of column names (column separated) is optional, in this case all columns are indexed. The index is updated in read time. To search the index, use the following query\: tutorial_1144_p=You can also call the index from within a Java application\: