db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil <ph...@vodafone.ie>
Subject Re: How to approach Derby embedded?
Date Mon, 05 Mar 2012 14:16:29 GMT

Apart from adding the derby jars to your classpath, that's kind of it
for derby configuration and I can't imagine any solution that doesn't
involve adding something to your classpath. There shouldn't be any
"hooey", a derby database is just a folder with some files in it that
can be easily relocated if necessary. In embedded mode, you can connect
to your DB with a URL similar to the following:

jdbc:derby:C:\mystuff\myapp\mydatabase

or possibly better in your case:

jdbc:derby:C:\mystuff\myapp\mydatabase;create=true

In the latter case, if there is no database at that location, a new
blank one will be created for you. By default, you can use the username
"SA" and password "SA" so there's no need to set up users or permissions
and because it's in embedded mode, there's no network service to worry
about. 

Phil




On Sat, Mar 3, 2012, at 16:51, Kenneth McDonald wrote:
> I need a very simple (even SQL is more than what I need) embedded
> database for some persistent stores. Derby seems like it would be ideal,
> except that even configuring seems to require more than what I need. In
> particular, I'm seeing in the docs that I need to edit my class path
> (which I shouldn't need to do for my purposes), that I may need to set up
> more complex configurations (than I need for my purposes), etc. etc. Can
> this be simplified?
> 
> More specifically; I have Derby downloaded and installed via Maven
> (actually via SBT in Scala). I want to run it as a purely embedded jar,
> to provide persistent store and dirt-simple queries. I don't want to
> worry about shell variables, CLIs, or any similar hooey--just the
> simplest possible SQL to store/access my data. Can I do this with Derby?
> 
> My comparison point is bdb the way bdb was under Python several versions
> ago--not the way bdb has become more recently. Can I achieve a similar
> level of simplicity?
> 
> Thanks,
> Ken

Mime
View raw message