I have few tables that maintains one-to-many relationship among them. If i delete a record from master table, i expect the corresponding records from child tables also to be deleted. What is the best way to do this?
For example: i have 'Employee' table(let us say master table), that stores employee information. I have another table 'Education'(child table) that stores multiple education details(one-to-many) for a given employee. When i delete an employee from employee table, i want to delete corresponding records from child table automatically.
We tried with making status field 'in-active' for all corresponding records in child table through item-event automation.
What is best way?
To register for the forums, please contact your Digital-Clay representative.
delete records from child tables
-
ZevToledano
- Posts: 722
- Joined: Fri Apr 03, 2009 2:29 pm
Re: delete records from child tables
Deleting records is almost always a bad idea because this can cause orphaned records, a loss of accountability, and the company loses historical information. It is also not reversible. For these reasons, only an administrator has delete permissions by default, and there is no Automation delete action.
Changing the Status to Inactive through Automation is the best way to achieve this. The Employee record itself should also be made inactive instead of deleted.
I suggest that once the managers are sure that specific records are no longer needed, they can periodically delete the records manually, but only with full understanding of the consequences and not via an Automated action.
Changing the Status to Inactive through Automation is the best way to achieve this. The Employee record itself should also be made inactive instead of deleted.
I suggest that once the managers are sure that specific records are no longer needed, they can periodically delete the records manually, but only with full understanding of the consequences and not via an Automated action.