![]() | |
#11
| |||
| |||
|
|
Procedural-or-not is completely orthogonal to supporting-MA-or-not. |
#12
| |||
| |||
|
|
Given that preference, I think join deletes and union inserts become mechanical problems. For me, in the end it amounts simply to a user stating that the tuples of the literal B relation are (all) true and that B's predicate is immaterial. With those two assertions, the A-algebra is sufficient to describe what results a language should produce without ambiguity. |
#13
| |||
| |||
|
|
On Mar 19, 7:47 am, paul c <anonym... (AT) not-for-mail (DOT) invalid> wrote: Given that preference, I think join deletes and union inserts become mechanical problems. *For me, in the end it amounts simply to a user stating that the tuples of the literal B relation are (all) true and that B's predicate is immaterial. *With those two assertions, the A-algebra is sufficient to describe what results a language should produce without ambiguity. I accept the idea that update operators on views can be defined to be unambiguous, dispelling a common argument against view updates such as join deletes and union inserts. However, I'm very suspicious of an application allowing users to update a non-injective view of the data. |
|
More specifically if users of an application cannot in general distinguish distinct values of some base relvar how can they reasonably be expected to have permission to update that relvar? |
#14
| |||
| |||
|
|
On 28 mrt, 23:49, paul c<anonym... (AT) not-for-mail (DOT) invalid> wrote: .... The "functional" quality of a "functional" program is that it "does nothing else but generate a result". Note that I used the word "generate" and _NOT_ the word "record" !!! A functional program can "generate" the number three as a result, and that's it. You can look at it, and note that the result is the number three, but _AS SOON AS YOU DO ANYTHING TO ACTUALLY RECORD_ that result (such as assigning it to some portion of the value of a DBVAR), you are outside the realm of "true" functional programming !!! |
#15
| |||
| |||
|
|
On 2 apr, 17:49, Erwin<e.sm... (AT) myonline (DOT) be> wrote: Procedural-or-not is completely orthogonal to supporting-MA-or-not. That might be a bit of a howler, given that : if "procedural" and "functional" are the only options possible, then "not-procedural" implies "functional", and "functional" implies that no variables exist that outlive the lifetime of the functional program, and the most important target for which the concept of MA has been invented, is a DBVAR, which is a variable that outlives the lifetime of any executing program by definition. |
#16
| |||
| |||
|
|
On 4 apr, 10:54, David BL <davi... (AT) iinet (DOT) net.au> wrote: On Mar 19, 7:47 am, paul c <anonym... (AT) not-for-mail (DOT) invalid> wrote: Given that preference, I think join deletes and union inserts become mechanical problems. For me, in the end it amounts simply to a user stating that the tuples of the literal B relation are (all) true and that B's predicate is immaterial. With those two assertions, the A-algebra is sufficient to describe what results a language should produce without ambiguity. I accept the idea that update operators on views can be defined to be unambiguous, dispelling a common argument against view updates such as join deletes and union inserts. However, I'm very suspicious of an application allowing users to update a non-injective view of the data. Hmmmmmmmm. Are you saying here that it's OK to _define_ join delete and union insert in some certain way that "makes it unambiguous", but that the applications that _use_ such an update are then suspect ? |
|
More specifically if users of an application cannot in general distinguish distinct values of some base relvar how can they reasonably be expected to have permission to update that relvar? (1) If views are used as a means for achieving logical data independence, then this is a non-argument, because users will then not be aware of any base relvars, by definition of what logical data independence means, and it then follows necessarily that any consideration as to whether or not they "should have update authority on the base relvars", is itself merely a function on whether they do have update authority on the virtual relvars referring to such base relvars ! |
#17
| |||
| |||
|
|
On Apr 4, 8:37 pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote: Hmmmmmmmm. *Are you saying here that it's OK to _define_ join delete and union insert in some certain way that "makes it unambiguous", but that the applications that _use_ such an update are then suspect ? Typically, yes. I'm suggesting a) ambiguity of view updates is a weak argument against their use because it's subjective; and b) there might be a much stronger argument against certain views which considers injectivity and ignores all discussion about the update operators. |
|
I think perhaps the only thing that matters is whether the mapping from the relevant base relvars to the /updateable/ view is injective |
|
(noting that constraints can reduce the domain of this mapping and help make it injective). |
#18
| |||||||
| |||||||
|
|
On 4 apr, 16:50, David BL <davi... (AT) iinet (DOT) net.au> wrote: On Apr 4, 8:37 pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote: Hmmmmmmmm. Are you saying here that it's OK to _define_ join delete and union insert in some certain way that "makes it unambiguous", but that the applications that _use_ such an update are then suspect ? Typically, yes. I'm suggesting a) ambiguity of view updates is a weak argument against their use because it's subjective; and b) there might be a much stronger argument against certain views which considers injectivity and ignores all discussion about the update operators. But isn't "ambiguity of view updates" precisely expressing the fact that the view in question is/constitutes a non-injective function of its constituent arguments ? |
|
I think so, but if you think otherwise, I'd like to see it explained. Taking V, R1 and R2 as relvar names and v, r1 and r2 as those relvars' values, If V = R1 JOIN R2, then for almost all v exists >1 (r1,r2) : v = r1 JOIN r2 . Except in special cases such as v being the empty relation. If V = R1 UNION R2, then for almost all v exists >1 (r1,r2) : v = r1 UNION r2 . Except in special cases such as v being the empty relation. If V = TCLOSE(R1), then for almost all v exists >1 r1 : v = TCLOSE(r1) . Except ... If V = PROJECT(R1, ... ), then for almost all v exists >1 r1 : v = PROJECT(r1, ... ) . Except ... If V = RESTRICT(R1, ... ), then for almost all v exists >1 r1 : v = RESTRICT(r1, ... ) . Except ... |
|
I think perhaps the only thing that matters is whether the mapping from the relevant base relvars to the /updateable/ view is injective You seem to make the important distinction between views that are "updatable" and others that are "not updatable". |
|
It also seems like you want to apply the "injective-or-not" criterion only once it is established that a view is indeed updatable. What are your criteria for deciding that a view is updatable (or not updatable) ? |
|
In "Database Explorations", Date argues that there are no views that are "inherently non-updatable" (though my guess is he attaches a very intricate meaning to the word 'inherently' in order to make that claim true ...). |
|
And if I understand you right, and if I understand "injectivity" as well, are you indeed saying that none of the five views I gave a few moments ago as an example can be "updatable" ? ("updatable, but only in suspect ways" ?) |
|
(noting that constraints can reduce the domain of this mapping and help make it injective). Do you think it is feasible, when faced with a view-update request, to interpret the applicable constraints so as to reduce the set of possible base relvar assignments that "satisfy" the view-update request ? |
#19
| |||
| |||
|
|
On Apr 4, 11:45 pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote: Do you think it is feasible, when faced with a view-update request, to interpret the applicable constraints so as to reduce the set of possible base relvar assignments that "satisfy" the view-update request ? Yes |
#20
| |||
| |||
|
|
On 5 apr, 10:04, David BL <davi... (AT) iinet (DOT) net.au> wrote: On Apr 4, 11:45 pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote: Do you think it is feasible, when faced with a view-update request, to interpret the applicable constraints so as to reduce the set of possible base relvar assignments that "satisfy" the view-update request ? Yes I slightly misexpressed myself. I know it is possible, but the only way I see is the "naive", brute- force, "trial-and-error" method : A) Compute all possible base-relvar-assignments that "satisfy" the view-update-request. (E.g. if the view is a 'simple' binary JOIN, then there are three possible solutions for DELETE. If the view is a join between three base relvars, then there are 7.) (Note that this step might already cause a failure when the set of possible solutions becomes too big, e.g. with insert-through-projection where no default value is available for the projected-away attributes.) B) Order all possible solutions by "preferability" : e.g. the 'symmetric' option for delete-through-join is always to be preferred over the 'non-symmetric' ones, but the non-symmetric ones have equal preference. C) In descending order of preferability, and for each distinct "level of preferability" : C1) process all possible solutions that have that "level of preferability", computing whether the solution will pass all database constraints (plus whether the solution satisfies the assignment principle, at least on the targeted view.) C2) If there is a unique solution that will pass all constraints, accept it. C3) If there is more than one solution that will pass all constraints, reject the update. C4) If there are no solutions in this "level of preferability" that will pass all constraints, then go down to the next "level of preferability", and if there is none such, reject the update. All of this is possible. But imo, the amount of computation involved makes it infeasible. My question concerned the feasibility of interpreting the constraints in an "intelligent" way to find the applicable solution "more directly". |
![]() |
| Thread Tools | |
| Display Modes | |
| |