my dog learned polymorphism*
The moose likes JDBC and the fly likes How to store data in an application which will be distributed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to store data in an application which will be distributed" Watch "How to store data in an application which will be distributed" New topic
Author

How to store data in an application which will be distributed

Shashank Agarwal
Ranch Hand

Joined: May 20, 2004
Posts: 105
I'm building a small lab-notebook desktop application in Java, which will be distributed to some of my friends. I was wondering how the data should be stored. The data is basically a table with multiple columns and rows, which could be sorted by different columns, searched over, edited, deleted etc. SQL would be awesome here, so I thought of using MySQL, but then that would require all users to have MySQL installed on their computers, but I'm trying to avoid asking them to install anything extra. I was looking at Java DB, but didn't know if that would also have to be installed on user computers or not.

I even considered using csv or xml to store the data, but that would just be a pain to use because of all the editing, deleting, searching involved. Would appreciate any help.
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1753
    
    7

You could use a lightweight in-memory database that supports SQL like Java DB / Apache Derby or HSQLDB.


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38007
    
  22
That sounds a good idea, Jelle Klap, but this looks like a thread which would sit better on our JDBC forum. Moving.
Shashank Agarwal
Ranch Hand

Joined: May 20, 2004
Posts: 105
Thanks for the replies. Java DB sounds good. Would it have to be installed on user computer?
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
No, you can just package it in your JAR. The client just need a JVM as usual.
Shashank Agarwal
Ranch Hand

Joined: May 20, 2004
Posts: 105
Great. That's what I wanted. Using Apache Derby.
 
wood burning stoves
 
subject: How to store data in an application which will be distributed
 
Similar Threads
question on servlet contexts
Optimizing a database
mysql enum to java string
mysql enum to java string
Storing SAX Parser data into MySql