![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Suppose we have views u, w defined as relational expressions over base tables x, y, z: u = f(x,y,z) w = g(x,y,z) Let's assume this system of equations is invertible, that is we can solve it and express x, y, z as functions of u, w: x = r(u,v) y = s(u,v) z = t(u,v) Then, the system of views u,w is updatable. Given the new database state reflected in the relations u, w, we can calculate base relations by leveraging above expressions. One can object that it wouldn't be a practical solution; on the plus side, however, increments and decrements never enter the picture! |
#3
| |||
| |||
|
|
Tegiri Nenashi wrote: Suppose we have views u, w defined as relational expressions over base tables x, y, z: u = f(x,y,z) w = g(x,y,z) Let's assume this system of equations is invertible, that is we can solve it and express x, y, z as functions of u, w: x = r(u,v) y = s(u,v) z = t(u,v) Then, the system of views u,w is updatable. Given the new database state reflected in the relations u, w, we can calculate base relations by leveraging above expressions. One can object that it wouldn't be a practical solution; on the plus side, however, increments and decrements never enter the picture! I think as soon as one starts using functions to describe relations it's easy to loose track of important details. *In the above u=f(x,y,z) could result in a an rva, *If I understand what you're saying, to invert it, you'd have to back and make x an rva too but once you do that u becomes a kind of nested rva and you'll recurse forever! |
|
Also, if one accepts that relational assignment is really what 'update' means, increments and decrements don't enter the picture in the first place. . |
#4
| |||
| |||
|
|
Suppose we have views u, w defined as relational expressions over base tables x, y, z: u = f(x,y,z) w = g(x,y,z) Let's assume this system of equations is invertible, that is we can solve it and express x, y, z as functions of u, w: x = r(u,v) y = s(u,v) z = t(u,v) Then, the system of views u,w is updatable. Given the new database state reflected in the relations u, w, we can calculate base relations by leveraging above expressions. One can object that it wouldn't be a practical solution; on the plus side, however, increments and decrements never enter the picture! |
#5
| |||
| |||
|
|
Let's assume this system of equations is invertible, that is we can solve it and express x, y, z as functions of u, w: x = r(u,v) y = s(u,v) z = t(u,v) |
|
Then, the system of views u,w is updatable. Given the new database state reflected in the relations u, w, we can calculate base relations by leveraging above expressions. One can object that it wouldn't be a practical solution; on the plus side, however, increments and decrements never enter the picture! |
#6
| |||
| |||
|
|
This makes the projection view "invertable" even though without the default value it would not be invertable. |
#7
| |||
| |||
|
|
PMFJI. I'm trying to combine this latest response with what Brian said in his latest response (about permitting NULLs in some attributes and providing default values in others.) Let me duck the issue of NULLS at least for the moment. Let's say that all attributes the base relvars and not in the projection have a default value. This makes the projection view "invertable" even though without the default value it would not be invertable. So now my question is, can business rules such as default values (in the case of insert into projection) or triggers that implement a delete from join predictably and uniquely be expressed as "equations"? Is it possible that a system of equations that describe views in terms of base relvars and also describe business rules, including constraints, might always be "invertable". Well, it's more complicated than what I ve expressed, but I don't want to get all tied up in knots. The point is to ask whether there's always a way to make a non invertable system invertable by adding more rules. ... |
#8
| |||
| |||
|
|
On Sep 8, 9:35 am, "Walter Mitty" <wami... (AT) verizon (DOT) net> wrote: This makes the projection view "invertable" even though without the default value it would not be invertable. And what is default value in relational terms? |
#9
| |||
| |||
|
|
"Vadim Tropashko" <vadimtro (AT) gmail (DOT) com> wrote in message news:dde2aed2-8d1f-4793-b481-a435383934e4 (AT) m7g2000prd (DOT) googlegroups.com... On Sep 8, 9:35 am, "Walter Mitty" <wami... (AT) verizon (DOT) net> wrote: This makes the projection view "invertable" even though without the default value it would not be invertable. And what is default value in relational terms? I think that depends on how a default constraint is expressed logically. For a table (x,y,z) that neither allows nulls nor has default constraints, the predicate could be Pxyz. If the table were to have a default constraint for y, what would the logical expression for the table become? Isn't it (Pxyz xor Pxdz) or (Pxyz and (y = d))? If it is, then I think a view over (x,z) should be updatable. snip |
#10
| |||
| |||
|
|
My attitude is that if it can't be expressed in an algebra it shouldn't be implemented. |
![]() |
| Thread Tools | |
| Display Modes | |
| |