Questions tagged [h2]

H2 is a relational database management system written in Java. It can be embedded in Java applications or run in the client-server mode. H2 supports regular disk-based as well as in-memory databases.

The software is available as open source software under modified versions of the Mozilla Public License or the original Eclipse Public License. The main features of H2 are:

  • Very fast, open source, JDBC API
  • Embedded and server modes; in-memory databases
  • Browser based Console application
  • Small footprint: around 2 MB jar file size

The main author of H2 is Thomas Mueller, who also developed the Java database engine Hypersonic SQL. The name H2 stands for Hypersonic 2, however H2 does not share code with Hypersonic SQL or HSQLDB.

Wiki

Issues

API

4948 questions
2
votes
1 answer

H2 Database how to keep rows un-ordered when updated

So I have a simple database with a table that has multiple column, most of which are of string type, one of which is a Boolean type. My problem occurs when I update a row changing the boolean state, the database re-organizes its self to let the…
Sammy Guergachi
  • 1,986
  • 4
  • 26
  • 52
2
votes
1 answer

I am having trouble scaling my h2 based java app that is using views

here the environment: We programmed an application for a customer that is based on the embedded h2 database, it was upgraded to the latest version before doing the tests. The database consists of 29 tables and 26 views. Of the 26 views only 8 are…
holle2de
  • 46
  • 3
2
votes
1 answer

How to configure FS database in playframework 2.0?

is it possible at all? Seems easy to be done in the first version of the framework.
Leandro
  • 1,076
  • 12
  • 21
2
votes
1 answer

which is better delete database or delete tables?

I have a database with 20 tables, sometime, i need to delete all the data of database? So, should I delete database and recreate it or just delete all tables (tables have the FKs)?
thangpt
  • 43
  • 2
  • 6
2
votes
1 answer

Merge in h2 database, how to use it?

How can I use merge with sepecify row in H2? Any answers are welcome and I appreciate I mean how to merge with the values passed from outside. Example: I wanna merge the row with name = "john" and id = "1" in table customer. what the statement in…
thangpt
  • 43
  • 2
  • 6
1
vote
2 answers

Can this SQL constraint be written more simply?

To clarify - there will be up to 4 distinct players in the table, referenced by their ids. I want to enforce this, i.e. no two ids are the same. Also, because it's up to 4 players, some may be null. Is potentially having many nulls like this a bad…
c24w
  • 7,421
  • 7
  • 39
  • 47
1
vote
5 answers

how to start from "0" an UNSIGNED AUTO_INCREMENT field?

I have the following tables : wherein idclient is unsigned auto_increment. code of the Client entity: import java.io.Serializable; import java.util.List; import javax.persistence.*; import javax.xml.bind.annotation.XmlRootElement; import…
Marwen Trabelsi
  • 4,167
  • 8
  • 39
  • 80
1
vote
1 answer

How to skip the column header in the output csv file when using CSVWRITE in h2?

I am migrating to h2. And I have a problem when exporting data to csv files. Due to all the csv files should be without column header. But h2 CSVWrite function will add the column header in the csv file. Is that possible to add one csvoption to…
Clark Bao
  • 1,743
  • 3
  • 21
  • 39
1
vote
1 answer

Unlimited String in JDO @ DataNucleus? (H2 DB)

I need to store a pretty much unlimited String (document) and I won't be able to determine it's length. I know there is CLOB, but I couldn't find it's implementation in JDO, just JPA. I tried that: @Column(jdbcType="CLOB") private String contents =…
Paul
  • 389
  • 3
  • 11
1
vote
1 answer

ClassNotFoundException with Netbeans and H2 Database

So I followed the tutorial on the H2 Documentation page and used the "Connecting to a Database using JDBC" method of connecting to the database. I First added the h2-*.jar file to the Lib Folder (through Netbeans) and used the following to make the…
Sammy Guergachi
  • 1,986
  • 4
  • 26
  • 52
1
vote
1 answer

Fuzzy Matching in H2 Database?

I was just wondering if there was a simple way to implement Fuzzy matching of strings using the H2 Database. I have in the database a list of names and I want to be able to search through them using 3 characters that may be found anywere in the…
Sammy Guergachi
  • 1,986
  • 4
  • 26
  • 52
1
vote
1 answer

Syntax error in H2

Our application uses H2Sharp to access a H2 database from C# (Framework v4). Recently we bumped into the following issue: The following code H2DataAdapter adapter; DataTable table; //initialize values H2Command updateCommand = new H2Command("UPDATE…
alokoko
  • 1,405
  • 4
  • 21
  • 35
1
vote
2 answers

H2 database org.h2.Driver ClassNotFoundException

I try to run JUNIT test with eclipse and ANT they both are complainen that org.h2.Driver class is not found. I have h2-1.3.164.jar in my classpath and for proof about it here is classpath from system property java.class.path c:\trasferer\build; …
Timii
  • 234
  • 4
  • 11
1
vote
1 answer

concurrency with h2 database

I have a table xxx with id (id_xxx int AUTO_INCREMENT ) and name (name_xxx varchar (50)), When I insert a new row in the table I made​​: INSERT INTO xxx VALUES ​​("name for test"); and the result (int=1) of insertion is returned, then I display in…
Marwen Trabelsi
  • 4,167
  • 8
  • 39
  • 80
1
vote
1 answer

H2 database - concurrent connections strategy

I have several identical applications running independently. Each read a row from the database (based on some criteria), perform a series of operations and finally updating that row. Therefore I want to make sure that a row started to be processed…
fv2005
  • 29
  • 2
1 2 3
99
100