Discuss the different types of update operations in relation to the integrity constraints which must be satisfied in a relational database model.
Open in App
Solution
The following are the update operations in a relation or table which must be satisfied in a relational database model. The three basic types updates are as given below:-
(i) Insert: This operation is performed to add a new tuple in a relation e.g., an attempt to add another record of an account with data values corresponding to Code and its Type to Accounts relation shall be made by performing Insert operation. The insert operation is capable of violating any of the four constraints discussed above.
(ii) Delete. This operation is carried out to remove a tuple from a relation. A particular data record from a table can be removed by performing such a operation. The delete operation can violate only referential integrity, if tuple being removed is referenced by foreign key from other tuples in the database.
(iii) Modify. The operation aims at causing a change in the values of some attributes in existing tuples. This is useful in modifying existing values of an accounting record in a data table. Usually, this operation does not cause problems provided the modification is directed on neither primary key nor foreign key, Whenever applied, these operations must enforce integrity constraints specified on relational database schema. Retrieval operation on Relational Data Model does not cause violation of any integrity constraints.