Re: insert to projection
From: Vadim Tropashko <vadimtro_at_gmail.com>
Date: Sun, 6 Sep 2009 11:28:29 -0700 (PDT)
Message-ID: <680406b5-cab1-4930-8083-05e728f381a5_at_12g2000pri.googlegroups.com>
;
dy = [p]
;
;
Received on Sun Sep 06 2009 - 20:28:29 CEST
Date: Sun, 6 Sep 2009 11:28:29 -0700 (PDT)
Message-ID: <680406b5-cab1-4930-8083-05e728f381a5_at_12g2000pri.googlegroups.com>
On Sep 4, 9:58 am, paul c <toledobythe..._at_oohay.ac> wrote: > ... We can delete from projection ...
Are you suggesting projection being updatable in respect to deletion? I fail to see this, here is my worksheet:
Let x be the base relation,
z an empty relation with subset of attributes of x,
y = x v z the projection of x onto attributes of z,
dx decrement of x,
dy decrement of y.
Counterexample:
dx = [p q]
1 a
2 a
;
dy = [p]
2
;
z = [p]
;
x = [p q]
1 a
1 b
2 a
;
QBQL assertion that generated it (against Figure1.db database):
z != [] & -- that is z != DUM. Introduced after QBQL
-- found counterexample with z = []
z ^ [] = z & -- z is an empty relation (aka header)
--x v z = y & -- View def: y is projection of x onto z
-- Substituted y with (x v z) everywhere
-- to make the counterexample search
faster
x ^ [] = dx ^ [] & -- x and dx have the same header
(x v z) ^ [] = dy ^ [] & -- y and dy have the same header
z > x ^ [] & -- Atributes of z are contained in attributes
of x
dx < x & -- decrement relation containment
dy < x v z & -- ditto
(x ^ dx') v z = (x v z) ^ dy' -- View definition after update
-> dx = dy ^ x. -- decrement of the base in terms of
-- decrements of the view and base
relation
If you are uncomfortable with deletion of more than one tuple at once, then here is modified single tuple counterexample:
dx = [p q]
1 a
;
dy = [p]
;
z = [p]
;
x = [p q]
1 a
1 b
2 a
;
Received on Sun Sep 06 2009 - 20:28:29 CEST
