Questions tagged [hsqldb]

HSQLDB (HyperSQL Database) is a relational database management system. It is written in Java.

HSQLDB (HyperSQL Database) is a relational database management system.

HSQLDB can be used inside Java application processes to serve local databases. HSQLDB also includes a database server, which allows access over the network.

Each HSQLDB instance can serve multiple databases. Each database can contain multiple schemas. The databases can be all-in-memory (mem: url) or persisted to disk (file: url). Persisted databases can use a mix of tables that are always kept in memory (MEMORY tables) and tables that are only cached in memory (CACHED tables) which can grow to many gigabytes and beyond the available memory.

HSQLDB is extremely fast, especially when used in memory, or when the database is relatively small.

HSQLDB supports a very extensive subset of the ISO Standard SQL:2011. It also features SQL syntax compatibility modes which simplify porting applications written for another database engine.

HSQLDB supports user-defined stored procedures, functions, aggregate functions, and triggers. These can be written in Java or in SQL procedural language (PSM). It also features an extensive list of built-in functions.

HSQLDB is fully multi threaded. It can operate in three different transaction models: the Two Phased Lock model (TPL), the Multiversion Concurrency Control Model (MVCC) and a mixed, pessimistic multiversion model with snapshot isolation. In each model, a transaction can run in read committed or serializable isolation levels.

HSQLDB has been around since 2001 and is supported by many Java frameworks and tools.

2521 questions
11
votes
3 answers

How can I start and keep running hsqldb in server mode from within my web application?

I don't want to use it in embedded mode as I may allow other external applications to access it as well. And I want to execute the startup of the server at the same time as Tomcat loads my application (or just when tomcat runs for that matter). …
Ravish Bhagdev
  • 955
  • 1
  • 13
  • 27
11
votes
11 answers

Storing arrays in databases

What is the most efficient way to store large arrays (10000x100) in a database, say, hsqldb? I need to do this for a certain math program that I'm writing in java. Please help. The whole array will be retrieved and stored often (not so much…
Anand
  • 7,654
  • 9
  • 46
  • 60
11
votes
2 answers

Junit with HSQL/H2 without Spring/Hibernate

I am trying to use H2 or HSQL for my unit testing. But my application is not of spring and hibernate. It seems most of the references are there only with spring and hibernate for HSQL/H2 in memory db for unit testing. Can someone point to a right…
Sripaul
  • 2,227
  • 9
  • 36
  • 60
10
votes
3 answers

How can I see table structure in HSQLDB?

How can I see the structure (details of the columns etc) of a table in HSQLDB? It is not "desc" like Oracle, so what?
Yasin Okumuş
  • 2,299
  • 7
  • 31
  • 62
10
votes
2 answers

Has HSQLDB some mechanism to save in-memory data to file?

Has HSQLDB some mechanism for saving in-memory data to file? As I know after the server is shutted down, all in-memory data become unaccessible. So I want to save all in-memory data to file. Unfortunately I can't use BACKUP mechanism, because it…
user850155
  • 101
  • 1
  • 1
  • 4
10
votes
1 answer

Property not mapped by JPA to column in DB

I have property in my JPA model which is not mapped to any column in the database. Because of this, the compiler says "column abc cannot be resolved". Is there any annotation to say that the property is no longer mapped to any DB column, its just…
Satya
  • 2,094
  • 6
  • 37
  • 60
10
votes
2 answers

Hibernate @generatedvalue for HSQLDB

I have the following definition for an id field in an entity that is mapped to a table in HSQLDB. ... @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name = "ID") private Integer id; ... But this does not seem to generate the an unique…
calvinkrishy
  • 3,798
  • 8
  • 30
  • 45
10
votes
1 answer

Check if ResultSet is empty in Java

I am using HSQLDB in my program. I want to check if my Result Set is empty or not. //check if empty first if(results.next() == false){ System.out.println("empty"); } //display results while (results.next()) { String data =…
Max Pain
  • 1,217
  • 7
  • 19
  • 33
10
votes
5 answers

Storing UUID in HSQLDB database

I wish to store UUIDs created using java.util.UUID in a HSQLDB database. The obvious option is to simply store them as strings (in the code they will probably just be treated as such), i.e. varchar(36). What other options should I consider for this,…
William
  • 13,332
  • 13
  • 60
  • 73
10
votes
1 answer

HSQLDB object name already exists

I'm trying to set up an HSQL database for testing, using version 2.2.9, Hibernate 3.6.9, and Spring 3.1.2. We had been using a local postgresql database but are making a switch for testing. I have 40-50 test classes with 200+ tests in total. Each…
Mike Desmarais
  • 101
  • 1
  • 1
  • 6
10
votes
3 answers

HSQLDB SQLException: Out of memory establishing database connection

We have a desktop application with a local HSQLDB database. Some customers have reported their application stops working. When I try to open it with DbVisualizer I can see this on debug console: 12:45:32 [DEBUG pool-2-thread-1 D.?] RootConnection: …
Daniel Albert
  • 757
  • 5
  • 22
9
votes
5 answers

HSQL org.hsqldb.HsqlException: invalid schema name

I am using HSQL to run a number of unit tests on my java application. I am using Spring + Hibernate. I am having a problem when switching from MySQL to HSQL. The tests run perfectly on MySQL but whenever I change to HSQL I get the following…
Kros
  • 848
  • 1
  • 10
  • 24
9
votes
2 answers

Startup script to create a schema in HSQLDB

I am attempting to use an in-memory database to mock out a teradata database. I need to create a schema before the tables are built, however, it is giving me fits. I am using Spring and have lots of database interaction with import.sql, however,…
markthegrea
  • 3,731
  • 7
  • 55
  • 78
9
votes
2 answers

How to configure HSQLDB 2.2.5 in Maven POM?

I am unable to find HSQLDB-2.2.5 POM at http://repo1.maven.org/maven2/org/hsqldb/hsqldb. Can anyone help how maven POM can be set to work with HSALDB-2.2.5 version?
mavenstudent
  • 91
  • 1
  • 1
  • 2
9
votes
1 answer

Cascade Type.ALL not working

I have set CascadeType.ALL in my entity relation, but it works partially whenevr I persist an entity. Ex : ` Member entity : @OneToMany(mappedBy="member", cascade={CascadeType.ALL}) private List contactInfos; and ContactInfo entity…
Satya
  • 2,094
  • 6
  • 37
  • 60