| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: More on lists and sets
Mikito Harakiri wrote:
> Definition. List intersection is a cartesian product with equijoin of
> the list nodes and lexicographic order. Example: 1->2->1 /\ 2->1->2 =
> 2->1->1->2
>
> 2 2
> ^ ^
> | \
> 1 1 ------> 1
> ^ ^
> | \
> 2 2
> 1 -> 2 -> 1
>
This is actually amusing. Selection from list is join of two lists. As join/intersection is noncommutative, we have left selection and right selection. Example:
Select all the elements greater than one from list
1->2->1->3->2
Formally we evaluate either
1->2->1->3->2 /\ 'x>1'
or
'x>1' /\ 1->2->1->3->2
The "list predicate" `x>1' evaluates to infinite list 2->3->4->5->...
Therefore:
1->2->1->3->2 /\ 'x>1' = 2->2->3
'x>1' /\ 1->2->1->3->2 = 2->3->2 Received on Mon Mar 20 2006 - 20:37:24 CST
![]() |
![]() |