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.

2444 questions
16
votes
5 answers

How to do "select current_timestamp" in hsqldb?

Oracle: select systimestamp from dual MySQL: select current_timestamp SQL Server: select current_timestamp PostgreSQL: select current_timestamp The question is, how can I get the current timestamp in HSQLDB? I use version 1.8.0.10
cherouvim
  • 30,497
  • 14
  • 99
  • 144
16
votes
3 answers

SQL - Add up all row-values of one column in a singletable

I've got a question regarding a SQL-select-query: The table contains several columns, one of which is an Integer-column called "size" - the task I'm trying to perform is query the table for the sum of all rows (their values), or to be more exact get…
ThE_-_BliZZarD
  • 690
  • 2
  • 12
  • 26
16
votes
3 answers

How do I test with DBUnit with plain JDBC and HSQLDB without facing a NoSuchTableException?

I am trying to use DBUnit with plain JDBC and HSQLDB, and can't quite get it to work -- even though I've used DBUnit with Hibernate earlier with great success. Here's the code: import java.sql.PreparedStatement; import…
neu242
  • 14,861
  • 13
  • 69
  • 107
16
votes
5 answers

Hibernate 4.1 with HSQLDB gives 'data exception: string data, right truncation'

I have a very strange problem, got it when I upgraded som deps to the project. I'm now using following versions: Spring: 3.1.0.RELEASE Hibernate: 4.1.7.Final Hsqldb: 2.2.8 (org.hsqldb) I THINK the problem has to do something with the file field.…
Kronis
  • 217
  • 1
  • 2
  • 9
15
votes
3 answers

How to use HSQLDB in Oracle query syntax mode?

I am trying to use HSQLDB as an embedded database in a spring application (for testing). As the target production database is Oracle, I would like to use HSQLDBs Oracle syntax mode feature. In the Spring config I use
Jan Algermissen
  • 4,752
  • 4
  • 24
  • 38
15
votes
5 answers

How to load mysql dump to hsqldb database?

I have a sql file that creates a database in mysql: SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL'; CREATE SCHEMA…
Skarab
  • 6,511
  • 11
  • 44
  • 81
15
votes
1 answer

Create a stored procedure in HSQLDB with Spring embedded databases API

I am currently trying to create a testing environment using an in-memory HSQLDB instance, created using Spring, thanks to its embedded databases support: Current set up Creation of the "data source" for my unit tests: db = new…
Marc Carré
  • 1,388
  • 12
  • 17
14
votes
2 answers

Unit test MyBatis with HSQL instead of Oracle

I would like to unit test my MyBatis persistence layer using an HSQL in-memory database. The real application uses an Oracle database. This worked fine unitl we started adding auto incremented numbers for the id columns. Oracle requires the use of a…
Luwil
  • 143
  • 1
  • 1
  • 5
13
votes
6 answers

Hibernate postgresql/hsqldb TEXT column incompatibility problem

I have a problem using Hibernate and PostgreSQL for production and HSQLDB for testing. I am using top-down approach letting Hibernate create database schema. I am also using annotations; mapping part of hibernate.cfg.xml only contains lines…
Nemanja
  • 343
  • 1
  • 3
  • 7
13
votes
8 answers

Internal HSQL database complains about privileges

I'm setting up a standalone Java service with an in-process, in-memory HSQL database. Persistence.xml
Bart van Heukelom
  • 40,403
  • 57
  • 174
  • 291
13
votes
3 answers

maven repository location for hsqldb 2.0

http://hsqldb.org/ - where is the maven repository for the latest version 2.0.0 bits
Joe
  • 12,573
  • 26
  • 77
  • 140
13
votes
1 answer

How to create table if not exists with HSQLDB

I'm using HSQLDB for persisting a small data, in my query I want to create tables at first time and if they are not exist anymore. However with HSQLDB I cannot execute the query "CREATE TABLE XYS IF NOT EXISTS" like other dbms like mysql or…
Khoi Nguyen
  • 922
  • 2
  • 12
  • 31
13
votes
3 answers

How to run a HSQLDB server in memory-only mode

In the documentation of the HSQLDB is a command line statement to start a HSQLDB server (HSQLDB Doc). But there is this "file:mydb" property, so I assume its not in memory-only mode. How do I run a memory-only HSQLDB server? I ran the following but…
Juri Glass
  • 76,369
  • 8
  • 31
  • 46
13
votes
2 answers

How do I create a specific date in HSQLDB?

I need to create a HIGH date in HSQLDB and the solution is eluding me. I need something like Date(9999-12-31 0:0:0) but I cannot find a function or whatever to do it. I am loding the date via Spring on startup and i need something like: insert…
markthegrea
  • 2,641
  • 5
  • 39
  • 59
13
votes
3 answers

Function not supported from hibernate

I'm unit testing my DAOs using spring. I am using JPA + Hibernate. For my tests i'm using the following hsqldb version: hsqldb hsqldb 1.8.0.10
Lefteris Laskaridis
  • 2,250
  • 2
  • 22
  • 38