Siebel Marketing Guide > External Data Mapping > Joining Tables and Fields >

Joining Tables


Use the following procedure to create joins between two tables.

To create a new join between two tables

  1. From the application-level menu, choose View > Site Map > Marketing Administration > External Data Mapping.
  2. Click the Joins view tab.
  3. NOTE:  To see more details, in the Joins list, select a join record and choose Details from the Show drop-down list.

  4. In the Joins list, create a new record.
  5. Complete the necessary fields using Table 20 as a guide and save the join.

Table 20. Fields in the Joins View
Field
Comment
Cache
Select this check box when the table should be loaded into memory or accessed off disk as necessary.
To reduce extract time, cache small tables (10,000 rows and smaller). Do not load large tables into memory unless the server has sufficient physical RAM.
Cardinality
Cardinality is the ratio of occurrence of matching records between the two tables. This ratio helps the Siebel Marketing Server determine the fastest way to join the records.
Select the cardinality between the parent and child tables from the list of values. Options are 1:N (one to many), 1:1 (one to one), N:N (many to many), and N:1 (many to one). The default is N:N.
For example, if the join keys are SSN and ACCOUNT_ID and the parent table has one record for each SSN/ACCOUNT_ID while the child table has two records for any SSN/ACCOUNT_ID, this setting would be 1:N.
In this case, the Siebel Marketing Server would scan for others after it has found one matching record.
Child Table
Click the Child Table select button. In the Pick Tables dialog box, select the Child table (the table to which the parent table will be joined). Click OK.
Cost
Type a cost value if you want the Siebel Marketing Server to evaluate which of two or more possible paths of joining tables is the most efficient. See Using the Cost Parameter (Advanced).
Customer Hierarchy
If the join is specific to a particular customer hierarchy, click the Customer Hierarchy select button. In the Pick Customer Hierarchy dialog box, select the customer hierarchy from the list. Click OK. When you specify a customer hierarchy for a join, that join is restricted to that hierarchy.
For example, you may wish to use a different join strategy for one type of customer hierarchy versus another. By making each join specific to a different customer hierarchy, the marketing administrator can indicate which strategy should be used. For additional information see, Guidelines for Customer Hierarchies and Joins.
Hint (Show Details)
(Optional) Type a hint statement if applicable. This field is only applicable to Oracle databases.
Hint statements are passed on to the RDBMS through the SQL generated by the Marketing Server.
Siebel Marketing includes these hints statements in the select statement against the child table. The following hints may be useful:
  • /*+all rows*/ This statement bypasses any indexes. It is useful when caching a table.
  • /*+first rows*/ This statement forces the use of an index. It is useful when you are not using the cache, the table is large, and the rows you want to retrieve are already in a sorted index.
  • /*+parallel (fully qualified table name,1)*/ This statement invokes parallelism on the select statement. It is not necessary if parallelism is already enabled at the table level.
Do not invoke parallelism if tables are already physically stored in sorted order and you checked the Presorted option when mapping tables and fields. If you do invoke parallelism, the order will be incorrect because each thread delivers records when it can.
Parent Table
Click the Parent Table select button. In the Pick Tables dialog box, select the table that is the start point for the join. Click OK.
For a start point join, leave this field blank.
RDBMS Join (Show Details)
Select this check box to display a check mark if you want the join to occur in the relational database management system (RDBMS) as opposed to the Marketing Server. The default is No (clear).

By default the Siebel Marketing Server performs the joins (faster). In some cases, you might want to reduce extraction time by having your RDBMS perform the join.
In general, you get the best extraction speed from RDBMS joins when joining to a large table but using a small percentage of its rows when using hierarchical attributes and filters.
You must use Siebel Marketing joins if the two tables are not in the same RDBMS.
Type
Choose Outer or Equal (inner) as the join type.
When Siebel Marketing Server cannot find a record in the child table that corresponds with a record in the parent table, it can either discard the row of data or keep it even though the row is incomplete.
To accept only complete rows (data in both parent and child), choose Equal. To accept partial rows (data only in the parent), choose Outer. A choice of Outer usually results in joining more rows than choosing Equal.


 Siebel Marketing Guide, Version 7.5, Rev. A 
 Published: 18 April 2003