Database management system quiz - DBMS quiz with answers - DBMS multiple choice questions - DBMS basics quiz - DBMS interview questions - Relational Algebra quiz in DBMS - Relational Algebra operations in Database interview questions
Let us use the following
relations R and S to answer the questions 1 – 10s;
|
|||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
1. Compute R ⋈
S. Which of the following records will be in the result? Assume each record
has the schema (A, B, C, D).
|
|||||||||||||||||||||||||
(a) (3, 3, 1, 6)
|
(b) (6, 4, 4, 1)
|
||||||||||||||||||||||||
(c) (2,
3, 3, 5)
|
(d) (3, 5, 3, 1)
|
||||||||||||||||||||||||
2. Compute R ⋈R.A<S.C S. [this is theta join]. Which of the following
records will be in the result? Assume each record has the schema (A, B, C,
D).
|
|||||||||||||||||||||||||
(a) (2,
3, 3, 5)
|
(b) (6, 4, 4, 1)
|
||||||||||||||||||||||||
(c) (6, 4, 3, 1)
|
(d) (3, 5, 1, 6)
|
||||||||||||||||||||||||
3. Compute R ⋈R.B < S.D AND R.A<S.C S. [this is
theta join]. Which of the following records will be in the result? Assume each
record has the schema (A, B, C, D).
|
|||||||||||||||||||||||||
(a) (3, 3, 3, 5)
|
(b) (6, 4, 3, 1)
|
||||||||||||||||||||||||
(c) (2,
3, 3, 5)
|
(d) (3, 5, 1, 6)
|
||||||||||||||||||||||||
4. Compute π C, D (S). Which of the
following records will be in the result?
|
|||||||||||||||||||||||||
(a) (5, 1)
|
(b) (4, 3)
|
||||||||||||||||||||||||
(c) (3, 3)
|
(d) (3,
5)
|
||||||||||||||||||||||||
5. Compute π B, C (R ⋈
S). Which of the following records will be in the result?
|
|||||||||||||||||||||||||
(a) (6, 4)
|
(b) (4,
3)
|
||||||||||||||||||||||||
(c) (5, 1)
|
(d) (5, 3)
|
||||||||||||||||||||||||
6. Compute π B (R) - π B (S). Which of
the following records will be in the result?
|
|||||||||||||||||||||||||
(a) (6)
|
(b) (4)
|
||||||||||||||||||||||||
(c) (1)
|
(d) (5)
|
||||||||||||||||||||||||
7. Compute π B (R) ∩ π B (S). Which of
the following records will be in the result?
|
|||||||||||||||||||||||||
(a) (6)
|
(b) (1)
|
||||||||||||||||||||||||
(c) (2)
|
(d) (5)
|
||||||||||||||||||||||||
8. Compute R ⋈
S. Which of the following records will be in the result? Assume each record
has the schema (A, B, C, D).
|
|||||||||||||||||||||||||
(a) (3, 3, 1, 6)
|
(b) (6, 4, 4, 1)
|
||||||||||||||||||||||||
(c) (3,
5, 1, 6)
|
(d) (3, 5, 3, 1)
|
||||||||||||||||||||||||
9. Compute π B (R) U π B (S). Which of
the following records will be in the result?
|
|||||||||||||||||||||||||
(a) (6)
|
(b) (1)
|
||||||||||||||||||||||||
(c) (2)
|
(d) (5)
|
||||||||||||||||||||||||
10. Assume a
relation R(A, B) with n unique records, and a relation S(B, C) with m unique
records. When you compute the natural join between R and S you shall get r
records as the result. Which of the following assumptions are correct in
terms of (n, m, r)?
|
|||||||||||||||||||||||||
(a) (5, 4, 25)
|
(b) (2, 3, 8)
|
||||||||||||||||||||||||
(c) (3, 3, 10)
|
(d) (2,
3, 6)
|
They have mistak on question 5 ?
ReplyDeleteAnswer will be : (b) (4, 3) & (c) (5, 1)
thanks. you are right.
Delete