Say there are two relations r and s such that the foreign key B of r references the primary key A of s. How can the trigger mechanism be used to implement the on delete cascade option, when a tuple is deleted from s.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In SQLite syntax:
This creates a trigger that run on each row deleted from s.
The trigger deletes the corresponding records from r, given the foreign key relationship you indicated.