Re: Do we always have to update or insert? Why can't we just relate?

From: Gene Wirchenko <genew_at_ucantrade.com.NOTHERE>
Date: Tue, 18 Oct 2005 11:52:21 -0700
Message-ID: <cmgal1hl4c4luv5efa833c354rr3ha3je1_at_4ax.com>


On 17 Oct 2005 17:08:47 -0700, "Marshall Spight" <marshall.spight_at_gmail.com> wrote:

>Gene Wirchenko wrote:
>> On 17 Oct 2005 16:28:22 -0700, "JOG" <jog_at_cs.nott.ac.uk> wrote:
>>
>> >Given two sets {2, 3, 4} and {3, 4, 5}, if I wanted to perform a union
>> >upon them, I would expect to get the result {2, 3, 4, 5} and not an
>> >error message stating the 3 and 4 existed in both. Is this analagous to
>> >an insert? If this is the case, with an insert viewed as the union of
>> >the relation's existing set of elements with specified insert set
>> >(which just contains a single element), then from a purely theoretical
>> >standpoint an error message does seem suprising.
>>
>> Good point on theory, but the inserts are one-at-a-time, so the
>> analogy is not strong.
>
>What about bulk inserts?

     I do not know. You could consider them either way I suppose. Good for starting an argument.

>> My preference is that each action that I choose to do gets an
>> appropriate response. If I am adding one row to a table, then
>> another, then another, that is three actions, each with their own
>> response. If my action is performing the union of two sets, then I
>> expect the result you give above.
>
>Consider what happens when you delete a row: if you delete where
>primary key = xxx, that will necessarily affect at most one row.
>If there aren't any qualifying rows, that's not an error. It
>doesn't seem symmetric.

     Live and learn. I had never seen that before.

>> I can see that this is YMMV.
>
>Yeah, I think that's true.

     Yup, too many highways.

Sincerely,

Gene Wirchenko Received on Tue Oct 18 2005 - 20:52:21 CEST

Original text of this message