dbTalk Databases Forums  

insert to projection

comp.databases.theory comp.databases.theory


Discuss insert to projection in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
paul c
 
Posts: n/a

Default insert to projection - 09-04-2009 , 11:58 AM






Why do implementation languages not allow this? Surely not for logical
reasons? We can delete from projection because NOT Pa implies NOT Pab,
eg., <NOT> R{a} -> <NOT> R{a,b}. Logically, we can insert to
projections because Pab implies Pa. Isn't the problem really a language
deficiency?

Reply With Quote
  #2  
Old   
Tegiri Nenashi
 
Posts: n/a

Default Re: insert to projection - 09-04-2009 , 01:37 PM






On Sep 4, 9:58*am, paul c <toledobythe... (AT) oohay (DOT) ac> wrote:
Quote:
Why do implementation languages not allow this? *Surely not for logical
reasons? *We can delete from projection because NOT Pa implies NOT Pab,
eg., <NOT> R{a} -> <NOT> R{a,b}. *Logically, we can insert to
projections because Pab implies Pa. *Isn't the problem really a language
deficiency?
Proposition: the following view updates are ambiguous:
1. Insert/delete from projection
2. Insert/delete from join (including selection)
3. Insert/delete from union
4. Insert/delete from minus

The only RA operation, that seems to allow view updates is renaming.
However, consider

rename( R(x,y), x->y )

Is renaming into the existing attributes allowed (then renaming is
projection, which is not updatable)?

I suggest that the idea that we focus on basic relational algebra
operators, figure out which updates of these are legitimate, then
leverage this knowledge for complex view updates is fundamentally
wrong. Consider a "pivot" view:

table Contacts (
name String,
email String,
phone String
)

and the view

select name, email as contact, 'email' as type
union
select name, phone as contact, 'phone' as type

This is a perfectly updatable view, yet your approach would fail to
discover how to translate its update to the base table. (This pivot
operation is a recurrent theme in data exchanges)

Then, there are constraints, "simultaneous" updates of multiple views.
There is simply no way a naive analysis (of how RA operations may
behave under view update) could possibly provide any insight to the
problem.

Reply With Quote
  #3  
Old   
paul c
 
Posts: n/a

Default Re: insert to projection - 09-04-2009 , 01:52 PM



Tegiri Nenashi wrote:
....
Quote:
The only RA operation, that seems to allow view updates is renaming.
Since when does RA have views?

....
Quote:
I suggest that the idea that we focus on basic relational algebra
operators, figure out which updates of these are legitimate, then
leverage this knowledge for complex view updates is fundamentally
wrong. Consider a "pivot" view:
...
Since when does RA have updates?

Reply With Quote
  #4  
Old   
Tegiri Nenashi
 
Posts: n/a

Default Re: insert to projection - 09-04-2009 , 03:01 PM



On Sep 4, 10:52*am, paul c <toledobythe... (AT) oohay (DOT) ac> wrote:
Quote:
Tegiri Nenashi wrote:

...

The only RA operation, that seems to allow view updates is renaming.

Since when does RA have views?
View is a named RA expression.

Quote:
I suggest that the idea that we focus on basic relational algebra
operators, figure out which updates of these are legitimate, then
leverage this knowledge for complex view updates is fundamentally
wrong. Consider a "pivot" view:
...

Since when does RA have updates?
I understood this thread was about view updates. Projection view to be
exact.

Reply With Quote
  #5  
Old   
paul c
 
Posts: n/a

Default Re: insert to projection - 09-04-2009 , 03:12 PM



Tegiri Nenashi wrote:
Quote:
On Sep 4, 10:52 am, paul c <toledobythe... (AT) oohay (DOT) ac> wrote:
Tegiri Nenashi wrote:

...

The only RA operation, that seems to allow view updates is renaming.
Since when does RA have views?

View is a named RA expression.
...
In other words, view is a language device. RA has no ambiguity, so if
your chosen dbms language allows ambiguous results, it is due to your
choice of language, just as Russell's paradox was due to the language he
chose.

A base is a named RA expression, so what is the logical difference?

Reply With Quote
  #6  
Old   
Tegiri Nenashi
 
Posts: n/a

Default Re: insert to projection - 09-04-2009 , 03:26 PM



On Sep 4, 12:12*pm, paul c <toledobythe... (AT) oohay (DOT) ac> wrote:
Quote:
Tegiri Nenashi wrote:
On Sep 4, 10:52 am, paul c <toledobythe... (AT) oohay (DOT) ac> wrote:
Tegiri Nenashi wrote:

...

The only RA operation, that seems to allow view updates is renaming.
Since when does RA have views?

View is a named RA expression.
...

In other words, view is a language device. *RA has no ambiguity, so if
your chosen dbms language allows ambiguous results, it is due to your
choice of language,
Yes, guilty with sloppy language. The other thread has already
established the term "underconstrained" rather than "ambiguous". So my
thesis is that all simple relational expressions are underconstrained
from view update perspective.

Let's get back to the main point. I'm suggesting that analysis of
simple relational expressions update won't be useful. Suppose a view
is composition of join, selection, and projection. Each of these can
violate some restrictions that you would propose based on analysis of
basic relation updates. Yet, the view can still be updatable.

Reply With Quote
  #7  
Old   
paul c
 
Posts: n/a

Default Re: insert to projection - 09-04-2009 , 03:55 PM



Tegiri Nenashi wrote:
....
Quote:
Let's get back to the main point. I'm suggesting that analysis of
simple relational expressions update won't be useful. Suppose a view
is composition of join, selection, and projection. Each of these can
violate some restrictions that you would propose based on analysis of
basic relation updates. Yet, the view can still be updatable.
That's more like it. Now it's a matter of either using the recording
form available or if that is thought deficient, coming up with a
different recording form. Even if for some arbitrary reason one doesn't
want to update views, it remains instructive to construct an equivalent
set of bases and ask what results those would produce. Then ask why the
view should be any different. From an RA perspective a view
"expression" is no different than a base constraint, such as a key
constraint or any other one could dream up. In fact, a base "update" to
a constrained table arbitrarily (and conventionally) "chooses" to
replace only the value of one of the several relations involved. If a
language is based on a convention that says only named expresssions can
have their values replaced, I wouldn't argue with that. Maybe part of
the problem is that many people think an implementation language
implements relational algebra, when all it needs to do is not violate
RA, eg., by introducing ambiguity.

Reply With Quote
  #8  
Old   
paul c
 
Posts: n/a

Default Re: insert to projection - 09-04-2009 , 04:02 PM



paul c wrote:
....
Quote:
replace only the value of one of the several relations involved. If a
language is based on a convention that says only named expresssions can
have their values replaced, I wouldn't argue with that. ...
I meant "can always have their values replaced".

Reply With Quote
  #9  
Old   
paul c
 
Posts: n/a

Default Re: insert to projection - 09-04-2009 , 04:10 PM



Tegiri Nenashi wrote:
Quote:
On Sep 4, 10:52 am, paul c <toledobythe... (AT) oohay (DOT) ac> wrote:
Tegiri Nenashi wrote:
....
I suggest that the idea that we focus on basic relational algebra
operators, figure out which updates of these are legitimate, then
leverage this knowledge for complex view updates is fundamentally
wrong. Consider a "pivot" view:
...
Since when does RA have updates?

I understood this thread was about view updates. Projection view to be
exact.
Yes, there is no point in trying to be so precise that the people in the
audience here who actually have some influence over the evolution of
dbms's, at least in the way they choose to use dbms's, have no idea what
the topic really is. I think "update" is a language notion, not an
algebra notion, but a lot of people seem to assume it's the latter. If
insert to projection means asserting an implication, all you need is a
language that allows you to assert an implication so I say why not play
the ball where it lies?

(For somebody like me who started programming with some pretty arcane
physical file systems, the word "update" itself is a big problem, being
either too casual for any meaningful insight ora misleading sop to 1959
file system lingo which can be dangerous because of what the word meant
then, such as the inability to "update" a physical key with those file
systems, some people still think keys have something to do with updating
when a language that follows RA is involved. Other people think
relational languages actually implement relational algebra.)

Reply With Quote
  #10  
Old   
paul c
 
Posts: n/a

Default Re: insert to projection - 09-04-2009 , 04:15 PM



paul c wrote:
..... If
Quote:
insert to projection means asserting an implication, all you need is a
language that allows you to assert an implication so I say why not play
the ball where it lies?
...
Should have said "assert the value of an implication".

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.