Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Trigger to ensure unique objects

Trigger to ensure unique objects

From: Christian \ <Christian.Gulich_at_IN.Stud.TU-Ilmenau.de>
Date: Tue, 20 Jan 2004 10:54:57 +0100
Message-ID: <buitr6$jk2$1@piggy.rz.tu-ilmenau.de>


Hi,
I have some multimedia content in my database stored using interMedia. Because there is no way, to declare these objects (ORDImage, ORDVideo, ...) as unique (or is it possible?), I wanted to write a trigger, wich ensures this constraints.
The trigger fires before insert and update operations for each row. In this trigger a have to check, if the same object is already in the table. Therefore I must read the complete table and perform my checks. The problem is, that this tricker throws an error, that "table is modified at the moment an the trigger can't see this". Oracle suggestion to solve this, is not to read this table in the trigger - not very good for me. I suppose there is a lock at the table. Do you have any suggestions, how I could implement the trigger?
Thanks Christian Received on Tue Jan 20 2004 - 03:54:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US