The Oracle tenants of OceanBase Database can use integrity constraints to prevent invalid data from being inserted into the tables in databases. This topic describes integrity constraints and their application scenarios.
Integrity constraints are used to ensure that the information stored in a database complies with specific business rules. For example, if the execution result of a DML statement violates an integrity constraint, the statement is rolled back and an error message is returned.
Operations performed on synonyms of tables and views are subject to the integrity constraints for the base tables.
For example, assume that you have defined an integrity constraint on the salary column of the employees table. This integrity constraint requires that no row containing a numeric value greater than 10,000 in the salary column can be inserted to the employees table. If an INSERT or UPDATE statement violates this integrity constraint, the statement is rolled back, and an error message is returned.