Database Management System


Q71.

Consider a database that has the relation schema CR (StudentName, CourseName). An instance of the schema CR is as given below. The following query is made on the database T1\leftarrow \pi _{CourseName}(\sigma _{StudentName='SA'}(CR)) T2\leftarrow CR\div T1 The number of rows in T2 is ____________.
GateOverflow

Q72.

Consider the following three relations in a relational database.Employee(eId, Name), Brand (bId, bName), Own(eId ,bId)Which of the following relational algebra expressions return the set of eIds who own all the brands?MSQ
GateOverflow

Q73.

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 are
GateOverflow

Q74.

Given the relations employee (name, salary, dept-no), and department (dept-no, dept-name,address), Which of the following queries cannot be expressed using the basic relational algebra operations \left(\sigma, \pi,\times ,\Join, \cup, \cap,-\right)?
GateOverflow

Q75.

Consider two relations R1(A,B) with the tuples (1,5), (3,7) and R2(A,C) = (1,7), (4,9). Assume that R(A,B,C) is the full natural outer join of R1 and R2. Consider the following tuples of the form (A,B,C): a = (1,5,null), b = (1,null,7), c = (3, null, 9), d = (4,7,null), e = (1,5,7), f = (3,7,null), g = (4,null,9). Which one of the following statements is correct?
GateOverflow

Q76.

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 in R2. If data in r1 and r2 satisfy referential integrity constraints, which of the following is ALWAYS TRUE?
GateOverflow

Q77.

Consider the following relations A, B and C: How many tuples does the result of the following relational algebra expression contain? Assume that the schema of A\cupB is the same as that of A. (A\cup B)\bowtie _{A.Id \gt 40 \vee C.Id \lt 15}C
GateOverflow

Q78.

Consider the relational schema given below, where eId of the relation dependentis a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation. The above query evaluates to the set of empIds of employees whose age is greater than that of
GateOverflow

Q79.

Consider a relational table r with sufficient number of records, having attributes A_{1}, A_{2},..., A_{n} and let 1\leq p\leq n . Two queries Q1 and Q2 are given below. Q1:\pi _{A_{1}....A_{n}}(\sigma _{A_{p}=c}(r)) where c is a constant Q2:\pi _{A1....A_{n}}(\sigma _{c_{1}\leq A_{p}\leq c_{2}}(r)) where c_{1} and c_{2} are constants The database can be configured to do ordered indexing on A_{p} or hashing on A_{p}. Which of the following statements is TRUE?
GateOverflow

Q80.

Information about a collection of students is given by the relation studinfo(\underline{studId}, name, sex). The relation enroll(\underline{studId}, courseId) gives which student has enrolled for (or taken) what course(s). Assume that every course is taken by at least one male and at least one female student. What does the following relational algebra expression represent?
GateOverflow