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
28
votes
7 answers

HsqlException: data exception

I am using hsqldb version 2.2.5 in my application sometimes I am getting org.hsqldb.HsqlException: data exception: string data, right truncation. So I want to know what are the possible reasons for that. I am not inserting any data like…
Anil
  • 1,380
  • 4
  • 23
  • 35
26
votes
3 answers

Experience using Derby or HSQL in production mode

Anyone ever tried to use Derby or HSQLDB in a production environment? Any good, bad or ugly experiences?
tellme
  • 871
  • 5
  • 18
  • 23
25
votes
4 answers

TEXT field that is compatible in mysql and hsqldb

I have an application that uses a mysql database but I would like to run the unit tests for the application in a hsqldb in-memory database. The problem is that some of my persistable model objects have fields which I have annotated as…
Clinton Bosch
  • 2,377
  • 3
  • 29
  • 43
25
votes
6 answers

HSQLDB and Hibernate/JPA - not persisting to disk?

Something of an novice with HSQL and Hibernate... em.getTransaction().begin(); for (Activity theActivity : activities) { em.persist(theActivity); } em.getTransaction().commit(); em.close(); followed by... EntityManager em =…
HenryR
  • 7,261
  • 6
  • 31
  • 38
24
votes
8 answers

Database lock acquisition failure and hsqldb

I was trying to connect to a hsql db. I created one by running from C:\myhsql: java -cp .;C:\hsql\lib\hsqldb.jar org.hsqldb.Server -database.0 file:db\mydb -dbname.0 MYDB This created mydb in a directory called db. This folder now has a…
markjason72
  • 1,523
  • 8
  • 24
  • 46
23
votes
1 answer

Using HSQL in-memory database as JPA datasource

I have an in-memory data source: java.sql.Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:testdb", "sa", ""); emf = Persistence.createEntityManagerFactory("manager"); But now I'm stuck. I want to use it as a JPA data source…
Bart van Heukelom
  • 40,403
  • 57
  • 174
  • 291
22
votes
8 answers

Am I crazy? Switching an established product from HSQLDB to Apache Derby

I have an established software product that uses HSQLDB as its internal settings database. Customer projects are stored in this database. Over the years, HSQLDB has served us reasonably well, but it has some stability/corruption issues that we've…
CarlG
  • 1,606
  • 16
  • 20
22
votes
4 answers

Difference between In memory databases and disk memory database

Recently i heard about the concept of In memory database. In any type of database we are finally storing the data in the computer,from there our program will get the data .How in memory database operations are fast when compared to the others. Will…
PSR
  • 36,137
  • 33
  • 104
  • 147
21
votes
1 answer

File based h2 persisted but not loaded in Spring Boot

I made a small application based on Spring Boot: spring-boot-starter-web spring-boot-starter-data-jpa The application has simply one domain class Post.java. Accordingly there is a RestController and a DAO. The data is supposed to be persisted in a…
Phil
  • 548
  • 2
  • 5
  • 15
21
votes
3 answers

is there a standard way to define a JDBC Datasource for Java EE containers?

I know that for JBoss you need a [name]-ds.xml file in the /deploy subdirectory of the appropriate instance. i dont have any experience with other Java EE containers, but im trying to stick to standards as much as possible. is there a standard way…
radai
  • 22,610
  • 8
  • 59
  • 108
20
votes
3 answers

"correct" way to select next sequence value in HSQLDB 2.0.0-rc8

suppose i have a sequence, called TEST_SEQ what would be the correct way of selecting its next value ? this does not work: select next value for TEST_SEQ probably because it expects a "FROM" clause. looking at HSQLDialect.getSequenceNextValString()…
radai
  • 22,610
  • 8
  • 59
  • 108
20
votes
15 answers

Cause of No suitable driver found for

I'm trying to unit test (JUnit) a DAO i've created. I'm using Spring as my framework, my DAO (JdbcPackageDAO) extends SimpleJdbcDaoSupport. The testing class (JdbcPackageDAOTest) extends AbstractTransactionalDataSourceSpringContextTests. I've…
IaCoder
  • 10,849
  • 10
  • 33
  • 45
19
votes
3 answers

Using Spring JdbcTemplate to extract one string

Can't seem to find a way to get one string from table using JdbcTemplate query. This is the table my sql returns: ID | STREET_NAME ------------------------ 1 | Elm street Now how am I supposed to get the value of STREET_NAME. SQL always returns…
lkallas
  • 1,110
  • 4
  • 19
  • 34
17
votes
5 answers

What is the best way to launch HSQLDB for unit testing, when working with spring, maven and hibernate?

In my project I can successfully test database code. I'm using Spring, Hibernate, HSQLDB, JUnit and Maven. The catch is that currently I have to launch HSQLDB manually prior to running the tests. What is the best way to automate the launching of…
tom eustace
  • 1,201
  • 2
  • 13
  • 20
17
votes
5 answers

Spring/Hibernate/Junit example of testing DAO against HSQLDB

I'm working on trying to implement a JUnit test to check the functionality of a DAO. (The DAO will create/read a basic object/table relationship). The trouble I'm having is the persistence of the DAO (for the non-test code) is being completed…
Ryan P.
  • 845
  • 2
  • 14
  • 20