derby

Any good Derby DB Editor?

I would like to modify some Derby DB's structure, do you know any good (multiplataform) editor for doing this? thanks! ...

How can I generically detect if a database is 'empty' from Java

Can anyone suggest a good way of detecting if a database is empty from Java (needs to support at least Microsoft SQL Server, Derby and Oracle)? By empty I mean in the state it would be if the database were freshly created with a new create database statement, though the check need not be 100% perfect if covers 99% of cases. My first th...

How do I configure a project to use latest Derby DB version (10.4)?

Every time I try to run a small application that uses a Derby DB I get this error message: Message: Database at /path/to/db/TheDB has an incompatible format with the current version of the software. The database was created by or upgraded by version 10.4. I've added the library from Netbeans, and still have the same problem. I'm n...

Delete all tables in Derby DB

How do i delete all the tables in the schema on Apache Derby DB using JDBC? ...

Kill Derby DB Network Server on background

I'm looking for a good way to run a Apache Derby server in network mode. I'm using the NetworkServerControl to start the server and it's working great. I start the server like this: /** * starts the network server * @return true if sucessfull */ public boolean start() { try { // just to be sure that we don't start tw...

Which is faster for a small amount of information, java file i/o or derby?

I'm writing a small agent in java that will play a game against other agents. I want to keep a small amount of state (probably approx. 1kb at most) around between runs of the program so that I can try to tweak the performance of the agent based upon past successes. Essentially, I will be reading a small amount of data at the beginning of...

Single database tool to access different database types?

I’d like a visual database tool that will allow me to access multiple database types from the same program. I’m looking for anything that supports Mysql, PostgreSQL, and Derby. Anything else it supports is a bonus. ...

How do you start derby in network server mode and still get an embedded connection?

I just want to know how I can start derby in network server mode and still be able to get an embedded connection? Thank you. ...

Apache Derby: how can I do "insert if not exists"?

I'm giving Apache Derby, aka JavaDB a spin. I can't seem to get around duplicate key issues when inserting records that may already exist. Is there a Derby equivalent to "insert if not exists", or "merge" ? Similarly, is there a way to do something like "drop table foo if exists"? ...

Is JDBC Connection aquiring with MySQL slower than with e.g. Derby ?

I use Tomcat C3p0 (JNDI configured inside Tomcat) MySQL(InnoDB) / Derby(not embedded) as Database EHCache (in Memory) Hibernate Testmachine runs WinXP I used Derby for development and wanted to switch to MySQL. I was surprised to see, that with MySQL my Tests were app. 50% slower than with Derby. My Testscenario : app. 2000 Selec...

Update several columns at once in Derby

DB2 supports this syntax: UPDATE DEST D SET (AAA,BBB) = ( SELECT MAX(Z.AAA), MAX(Z.BBB) FROM OTHER O WHERE O.ID = D.ID ) i.e. I can run a select which returns more than one column and copy the results into various columns of the destination table (the one to update). Derby only allows the syntax: UPDATE table-Name [[AS] correlat...

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? ...

How can I emulate UPDATE x SET (col1, col2) = ( SELECT a,b FROM y ) in Derby?

Derby doesn't support this syntax: UPDATE x SET (col1, col2, ...) = ( SELECT a,b,... FROM y ... ) (see this bug). Does anyone have a workaround other than creating a loop in Java which does the select and sends N updates back? [EDIT] Note that I have 50 columns and a complex condition (joins with x and EXISTS and whatnot). So I'dd li...

Using SQL in Java with package java.sql

Hello, during a lecture my professor gave examples of several actions involving databases and the java.sql package. These examples were supposed to be uploaded online in a pdf file, but for some reason the names of all functions and class names aren't displaying with my pdf reader. I would like to know the equilavents of the following P...

java.sql.SQLException: No suitable driver on Mac OS X Attempting to use Derby

Hello, I am getting a java.sql.SQLException: No suitable driver when I am trying to connect to a database with Java. I am on Mac OS 10.5 using the NetBeans IDE. It seems to be having trouble with the EmbeddedDriver, but I'm not sure what I am missing: public class A { Connection conn = null; public A(String URL...

how to repair Apache Derby tables

I deleted some records in tables which are interconnected with other tables with foreign keys, so somehow I succeded to delete some records which I would not be able to delete (FK constraint). Now I cannot delete records in main tables (to which FK refers). Anyway, I was trying to drop table, drop index, nothing helps. Is there any too...

JavaDB connection issues; database not found

I am having a problem with Java DB that I just don't know how to resolve. I am creating a DB and connecting to it using Java DB's native JDBC driver. If I relocate that database physically and try to connect to it using its new path, I consistently get XJ004 errors: ERROR XJ004: Database 'blahblah' not found. I am sure I am using th...

Using embedded Derby with JRuby on Rails.

Attempting to use JRuby 1.2.0 and Rails 2.3.2 with an embedded Derby database. I've copied derbytools.jar and derby.jar to $RUBY_HOME/lib, yet rake db:migrate still gives: The driver encountered an error: cannot load Java class org.apache.derby.jdbc.ClientDriver Aaaand... I played a hunch and figured it out. So, I'll post this...

SQL query to insert the available slots into a table (avail) from booked slots table.

I want a sql query to insert the available slots into a table (avail) from booked slots table. I have two tables .I have a book table with bookstarttime and bookendtime columns .these are timestamp objects.I have another table with availstarttime and availendtime.these are also timestamp columns.I have to get the available slots left be...

Derby - constraints.

In the Derby server, how can you use the information in the system tables of the schema to create a select statement in order to retrieve the constraint names for each table? ...