3.11 Merging and Refreshing Workspaces for Tables with Valid Time Support

When tables that have valid time support are merged or refreshed, you can determine the resulting rows by considering the distinct cases when there is an intersection between rows for the same primary key value.

To determine if two row intersect, you can use the WM_OVERLAPS operator.

In the validTill cases shown in Table 3-3:

  • For a merge operation, the target workspace is the parent workspace.

  • For a refresh operation, the target workspace is the child workspace of the specified workspace.

  • Because of the intersecting nature of the rows, conflict resolution was performed before the merge or refresh operation. (A single source row might conflict with multiple target rows, and a single target row might conflict with multiple source rows.)

Table 3-3 validTill Values and Intersection Result from Merge or Refresh Operation

validTill Values Intersection Result

Both the source and the target rows have a validTill value that is not DBMS_WM.UNTIL_CHANGED.

The intersecting portion of the row is modified in the target workspace to equal that of the source row.

The validTill value of the source row is not DBMS_WM.UNTIL_CHANGED, and the value for the target is DBMS_WM.UNTIL_CHANGED.

The intersecting portion of the row is modified and the resulting row has a validTill value equal to that of the source row.

The validTill value of the source row is DBMS_WM.UNTIL_CHANGED, and the value for the target row is not DBMS_WM.UNTIL_CHANGED.

The intersecting portion of the row is modified and the resulting row has a validTill value equal to that of the target row.

The validTill value of both the source and target rows are both DBMS_WM.UNTIL_CHANGED.

The intersecting portion is modified and the resulting row has a validTill value of DBMS_WM.UNTIL_CHANGED.

For all cases in Table 3-3, any non-intersecting portion of the target row is left unchanged. When there is no overlapping row in the target workspace, then no special consideration needs to be made; the row is merged or refreshed as is without any additional changes.