Вы находитесь на странице: 1из 2

Relationa Algebra TC DC

Q1.

Relationa Algebra TC DC Q1. Q2. Q3. Q4. Q5. Q6. Q7. Consider the relational schema given

Q2.

Relationa Algebra TC DC Q1. Q2. Q3. Q4. Q5. Q6. Q7. Consider the relational schema given

Q3.

Relationa Algebra TC DC Q1. Q2. Q3. Q4. Q5. Q6. Q7. Consider the relational schema given

Q4.

Relationa Algebra TC DC Q1. Q2. Q3. Q4. Q5. Q6. Q7. Consider the relational schema given

Q5.

Relationa Algebra TC DC Q1. Q2. Q3. Q4. Q5. Q6. Q7. Consider the relational schema given

Q6.

Relationa Algebra TC DC Q1. Q2. Q3. Q4. Q5. Q6. Q7. Consider the relational schema given

Q7. Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee.

Assume that every employee has at least one associated dependent in the dependent relation. employee (empId, empName, empAge) dependent(depId, eId, depName, depAge)

Consider the following relational algebra query:

ΠempId(employee)-ΠempId(employee pAge)dependent)

Relationa Algebra TC DC Q1. Q2. Q3. Q4. Q5. Q6. Q7. Consider the relational schema given

(empId = eID)(empAge

The above query evaluates to the set of empIds of employees whose age is greater than that of

(A) some dependent. (B) all dependents. (C) some of his/her dependents. (D) all of his/her dependents.
(A)
some dependent.
(B) all dependents.
(C)
some of his/her dependents.
(D) all of his/her dependents.
Q8. Consider the following relational schema.
Students(rollno: integer, sname: string)
Courses(courseno: integer, cname: string)
Registration(rollno: integer, courseno: integer, percent: real)
Which of the following queries are equivalent to this query in English?
“Find the distinct names of all students who score more than 90% in
the course numbered 107”
(I)
SELECT DISTINCT S.sname
FROM Students as S, Registration as R
WHERE R.rollno=S.rollno AND R.courseno=107 AND R.percent >90
(II) Πsname(σcourseno=107 ∧ percent>90 (Registration ⋈ Students))
(III) {T | SStudents, RRegistration ( S.rollno=R.rollno ∧
R.courseno=107 ∧ R.percent>90 ∧T.sname=S.sname)}
(IV) {<SN> | SRRP ( <SR, SN>Students ∧ <SR, 107,
RP>Registration ∧ RP>90)}
(A)
I, II, III and IV
(B) I, II and III only
(C)
I, II and IV only
(D) II, III and IV only
Q9.
Q11.How many tuples does the result of the following relational algebra
of A.
U 
 A.Id >40 v C.Id <15 C
(A)
7
(B) 4
(C) 5
(D) 9

Ankush Saklecha, CSE Gate Trainer, 9685285381, saklecha.ankush@gmail.com

Relationa Algebra TC DC

Q12. Q18. The database can be configured to do ordered indexing on Ap or hashing on
Q12.
Q18.
The database can be configured to do ordered indexing on Ap or hashing on
Ap.
Which of the following statements is TRUE?
(A)
Ordered indexing will always outperform hashing for both queries
(B)
Hashing will always outperform ordered indexing for both queries
(C)
Hashing will outperform ordered indexing on Q1, but not on Q2
(D)
Hashing will outperform ordered indexing on Q2, but not on Q1.

Q13.

Relationa Algebra TC DC Q12. Q18. The database can be configured to do ordered indexing on

Q14.

Relationa Algebra TC DC Q12. Q18. The database can be configured to do ordered indexing on

Q15.

Relationa Algebra TC DC Q12. Q18. The database can be configured to do ordered indexing on

Q16

Relationa Algebra TC DC Q12. Q18. The database can be configured to do ordered indexing on

Q17.

Relationa Algebra TC DC Q12. Q18. The database can be configured to do ordered indexing on

Q19.

Relationa Algebra TC DC Q12. Q18. The database can be configured to do ordered indexing on

Q20.

Relationa Algebra TC DC Q12. Q18. The database can be configured to do ordered indexing on

Q21.

Relationa Algebra TC DC Q12. Q18. The database can be configured to do ordered indexing on

Q22.

Relationa Algebra TC DC Q12. Q18. The database can be configured to do ordered indexing on

Q23.

Relationa Algebra TC DC Q12. Q18. The database can be configured to do ordered indexing on

Ankush Saklecha, CSE Gate Trainer, 9685285381, saklecha.ankush@gmail.com