Path: newssvr20.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!logbridge.uoregon.edu!newsfeed.berkeley.edu!ucberkeley!cyclone-sf.pbi.net!216.218.192.242!news.he.net!chekhov.conxion.net!news.oracle.com!not-for-mail
From: "Mikito Harakiri" <mikharakiri@ywho.com>
Newsgroups: comp.databases.theory
References: <o894b.2393$Lk5.1358@newsread3.news.pas.earthlink.net> <e4330f45.0309071059.7a7897e1@posting.google.com> <YwM6b.656$iy5.61949065@mantis.golden.net> <e4330f45.0309080357.3a627b52@posting.google.com> <Ia07b.686$wf7.65737782@mantis.golden.net> <Uj47b.22$741.237@news.oracle.com> <Vd97b.717$zB.69216404@mantis.golden.net> <xT87b.26$741.203@news.oracle.com> <Yw97b.27$741.210@news.oracle.com>
Subject: Re: View Updates Problem Statement
Lines: 51
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <RM97b.28$741.254@news.oracle.com>
Date: Mon, 8 Sep 2003 18:02:15 -0700
NNTP-Posting-Host: 130.35.179.109
X-Trace: news.oracle.com 1063069873 130.35.179.109 (Mon, 08 Sep 2003 18:11:13 PDT)
NNTP-Posting-Date: Mon, 08 Sep 2003 18:11:13 PDT
Xref: newssvr20.news.prodigy.com comp.databases.theory:21351

"Mikito Harakiri" <mikharakiri@ywho.com> wrote in message
news:Yw97b.27$741.210@news.oracle.com...
> 3. Constraints are views that evaluate to constants. For example, if we
> define
>
> view V3
> select max(sal) from (
>     select sal from emp
>     union
>     select 1000 from DEE
> )
>
> then constraint "each emp has salary no more than 1000" can algebraically
be
> written as
>
> V3*x = 1000
>
> where "V3*x" means view V3 applied to a set of base relations x, and
"1000"
> means an output relation that has one tuple with a single value 1000.

Small increment, sorry.

It is even better to write constraint equation as

view V3
select max(sal)/1000 from (
     select sal from emp
     union
     select 1000 from DEE
)

V3*x = DEE

or still even better

view V3
select 1000 from DEE
minus
select max(sal) from (
     select sal from emp
     union
     select 1000 from DEE
)

V3*x = DUM

(Equations that evaluate to 0 are math favorits:-)


