Marks 1
Consider the following three relations in a relational database.
Employee ( $$\underline {eld} $$ , Name), Brand ( $$\underline {bld} $$ , bName), Own...
What is the optimized version of the relation algebra expression $$\pi_{A1}(\pi_{A2}(\sigma_{F1}(\sigma_{F2}(r))))$$, where $$A1, A2$$ are sets of att...
Which of the following tuple relational calculus expression(s) is/are equivalent to $$\forall t \in r \left(P\left(t\right)\right)$$?
I. $$\neg \exist...
Consider the relations r1(P, Q, R) and r2(R, S, T) with primary keys P and R respectively. The relation r1 contains 2000 tuples and r2 contains 2500 t...
Which of the following relational query languages have the same expressive power?
I) Relational algebra
II) Tuple relational calculus restricted to sa...
Let r be a relation instance with schema R = (A, B, C, D).
We define $${r_1} = {\pi _{A,B,C}}\left( r \right)$$ and $${r_1} = {\pi _{A,D}}\left( r \ri...
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. ...
Consider the following SQL query:
Select distinct a1, a2, ..., an
From r1, r2, ..., rm
Where P;
For an arbitrary predicate P, this query is equi...
With regard to the expressive power of the formal relational query languages, which of the following statements is true?
Given the relations
employee (name, salary, deptno), and department (deptno, deptname, address)
Which of the following queries cannot be expressed u...
Consider the join of a relation R with a relation S. If R has m tuples and S has n tuples then the maximum and minimum sizes of the join respectively ...
The relational algebra expression equivalent to the following tuple calculus expression:
$$\left\{ {t|t \in r \wedge \left( {t\left[ A \right] = 10 \w...
An instance of a relational scheme R(A, B, C) has distinct values for attribute A. Can you conclude that A is a candidate key for R?
Give a relational algebra expression using only the minimum number of operators from $$\left( { \cup ,\, - } \right)$$ which is equivalent to $$R \cap...
Marks 2
A relation r(A, B) in a relational database has 1200 tuples. The attribute A has integer values ranging from 6 to 20, and the attribute B has integer ...
Consider the following relations P(X,Y,Z), Q(X,Y,T) and R(Y,V).
How many tuples will be returned by the following relational algebra query?
...
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 quer...
Consider two relations $${R_1}\left( {A,B} \right)$$ with the tuples $$(1,5), (3,7)$$ and $${R_2}\left( {A,C} \right) = \left( {1,7} \right),\left( {4...
Consider a join (relation algebra) between relations r(R)and s(S) using the nested loop method.
There are 3 buffers each of size equal to disk block s...
Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume t...
Consider the following relations A, B and C:
A
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;...
Consider the following relations A, B and C:
A
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;...
Suppose R1 (A, B) and R2 (C, D) are two relation schemas. Let r1 and r2 be the
corresponding relation instances. B is a foreign key that refers to C i...
Consider a relational table r with sufficient number of records, having attributes
A1, A2,....., An and let 1 $$ \le $$ p $$ \le $$ n. Two queries Q1 ...
The following functional dependencies hold for relations R(A, B, C) and S(B, D, E):
$$$\eqalign{
& B \to A \cr
& A \to C \cr} $$$
The re...
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 fo...
Consider a selection of the form σA ≤ 100(r), where r is a relation with 1000 tuples. Assume that the attribute values for A among the tuples are unif...
Information about a collection of students is given by the relation studInfo(studId, name, sex). The relation enroll(studId, courseId) gives which stu...
Consider the relation employee(name, sex, supervisorName) with name as the key, supervisorName gives the name of the supervisor of the employee under ...
Consider the following relation schemas :
b-Schema = (b-name, b-city, assets)
a-Schema = (a-num, b-name, bal)
d-Schema = (c-name, a-number)
Let branch...
A table ‘student’ with schema (roll, name, hostel, marks), and another table ‘hobby’ with schema (roll, hobbyname) contains records as shown below:
Ta...
Consider the relation Student (name, sex, marks), where the primary key is shown underlined, pertaining to students in a class that has at least one b...
Which of the following relational calculus expressions is not safe?
Which of the following query transformations (i.e. replacing the l.h.s. expression by the r.h.s. expression) is incorrect? R1 and R2 are relations, C1...
A library relational database system uses the following schema
USERS (User #, User Name, Home Town)
BOOKS (Books # Book Title, Author Name) ISSUED (Bo...