| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: E/R modeling: relationship's attributes
> In Chen's Entity/relationship model, relationships too can have attributes.
> How should I represent these relationships in a database?
In dbd (Db for Dummies!), the below abridged script gives the relationship "like" an attribute that indicates its opposite is "hate". A query that utilizes this attribute is also shown.
(; Create various relationships) (create like opposite hate) (create john like mary) (create john hate bob)
(; Find the thing with which john's relationship
is opposite that to mary. Query returns bob.) (select john
(select (select john * mary)
opposite
*)
*)
While the equivalent is possible with RMDBs using generic modelling, it is not as general/flexible/systematic. Maybe someone in c.d.t can post a similar RMDB solution. Received on Mon May 01 2006 - 12:11:47 CDT
![]() |
![]() |