Standalone database app?

Hey Everyone!!

Is there anything in Java's API, that I can use to develop a standalone database? I can connect to MSAccess and MySQL via JDBC.... but I want to develop a standalone application that has it's own database, rather than making sure every system this is installed on has some version of MySQL.

Is there, maybe, a way to embed MySQL into the java application? Or, should I just have to use arrays? The application will be using a fully-functional, relational database, but I want a single install. Does this make any sense? Any ideas?

Thanks everyone!!

Aaron

[625 byte] By [ajpaxson] at [2007-9-26 1:53:33]
# 1

I think you can use Access, get the ODBCJT32.DLL (the JET32 ODBC driver),I think thats all you need to install access to .mdb over odbc. then you should be able to create a system datasource/file datasource by extracting your datasource from the system registry, and running it onto the registry of the computer being setup.

then on the other hand you might want to write your own datastructure, that reads all data into memmory from a text file when the program starts, and saves it again when the program ends. It can be easy to implement a datastructure with a search and sort functionality for simple data. I would do it this way if the database was "very" simple. It can be very fast but, if the electricity goes of, you re in trouble (no transactions).

just dependes on what you want to do.

hope it helps

-r

ReynirH at 2007-6-29 3:04:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
You might want to look at this. http://www.lutris.com/products/projects/instantDB/index.htmlThere is at least one other pure java database too.
jschell at 2007-6-29 3:04:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

Awesome, Jschell!! That is just what I'm looking for! Do you know of any open-source java databases, though? InstantDB is JUST WHAT I NEED, but they don't give licensing costs on the web site. Which tells me.... hmmm... probably pretty expensive. But I won't know, until I email their sales department.

But, I can still download their evaluation database. I would just hate to learn their database, and then, not be able to implement it, because of licensing. But, there are probably not any Open-source db's.

>>ReynirH

Thanks! But, unfortunately, my database will be pretty complex... and be a fully relational database. So the text file wouldn't be of much use. Also... in creating an ODBC and Datasource names, pretty much excludes all OS's but Microsoft... and I'm wanting this to be portable. Or is there a way around this?

ajpaxson at 2007-6-29 3:04:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4
I guess you should not use an Access database if you're going to do an OS independant application. I would recomend InstantDB, once there was Hypersoniq SQL, I think they?ve stopped devleloping that one... check http://sourceforge.net/projects/hsql/-r
ReynirH at 2007-6-29 3:04:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5
I apologize ReynirH. I guess that was a bit misleading. I was merely mentioning that I can connect to those databases, so no one can say, "Why don't you just connect to a Access database?". <grin>I'll check it out! Thanks!
ajpaxson at 2007-6-29 3:04:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 6

Awesome, ReynirH! Although, you are correct, that SourceForge did stop Developement on HypersonicSQL, they have started a new project in March of this year for HSQLdb. The URL is http://www.hsqldb.org for the product, and the project info is available at, http://www.sourceforge.net/projects/hsqldb/

Thanks everyone! I'm going to check these two DB's out!

Aaron

ajpaxson at 2007-6-29 3:04:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 7
I think these two and probably most embedded databases are standalone as opposed to 100% embedded. I tried hypersql and the engine is embeddable but the database files are kept separately. does anyone know of a 100% java 100% embeddable database
gpathman1 at 2007-6-29 3:04:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 8

> I think these two and probably most embedded databases

> are standalone as opposed to 100% embedded. I tried

> hypersql and the engine is embeddable but the database

> files are kept separately. does anyone know of a 100%

> java 100% embeddable database

That is non-sensical.

When you persist something you must write it to a file.

If you don't want to write anything, then just use a properties file which you can put in your jar file.

jschell at 2007-6-29 3:04:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 9

> I think these two and probably most embedded databases

> are standalone as opposed to 100% embedded. I tried

> hypersql and the engine is embeddable but the database

> files are kept separately. does anyone know of a 100%

> java 100% embeddable database

hsqldb offers an in-memory mode where nothing is written to disk. But as jschell said: what use is a database if you don't save your data :-)

Thomas

thomas.kellerer at 2007-6-29 3:04:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 10

I think my point was misunderstood. what i meant was to write to the database but the files ( or whatever it is being written to ) should be inside the application itself rather than outside. for example ms access has just one file ( the mdb file) but that file contains the interface has well. although i guess in this case the application is msaccess and the file is the mdb file. but i wanted something where everything is in the one executable file ( the ar file) hope this makes sense

gpathman1 at 2007-6-29 3:04:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 11

> for example ms

> access has just one file ( the mdb file) but that file

> contains the interface has well.

No it doesn't. All that is in there is data. To access it you need to use MS Access (the application) or the ODBC driver. Both of those are seperate files.

jschell at 2007-6-29 3:04:49 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 12
Will Cloudscape work (I believe IBM purchased it from Informix so it is no longer free, but shouldn't cost too much)? I believe they are claiming you can embed it and the whole thing is 2 MB (plus data).
blacklynx at 2007-6-29 3:04:50 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...