• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Simple database

 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 4342
40
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Rancher
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you think you need a database?
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this example, is small the information you need to store to database (sourcecode Included)...
 
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic