hsqldb

How to see all the tables in an HSQLDB database?

﹥>﹥吖頭↗ 提交于 2019-11-27 03:54:02
I usually use SQLDeveloper to browse the database, but I couldn't make it work with HSQLDB and I don't know which tables are already created… I guess it's a vendor-specific question and not plain SQL, but the point is: how can I see the tables so I can drop/alter them? Steve Weet The ANSI SQL92 standard for querying database metadata is contained within the INFORMATION_SCHEMA data structures. I have no idea whether your database supports this or not, but try the following: SELECT * FROM INFORMATION_SCHEMA.TABLES On further research, it appears that HSQLDB does support INFORMATION_SCHEMA , but

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

痴心易碎 提交于 2019-11-27 03:51:20
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 to define a JDBC datasource and deploy it ? if possible i'd like to include my datasource inside the *.ear file (for instance, an embedded in-memory HSQLDB datasource for demo purposes) ? if there is no standard way, will other containers at least accept the jboss way ? (/deploy/*-ds.xml) Arjan Tijms Is there a standard way to define a JDBC

How to use HSQLDB in Oracle query syntax mode?

℡╲_俬逩灬. 提交于 2019-11-27 03:51:19
问题 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 <jdbc:embedded-database type="HSQL" id="dataSource"> </jdbc:embedded-database> <jdbc:initialize-database data-source="dataSource" enabled="true"> <jdbc:script location="classpath:schema.sql"/> </jdbc:initialize-database> And in schema.sql at the top I wrote: SET DATABASE SQL

“Found: bit, expected: boolean” after Hibernate 4 upgrade

可紊 提交于 2019-11-27 01:15:45
问题 I'm trying to upgrade from Hibernate 3.6.5 to 4.0 (and from Spring 3.0.5 to 3.1 which is required for Hibernate 4 support). Now, with both MySQL and HSQL, I'm running into this problem with persistent boolean fields: Caused by: org.hibernate.HibernateException: Wrong column type in PUBLIC.PUBLIC.EVENT for column Checked. Found: bit, expected: boolean at org.hibernate.mapping.Table.validateColumns(Table.java:282) at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1268) at org

EntityManager does not write to database

我们两清 提交于 2019-11-26 21:24:13
问题 i just set up a so far still quite minimal project maven/jpa/hibernate project, where i am trying to persist an object. My class is a quite simple one: @Entity public class Person { @Id @GeneratedValue private int id; private String name; } My persistence.xml is very basic as well: <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence

Unsuccessful: alter table XXX drop constraint YYY in Hibernate/JPA/HSQLDB standalone

為{幸葍}努か 提交于 2019-11-26 19:02:28
问题 I am trying to run some Hibernate/JPA examples using an in-memory HSQL DB. The error message I get is the following: 13:54:21,427 ERROR SchemaExport:425 - HHH000389: Unsuccessful: alter table ReferringItem_map drop constraint FK5D4A98E0361647B8 13:54:21,427 ERROR SchemaExport:426 - user lacks privilege or object not found: PUBLIC.REFERRINGITEM_MAP 13:54:21,427 ERROR SchemaExport:425 - HHH000389: Unsuccessful: alter table ReferringItem_myCollection drop constraint FK75BA3266361647B8 13:54:21

View content of H2 or HSQLDB in-memory database

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 18:49:22
问题 Is there a way to browse the content of an H2 or an HSQLDB in-memory database for viewing? For example, during a debugging session with Hibernate in order to check when the flush is executed; or to make sure the script that instantiates the DB gives the expected result. Does it exist an addon or a library that you can embed with your code in order to allow this? Please, mention which one you're talking about (H2 or HSQLDB) in case you have an answer specific to one of them. 回答1: You can run

Huge performance difference when using group by vs distinct

眉间皱痕 提交于 2019-11-26 18:31:02
I am performing some tests on a HSQLDB server with a table containing 500 000 entries. The table has no indices. There are 5000 distinct business keys. I need a list of them. Naturally I started with a DISTINCT query: SELECT DISTINCT business_key FROM memory WHERE concept <> 'case' or attrib <> 'status' or value <> 'closed' It takes around 90 seconds!!! Then I tried using GROUP BY : SELECT business_key FROM memory WHERE concept <> 'case' or attrib <> 'status' or value <> 'closed' GROUP BY business_key And it takes 1 second!!! Trying to figure out the difference I ran EXLAIN PLAN FOR but it

How to see all the tables in an HSQLDB database?

两盒软妹~` 提交于 2019-11-26 12:42:06
问题 I usually use SQLDeveloper to browse the database, but I couldn\'t make it work with HSQLDB and I don\'t know which tables are already created… I guess it\'s a vendor-specific question and not plain SQL, but the point is: how can I see the tables so I can drop/alter them? 回答1: The ANSI SQL92 standard for querying database metadata is contained within the INFORMATION_SCHEMA data structures. I have no idea whether your database supports this or not, but try the following: SELECT * FROM

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

核能气质少年 提交于 2019-11-26 10:55:45
问题 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 to define a JDBC datasource and deploy it ? if possible i\'d like to include my datasource inside the *.ear file (for instance, an embedded in-memory HSQLDB datasource for demo purposes) ? if there is no standard way, will other containers at least