Re: data modelling, ER diagram

From: Anil Sinha <sinha_at_watson.bms.com>
Date: Tue, 22 Sep 1992 15:13:00 GMT
Message-ID: <22SEP199210130631_at_watson.bms.com>


In article <1992Sep16.173701.8195_at_cs.sfu.ca>, hall_at_cs.sfu.ca(Gary Hall) writes:
>In article <11SEP199212091688_at_watson.bms.com> sinha_at_watson.bms.com(Anil Sinha)
> writes:
>>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 ?
>>
>
>How about this?
>
> (Deduction) (Payment)
> ________ ________ _________
> |Grant &| | | | |
> |Party &|\ |Party &|\ | |
> | Date |-------------------------| Date |----| Date |
> | |/ | |/ | |
> --------- --------- ---------
> \|/ \|/
> | |
> | |
>>|-------|(Authorization) |-----------------|
>>| | | |
>>|Grant |\ | |
>>|and |---------------------| |
>>|Party |/ | Party |
>>| | | |
>>|-------| ------------------

 \|/                

>> |
>> .
>> .
>>|-------|
>>| |
>>|Grant |
>>| |
>>|-------|
>>
>An authorization permits certain parties to receive monies from certain grants.
>A Payment is made to a given party on a given date.
>A Deduction specifies the amount to be charged to a given grant for a given
>payment via ensuring that the party to whom the payment is to be made
>has been authorized to receive monies from the grant which is to be charged.
>

Does the data model imply all the above constraints ?

Does the model imply that a given entry in the entity "Grant & party & Date (Deduction)" [which represents many to many relationship between entity "Party & Date (Payment)" and entity "Grant and Party (Authorization)" ] have the same party_id (primary key for entity Party) for both entities "Party & Date (Payment)" and entity "Grant and Party (Authorization)" reference..

IMHO this has to be implemented at the application and/or data base level.

>--
>Gary Hall | Voice (604) 291-3208 | INTERNET: hall_at_cs.sfu.ca
>Centre for Systems Science | Fax (604) 291-4951 | BITNET: hall%cs.sfu.ca_at_
>Simon Fraser University | | relay.cdnnet.ca
>Burnaby, B.C. V5A 1S6 |



Include Standard Disclaimers: and so .............. life goes on
Anil Sinha           internet:sinha_at_watson.bms.com           Work:(609) 252 4788
                                                             Home:(201) 366 0608
Received on Tue Sep 22 1992 - 17:13:00 CEST

Original text of this message