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
0
votes
1 answer

Why did HSQLDB 2.5.x drop support for `ROLLBACK ON DEADLOCK`?

I use HSQLDB 2.4 with a database setup script that contains SET DATABASE TRANSACTION ROLLBACK ON DEADLOCK TRUE After I updated to 2.5, this now fails with: error in script file line: X org.hsqldb.HsqlException: unexpected token: DEADLOCK required:…
soc
  • 27,983
  • 20
  • 111
  • 215
0
votes
1 answer

HSQLDB creating table for unit test for sqlserver

I am creating table for my sqlserver unit test using hsqldb. Here is my syntax: SET DATABASE SQL SYNTAX MSS TRUE; DROP TABLE MY_STUDIES IF EXISTS; CREATE TABLE MY_STUDIES ( STUDY_ID INT, IB_ID INT NOT NULL, STUDY_DATE DATE, CREATION_DATE…
Jonathan Hagen
  • 580
  • 1
  • 6
  • 29
0
votes
0 answers

How to encrypt HSQLDB User Password using Spring Boot

I have an Spring Boot based application and a external HSQLDB folder that contains db.data db.properties db.script My application load & connect to this db, everything is fine. The problem is, that the username and passwword are written in…
Tristate
  • 1,498
  • 2
  • 18
  • 38
0
votes
1 answer

HSQLDB inserting datetime format for SQL Server throws exception

I am trying to run unit tests for my SQL Server query. Query is simply inserting date to the table. I tried two different formats but didn't work: parameters.addValue(STUDY_DATE, getDate(studyEvent.getStudy().getStudyDate())); Timestamp timestamp =…
Jonathan Hagen
  • 580
  • 1
  • 6
  • 29
0
votes
3 answers

Is there way to set default as null for SQL parameter?

I have a code that creates sql parameters using MapSqlParameterSource. Here is my code: MapSqlParameterSource parameters = new MapSqlParameterSource() .addValue(EVENT_ID, eventId) .addValue(TYPE, type.toString()) …
Jonathan Hagen
  • 580
  • 1
  • 6
  • 29
0
votes
3 answers

SQL query to select parent and child names in one row

i have table in hsqldb and values like this How do I write a query that displays like this
0
votes
2 answers

HSQLDB update null entries with the previous not null value

How can I update the null values from all entries with the previous not null row? For example: create table users ( id int primary key, create_date date ); Actual entries id create_date 2 2018-12-03 3 NULL 4 2018-12-04 5 NULL 6 …
Valip
  • 4,440
  • 19
  • 79
  • 150
0
votes
0 answers

Foreign key array in hsqldb

I have a column of type integer array GENRE INTEGER ARRAY NOT NULL, each value of which must be a foreign key. I tried this FOREIGN KEY(SELECT * FROM GENRE) REFERENCES PUBLIC.GENRE(ID) but obviously it won't work. Help how this can be implemented in…
DKosh
  • 23
  • 4
0
votes
1 answer

How do I define a java defined stored proc to return multiple result sets?

I'm trying to define a java (written in Kotlin) method that returns multiple result sets when called as a stored procedure. Code is below. the Hsqldb website;s features page indicates that this should be possible, what am I missing? I currently get…
0
votes
1 answer

HSQDLDB throws ArrayIndexOutOfBoundsException: when encrypted DB is introduced

//java code in netbeans //Registering the HSQLDB JDBC driver and getting connection Class.forName("org.hsqldb.jdbc.JDBCDriver"); con =…
Maha Saad
  • 115
  • 10
0
votes
1 answer

Difficulty getting PK in HSQLDB

I'm using hsqldb for a unit test (NOT production). These tests need to access the table's primary key, but I cant seem to get it to work. BTW, I'm using the latest version 2.0.0 I've created a small snippet to recreate the problem. Any feedback…
qwerty
  • 3,801
  • 2
  • 28
  • 43
0
votes
2 answers

str_to_date mysql does not run in hsql

My code is performing the following update at a given time in my mysql database: " UPDATE client_registration " + " SET registration_date = NOW() " + " WHERE cycle <= str_to_date(\"" + now + "\",'%d/%m/%Y %H:%i') "; However I have a unit test…
0
votes
1 answer

Hibernate HSQL select new with nested List

I've searched for this problem and have been stuck for the past couple of days so i'm hoping you can help out. I will try to summarize the problem I run into with a basic concept because then I can just apply that to my more complex problem. I have…
0
votes
2 answers

need to access hsqldb static method but get java.sql.SQLSyntaxErrorException: user lacks privilege or object not found

I'm trying to access the deserialize static method within the hsqldb (2.5.1) InOutUtil class. When I run it, java -cp hsqldb.jar:. testcode I get: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found:…
Matt
  • 1,053
  • 4
  • 14
  • 29
0
votes
1 answer

HSQLDB MySQL compatibility is rubbish

With reference to http://hsqldb.org/doc/2.0/guide/compatibility-chapt.html#coc_compatibility_mysql, the compatibility only solves half the problem. THE CAPITALIZED RESULTSETMETADATA (COLUMN NAMES) IS A PROBLEM! This complicates testing with the…
Kok How Teh
  • 3,298
  • 6
  • 47
  • 85