Re: What predicates the following relation represents
From: Alfredo Novoa <alfredo_at_ncs.es>
Date: Thu, 06 May 2004 16:55:01 GMT
Message-ID: <409a67dd.23523484_at_news-read3.maxwell.syr.edu>
Date: Thu, 06 May 2004 16:55:01 GMT
Message-ID: <409a67dd.23523484_at_news-read3.maxwell.syr.edu>
On Sun, 04 Apr 2004 23:08:19 +0100, Paul <paul_at_test.com> wrote:
>If I then do an INSERT of the tuple ('nuts', 25) in SQL I get an key
>violation error (assuming the primary key is defined). In a truly
>relational DBMS, should it silently accept this, but just do nothing?
It depends on the semantics you want for the insert statement.
Traditionally, Insert has a integrity constraint that checks if the cardinality of the relation has changed and it raises an error if not.
But you can change this if you want or you can create a new shorthand for assignments without the constraint.
For instance
Assert('nuts', 25);
Regards
Alfredo
Received on Thu May 06 2004 - 18:55:01 CEST