Embedded Join Master Files

How to:

Each embedded join segment declaration describes one RDBMS table or view, or one non-RDBMS record. You can include up to 64 segments.

If several Master Files (used only with TABLE requests) include the same table, you can avoid repeating the same description multiple times. Describe the table in one of the Master Files, and use the CRFILE attribute in the other Master Files to access the existing description.


Top of page

x
Syntax: How to Define an Equijoin in the Master File

An embedded equijoin uses the PARENT segment attribute to identify the relationship between tables and/or records.

FILENAME=mtname, SUFFIX=rootsuffix   [,$]
 SEGNAME=table1, SEGTYPE= {S0} [,CRFILE=crfile1] [,$]
  FIELD=name,...,$
  .
  .
  .
 SEGNAME=table2, [SEGSUF=branchsuffix,] SEGTYPE=relationship,
  PARENT=table1 [,CRFILE=crfile2][,$]
   FIELD=name,...,$
  .
  .
  .

where:

mtname

Is the one-character to eight-character name of the embedded join Master File.

rootsuffix

When the Master File describes:

  • A homogeneous embedded join, rootsuffix specifies which adapter to use to access the data source.
  • A heterogeneous embedded join, rootsuffix specifies which adapter to use to access the highest-level subtree of the join. That is, it specifies which adapter to use to access the tables or records represented by the root segment and all directly-related descendant segments that are of the same DBMS type.
table1

Is the SEGNAME value for the root table or record in the embedded join. If this segment references a remote segment description, table1 must be identical to the SEGNAME from the Master File that contains the full definition of the remote data source.

name

Is any field name.

table2

Is the SEGNAME value for the related table or record. If this segment references a remote segment description, table2 must be identical to the SEGNAME from the Master File that contains the full definition of the remote data source.

SEGSUF

Is used in a heterogeneous embedded join to identify the beginning of a new subtree (other than the root subtree), and to specify which adapter to use to access that subtree. A subtree is a segment (representing a table or record) and all directly related descendant segments of the same data source type. You specify SEGSUF in the highest-level segment of the subtree.

branchsuffix

Specifies the value of SEGSUF.

relationship

Indicates the type of relationship between the table or record and its parent. Possible values are:

S0 indicates that the related table is in a one-to-many or many-to-many (non-unique) relationship with the table or record named as its parent.

U indicates that the related table or record is in a one-to-one or a many-to-one (unique) relationship with the table or record named as its parent.

KL references a remote segment description. Indicates that the related table or record is in a one-to-many or many-to-many (non-unique) relationship with the table or record named as its parent.

KLU references a remote segment description. Indicates that the related table or record is in a one-to-one or a many-to-one (unique) relationship with the table or record named as its parent.

crfile1

References a remote segment description. Indicates the name of the Master File that contains the full definition of table1.

crfile2

References a remote segment description. Indicates the name of the Master File that contains the full definition of table2.


WebFOCUS