GATE 2025
65 questions
MCQ 35 · MSQ 18 · NAT 121-mark 30 · 2-mark 35
Questions 16–20 of 65
If a relational decomposition is not dependency-preserving, which one of the following relational operators will be executed more frequently in order to maintain the dependencies?
Answer: (C)
Suppose a decomposition does not preserve dependencies. Then the attributes on the left and right sides of some functional dependency are split across different relations. To check or enforce that dependency, the DBMS must first rebuild the combined information by joining those relations again. This is an expensive operation. It has to be run again and again (for example, on every update) to confirm that the dependency still holds.
Answer: Join
Answer: Join
Consider the following three relations:
A tuple in represents a specific car of a given , made in a given , with a serial number and a color. A tuple in specifies that a company makes cars of a certain model. A tuple in specifies that an owns the car with a given number. Keys are underlined; () together form the key for ( denotes natural join)
Which one of the following options describes what the above expression computes?
A tuple in represents a specific car of a given , made in a given , with a serial number and a color. A tuple in specifies that a company makes cars of a certain model. A tuple in specifies that an owns the car with a given number. Keys are underlined; () together form the key for ( denotes natural join)
Which one of the following options describes what the above expression computes?
Answer: (C)
Work from the inside out. The natural join matches columns with the same name, so each join links the same car:
1. keeps the models made by ABC.
2. joins on , so it gives the cars of those models.
3. keeps only the red ones. These are the red cars made by ABC.
4. joins on , so it gives the owners of those same cars.
5. keeps just the owner names.
Both conditions (red and made by ABC) apply to the same car, so the result is the owners of a red car made by ABC.
Why the other options are wrong: (A) uses "or", but the conditions are joined by "and". (B) asks for owners of more than one car, but one qualifying car is enough. (D) gives cars, but the final projection is on owner.
Answer: (C)
1. keeps the models made by ABC.
2. joins on , so it gives the cars of those models.
3. keeps only the red ones. These are the red cars made by ABC.
4. joins on , so it gives the owners of those same cars.
5. keeps just the owner names.
Both conditions (red and made by ABC) apply to the same car, so the result is the owners of a red car made by ABC.
Why the other options are wrong: (A) uses "or", but the conditions are joined by "and". (B) asks for owners of more than one car, but one qualifying car is enough. (D) gives cars, but the final projection is on owner.
Answer: (C)
Consider a hash table of size 10 with indices , with the hash function
,
where linear probing is used to handle collisions. The hash table is initially empty and then the following sequence of keys is inserted into the hash table: 1, 4, 5, 6, 14, 15. The indices where the keys 14 and 15 are stored are, respectively:
,
where linear probing is used to handle collisions. The hash table is initially empty and then the following sequence of keys is inserted into the hash table: 1, 4, 5, 6, 14, 15. The indices where the keys 14 and 15 are stored are, respectively:
Answer: (D)
Hash function with linear probing (if a slot is taken, try the next slot, wrapping around).
Key 1: , goes to slot 3.
Key 4: , goes to slot 2.
Key 5: , goes to slot 5.
Key 6: , goes to slot 8.
Key 14: . Slot 2 is taken by 4, slot 3 is taken by 1, slot 4 is free. So 14 goes to slot .
Key 15: . Slot 5 is taken by 5, slot 6 is free. So 15 goes to slot .
Keys 14 and 15 are at indices 4 and 6.
Answer: (D)
Key 1: , goes to slot 3.
Key 4: , goes to slot 2.
Key 5: , goes to slot 5.
Key 6: , goes to slot 8.
Key 14: . Slot 2 is taken by 4, slot 3 is taken by 1, slot 4 is free. So 14 goes to slot .
Key 15: . Slot 5 is taken by 5, slot 6 is free. So 15 goes to slot .
Keys 14 and 15 are at indices 4 and 6.
Answer: (D)
Let be a continuous random variable whose cumulative distribution function (CDF) , for some , is given as follows:
If the median of is 3, then what is the value of ?
If the median of is 3, then what is the value of ?
Answer: (A)
For the median, we need . The question gives the median as . So the point lies in the middle piece of the CDF (we assume ).
Answer: 2
Answer: 2
Let , where is a standard normal random variable, and are two unknown constants. It is given that
where denotes the expectation of random variable . The values of are:
where denotes the expectation of random variable . The values of are:
Answer: (A)
We start with , where .
Take the mean: . This works because . So we get .
We know , so . Now:
, because . The question says this is , so .
Check: . This agrees with , because .
Answer: a=-2, b=1
Take the mean: . This works because . So we get .
We know , so . Now:
, because . The question says this is , so .
Check: . This agrees with , because .
Answer: a=-2, b=1