TU Wien:Datenbanksysteme VU (Hose)/Quiz 2 (2024-03-12)

Aus VoWi
Zur Navigation springen Zur Suche springen

Given R(A, B, C) and S (X, Y, Z) what is the schema for R natural_join S?

- (X, Y, Z)

- (A, B, C, X)

- (C, X, Y, Z)

- (A, B, C)

+ (A, B, C, X, Y, Z)


Given R(A, B, C) and S(A, B, Z) what is the schema for R natural_join S?

- (A, B, C)

- (A, B, Z)

- (R.A, R.B, C, S.A, S.B, Z)

+ (A, B, C, Z)

Given 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?

- (A, B, C, Z)

- (A, B, C)

- (A, B, Z)

+ (R.A, R.B, C, S.A, S.B, Z)

What is true for R left_outer_join S?

+ The resulting relation may contain null values.

+ The size of the resulting relation |R left_outer_join S| is at least as big as |R natural_join S|.

- It is an illegal relational expression.

- It is the same as S left_outer_join R.

- It is the same as R right_outer_join S.

- It is the same as R full_outer_join S.


Given two relations R(A, B ,C) and S(C, Y, Z) what is the schema for R right_outer_join S?

- (A, B, Y, Z)

- (A, B, C)

+ (A, B, C, Y, Z)

- (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, X, Y)

- (A, X, Y)

- (B, C, X, Y)

+ (A, B, C)

Natural Joins are derived relational operators that use which of the following fundamental operators?

+ projection

+ cartesian product

+ selection

- union

- difference

- rename

Two relations R and S are union compatible if ...

+ for the i-th attribute of R and S they have the same domain.

+ they have the same arity.

- they have at most 10 attributes.

- they have the same number of tuples

- the attribute names of the columns are the same.

Which of the following statements are correct?

+ A valid relation can consist of many tuples.

+ A valid relation has at least one attribute.

- A valid relation can contain duplicate tuples.

- A valid relation can have no more than one attribute.

- A tuple consists of many relations.

Which of the following joins are not commutative?

+ Left outer join

+ Right outer join

+ Semi join

+ Natural join

Are duplicate tuples allowed in the relational model?

False

If the arity of R is 4 and the arity of S is 3, then what is the arity of R x S ?

+ 7

- 1

- 3

- 4

- 12