I am a new computer graduate and I am motivated by all this programming; I am making an administrative system of human resources for my institution (Police) I am using the yiiframework 1.1 I think this framework is quite practical; Now create 5 tables: officials, families, studies, transfers and casualties; Of course the last 4 tables relate to the table "officials"; I have 2 problems is the following: FIRST: I want that when deleting 1 record of the table "Officials" I delete the records of that ID of the Study, Families and Transfers tables. SECOND: in the case of the "Low" table, I want the bitagora or permanent records to be maintained; they told me that using ON_DELETE calling with Constraints, I really do not know how to do it; they could help me within their possibilities ... !!!