Re: Extending my question. Was: The relational model and relational algebra - why did SQL become the industry standard?
Date: Mon, 24 Feb 2003 17:40:27 -0800
Message-ID: <KVz6a.16$i82.64_at_news.oracle.com>
"Bob Badour" <bbadour_at_golden.net> wrote in message
news:YcX4a.103$CO5.10014787_at_mantis.golden.net...
> > Database A and B together can be viewed as a distributed database. There
> is
> > a redundancy here: the data in both tables should be maintained in sync.
>
> Strictly speaking, it's not possible to keep them in sync because a user
can
> insert a phone in phones without a fax. Contacts cannot represent this,
and
> what you claimed was a reverse mapping is not a reverse mapping.
The view
select id, 'VOICE' type, voice phone
from contact
union
select id, 'FAX' type, fax phone
from contact
implies the following constraint
For any 'id' and 'num' such that tuple
<id, 'PHONE', num> is in the 'phones' view
there exists 'num1' such that <id, 'FAX', num1> is in the 'phones' view as
well.
In other words, a user is not allowed inserting a set of tuples if any of those tuples doesn't have a "complementary" tuple in the view. For example a user is not allowed inserting a single tuple with a phone without a tuple with fax.
By the "view" we refer to the state immediately after the insert transaction. Since the view state before the transaction complied with the above constraint as well, it means that user is allowed to insert only self-consistent set of tuples: each tuple in the set has a "complementary" tuple in the set. Received on Tue Feb 25 2003 - 02:40:27 CET