data modelling, ER diagram

From: Anil Sinha <sinha_at_watson.bms.com>
Date: Fri, 11 Sep 1992 17:09:00 GMT
Message-ID: <11SEP199212091688_at_watson.bms.com>


Heres a question for data modellers.

How does one incorporate the restriction that a given relation is a subset of another relationship ?

Assume we have these entities:

Grant: Approved grants
Party: Parties working on grants
Payments: payments made to parties

There is another entity "grant and party" which shows many to many relationship between grant and party. The entity payment is payment to a party and could be made against many grants. So there is another entity "payment and grant" which shows many to many relationship between payment and grant. So a given payment to party should be made against grants which are valid within the entity "grant and party" for the given party. Can this restriction be modelled within the ER diagram ?

Heres the ER diagram without this restriction.

Now heres the ER diagram.

|-------| |-----------------|
| | | |
|Grant |\ | |
|and |----------------------------------................| |
|Party |/ | Party |
| | | |
|-------| |---------| | |

 \|/                  |         |\                       |                 |
    |                   | Payment |---------...............|                 |
    |                   |         |/                       |                 |
    |                   |---------|                        |                 |
    .                        |                             |-----------------|
    .                        |
    .                        |
    .                       /|\

|-------| |---------|
| | /|Payment |
|Grant |.........------| and |
| | \|Grant |
|-------| | |
|---------|

Can this only be done at the application or database level ? Is there any other way to model this case ?

Thanks in advance.



Include Standard Disclaim:
Anil Sinha                                          	     Work:(609) 252 4788
Email:sinha_at_watson.bms.com                                   
Received on Fri Sep 11 1992 - 19:09:00 CEST

Original text of this message