Master-detail versus lookup relationships
Key Takeaway
A lookup relationship is a loose link, and a master-detail relationship is a tight link. If the parent needs a roll-up summary field, the relationship must be master-detail.
A relationship field links one object to another so users can see related data, such as the contacts on an account. Salesforce has two main types. A lookup relationship is a loose link between objects that can stand on their own. A master-detail relationship is a tight link where the master record controls the detail record's deletion, ownership, and security. The type you choose decides how the objects handle data deletion, sharing, and required fields on page layouts.
Lookup and master-detail relationships compared
You create a relationship by adding a custom relationship field to an object. Lookup relationships are like master-detail relationships, except they don't support sharing or roll-up summary fields.
| Lookup relationship | Master-detail relationship | |
|---|---|---|
| Stand-alone objects | Objects usually work as stand-alone objects and have their own tabs | The detail object is highly dependent on the master and doesn't work as a stand-alone object |
| Relationship field | Can be optional or required | Always required on the detail record's page layout |
| Standard report types you get | Join data from two objects in one report | Join three: the master, the detail, and one other lookup object |
If objects are related only in some cases...
Use a lookup relationship.
If the parent needs a roll-up summary field...
The relationship must be master-detail.
If you need a relationship on an external object...
Master-detail isn't available, because external objects support only lookup, external lookup, and indirect lookup relationships.