Re: MultiValue Databases

From: Neo <neo55592_at_hotmail.com>
Date: 9 Jun 2005 12:50:01 -0700
Message-ID: <1118346601.518594.102160_at_g47g2000cwa.googlegroups.com>


> rather than restructure the phone DB to add the "Bob likes Mary" data,
> i would suggest a table called LIKES with two attributes DESIRER
> and DESIREE as primay key. both [with] foreign key back to the
> persons table so you prevent illogical entries like "111-1111 likes neutral".

Assuming one had chosen to update the RM schema only as described above, how would one implement the following xrdb query specified earlier? Please show actual RM script.

// Find relationship between john and 111-1111? (SELECT john * 111-1111) // Query returns phone#.

Using your updated RM schema, how would one handle new data that "Mary likes Fido" where Fido is a dog and perform the following new query. Note, that with xrdb, in this case also, user does not have to change the schema and/or move original data to new db. How does one get the reference in attribute T_LIKES.DESIREE to reference a tuple in T_Person and one in T_Dog also? Please show actual RM script.

(CREATE type inst *dog)
(CREATE dog inst *fido)
(CREATE mary like fido)

// What type of thing does mary likes? returns dog. (SELECT * type (mary like *)) Received on Thu Jun 09 2005 - 21:50:01 CEST

Original text of this message