Skip to content


This guide presents the integrity constraint (IC) violation error and describes how to fix it.

An integrity constraint ensures the integrity of the database, requiring that its relations and data obey the specified constraint.

Consider the following example that defines the relation R and adds an IC to it:

def R = { 0 }
ic (x in R) { x > 0 }
Error example from the RAI Console

The IC enforces that every element in the relation R must be greater than 0. Therefore, the definition of R isn’t valid, since 0 is not greater than 0, and the output returns an IC violation error.

When an IC is violated, the running transaction is aborted and the output returns related information. In this sense, an IC violation error isn’t like other RAI errors, which show transactions as completed. It’s a tool that ensures certain rules are imposed correctly.

See the Integrity Constraints concept guide and Integrity Constraints Reference for more details.

Was this doc helpful?