Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: lookup by EnumSet Date: Tue, 28 Feb 2012 09:31:11 -0800 Organization: albasani.net Lines: 34 Message-ID: References: <3kmpk7lno3fehkr0o21b4dqvhoijmpehbq@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net cjL1juA/78BeOrJ3JHzJUa3aPDNJJefA2lClOVycMIG5wBzKUlIdwdcm7lR+cH7TlUTVIYpeJVZLOEGbx+opCn3GJ6t07VDsyo8PDBJkezBbRXF+4BYF8AEls8wwwVcC NNTP-Posting-Date: Tue, 28 Feb 2012 17:31:04 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="LHmkW/E1HkX00reGxp3RaKlek2DveDl4oN81+YUemD0L6xhvaStK5DYy9Aq/tAHRn+XdEsDO2GDX6EHpH3RSjHxeftrdW8653Dv4cXVSdNV64UdyWUr+/kmdtYvfsM4V"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: Cancel-Lock: sha1:LC08YOXv+J9nj6lJUtv4QYHxNOg= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:12497 On 02/28/2012 07:27 AM, Leif Roar Moldskred wrote: > Roedy Green 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. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg