Frequently, you may have data in one table that is related to data in another table in a one-to-many relationship. For example:
You maintain information about departments and their employees. In one department there are many employees. That is, there is a one-to-many relationship between departments and employees.
You maintain information about your customers and their orders. One customer typically has many orders. There is a one-to-many relationship between customers and orders.
You may want to display this type of relationship in a form. Such a form is called a master/detail one-to-many form.
For example, the following form displays information about one department at the top and all of the employees of that department at the bottom:
About the ID column Note the ID of the department in the master table at the top of the form. Although you cannot see the ID of the department in the detail table at the bottom of the form, it is there. The ID has been hidden by moving grid boundaries to cover the ID column. Since all the ID values are the same, hiding the values is useful.
If the detail table did not include the ID, the form would not be updatable. If you forget to include necessary columns, InfoMaker prompts you.
The following illustration shows the database tables that handle the data on this form: the Department table and the Employee table in the EAS Demo DB. The Department table is the master table, and the Employee table is the detail table.
Note that there is a primary/foreign key relationship between the tables: the Dept_id column in the Employee table has the same values as the Dept_id column in the Department table: