masterdetail
Master-detail is a data relationship pattern in which one record acts as the parent (master) and one or more records act as the child (detail). The detail records depend on the master for identity and often for security, ownership, and lifecycle. In many implementations, the detail table contains a foreign key that points to the master, and the master controls or constrains the existence of its details. A common characteristic is cascade behavior: deleting the master typically deletes its associated details, ensuring referential integrity. By contrast, a lookup relationship allows the child to exist independently and does not imply the same tight coupling or cascade deletion.
Key features commonly associated with master-detail designs include referential integrity, where detail records cannot exist without
Common use cases involve assemblies of items where a single parent aggregates multiple children, such as an
In practice, master-detail is often contrasted with the simpler lookup relationship, where records remain more independent