Master–detail interface


In computer user interface design, a master–detail interface displays a master list and the details for the currently selected item. The original motivation for master detail was that such a view table on old 1980s 80-character-wide displays could only comfortably show about four columns on the screen at once, while a typical data entity will have some twenty fields. The solution is that the detail shows all twenty fields and the master shows only the commonly recognised three to five that will fit on the screen in one row without scrolling.
A master area can be a form, list or tree of items, and a detail area can be a form, list or tree of items typically placed either below or next to the master area. Selecting an item from the master list causes the details of that item to be populated in the detail area.

Data model

A master–detail relationship is a one-to-many type relationship. Examples of a master-detail relationship are: a set of purchase orders and a set of line items belonging to each purchase order, an expense report with a set of expense line items or a department with a list of employees belonging to it. An application can use this master-detail relationship to enable users to navigate through the purchase order data and see the detail data for line items only related to the master purchase order selected.