Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Cyclical Relation.

Re: Cyclical Relation.

From: Heinz Huber <hhuber_at_racon-linz.at>
Date: Tue, 24 Apr 2001 14:12:32 +0200
Message-ID: <3AE56DB0.3F2F9402@racon-linz.at>

kk wrote:
>
> Hi Friends, i've a little problem with a database design, and i've found
> several solutions....but i'd like to heard from you...
>
> The example is really easy...
>
> User Message
> -------- --------
> IdUser IdMessage
> Name Date
> Title
> Body
>
> Each User has some data that is only for that user like readed, active....
>
> What E/R Model should cover this and without finishing in a cyclical
> relation between User and Message.. If....
>
> Send Action
> 1 user can send 1 or many messages
> 1 message can be sent by only 1 user
>
> Receive Action
> 1 user can receive 1 or many messages
> 1 message is owned by 1 user.

Sounds like you need two user fks in Message: IdUserSent
IdUserRecipient

These are no cyclic relations, because they go from User to Message twice. To be cyclic (as I understand it) they would have to go from User to Message and back.

hth,
Heinz Received on Tue Apr 24 2001 - 07:12:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US