This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What's the java equivalent of database rate tables?

 
Lesley McKnight
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm very much a beginner! I am a developer familiar with using database tables to store rates. The rate lookup depends on a number of variables. How would you do a similar sort of thing in Java? I'm just doing a startup java vourse and so far the only thing I can think of to do is to use a Hashtable with a combined key (of the variables I would use in the Oracle SQL) for the lookup. Am I completely on the wrong track here? I'd appreciate some advice. Thanks
 
eammon bannon
Ranch Hand
Posts: 140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose you could do this - a Hashtable is a collection which can be used to store data, specifically key:value pairs (kind of like a DB table with 2 fields). However, there is one huge difference - using a DB will persist the data, putting the data in a Hashtable will not. So your java application stops, your data is lost.
If you need a way to do database operations in Java, have a look at JDBC on the Sun site.
 
Lesley McKnight
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I'll have a look.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic