Re: lookup by EnumSet
On 02/28/2012 07:27 AM, Leif Roar Moldskred wrote:
Roedy Green<see_website@mindprod.com.invalid> wrote:
I wondered how you would do it.
I would put the data in a database and use SQL for the
queries. Proven, and even more importantly, commonly understood
technology that pretty much any Tom, Dick or Harry could maintain.
If, for some reason, I actually had to implement the functionality in
Java, my approach would vary depending on how complex the queries
would be allowed to be.
And you can use Derby or some other extremely low-footprint, even
runs-in-memory database. There are also key-value store frameworks that might
do what Mr. Green wants.
I do think many of his attributes are not binary. "Fat"? How fat is fat? Isn't
"average" a third state between "fat" and "thin"? Rubens's "average" would be
the Paris runways' "fat" - how would you classify a woman who wears a size 7?
5? 9?
Classification, especially fuzzy classification like Mr. Green might actually
find more useful, is the purview of techniques like artificial intelligence,
which work quite well adjunct to databases and in-memory stores, btw.
Syncleus dANN is a good open-source AI library. I know the guy behind it; he's
a genius.
<http://www.syncleus.com/>
--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg