hsqldb

Starting processes at same time is slower than staggering; why?

I'm evaluating the performance of an experimental system setup on an 8-core machine with 16GB RAM. I have two main-memory Java RDBMSs (hsqldb) running, and against each of these I run a TPCC client (derived from jTPCC/BenchmarkSQL). I have scripts to launch things, so e.g. the hsqldb instances are started with: ./hsqld.bash 0 & ./hsqld...

What is the most easy way to get ddl sql-script from HSQLDB?

In other words, how to export sql-script for building database and putting data into it from HSQLDB? ...

How to use Oracle SQLdeveloper with HSQL / Hypersonic DB's JDBC driver

I'd like to use Oracle's SQLdeveloper to visualize my HSQLDB tables. An instruction on how to use it with MySQL can be found on http://blogs.techrepublic.com.com/programming-and-development/?p=564 ... and I know that Oracle points to a location where to download all JDBC drivers. With MySQL this worked, however, including the JAR file ...

HSQLDB how to manually insert records

Hey, My question is how can I manually add records to hsqldb database. I mean using command line or some client. I know I can use hsqldb manager but I cannot execute any query with it. It says that there is no table of specified name. What might be the problem? ...

HSQL, In-memory databases, Java and PHP question

I'm investigating options to create a database cache using HSQLDB in an in-memory mode. The idea is that the cache will be queried from a PHP application and the query will be passed to a Java application that runs the HSQLDB database. Now, I've been thinking this through and I can't see any efficient way to pass the data from Java bac...

DDD Sample Application - Where's the hsqldb?

I downloaded the DDD Sample Application (based on book by Eric Evans) and it uses a hsqldb. However, I can't seem to find how this db is set up. I opened the project in Intellij and everything builds like a charm. But nowhere do I find such a hsqldb... I'm not an experienced Java developer, so I'm probably missing something. Anyone that ...

Problem using HSQLDB Transfer Tool with MySQL

Hi, I am trying to use the HSQLDB transfer tool to migrate a Database from MySQL. The tool is able to get the tables from the source MySQL database, however when I "start the transfer" I get the error,as follows and tables are not created in the target HSQLDB database. org.hsqldb.util.DataAccessPointException: Unexpected token: PRIMARY...

In-memory database close()

In an in-memory database, is it necessary to close ResultSets, Statements and Connections? My Java program uses HSQLDB to create a "memory table" and populate it with data, which it later queries. There is no persistence. Everything is done in memory. The program is single-threaded and only has one database connection (i.e. no database...

Running a script to create tables with HSQLDB

Hi all, I use hsqldb to run my unit tests that need a database access. For the moment, when I want to create a table for a specific test, I have the following code: private void createTable() { PreparedStatement ps; try { ps = getConnection().prepareStatement("CREATE TABLE T_DATE (ID NUMERIC PRIMARY KEY, DATEID TIMESTA...

SimpleJdbcTestUtils.executeScript and multilines script

Hi, I want to load SQL script files for my unit tests. As I am using Spring 2.5.2, I decided to use the SimpleJdbcTestUtils.executeScript() method to load my script file, using the following code: DriverManagerDataSource dataSource = ... // getting my DataSource defined in my Spring context SimpleJdbcTemplate template = new SimpleJdbcT...

Is is safe to use HSQLDB for production? (JBoss AS5.1)

The JBoss developers warn against the use of HSQLDB as a persistent storage (see JBoss wiki). I am confused though, because HSQLDB appears to be used heavily in production. Especially, the above mentioned page seems to warn against the use of HSQLDB entirely and not against the use in conjunction with JBoss. Is it still not recommendab...

How do I get name of the target table and column of foreign key column with plain JDBC

I'm trying to make a piece of code using plain JDBC that fetches me the name of both target table and column of a foreign key of a specific column in specific table but going through the core interfaces I can't seem to find a direct way to do this. Is there a way to get such information about foreign keys through JDBC directly or do I h...

"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() in hibernate i see this: "select next value for " + sequenceName + " from dual_" + sequ...

Conditional insert as a single database transaction in HSQLDB 1.8?

I'm using a particular database table like a "Set" data structure, i.e., you can attempt to insert the same row several times, but it will only contain one instance. The primary key is a natural key. For example, I want the following series of operations to work fine, and result in only one row for Oklahoma: insert into states_visited...

Ant Build faling with correct class path and database properties.

Buildfile: C:\MyJava\workspace\springapp\build.xml build: buildtests: dropTables: [echo] DROP TABLES USING: org.hsqldb.jdbcDriver jdbc:hsqldb:hsql//localhost [sql] Executing commands [sql] 1 of 1 SQL statements executed successfully createTables: [echo] CREATE TABLES USING: org.hsqldb.jdbcDriver jdbc:hsqldb:hsql//lo...

How to combine two result sets from one table sorted independently using one SQL query?

This is a simplified task which I have to solve in real project. In this project data is stored in HSQLDB. Data is accessed using JDBC. I have one table: name | flag ----------- aa | 1 bb | 0 cc | 1 dd | 0 ee | 1 ff | 0 I need to compose query to get the following table: name | flag ----------- aa | 1 cc | 1 ee | 1...

Invalid SQL while Embedding HSQLDB into a Rails App

I am working on porting a Rails app to JRuby and HSQLDB. My goal is to embed a database and the site within a single JAR file for deployment at customer sites. I have the site working quite well from the JAR, with a few notable problems. When I do the following with a pretty mundane ActiveRecord model: @total = SessionLog.count(:id) ...

Inspect Hsqldb Schema

Is it possible to inspect and subsequently modify an existing schema in Hsqldb standalone mode? I've tried looking at the file using the built in admin tool as well as hooking up SQuirrel SQL Client. I'm particularly interested in what primary keys exist on various tables. Is there command equivalent to MySql's 'show create table...' ...

HSQLDB Constraint Violation & SQL Query Log for an HSQLDB in-memory setup

We have a setup where we are using an embedded HSQLDB for backing Hibernate/JPA unit tests in java, and we are using the in-memory database mode since we simply want the database thrown away after the test run. My problem is that one of the tests is failing due to a constraint violation and HSQLDB lists the column as SYS_CT_286, and the ...

Atomic INSERT/SELECT in HSQLDB

Hello, I have the following hsqldb table, in which I map UUIDs to auto incremented IDs: SHORT_ID (BIG INT, PK, auto incremented) | UUID (VARCHAR, unique) Create command: CREATE TABLE mytable (SHORT_ID BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, UUID VARCHAR(36) UNIQUE) In order to add new pairs concurrently, I want to use t...