Exercise 1: Join Size Estimation
How many tuples are in the output from:
-
select * from R, S where R.s = S.id
where S.id is a primary key and R.s is a foreign key referencing S.id
-
select * from R, S where R.s <> S.id
where S.id is a primary key and R.s is a foreign key referencing S.id
-
select * from R, S where R.x = S.y
where R.x and S.y have no connection except that dom(R.x)=dom(S.y)
Under what conditions will the first query have maximum size?
|