home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / database / oracle / 1559 < prev    next >
Encoding:
Text File  |  1992-09-11  |  2.9 KB  |  71 lines

  1. Newsgroups: comp.databases.oracle
  2. Path: sparky!uunet!wupost!uwm.edu!spool.mu.edu!darwin.sura.net!jvnc.net!synapse.bms.com!watson.bms.com!sinha
  3. From: sinha@watson.bms.com (Anil Sinha)
  4. Subject: data modelling, ER diagram
  5. Message-ID: <11SEP199212091688@watson.bms.com>
  6. News-Software: VAX/VMS VNEWS 1.4-b1  
  7. Keywords: data modelling, ER diagram
  8. Sender: news@synapse.bms.com
  9. Organization: X
  10. Date: Fri, 11 Sep 1992 17:09:00 GMT
  11. Lines: 58
  12.  
  13. Heres a question for data modellers. 
  14.  
  15. How does one incorporate the restriction that a given relation is a subset of
  16. another relationship ?
  17.  
  18. Assume we have these entities:
  19.  
  20. Grant: Approved grants
  21. Party: Parties working on grants
  22. Payments: payments made to parties
  23.  
  24. There is another entity "grant and party" which shows many to many
  25. relationship between grant and party. The entity payment is payment to a party
  26. and could be made against many grants. So there is another entity "payment and
  27. grant" which shows many to many relationship between payment and grant.
  28. So a given payment to party should be made against grants which are valid within
  29. the entity "grant and party" for the given party. Can this restriction be
  30. modelled within the ER diagram ?
  31.  
  32. Heres the ER diagram without this restriction. 
  33.  
  34. Now heres the ER diagram.
  35.  
  36.  
  37. |-------|                                                  |-----------------|
  38. |       |                                                  |                 |
  39. |Grant  |\                                                 |                 |
  40. |and    |----------------------------------................|                 |
  41. |Party  |/                                                 |  Party          |
  42. |       |                                                  |                 |
  43. |-------|               |---------|                        |                 |
  44.    \|/                  |         |\                       |                 |
  45.     |                   | Payment |---------...............|                 |
  46.     |                   |         |/                       |                 |
  47.     |                   |---------|                        |                 |
  48.     .                        |                             |-----------------|
  49.     .                        |
  50.     .                        |
  51.     .                       /|\
  52. |-------|               |---------|
  53. |       |              /|Payment  |
  54. |Grant  |.........------|  and    |
  55. |       |              \|Grant    |
  56. |-------|               |         |
  57.                         |---------|
  58.  
  59.  
  60. Can this only be done at the application or database level ? Is there any other
  61. way to model this case ?
  62.  
  63.  
  64. Thanks in advance.
  65.  
  66. ********************************************************************************
  67. Include Standard Disclaim:
  68. ********************************************************************************
  69. Anil Sinha                                                   Work:(609) 252 4788
  70. Email:sinha@watson.bms.com                                   
  71.