Update Operations and Dealing with Constraint Violations
There are three basic operations to be executes on relations:
- Insertion
- Deletion
- Update
The INSERT Operation:
The insert operation permits us to insert a new tuple in a relation. When we try to insert a new record, then any of the following four types of constraints can be violated:
- Key constraint: If the value of the key attribute in new tuple t is the similar as in the existing tuple in relation R.
- Domain constraint: If the value given to an attribute lies outside the domain of that attribute.
- Referential Integrity constraint: If the value of the foreign key in t refers to a tuple that doesn't show in the referenced relation.
• Entity Integrity constraint: If the primary key attribute value of new tuple t is given as null.