Re: relative complement?

From: Erwin <e.smout_at_myonline.be>
Date: Tue, 5 Apr 2011 05:06:58 -0700 (PDT)
Message-ID: <100ad2d9-3eff-44d8-8420-2976caa0cacc_at_o20g2000yqk.googlegroups.com>


On 5 apr, 10:04, David BL <davi..._at_iinet.net.au> wrote:
> On Apr 4, 11:45 pm, Erwin <e.sm..._at_myonline.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", bruteforce,  "trial-and-error" method :

  1. 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.)
  2. 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.
  3. 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". Received on Tue Apr 05 2011 - 14:06:58 CEST

Original text of this message