Relational algebra and relational model Flashcards
If the arity of R is 4 and the arity of S is 3, then what is the arity of R x S ?
7
Natural Joins are derived relational operators that use the following fundamental operators?
Projection, selection and the cartesian product
Given two relations R(A,B,C) and S(C,Y,Z) what is the schema for R right_outer_join S?
(A, B, C, Y, Z)
Given two relations R(A,B,C) and S(X,Y,A) what is the schema for R left_semi_join S?
(A, B, C)
What is true for R left_outer_join S?
The size of the resulting relation |R left_outer_join S| is at least as big as |R natural_join S|, may contain null values
A valid relation can contain duplicate tuples
False
A tuple consists of many relations
False
A valid relation has at least one attribute
Correct, a relation with zero attributes does not make sense
A valid relation can consist of many tuples
Correct
If R(A, B, C) and S(A, B, Z) what is the schema for R natural_join S?
(C, A, B, Z)
If R(A, B, C) and S(X, Y, Z) what is the schema for R natural_join S?
(A, B, C, X, Y, Z). The natural join is defined on the Cartesian product. Hence, if there are no common attributes in the input relations, then its result corresponds to the Cartesian product.
If R(A, B, C) and S(A, B, Z) what is the schema for R theta_join S with condition R.A=S.A and R.B=S.B?
(R.A, R.B, C, S.A, S.B, Z)
Two relations R and S are union compatible if they have the same arity
Correct
Two relations R and S are union compatible if they have at most 10 attributes
False
Two relations R and S are union compatible if the attribute names of the columns are the same
False