![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
On Dec 15, 2:30 pm, Hugo Kornelis h... (AT) perFact (DOT) REMOVETHIS.info.INVALID> wrote: If this is the book I think it is (Pro SQL Server 2005 yadda yadda), then please do me -or rather yourself- a favor and stop trying to learn database theory from it. There are a lot of things that Louis and I agree on, but database theory is definitely not among them. Parts of his book are useful, the art is figuring out which parts. Best, Hugo Hugo are you famous? "Louis and I"? I should start hanging out here more often! |
|
in other parts of the book Louis says he sometimes posts in Usenet groups, perhaps or in particular even this one--RL |
|
So, from this passage, I think the author does a good job disclaiming the slavish use of GUIDs without understanding their drawbacks, even after the author said he's a "big fan" of such GUIDs. |
#12
| |||
| |||
|
|
So, from this passage, I think the author does a good job disclaiming the slavish use of GUIDs without understanding their drawbacks, even after the author said he's a "big fan" of such GUIDs. True. But in the rest of his book, he adds a surrogate key (either GUID or IDENTITY) to every entity before and without considering whether one is needed. I believe that logical design should be done completely without surrogate keys. They MIGHT be introduced during physical design, but not before. |
#13
| |||
| |||
|
|
On Dec 16, 3:00 pm, Hugo Kornelis h... (AT) perFact (DOT) REMOVETHIS.info.INVALID> wrote So, from this passage, I think the author does a good job disclaiming the slavish use of GUIDs without understanding their drawbacks, even after the author said he's a "big fan" of such GUIDs. True. But in the rest of his book, he adds a surrogate key (either GUID or IDENTITY) to every entity before and without considering whether one is needed. I believe that logical design should be done completely without surrogate keys. They MIGHT be introduced during physical design, but not before. OK I'll keep this in mind when trying to architect a database system-- use natural keys. Which is easier said than done: how unique is anybody nowadays ('hair color, height, weight, name, shoe size') with 300M Americans and 9B people on the planet? I'm not sure even a GUID is 100% safe with those big numbers?! Maybe we need biometrics. But I guess most databases are not designed to be so scalable anyway, so perhaps natural keys are indeed the best bet. |
|
RL |
#14
| |||
| |||
|
|
On Dec 16, 3:00 pm, Hugo Kornelis h... (AT) perFact (DOT) REMOVETHIS.info.INVALID> wrote So, from this passage, I think the author does a good job disclaiming the slavish use of GUIDs without understanding their drawbacks, even after the author said he's a "big fan" of such GUIDs. True. But in the rest of his book, he adds a surrogate key (either GUID or IDENTITY) to every entity before and without considering whether one is needed. I believe that logical design should be done completely without surrogate keys. They MIGHT be introduced during physical design, but not before. |
|
OK I'll keep this in mind when trying to architect a database system-- use natural keys. Which is easier said than done: how unique is anybody nowadays ('hair color, height, weight, name, shoe size') with 300M Americans and 9B people on the planet? I'm not sure even a GUID is 100% safe with those big numbers?! Maybe we need biometrics. But I guess most databases are not designed to be so scalable anyway, so perhaps natural keys are indeed the best bet. RL |
#15
| |||
| |||
|
|
Ray, there is no simple rule. The design criteria for keys are: simplicity, familiarity, stability, uniqueness, irreducibility. You would do yourself a favour by writing them on a post-it note right about now. Sometimes they conflict and one has to make tradeoffs. The ideal key will have all 5 of those properties. Sometimes no such ideal key exists. At such times, one must understand why each of the above properties is important and what problems will ensue from not having the property. |
#16
| |||
| |||
|
|
... migrate a primary key to another table ... |
#17
| |||
| |||
|
|
raylopez99 wrote: ... migrate a primary key to another table ... There is no movement here. I am not a native english speaker, but 'migrate' really sets you on the wrong foot. Try to describe it in a different way. -- What you see depends on where you stand. |
#18
| |||
| |||
|
|
On Dec 17, 8:02 am, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote: Ray, there is no simple rule. The design criteria for keys are: simplicity, familiarity, stability, uniqueness, irreducibility. You would do yourself a favour by writing them on a post-it note right about now. Sometimes they conflict and one has to make tradeoffs. The ideal key will have all 5 of those properties. Sometimes no such ideal key exists. At such times, one must understand why each of the above properties is important and what problems will ensue from not having the property. Bob thanks for that link to the 1989 poster "Five Rules of Normalization" involving the Puppy Kennel. Very useful, I've gone over it several times (still can't figure out Rules 4 or 5 but I'll get it eventually). Today I learned that Access will not give you an error if you create a relationship (i.e. migrate a primary key to another table as a foreign key) between two tables where the second table has a *compound* primary key that includes a PRIMARY key of the first table (!). I didn't know that you could do that, I assumed you never could use a primary key as the primary key of another table, but it makes sense since you're not really using a primary key again, since the second table has a _compound_ primary key. Now something tells me that this compound key is probably not a good key, since it seems to violate 2NF, but that's another point. Learn something new everyday. RL |
#19
| |||
| |||
|
|
mAsterdam wrote: raylopez99 wrote: ... migrate a primary key to another table ... There is no movement here. I am not a native english speaker, but 'migrate' really sets you on the wrong foot. Try to describe it in a different way. Louis Davidson's textbook uses the term "migrate" when a PK -->FK (PK becomes a FK in another dB). |
#20
| |||
| |||
|
|
I'm not sure even a GUID is 100% safe with those big numbers?! Maybe we need biometrics. |
![]() |
| Thread Tools | |
| Display Modes | |
| |