home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / theory / 415 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  2.4 KB

  1. Xref: sparky comp.databases.theory:415 comp.databases:6396
  2. Newsgroups: comp.databases.theory,comp.databases
  3. Path: sparky!uunet!usc!sol.ctr.columbia.edu!ira.uka.de!chx400!bernina!neptune!apelc8.inf.ethz.ch!rys
  4. From: rys@apelc8.inf.ethz.ch (Michael Rys)
  5. Subject: Re: Different representation of entity-relation diagrams
  6. Message-ID: <1992Aug28.090536.16369@neptune.inf.ethz.ch>
  7. Sender: news@neptune.inf.ethz.ch (Mr News)
  8. Nntp-Posting-Host: apelc8.inf.ethz.ch
  9. Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH), Zurich, CH
  10. References:  <1992Aug27.154114.23295@eng.umd.edu>
  11. Distribution: usa
  12. Date: Fri, 28 Aug 1992 09:05:36 GMT
  13. Lines: 60
  14.  
  15. There is also this notation:
  16.  
  17. |> One-to-One:
  18. |>     +----------+          /----------\          +----------+
  19. |>     | Entity_1 | <------- | Relation | -------> | Entity_2 |
  20. |>     +----------+          \----------/          +----------+
  21.  
  22.      +----------+   (a,1)   /----------\   (a,1)   +----------+
  23.      | Entity_1 | --------- | Relation | --------- | Entity_2 |
  24.      +----------+           \----------/           +----------+
  25.  
  26. |> One-to-Many:
  27. |>     +----------+          /----------\          +----------+
  28. |>     | Entity_1 | <------- | Relation | ------>> | Entity_2 |
  29. |>     +----------+          \----------/          +----------+
  30.  
  31.      +----------+   (a,1)   /----------\   (b,n)   +----------+
  32.      | Entity_1 | --------- | Relation | --------- | Entity_2 |
  33.      +----------+           \----------/           +----------+
  34.  
  35. |> Many-to-One:
  36.  
  37. viceversa.
  38.  
  39. where:
  40.  
  41. a = 0 or 1.
  42. b = 0, 1 or n.
  43. n > 1 or *.
  44.  
  45. The type of the above relation can be represented as:
  46.  
  47. RelT = <Ent1T, Ent2T>
  48.  
  49. To express the cardinality, we use:
  50.  
  51. card(RelT) = < (x1,y1), (x2,y2) >       where xi, yi = b.
  52.  
  53. The first number xi of the tuple gives the required minimal number of the
  54. Entity_i in that relation, yi the required maximal number. 
  55.  
  56. This information belongs to the integrity constraints of the data model.
  57.  
  58. For example:
  59.  
  60. Works_ForT = <EmpT, ChefT>
  61. card(Work_ForT) = < (1,1), (1,*) >
  62.  
  63. means
  64.  
  65. Every employee has exactly one chef, each chef has at least one employee.
  66. Thus, this is a strict hierarchical relation.
  67.  
  68. Hope this helps
  69. Michael
  70. --
  71. Michael Rys     Institute for Informationsystems/Databases     ETH Zuerich
  72. Voice: priv. +41 1 242 35 87   bus. +41 1 254 72 57   Fax: +41 1 262 39 73
  73.     -- Wovon man nicht sprechen kann, darueber muss man schweigen. --
  74.           Ludwig Wittgenstein, Tractatus logico-philosophicus
  75.