Let T be a full binary tree with 8 leaves. (A full binary tree has every level full). Suppose two leaves a and b of T are chosen uniformly and independently at random. The expected value of the distance between a and b in T (i.e., the number of edges in the unique path between a and b) is (rounded off to 2 decimal places) _____.
Your input ____
2
GATE CSE 2019
Numerical
+2
-0
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?
Your input ____
3
GATE CSE 2019
Numerical
+2
-0
A relational database contains two tables Student and Performance as shown below :
The primary key of the Student table is Roll_no. For the Performance table, the columns Roll_no. and Subject_code together from the primary key. Consider the SQL query given below:
SELECT S.Student_name, sum (P.Marks)
FROM Student S, Performance P
WHERE P.Marks > 84
GROUP BY S.Student_name;
The number of rows returned by the above SQL query is _________.
Your input ____
4
GATE CSE 2019
MCQ (Single Correct Answer)
+2
-0.67
Let the set of functional dependencies
F = {QR → S, R → P, S → Q}
hold on a relation schema X = (PQRS). X is not in BCNF. Suppose X is decomposed into two schemas Y and Z, where Y = (PR) and Z = (QRS).
Consider the two statements given below.
I. Both Y and Z are in BCNF
II. Decomposition of X into Y and Z is dependency preserving and lossless