Suggested answer

Master-Detail:
— Tightly coupled: the child record's lifecycle, ownership, and sharing are controlled by the master.
— Cascade delete: deleting the master deletes all related detail records.
— The master field is required on the child — a detail cannot exist without a master.
— Supports Rollup Summary fields on the master (COUNT, SUM, MIN, MAX over child records).
— Maximum 2 per custom object.
Lookup:
— Loosely coupled: the child has its own OWD, owner, and sharing settings.
— Deleting the parent is configurable: clear the field, restrict the delete, or cascade.
— The lookup field is optional on the child.
— Does not support rollup summaries natively (use cross-object formulas for single values).
Junction object (Many-to-Many): A custom object with two master-detail relationships to two other objects. This is the correct data model for M:M relationships in Salesforce (e.g., Contact ↔ Campaign via CampaignMember).

Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.

Community comments (0)

No comments yet.

Sign in or create a free account to add a comment. Comments are moderated before they appear.

Plain text only, 3–2000 characters. A moderator reviews every comment before it is published.