home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / database / 7904 < prev    next >
Encoding:
Text File  |  1992-11-17  |  2.5 KB  |  47 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!yale.edu!ira.uka.de!math.fu-berlin.de!unidui!rrz.uni-koeln.de!Germany.EU.net!mcsun!chsun!bernina!neptune!nugget.inf.ethz.ch!marti
  3. From: marti@nugget.inf.ethz.ch (Robert Marti)
  4. Subject: Re: Normalizing 2NF -> 3NF
  5. Message-ID: <1992Nov17.081019.12300@neptune.inf.ethz.ch>
  6. Sender: news@neptune.inf.ethz.ch (Mr News)
  7. Nntp-Posting-Host: nugget.inf.ethz.ch
  8. Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH), Zurich, CH
  9. References: <1992Nov15.163413.17527@news.uiowa.edu> <1992Nov15.223825.16263@odin.diku.dk> <1992Nov16.103334.15543@neptune.inf.ethz.ch> <1992Nov16.135135.3108@odin.diku.dk>
  10. Date: Tue, 17 Nov 1992 08:10:19 GMT
  11. Lines: 34
  12.  
  13. In article <1992Nov16.135135.3108@odin.diku.dk>, elgaard@diku.dk
  14. (Niels Elgaard Larsen) writes:
  15. |> marti@nugget.inf.ethz.ch (Robert Marti) writes:
  16. |> >[...]  Yhe solution with R'(A*,B) and R"(B*,C) is much better than
  17. |> >the other one with R'(A*,B) and R"(A*,C).  Why?  Well, if you
  18. |> >perceive an FD B -> C in the real world, you probably would
  19. |> >like your system to enforce this integrity constraint. [...]  The
  20. |> >simplest (and in some systems still the _only_) way to enforce an
  21. |> >FD is to make its left hand side a key for a relation consisting of
  22. |> >the attributes listed on both its left and right hand side.
  23. |> 
  24. |> Yes, but this might not be efficient. Fx, if there are two groups of users
  25. |> that wants to see an (A,B) and an (A,C) view resp., it requires a lot of
  26. |> unnecessary joins. Eg, (A,B,C) == (Name,Address,Phone#). You typically look up
  27. |> addresses from names and phone-numbers from names---not phone# from addresses.
  28. |> 
  29. |> A DBMS should be able to check other integrity constraints than primary keys. 
  30.  
  31. Agreed, they _should_.  But like I said, many (still) don't.  And
  32. since you raise the issue of efficiency, I'd just like to point out
  33. that the R'(A*,B), R"(A*,C) solution requires that you join R' and R"
  34. in order to check the FD B -> C which in turn is much more expensive
  35. than a solution with a unique index.  So it all boils down on the
  36. access patterns.  (I know, you siad this yourself in your earlier
  37. posting.
  38.  
  39. Finally, I'd be very surprised if the FD Address -> Phone# held indeed
  40. in Denmark.  It certainly doesn't in Switzerland.
  41.  
  42. -- 
  43. Robert Marti                    |  Phone:    +41 1 254 72 60
  44. Informationssysteme             |  FAX:      +41 1 262 39 73
  45. ETH-Zentrum                     |  E-Mail:   marti@inf.ethz.ch
  46. CH-8092 Zurich, Switzerland     |
  47.