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

From: Marshall Spight <marshall.spight_at_gmail.com>
Date: 17 Oct 2005 17:04:21 -0700
Message-ID: <1129593861.797080.302240_at_o13g2000cwo.googlegroups.com>


Gene Wirchenko wrote:
>
> I do not like the idea of lying to the programmer.

If anything, the current behavior of insert is lying. If I assert a fact to the database, and it rejects the fact, then I presume that must be because of a logical inconsistency-- I have violated some constaint. But in this case, there is no violation; the database is just being bitchy. "You already told me that!"

> Suppose the
> program counts the number of rows added as part of an audit trail.
> This would knock the count off by one.

There are plenty of other ways to achieve the same end, and plenty of other use cases that are made harder (instead of easier) by this behavior.

Marshall Received on Tue Oct 18 2005 - 02:04:21 CEST

Original text of this message