Organizer Advantage is powerful yet easy to use database manager for Windows.
Advantage Designer lets you modify our solutions or easily create new ones.
Take control of your data with our simple or buinsess database software solutions.


 |  Organizer Advantage HowTo/Help  |  Designer HowTo/Help  | 


Designer Help > Data Fields, Controls > MasterDetail (Advanced)

easy-to-use database designer

Master Detail

The Master-Detail field lets you link and display record(s) from one table (detail table) in another table (master table). Data between tables is related through the use of the common fields. The Master-Detail field is defined in the master table.

The Master-Detail field lets you define the following relations: one-to-one or one-to-many.

If you want to use a master-detail field in your table:

  • Create MasterDetail field type
  • Define master detail options: a detail table, a common field for the detail table, a common field for the master table
  • Note: MasterDetail, Calculated, and QueryEdit fields are virtual (dynamic) data fields, those fields are placed at the end of the table structure by the Designer, regardless of your field definition order.

The Master-Detail field has a toolbar with several commands that let you add, edit, and delete records from the detail table:

  • Add: add records to the detail table.
  • Edit: modify selected record in the detail table.
  • Delete: delete records from the detail table.
  • You should use the above commands if you have additional data fields in the master table that calculate and store results from the detail table.

In the ProjectCost database solution there are two tables: P_PROJECTS (1) and P_COSTS (2).

  • COSTTABLE (3) is the master detail field in the P_PROJECTS (the master table).
  • COSTTABLE displays the list of project cost transactions from the P_COSTS (the detail table).
  • Tables are linked through the common fields: PROJECTNAME (4) from the P_PROJECTS table and PROJECT (5) from the P_COSTS table.
  • Project expense transactions should be processed through the COSTTABLE toolbar (Add and Edit).
master detail field, master table
master detail field, detail table

 

Copyright © 2021 · All Rights Reserved · PrimaSoft PC