|< < 37 > >|

Divide

divide(R, S)

  • Like join, there are common columns between R and S.
  • Form "groups" in R, defined by unique values of the other columns, (those that don't appear in S).
  • Keep those groups that contain all of the S rows projected onto the common columns.

Example

R ÷ S computes values of X such that the corresponding set of Y contains all of project(S, [Y]).

R

X Y
1aaa
1bbb
2aaa
2bbb
2ccc
3bbb
3ccc
4aaa
4bbb
4ccc
4ddd

S

Y Z
aaa10
aaa20
bbb30
ccc40


divide(R, S, [Y])

X
2
4

|< < 37 > >|