Types of table relationships

Table relationships can be categorized as one-to-one or one-to-many relationships. A one-to-one relationship means that for every record in the primary table, there is at most one and only one corresponding record in the secondary table. A one-to-many relationship means that for every record in the primary table, there can be any number of records in the secondary table.

The following illustration shows the differences between one-to-one and one-to-many relationships.

[spacer]

The Customer_Master table is the primary table in both examples. In the one-to-one relationship, there can be only one record in both the Customer_Master and Customer_Info tables with the Cust_ID 0001. In the one-to-many relationship, there can be only one record in the Customer_Master table with the Cust_ID 0001, but there can be multiple invoices associated with that Cust_ID in the Invoice_Data table.

You do not need to specify the type of relationship when you use the Table Relationship Definition window to define a relationship between two tables. The Report Writer automatically chooses the appropriate type of relationship based upon the fields you use to link the tables. It is still important to understand relationship types because the type of relationship between tables will affect the type and quantity of data that you can use in your report.


Documentation Feedback