Database Management System
Q91.
Let R and S be two relations with the following schema R (\underline{P},\underline{Q},R1,R2,R3) S (\underline{P},\underline{Q},S1,S2) Where {P, Q} is the key for both schemas. Which of the following queries are equivalent? I. \Pi _{P}(R\Join S) II. \Pi _{p}(R)\Join \Pi _{P}(S) III. \Pi _{P}(\Pi _{P,Q}(R)\cap \Pi _{P,Q}(S)) IV. \Pi _{P}(\Pi _{P,Q}(R)-(\Pi _{P,Q}(R)-\Pi _{P,Q}(S)))Q92.
Which of the following query transformations (i.e., replacing the l.h.s. expression by the r.h.s expression) is incorrect? R_1 and R_2 are relations, C_1 and C_2 are selection conditions and A_1 and A_1 are attributes of R_1.Q93.
Suppose the adjacency relation of vertices in a graph is represented in a table Adj(X,Y). Which of the following queries cannot be expressed by a relational algebra expression of constant length ?Q94.
Consider the following relational schema:Student(school-id,sch-roll-no,sname,saddress) School(school-id,sch-name,sch-address,sch-phone) Enrolment(school-id,sch-roll-no,erollno,examname) ExamResult(erollno,examname,marks) Consider the following tuple relational calculus query. \begin{array}{l} \{t \mid \exists E \in \text { Enrolment } t=E \text { .school-id } \\ \wedge \mid\{x \mid x \in \text { Enrolment } \wedge x . \text { school-id }=t \wedge(\exists B \in \text { ExamResult } B . \text { erollno }=x . \text { erollno } \wedge B \\ \text { examname }=x . \text { examname } \wedge B . \text { marks }>35)\}|\div|\{x \mid x \in \text { Enrolment } \wedge x . \text { school-id }=t\} \mid \\ * 100>35\} \end{array}If a student needs to score more than 35 marks to pass an exam, what does the query return?Q95.
Consider a selection of the form \sigma_{A\leq 100} (r), where r is a relation with 1000 tuples. Assume that the attribute values for A among the tuples are uniformly distributed in the interval [0, 500]. Which one of the following options is the best estimate of the number of tuples returned by the given selection query ?Q96.
Let r be a relation instance with schema R = (A, B, C, D). We define r_{1}=\Pi _{A,B,C}(R) and r_{2}=\Pi _{A,D}(R). Let s=r_1*r_2 where * denotes natural join. Given that the decomposition of r into r_1 and r_2 is lossy, which one of the following is TRUE?Q97.
Which one of the options given below refers to the degree (or arity) of a relation in relational database systems?Q98.
Let R1(\underline{A},B,(C)) and R2(\underline{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?Q99.
Let r and s be two relations over the relation schemes R and S respectively, and let A be an attribute in R. Then the relational algebra expression \sigma _{A=a}(r\Join s) is always equal to :Q100.
Consider the relation R(P,Q,S,T,X,Y,Z,W) with the following functional dependencies. PQ\rightarrow X;\quad P\rightarrow YX;\quad Q\rightarrow Y; \quad Y\rightarrow ZW Consider the decomposition of the relation R into the constituent relations according to the following two decomposition schemes. D1:\quad R=[(P,QS,T);\;(P,T,X);\;(Q,Y);\;(Y,Z,W)] D2:\quad R=[(P,Q,S);\;(T,X);\;(Q,Y);\;(Y,Z,W)] Which one of the following options is correct?