Question 1
1
2
3
4
The IIT Madras BS Database Management Systems (DBMS) End Term paper sat on 28 Apr 2024, in the January 2024 term, set QDB1: 20 questions for 50 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
1
2
3
4
Correct answer
3
Let us consider the following statistics for searching a condition within a given relation.
What will be the average cost of selection query on a key attribute using linear search file scan?
166 milliseconds
12.8 milliseconds
128 milliseconds
16.6 milliseconds
Correct answer
128 milliseconds
Consider the relational schema:
prescription(doctor_id, doctor_name, patient_id, patient_name, medicine_id, medicine_name), where the domains of all the attributes consist of atomic values. Consider the following FDs for the relation prescription .
From among the decompositions given, identify the one that is in 4NF.
Correct answer
Consider the table Students given below:
| ID | Name | Department | Marks |
|---|---|---|---|
| 001 | Harry | Comp. Sci. | 90 |
| 002 | Louis | Maths | 88 |
| 003 | Liam | History | 80 |
| 004 | Niall | Comp. Sci. | 86 |
| 005 | Zayn | History | 91 |
| 006 | Luke | Geography | 82 |
| 007 | Ashton | Maths | 87 |
| 008 | Bradley | Music | 78 |
| 009 | Connor | Biology | 92 |
| 010 | Alex | Music | 100 |
Let hash function h(x) generate 16-bit binary hash values for the distinct elements in Department attribute:
Comp. Sci.- 1100 0010 1110 0101
History- 1000 1010 0101 1110
Maths- 0111 1100 0011 0110
Geography- 1110 0101 0000 1101
Music- 0100 1010 1111 1011
Biology- 0011 1111 1010 0101
If we insert the records in the following order:
Harry, Liam, Niall, Connor, Bradley, Luke, Louis, Zayn, Alex, Ashton.
Considering bucket size as 2, using dynamic hashing technique, which one of the following denotes the correct distribution of records in hash buckets?
Correct answer
Choose the correct statement(s):
Time complexity of searching in a BST is O(nlogn)
In a B+ tree the leaf nodes are linked using a link list
Sparse indices are generally faster than dense indices for locating records.
B tree does not allow duplicate search-key values
Correct answers
In a B+ tree the leaf nodes are linked using a link list
B tree does not allow duplicate search-key values
Choose the correct statement(s):
In Raid 0 architecture, the space utilization is always 100 percent.
In Raid 1 architecture, the data is striped over different disks.
In Raid 4 architecture, the striping unit consists of a disk block
In Raid 5 architecture, the parity blocks are uniformly distributed over all the disks
Correct answers
In Raid 0 architecture, the space utilization is always 100 percent.
In Raid 4 architecture, the striping unit consists of a disk block
In Raid 5 architecture, the parity blocks are uniformly distributed over all the disks
Correct answers
Correct answers
One team cannot have more than one coach
There might exist a coach who is not training any player
A coach can be coaching more than one team
A player can have only one coach
Correct answers
There might exist a coach who is not training any player
A player can have only one coach
Consider the following relations:
players(pid, name, age, jersey_no)
teams(team_name, matches, points, pid)
Choose the correct TRC or DRC expression which is equivalent to the below SQL query.
SELECT p.name, t.pointsFROM players p natural join teams tWHERE p.jersey_no = 7Correct answers
Consider you are designing a database schema for a university management system. One of the key relations, R, represents information about courses offered, including details such as course code (), instructor (), course title (), and maximum enrollment capacity (). The functional dependencies for this relation are as follows:
During the normalization process, you decide to decompose R into two relations: R1 and R2. Your goal is to ensure that this decomposition preserves all the information without any loss. Determine whether this decomposition is lossless or lossy. If it is lossy, identify which additional functional dependency from the following would make the decomposition lossless.
Choose the correct option(s).
Correct answers
Correct answers
Consider the following two schedules S1 and S2 and three transactions , , :
where denotes a read operation by transaction on a data item X, denotes a write operation by transaction on a data item X.
Which among the following statements is/are correct?
Correct answers
Correct answer: 6
Correct answer: 5
Consider the following monthly backup schedule used by a company:
| Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday |
|---|---|---|---|---|---|---|
| 1/ Full | 2/ Incremental | 3/ Incremental | 4/ Differential | 5/ Incremental | 6/ Incremental | 7/ Differential |
| 8/ Incremental | 9/ Incremental | 10/ Differential | 11/ Incremental | 12/ Incremental | 13/ Differential | 14/ Incremental |
| 15/ Incremental | 16/ Differential | 17/ Incremental | 18/ Incremental | 19/ Differential | 20/ Incremental | 21/ Incremental |
| 22/ Differential | 23/ Incremental | 24/ Incremental | 25/ Differential | 26/ Incremental | 27/ Incremental | 28/ Differential |
| 29/ Incremental | 30/ Incremental |
Let A be the number of backup sets that need to be loaded for a complete recovery, if there is a system failure on the 11th day of the month (after the backup for the day had been completed). Let B be the number of backup sets that need to be loaded for a complete recovery , if there is a system failure on the 25th day of the month (before the backup for the day had been completed).What will be the value of B-A?
Correct answer: 1
Correct answer: 2
Correct answer: 21
Consider the table Points_Table given below to answer the given subquestions.
| Team_ID | Team_Name | Country | Wins | Losses | Draw | Total_Points |
|---|---|---|---|---|---|---|
| 001 | Barcelona | Spain | 8 | 1 | 2 | 16 |
| 002 | Real Madrid | Spain | 6 | 3 | 3 | 12 |
| 003 | Arsenal | England | 5 | 4 | 3 | 10 |
| 004 | Man United | England | 4 | 5 | 2 | 8 |
| 005 | PSG | France | 4 | 4 | 3 | 8 |
| 006 | Bayern | Germany | 3 | 6 | 2 | 6 |
| 007 | Man City | England | 2 | 4 | 5 | 4 |
Table 1: Points_Table
What will be the output of the following SQL query:
SELECT Count(*)FROM ( ( SELECT Team_Name, Country FROM Points_Table) AS P NATURAL JOIN ( SELECT Country, Team_ID, Draw, Total_Points FROM Points_Table) AS Q )WHERE Draw>2 and Total_Points<12Correct answer: 7
Consider the table Points_Table given below to answer the given subquestions.
| Team_ID | Team_Name | Country | Wins | Losses | Draw | Total_Points |
|---|---|---|---|---|---|---|
| 001 | Barcelona | Spain | 8 | 1 | 2 | 16 |
| 002 | Real Madrid | Spain | 6 | 3 | 3 | 12 |
| 003 | Arsenal | England | 5 | 4 | 3 | 10 |
| 004 | Man United | England | 4 | 5 | 2 | 8 |
| 005 | PSG | France | 4 | 4 | 3 | 8 |
| 006 | Bayern | Germany | 3 | 6 | 2 | 6 |
| 007 | Man City | England | 2 | 4 | 5 | 4 |
Table 1: Points_Table
Choose the correct expression(s) for the statement given below:
Name all the teams from England, with atmost 5 wins and at least 3 draws.
Correct answers