[Logo]
Forums Register Login
What's the java equivalent of database rate tables?
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
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.
Thanks, I'll have a look.
A day job? In an office? My worst nightmare! Comfort me tiny ad!
The WEB SERVICES and JAX-RS Course
https://coderanch.com/t/690789/WEB-SERVICES-JAX-RS


This thread has been viewed 690 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 21, 2018 14:10:11.