Specifying Relationships

The relationship section is used to create joins between custom query subjects or custom query subjects and pre-defined query subjects. If you are designing a set of queries that are related to each other, that relationship needs to be specified. This portion of the XML file enables you to create those relationships.

The following sections list the relationship elements, the attributes of those elements, the elements they contain, and the elements in which they are contained.

RELATIONSHIPS

Attributes:

Contains: relationship

Contained by: MODELQUERYSUBJECTS

 

relationship

Attributes:
parent
The name of the parent query subject.

Required.

child
The name of the child query subject.

Required.

pid
The field to join to on the parent.

Required.

cid
The field to join to on the child.

Required.

innerjoin
Is this an inner join? Values are true or false.

Optional.

useReportingPeriodId
Whether to join on the reporting period. Values are true or false.

Optional.

one-to-n-left-outer-join
Is this a left outer join? Values are true or false.

Optional.

Contains: None.

Contained by: RELATIONSHIPS

 

 

RELATIONSHIPS Example

<RELATIONSHIPS>
  <relationship
    parent="RISKEVAL-BY-SOXRISK"
    child="RISK_RATINGS"
    pid="RE_RISKEVAL_ID"
    cid="RE_RISKEVAL_ID"
    useReportingPeriodId="true"
    one-to-n-left-outer-join="true"/>

  <relationship
    parent="RISKEVAL-BY-SOXRISK"
    child="RISK_ALLOCATED"
    pid="RE_RISKEVAL_ID"
    cid="RE_RISKEVAL_ID"
    useReportingPeriodId="true"
    one-to-n-left-outer-join="true"/>

</RELATIONSHIPS>