Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / November 2005

Tip: Looking for answers? Try searching our database.

Using MySQL for Persistence

Thread view: 
E11 - 14 Nov 2005 10:04 GMT
Hi all,

i am writing an application where i need persistence, i.e. saving and
loading of some data. One option is to define my own flat file format
and save to a file.

What i am considering, is to save to a database like MySQL, for two
reasons:
- i don't need to worry about the file format, and parsing/serializing
my data from a flat file.
- random-access is faster.

However, MySQL doesn't really fit my needs for two reasons:
- i may pass my application to friends, and i do not want to have to
bundle MySQL with it, and require them to run it in the background just
to use the application.
- MySQL is started and stopped as a service, whereas i really only need
it running when my application is running. (Of course, if i am the user
i can start and stop the service, but if i pass my application around,
i will then have to provide instructions to start the database service
before running the application, and to stop it after exiting, etc.)

Hence, what i am looking for is something that has the interface of an
SQL database, but which is relatively lighter (in terms of CPU, memory
and HDD space required), and which also can be started and stopped from
within my application.

Any suggestions? Or am i just being ridiculous and should just stick to
a flat-file?

TIA and Regards,
Edwin
Daniel Dyer - 14 Nov 2005 10:10 GMT
> Hence, what i am looking for is something that has the interface of an
> SQL database, but which is relatively lighter (in terms of CPU, memory
> and HDD space required), and which also can be started and stopped from
> within my application.

http://hsqldb.org/
http://axion.tigris.org/

Dan.

Signature

Daniel Dyer
http://www.dandyer.co.uk

Roedy Green - 14 Nov 2005 10:19 GMT
>Hence, what i am looking for is something that has the interface of an
>SQL database, but which is relatively lighter (in terms of CPU, memory
>and HDD space required), and which also can be started and stopped from
>within my application.

see http://mindprod.com/jgloss/sqlvendors.html

You might want to implement a hermit crab file structure.

See http://mindprod.com/projects/hermitcrab.html

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.