Re: Timing Issues in Oracle

From: Marc de Brouwer <mbrouwer_at_nl.oracle.com>
Date: 1995/07/10
Message-ID: <3truc6$76k_at_nlsu110.nl.oracle.com>#1/1


Gordon E. Hooker (gordonh_at_acslink.net.au) wrote:
: Hi All,
 

: I am fairly new to the Oracle fold after many years working with
: Informix.
 

: I have a question I would like to pose to anyone out there who can
: advise me.
 

: I would like to know how the Oracle server implements the relational
: concept of timing with regards to constraint checking.
 

: In a transaction if I wanted to update data on which there is an
: unique constraint how would you defer the constraint. What I mean is
: as follows:
 

: I have a set of rows
 

: col1 unique
: 1
: 2
: 3
: 4
: I want to update the table and set col1 = col1 + 1. When the value 1
: is update and set to 1+1 it would cause unique constraint error. How
: could I defer constraint checking until all the rows had 1 added to
: it, which at the end of the update not cause the error?
 

: Thanks in advance...

: -----------------------------\ooOoo/-----------------------------------
: Gordon Hooker MACS PCP ,--_|\
: 25 Clarke Street, Ripley, Queensland, 4306, Australia / \
: gordonh_at_acslink.net.au \_.--._/
: mobile: 018883835 phone: 61-7-2889716 V
: -----------------------------------------------------------------------
: The opinions you read here are mine and not necessarily those of my
: employers. Although, I must say they are the truth, the whole truth,
: and nothing like the truth. As far as I'm concerned anyway...
My 5c:

Check out the Server Concepts Manual, page 7-17 "The Mechanisms of Constraint Checking".
In Oracle7, your example is not a problem. It will only generate an error if the result of your operation would violate the constraint, and it doesn't.

Hope this answers your question.
Greets,
Marc.

Disclaimer: these are MY OWN opinions, not Oracle's. Received on Mon Jul 10 1995 - 00:00:00 CEST

Original text of this message