Master and detail blocks are linked to each other in one of two ways: either through a relational join condition, or though a REF column in one block that points to data in the other block.
The master block is related to the detail block through the join condition. The join condition establishes the primary-key item(s) in the master block and the foreign-key item(s) in the detail block. The join condition for the example application would be stated as follows:
warehouse.region_id = region.id
That is,
detail_block.foreign_key_item = master_block.primary_key_item
Note: For Forms processing, it is recommended that you avoid basing a join condition on columns in the database that are of type CHAR. (VARCHAR2 columns, however, are acceptable.)
A REF column in a table/block contains pointers to rows of data in another table/block. This reference forms a natural master-detail relationship. The detail block has a REF item that points to the master block. Note that a REF link is not dependent on any primary or foreign key values in either table.