Re: MultiValue Databases
Date: Thu, 9 Jun 2005 10:19:41 +0200
Message-ID: <MPG.1d1219f523a6fa6e98968d_at_news.ntnu.no>
In article <1118169752.050726.90610_at_f14g2000cwb.googlegroups.com>,
neo55592_at_hotmail.com says...
> >> Assume a person can have 0 to many phone numbers. Assume a
> >> phone number can be assigned to multiple persons ...
> >> normalized the phone numbers to allow adding various attributes
> >> to some phone numbers later.
>
> > ... without having read the rest of the thread, ...
> > CREATE TABLE person_phone (char name, char number);
>
> Yes, this could suffice for the initial data. Would it look like this?
>
> Name Number
> -------- ----------
> John 111-1111
> John 222-2222
> Mary 222-2222
> Bob NULL
No, the Bob tuple should not be present. If you want to record the existence of people independently of phone numbers, you need a Person relvar.
> What enforces the integrity of the "222-2222"s?
What kind of integrity do you need? What enforces it in your xrdb?
> What if "222-2222" appears in mulitple columns of multiple tables?
What about it? Please be more explicit.
> Also when performing a
> query, should one assume that Bob doesn't have a phone or that he could
> have a phone and it could be "222-2222"?
You don't need to assume anything. Bob does not have any phone number under the closed world assumption, given that I would not put NULLs in my relvars.
> Yes, expect the unexpected. Allow each thing to have any number of
> attributes and allows each attribute to have any number of values.
> Allow attributes and values to have their own attributes :)
You are reinventing RDF?
-- JonReceived on Thu Jun 09 2005 - 10:19:41 CEST