GATE 2002
56 questions
MCQ 561-mark 56
Questions 51–55 of 56
With regard to the expressive power of the formal relational query languages, which of the following statements is true ?
Answer: (C)
Relational algebra and safe relational calculus have the same expressive power (Codd's theorem): a query can be written in safe relational calculus if and only if it can be written in relational algebra.
Unrestricted relational calculus is more powerful, because it allows unsafe queries. For example has an infinite answer, and relational algebra cannot express it. So (B) is false. (A) is false because algebra cannot express unsafe queries, and (D) is false because (C) is true.
Answer: (C)
Unrestricted relational calculus is more powerful, because it allows unsafe queries. For example has an infinite answer, and relational algebra cannot express it. So (B) is false. (A) is false because algebra cannot express unsafe queries, and (D) is false because (C) is true.
Answer: (C)
Relation R is decomposed using a set of functional dependencies, F ,and relation S is decomposed using another set of functional dependencies, G. One decomposition is definitely BCNF , the other is definitely. 3NF , but it is not known which is which. To make a guaranteed identification, which one of the following tests should be used on the decompositions ? (Assume that the closures of F and G are available).
Answer: (C)
Every BCNF relation is also in 3NF, so we need a test that only the BCNF decomposition can pass.
(A) Dependency preservation does not tell them apart. A BCNF decomposition may or may not preserve the dependencies, and so may a 3NF decomposition.
(B) Lossless join does not tell them apart. Either kind of decomposition can be lossless or lossy; the normal form does not decide it.
(C) The BCNF definition does. Using the closures, check that the left side of every non-trivial FD in each relation is a super key. The BCNF decomposition passes. The 3NF decomposition is the one that fails.
(D) The 3NF definition does not tell them apart. A BCNF relation is also in 3NF, so both decompositions pass.
Answer: (C)
(A) Dependency preservation does not tell them apart. A BCNF decomposition may or may not preserve the dependencies, and so may a 3NF decomposition.
(B) Lossless join does not tell them apart. Either kind of decomposition can be lossless or lossy; the normal form does not decide it.
(C) The BCNF definition does. Using the closures, check that the left side of every non-trivial FD in each relation is a super key. The BCNF decomposition passes. The 3NF decomposition is the one that fails.
(D) The 3NF definition does not tell them apart. A BCNF relation is also in 3NF, so both decompositions pass.
Answer: (C)
Relation R with an associated set of functional dependencies, F , is decomposed into BCNF. The redundancy (arising out of functional dependencies) in the resulting set of relations is.
Answer: (A)
A relation is in BCNF when, for every non-trivial FD that holds, is a super key.
Redundancy caused by an FD needs two tuples with the same value, so that the value is stored twice. If is a super key, no two tuples share an value, so this cannot happen. So a BCNF decomposition has no redundancy that comes from functional dependencies. Other kinds of redundancy, such as those from multivalued dependencies, can still remain, but the question asks only about FD redundancy.
(B) is wrong because the redundancy is zero, and a 3NF decomposition cannot have less than zero. (C) and (D) are wrong because the redundancy is exactly zero, whatever the size of .
Answer: (A)
Redundancy caused by an FD needs two tuples with the same value, so that the value is stored twice. If is a super key, no two tuples share an value, so this cannot happen. So a BCNF decomposition has no redundancy that comes from functional dependencies. Other kinds of redundancy, such as those from multivalued dependencies, can still remain, but the question asks only about FD redundancy.
(B) is wrong because the redundancy is zero, and a 3NF decomposition cannot have less than zero. (C) and (D) are wrong because the redundancy is exactly zero, whatever the size of .
Answer: (A)
A B+-tree index is to be built on the Name attribute of the relation STUDENT. Assume that all student names are of length 8 bytes, disk blocks are of size 512 bytes, and index pointers are of size 4 bytes. Given this scenario, what would be the best choice of the degree (i.e. the number of pointers per node) of the B+-tree
Answer: (C)
The degree p is the number of pointers per node, and a node must fit in a 512-byte block. Key = 8 bytes, pointer = 4 bytes.
Internal node (p child pointers and p-1 keys):
Leaf node (p-1 keys, p-1 record pointers and one sibling pointer):
Both node types give the same limit. The largest whole value is . Degree 44 does not fit in a block, and 16 and 42 waste space.
Answer: (C)
Internal node (p child pointers and p-1 keys):
Leaf node (p-1 keys, p-1 record pointers and one sibling pointer):
Both node types give the same limit. The largest whole value is . Degree 44 does not fit in a block, and 16 and 42 waste space.
Answer: (C)
In the index allocation scheme of blocks to a file, the maximum possible size of the file depends on
Answer: (C)
With index allocation, we can work out the maximum file size like this:
Blocks one Index block can address Size of block / Size of block address
Block addresses available to address one file
Most blocks we can use for the Index * Blocks one Index block can address
Size of File = * Size of Block
So it is clear that:
The answer is (C).
A & B are not complete.