Databases Reference
In-Depth Information
If we define a unary relation version of UNFOLD (analogous to the
unary relation version of COALESCE), then we can obtain T1 as follows:
( EXTEND ( S_DURING { S#, DURING } GROUP ( DURING ) AS X )
ADD UNFOLD (X)ASY){ALLBUTX}UNGROUP Y
As already suggested, however, we can simplify matters by inventing a rela-
tion unfold operator with syntax as follows (and straightforward semantics):
R UNFOLD A
Now we can write
WITH ( S_DURING { S#, DURING } UNFOLD DURING ) AS T1 :
We treat the right temporal difference operand in like fashion:
WITH ( SP_DURING { S#, DURING } UNFOLD DURING ) AS T2 :
Now we can apply (regular) relation difference:
WITH ( T1 MINUS T2 ) AS T3 :
T3 looks like this:
S#
DURING
S2
[d07, d07 ]
S3
[d03, d03 ]
S3
[d04, d04 ]
S3
[d05, d05 ]
S3
[d06, d06 ]
S3
[d07, d07 ]
S5
[d02, d02 ]
S5
[d03, d03 ]
S5
[d04, d04 ]
S5
[d05, d05 ]
S5
[d06, d06 ]
S5
[d07, d07 ]
S5
[d08, d08 ]
S5
[d09, d09 ]
S5
[d10, d10 ]
Search WWH ::




Custom Search