Referential integrity rules trigger some cleanup of your dat
Referential integrity “rules” trigger some cleanup of your data when insertion, update, or deletion events would typically cause data anomalies. But the word “trigger” has its own place in database design and implementation. Research the concept of a “trigger” and compare and contrast “trigger” events with referential integrity rules.
Solution
TRIGGER
Trigger is a special kind of stored procedure that automatically executes when an event occurs in the database server. Data manupulation language \"triggers\" execute when a user tries to modify data through a data manipulation language (DML) event. DML events are INSERT, UPDATE, or DELETE statements on a table or view.
If elements of second table refer to the element of first table.Then element of first table is the primary key and the element of second table become the foreign key.primary key must be unique.It cannot have repeated values.
Referential integrity says about the special propery or kind of data which, when satisfied, requires every value of one attribute (column) of a relation (table) to exist as a value of another attribute (column) in a different (or the same) relation (table).
so when we manupulate data through different manupulation methods like insert,update and delete,the references between the primary and foreign keys get altered .This is one of the ways in which \"trigger\" events interfere with referental integrity constraints.
benifits.
1.we can keep track of values getting altered and affected when changes are made.
disadvantages
1..complexity increases.
