News for hackers. Stuff that matters.
Re:SQL Keys in Depth by MarHoff on Tuesday January 02, 2018 @04:43AM (#16050921)
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.

Re:SQL Keys in Depth by olavk on Tuesday January 02, 2018 @05:07AM (#16050995)
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.
Re:SQL Keys in Depth by bastih on Tuesday January 02, 2018 @06:38AM (#16051302)
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.
Re:SQL Keys in Depth by tzahola on Tuesday January 02, 2018 @05:15AM (#16051020)
>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.

Re:SQL Keys in Depth by twic on Tuesday January 02, 2018 @03:34PM (#16055354)
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!

Re:SQL Keys in Depth by Dylan16807 on Wednesday January 03, 2018 @04:56AM (#16059759)
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.

Re:SQL Keys in Depth by simonw on Tuesday January 02, 2018 @06:25AM (#16051263)
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!

Re:SQL Keys in Depth by danso on Tuesday January 02, 2018 @08:26AM (#16051695)
But why would a database in the scale of 1-100 records need a key constraint to begin with?