Relational algebra and relational model Flashcards

1
Q

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

A

7

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

Projection, selection and the cartesian product

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

(A, B, C, Y, Z)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A

(A, B, C)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is true for R left_outer_join S?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A valid relation can contain duplicate tuples

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A tuple consists of many relations

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A valid relation has at least one attribute

A

Correct, a relation with zero attributes does not make sense

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A valid relation can consist of many tuples

A

Correct

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

A

(C, A, B, Z)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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

A

(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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Two relations R and S are union compatible if they have the same arity

A

Correct

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Two relations R and S are union compatible if they have at most 10 attributes

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Two relations R and S are union compatible if the attribute names of the columns are the same

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Two relations R and S are union compatible if they have the same number of tuples

A

False

17
Q

Two relations R and S are union compatible if they for the ith attribute of R and S have the same domain

A

Correct

18
Q

The natural join is not commutative

A

Correct

19
Q

The left outer join is not commutative

A

Correct

20
Q

The semi join is not commutative

A

Correct

21
Q

The right outer join is not commutative

A

Correct

22
Q

The inner join is not commutative

A

False

23
Q

Duplicate tuples are allowed in the relational model

A

False