Hacker News new | ask | show | jobs
by MarHoff 3097 days ago
I agree with you, but I think you did overthink his metaphorical example a little.

I think the point was that for a 40 people club odd are very very poor that two people would have the same name. And even if so a club manager could still differentiate by adding a middle name or a nickname (in a 40 people scenario).

Of course IF your neighborhood club expand and you need to manage a lot of people you'll have to switch to a better technique. His point was that you must fit to you business case. (But hey some people change name when they marry so... problems can happen fast, but that's mutability issue not uniqueness).

Overall very good article but keeping critical mind as you did is needed.

4 comments

I'm not convinced that the odds are "very very poor". Some names (like Robert Smith or Maria Garcia) are quite common. And a hobby club is not a random selection of people, members would typically tend towards a specific geographic area, social class or culture depending on the subject. Some cultures have a very limited pool of names, depending on tradition.
Just from looking at a 200 member club I'm part of, I can see at least two name collisions in our current club roster. So absolutely agree with your assessment.
>I think the point was that for a 40 people club odd are very very poor that two people would have the same name.

Wrong. For example I have exactly the same name as my father and we're members of the same squash club.

I don't have exactly the same name as my father, and we are not members of the same squash club. So, in the sample so far, there's only a 50% chance of that happening. I suspect that if we enlarged the sample, it would fall much further.

A single counterexample does not falsify the theory that the odds are very very poor!

We're interested in the odds of collision of people in the same club. Any data about people not sharing a club is irrelevant.

> I suspect that if we enlarged the sample, it would fall much further.

Try to back that up, maybe.

Two people in my class at high school had the exact same first and last names, and they were not common names like "Matthew Smith".

The thing that upsets me here is the idea that dropping the constraint later on is easy. It's only easy if you are a software engineer!

But why would a database in the scale of 1-100 records need a key constraint to begin with?