dbTalk Databases Forums  

Re: Hashes from composite keys?

comp.databases.theory comp.databases.theory


Discuss Re: Hashes from composite keys? in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David BL
 
Posts: n/a

Default Re: Hashes from composite keys? - 07-27-2010 , 08:50 AM






On Jul 26, 6:27 pm, Clifford Heath <n... (AT) spam (DOT) please.net> wrote:

Quote:
You're missing the point here. You cannot "identify" your objects
using any kind of general hash code. All general hash codes will
(in fact, *must*) sometimes map two different key values into the
same hash code.
Yes in theory but not always in practise. E.g. SHA-2. A "decent"
hash function with n output values requires about sqrt(n) evaluations
for a successful birthday attack. In certain application domains
(e.g. content addressable file stores) the chance of a collision can
be made small enough for a suitable hash to be regarded as unique for
all practical purposes.

Reply With Quote
  #2  
Old   
-CELKO-
 
Posts: n/a

Default Re: Hashes from composite keys? - 07-28-2010 , 11:13 AM






Google in academic sites for the research on "minimal perfect hashing"
"perfect hashing" and "databases" in the literature. It is a fairly
active area that I have not looked at in along time. But as I recall,
there was a proof that a perfect hash always exists. That mean a hash
would alway require one probe to retrieve a record from a file, unlike
tree structured indexes which can require several probes.

Reply With Quote
  #3  
Old   
Kevin Kirkpatrick
 
Posts: n/a

Default Re: Hashes from composite keys? - 07-30-2010 , 10:58 AM



On Jul 24, 3:23*am, Karsten Wutzke <kwut... (AT) web (DOT) de> wrote:
Quote:
Thanks for kicking me into the right direction. :-)

Apparently he didn't kick hard enough. :-) You've found an answer to
your "how", but I believe (he can confirm) that Bob's point was that
you skipped "what". Same applies to the developers of the hash
functionality to which you linked. I needed read no further than
this:

public class Person {
String name;
int age;
boolean smoker;
....
}

The wrong direction is the effort to do your data managment in the
application, rather than in the database. *That* is the wrong
direction, and the best of all solutions you come up with will be
fabulously sophisticated hacks which will work fine for your current
task at hand, impress the hell out of any equally naive developers
with whom you work, and leave you with a glass-brittle application
that nobody will want to breathe wrong on for the next 10 years.

Seeing enough of it can make you as jaded as, well, Bob.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.