• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

best data structure?

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
What's the best data structure to store and retrieve data in the form of record, to and from disk, respectively? This should also let one search the record based on criteria from a record field. I was thinking of RandomAccessFile but just wondering if there are newer alternatives. In term of performance, does it matter if I try something like retrieving the record in saved File object , then put the fields into an array, then use Arrays to binarySearch? Also, how is this compared to Linklist or Tree? Is it true that if one has jdbc connection, this can easily be done in the backend? Thank you.
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would stronngly recommend that you investigate JDBC for this sort of job. Not only will you get a more flexible and robust system, but you will also learn some very useful skills.
For small projects, have a look at some of the pure-java databases. Installation is usually just a matter of adding a jar or two to your classpath and maybe tweaking an ini file, and you get full JDBC support.
I recommend InstantDB and HypersonicSQL as good places to start (any search engine should find them for you).
 
tom nugent
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, Frank
reply
    Bookmark Topic Watch Topic
  • New Topic