48.9k views
4 votes
In a lookup relationship, what happens to the child records if the parent record is deleted?

1) Child records are deleted
2) Child records are not deleted
3) A subset of the child records are deleted
4) Parent record deletion fails

1 Answer

6 votes

Final answer:

In a lookup relationship, the deletion of a parent record does not cause the child records to be deleted; their reference to the parent is simply removed.

Step-by-step explanation:

In a lookup relationship within a database or a platform like Salesforce, when a parent record is deleted, the child records are not deleted. Instead, the field that established the lookup on the child records typically gets cleared or set to null, removing the reference to the deleted parent record. The integrity of the child records is maintained, and they remain in the database without that relationship. This behavior differs from a master-detail relationship where deleting a parent (master) would result in the deletion of the associated child (detail) records.

User Pavel Anossov
by
7.9k points