oracle constraints on tables
Posted on 2013-01-21
I have a tricky question about constraints and primary keys.
lets say i have a table which has the following structure.
Table name : Events
so i have a table that stores different types of events that occur at certain times.
Generally speaking the events should be unique by time but there is an exception that one type of event can have multiple entries at the same time with the same description. Is there a way i can have a unique constraint with exceptions or a check constraint that checks for uniqueness. I dont really want to do it in a trigger as that will slow down the inserts significantly. This is a simplified extract of a very large database with a very complex structure and ui so performance is important.