Question 1
Consider the following relations A, B, C. How many tuples does the result of the following relational algebra expression contain? Assume that the schema of A U B is the same as that of A.

Table A
Id Name Age
----------------
12 Arun 60
15 Shreya 24
99 Rohit 11
Table B
Id Name Age
----------------
15 Shreya 24
25 Hari 40
98 Rohit 20
99 Rohit 11
Table C
Id Phone Area
-----------------
10 2200 02
99 2100 01
7
4
5
9
Question 2
Suppose (
A
, B) and (
C
,D) are two relation schemas. Let r1 and r2 be the corresponding relation instances. B is a foreign key that refers to C in r2. If data in r1 and r2 satisfy referential integrity constraints, which of the following is ALWAYS TRUE?
A
B
C
D
Question 3
Consider the relations r(A, B) and s(B, C), where s. B is a primary key and r. B is a foreign key referencing s. B Consider the query

Let LOJ denote the natural left outer-join operation. Assume that r and s contain no null values. Which one of the following is NOT equivalent to Q?

.

.

.

.
Question 4
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:

The above query evaluates to the set of empIds of employees whose age is greater than that of
some dependent.
all dependents.
some of his/her dependents
all of his/her dependents.
Question 5

A
B
C
D
Question 6
1) Let R and S be two relations with the following schema
R (P,Q,R1,R2,R3)
S (P,Q,S1,S2)
Where {P, Q} is the key for both schemas. Which of the following queries are equivalent?
Only I and II
Only I and III
Only I, II and III
Only I, III and IV
Question 7
Let R1 (A, B, C) and R2 (D, E) be two relation schema, where the primary keys are shown underlined, and let C be a foreign key in R1 referring to R2. Suppose there is no violation of the above referential integrity constraint in the corresponding relation instances r1 and r2. Which one of the following relational algebra expressions would necessarily produce an empty relation ?
1
2
3
4
Question 8
Given the STUDENTS relation as shown below.

For (StudentName, StudentAge) to be the key for this instance, the value X should not be equal to
18
19
17
20
Question 9
Let r be a relation instance with schema R = (A, B, C, D). We define r1 = ΠA, B, C (r) and r2 = ΠA.D (r). Let s = r1 * r2 where * denotes natural join. Given that the decomposition of r into r1 and r2 is lossy, which one of the following is TRUE?
s ⊂ r
r ∪ s
r ⊂ s
r * s = s
Question 10
Given the relations
employee (name, salary, deptno) and
department (deptno, deptname, address)Which of the following queries cannot be expressed using the basic relational algebra operations (U, -, x,[Tex]\pi[/Tex], [Tex]\sigma[/Tex], [Tex]\rho[/Tex])?
Department address of every employee
Employees whose name is the same as their department name
The sum of all employees’ salaries
All employees of a given department
There are 21 questions to complete.