Retrieve a customer description to be displayed when processing an order:
When the I/O module for the order table is made operational the Predetermined Join Column customer description will be available in the same way as a virtual column when coding RDML without having to include any type of fetch from the customer table.
Where a code table is repeatedly accessed for the same information an appropriate KEEP LAST value will reduce the number of I/Os performed.
Retrieve the descriptions of the 'from' and 'to' warehouses in a stock transfer table:
Retrieve the total value and number of lines in an order when displaying the order header details:
When the order table is made operational, the total value and line count columns are available in the RDML editor along with the order columns without coding any reference to the order line table.
Calculate a price for each line of an order using a Predetermined Join Column and a virtual column:
By including the product price (Predetermined Join Column) and product value (virtual column) when defining a select command in RDML, the arithmetic will be performed without any additional RDML code.
Manipulate the Department and Section tables which are normally part of a Personnel System database.
Imagine that you want to be able to make the Department Description column in the Department table part of the Section table. You also want to derive the Section Count column by counting the sections for a specific department in Section table. PJCs will be created to make these two columns part of the Department table.
First, two new virtual columns are created in the Repository:
Based on the access routes between the Section table and the Department table, a PJC is added to the Section table so that the Description of Department column is a table lookup to the Department Description in the Department table. Description of Department is a virtual column. When it is used by a function, the Repository will actually access the Department table to get the required data since it does not really exist in the Section table. The access route is used to determine how to access the data.
Based on the access routes between the Department table and the Section table, a PJC is added to the Department table so that the Section Count column is calculated by counting the appropriate sections in the Section table. Section Count is a virtual column. When it is used by a function, the Repository will actually access the Section table to get and total the data.