• Post Reply Bookmark Topic Watch Topic
  • New Topic

Simple database  RSS feed

 
Christopher Arthur
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm writing a java application that needs some simple database functionality, and I'm wondering if someone has already written and made open source something like this. What I need is way too simple to need J2EE/EJB; I'm talking about maybe 1000 records maximum with record size probably less than a few thousand bytes, and it would be great if there were already a nice little application complete with a GUI that lets me select, sort, delete, etc..., so I could just pop the frame into my application window or have it in another window.

Kindly,

Chris Arthur
 
Scott Selikoff
author
Bartender
Posts: 4093
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If its so small why not use a singleton pattern and intermittently flush to disk? It sounds like loading the entire set of data into memory is easy enough, just make sure access methods are sychronized.

You don't need EJBs to access a database at all, in fact most access in J2EE is still done with JDBC.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A nice little embeddable Java database is HSQLDB (www.hsqldb.org). You can probably adapt one of the many SQL/JDBC DB frontends to run inside of your application (while removing many of their features that you don't need).
[ December 22, 2005: Message edited by: Ulf Dittmer ]
 
Matthew Taylor
Rancher
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found it very easy to use MS Access and the ODBC bridge to store data in with Java. ... If you are using Windows, anyway.
 
Tasja Mango
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have made quite good experiences with Hybersonic/HSQL (as say above).

Alternatively, there is
http://db.apache.org/derby/
which I don't know in pratice.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you think you need a database?
 
Nik lammar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this example, is small the information you need to store to database (sourcecode Included)...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!