H2 (DBMS)
![]() |
|
|
Screenshot
H2 web console running in Internet Explorer 7.0 |
|
| Stable release | 1.3.164 / February 3, 2012 |
|---|---|
| Written in | Java |
| Operating system | Cross-platform |
| Type | Relational Database Management System |
| License | Mozilla Public License or Eclipse Public License |
| Website | http://www.h2database.com/ |
H2 is a relational database management system written in Java. It can be embedded in Java applications or run in the client-server mode.[1] The disk footprint (size of the jar file) is about 1 MB.[2]
The software is available as open source software under modified versions of the Mozilla Public License or the original Eclipse Public License. The modification of the MPL is a shorter file header and the license name.[3]
Contents |
[edit] Main features
A subset of the SQL (Structured Query Language) standard is supported. The main programming APIs are SQL and JDBC, however the database also supports using the PostgreSQL ODBC driver by acting like a PostgreSQL server. [4]
It is possible to create both in-memory tables, as well as disk-based tables. Tables can be persistent or temporary. Index types are hash table and tree for in-memory tables, and b-tree for disk-based tables. All data manipulation operations are transactional. Table level locking and multiversion concurrency control are implemented. The 2-phase commit protocol is supported as well, but no standard API for distributed transactions is implemented. The security features of the database are: role based access rights, encryption of the password using SHA-256 and data using the AES or the Tiny Encryption Algorithm, XTEA. The cryptographic features are available as functions inside the database as well. SSL / TLS connections are supported in the client-server mode, as well as when using the console application.
Two full text search implementations are included, a native implementation and one using Lucene.
A simple form of high availability is implemented: when used in the client-server mode, the database engine supports hot failover (this is commonly known as clustering). However, the clustering mode must be enabled manually after a failure.[5]
The database supports protection against SQL injection by enforcing the use of parameterized statements. In H2, this feature is called 'disabling literals'.[6]
Since version 1.1.111, H2 in-memory database can run inside the Google App Engine.[7]
[edit] Utilities
An embedded web server with a browser based console application are included, as well as command line tools to start and stop a server, backup and restore databases, and a command line shell tool.
[edit] History
The development of the H2 database engine started in May 2004, but it was first published in December 2005. The database engine is written by Thomas Mueller. He also developed the Java database engine Hypersonic SQL.[8] In 2001, the Hypersonic SQL project was stopped, and the HSQLDB Group was formed to continue work on the Hypersonic SQL code. The name H2 stands for Hypersonic 2, however H2 does not share code with Hypersonic SQL or HSQLDB. H2 is built from scratch.[9]
[edit] See also
- List of relational database management systems
- Comparison of relational database management systems
- Apache Derby
- HSQLDB
[edit] References
- ^ "Presentation and use of H2 Database Engine". http://www.baptiste-wicht.com/2010/08/presentation-usage-h2-database-engine/.
- ^ "Jar File Download". http://repo2.maven.org/maven2/com/h2database/h2/.
- ^ "OpenLogic Exchange Package Listing". http://olex.openlogic.com/packages/h2database.
- ^ "H2 Database supports PostgreSQL ODBC driver". http://www.theserverside.com/news/thread.tss?thread_id=46456.
- ^ "H2 Clustering". http://geowebcache.org/trac/wiki/external_h2db#H2clustering.
- ^ "SQL Injections: How Not To Get Stuck". http://thecodist.com/article/sql-injections-how-not-to-get.
- ^ "H2 Database on GAE". gaevfs. http://code.google.com/p/gaevfs/wiki/H2GAE.
- ^ Hypersonic SQL project page at SourceForge
- ^ "Write Your Own Database, Again". http://thecodist.com. http://thecodist.com/article/write-your-own-database-again-an-interview-with-the-author-of-h2.
