Multilevel master-detail and subdetail records
Key Takeaway
Choose master-detail over lookup when a parent needs roll-up summary fields or its child records must inherit the parent's access. In a multilevel chain, put a master-detail relationship field on the child object at every level.
A master-detail relationship ties a detail (child) record tightly to a master (parent) record, so the master controls the detail record's owner, security, and deletion. A multilevel master-detail relationship adds another level below the detail, called a subdetail record. The top record then controls everything beneath it.
Master, detail, and subdetail records
In a master-detail relationship, the master record controls certain behaviors of its detail and subdetail records. A two-object relationship, such as Account to Expense Report, can extend down to subdetail records, such as Account to Expense Report to Expense Line Item. You can then perform operations across the whole master, detail, subdetail chain.
You build each level by creating a master-detail relationship field on the child object, so the field always lives on the detail side. In the expense chain, Expense Report holds the field that points to Account. Expense Line Item holds the field that points to Expense Report. The master can be a standard object, such as Account or Opportunity, or a custom object.
A detail record can't exist without its master, unlike lookup objects, which usually stand alone. The master-detail relationship field is required on the page layout of detail and subdetail records.