Question 1
Reflexivity
Reflexivity and Augmentation
Augmentation and Transitivity
Union and Reflexivity
The IIT Madras BS Database Management Systems (DBMS) End Term paper sat on 3 Apr 2022, in the January 2022 term, set AN1: 25 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.
Reflexivity
Reflexivity and Augmentation
Augmentation and Transitivity
Union and Reflexivity
Correct answer
Augmentation and Transitivity
Atomicity
Consistency
Isolation
Durability
Correct answer
Consistency
Which of the following statement(s) is/are correct regarding the third normal form in normalization?
1. Non-prime attributes are not allowed to functionally determine non-prime attributes. 2. The proper subset of any candidate key functionally determines non-prime attributes. 3. Multivalued attributes are allowed in third normal form.
4. Proper subset of any candidate key is not allowed to functionally determine the non-prime attributes.
Statements 1,2 & 3 are correct.
Statements 3 & 4 are correct.
Statements 1 & 4 are correct.
All the statements are correct.
Correct answer
Statements 1 & 4 are correct.
Which among the following layers provides a user interface to translate tasks and results to something that the user can understand?
Presentation Layer
Data Layer
Logic Layer
Business Logic Layer
Correct answer
Presentation Layer
Choose the option that depicts the correct order of steps in Query Processing.
Correct answer
Consider a RAID-0 and a RAID-1 system, both having 12 data disks in total. What is the storage efficiency (or effective space utilization) for these two systems?
RAID-0 = 50% and RAID-1 = 100%
RAID-0 = 100% and RAID-1 = 91.67%
RAID-0 = 91.67% and RAID-1 = 50%
RAID-0 = 100% and RAID-1 = 50%
Correct answer
RAID-0 = 100% and RAID-1 = 50%
Consider table emp_info shown in Table 1.
| id | name | salary |
|---|---|---|
| E001 | Oliver | 45000 |
| E002 | Jack | 70000 |
| E003 | Harry | 65000 |
| E004 | Thomas | 55000 |
| E005 | Jacob | 30000 |
| E006 | Tommy | 60000 |
| E007 | Joseph | 35000 |
Table 1: emp_info
What will the output of the following query be?
Correct answer
In a college database named student, there exists a table named marks, the content of which is shown in Table 2:
Based on the table, what will the output of the below given Python code be?
# Import libraryimport psycopg2
# Define functiondef connectDb(dbname, username, pwd, address, portnum): try: connection = psycopg2.connect(database = dbname, user = username, password = pwd, host = address, port = portnum) cursor = connection.cursor() query = "select * from marks;" cursor.execute(query) result = cursor.fetchmany(2) print(cursor.rowcount) cursor.close()
except (Exception, psycopg2.DatabaseError) as error: print(error) finally: connection.close()#function callconnectDb("student", "postgres", "root", "127.0.0.1", "5432")1
2
3
4
Correct answer
4
A telecom company has 2¹⁶ customer records in a table T in their database. These records are sorted in ascending order of the attribute customer_id, which is also the primary key of T. The data file is stored in a disk with a block size of 512 bytes. Assume that, in each block, the records are unspanned and are of fixed-length. Each record is of size 32 bytes, the size of the primary key field is 10 bytes and the size of the block pointer is 6 bytes.
If a primary (sparse index with an index entry for every block in the file) index is created on the data file, what is the minimum number of blocks required for the index file?
64
128
256
512
Correct answer
128
Consider the relational schema as shown in Figure 1.
What does the following query return?
The names of customers who have taken at least one insurance policy of type ‘Health’, but have not claimed any policy.
The names of customers who have taken any ‘Health’ insurance policy.
The names of customers who have claimed any type of insurance policy.
None of these.
Correct answer
The names of customers who have taken at least one insurance policy of type ‘Health’, but have not claimed any policy.
Consider the relation R shown in Figure 4.
| A | B | C | D |
|---|---|---|---|
| 2 | 3 | 4 | x |
| 2 | 3 | 6 | 7 |
| 2 | y | 6 | 5 |
| 2 | y | 4 | 7 |
Figure 4: Relation R
Choose the correct value of x and y such that and hold true.
x = 7 and y = 3
x = 5 and y = 3
x = 3 and y = 6
x = 5 and y = 4
Correct answer
x = 5 and y = 3
Consider a disk with 5 double-sided platters, 100 tracks/surface, 32 sectors/track, 60 bytes/sector. Find the capacity of each surface, and the number of cylinders that the disk has.
Capacity of surface = 960 KB, Number of cylinders = 100.
Capacity of surface = 1920 KB, Number of cylinders = 500.
Capacity of surface = 187.5 KB, Number of cylinders = 100.
Capacity of surface = 1920 KB, Number of cylinders = 60.
Correct answer
Capacity of surface = 187.5 KB, Number of cylinders = 100.
Choose the correct ER Diagram based on the given information.
• Cricketers are identified by cricID. For each cricketer, name, team and age are recorded. • Cricket grounds are identified by ground_ID. For each ground, name and location are recorded. • For each century scored, total runs and strike rate are recorded.
• Assume that cricketers played the matches on several grounds and scored centuries.
Correct answer
Consider the relational schema R(A,B,C,D,E) and the set of functional dependencies
Which of the following functional dependency sets is equivalent to the given set of functional dependencies?
Correct answer
Insert the following key values 10, 14, 11, 16, 17, 7, 12, 13, 15, 9, 8, in the given order, into an empty 2 - 3 - 4 tree. Which key value(s) is(are) on the root node of the 2 - 3 - 4 tree?
(Note: Using early splitting strategy)
9,11
9,11,13
8
13
Correct answer
13
Consider the following two schedules S1 and S2 and three transactions T1, T2, T3:
Where Ri(X) denotes a read operation by transaction Ti on a data item X, Wi(X) denotes a write operation by transaction Ti on a data item X, Ci denotes a commit by Ti, and Ai denotes an abort by Ti.
Consider the following statements:
1. S1 and S2 are not conflict equivalent.
2. S1 and S2 are conflict equivalent.
3. S1 and S2 are view equivalent.
4. S1 and S2 are not view equivalent.
Which among the following statements is/are correct?
Statements 1 and 4 are correct.
Statements 1 and 3 are correct.
Statements 2 and 3 are correct.
Statements 2 and 4 are correct.
Correct answer
Statements 2 and 3 are correct.
R is in 2NF, but not in 3NF.
R is in 3NF, but not in BCNF.
R is in 1NF, but not in 2NF.
R is in BCNF.
Correct answer
R is in 2NF, but not in 3NF.
Consider the following statements and assume that you have to back up some files from Monday to Thursday.
• Monday: You have 100 files and perform a full backup. 100 files were backed up.
• Tuesday: You have made no changes. No files are backed up.
• Wednesday: You have added 100 new files, and 200 files are backed up.
• Thursday: You have made no changes, and 200 files are backed up.
Which among the following types of backups take place on Wednesday and Thursday?
Wednesday : Differential Backup, Thursday : Incremental Backup.
Wednesday : Full Backup, Thursday : Incremental Backup.
Wednesday : Incremental Backup, Thursday : Differential Backup.
Wednesday : Full Backup, Thursday : Full Backup.
Correct answer
Wednesday : Full Backup, Thursday : Full Backup.
Consider the information provided about relations employee and project in Table 3.
Consider worst-case memory availability and assume project as the outer relation.
Let A be the number of block transfers for nested-loop join of employee and project, and B be the number of block transfers for block nested-loop join of employee and project.
Choose the correct values of A and B.
A: 120,600 & B: 1,200,600
A: 1,200,200 & B: 120,200
A: 120,200 & B: 1,200,200
A: 1,200,600 & B: 120,600
Correct answer
A: 1,200,600 & B: 120,600
Consider the relations shown in Figure 2.
MUMBAI_INDIANS
| Player_Name | Jersey_No |
|---|---|
| RS | 45 |
| SKY | 63 |
| JB | 93 |
| IK | 32 |
| RC | 28 |
| HP | 33 |
| KP | 24 |
TEAM_INDIA
| Player_Name | Jersey_No |
|---|---|
| VK | 18 |
| KLR | 1 |
| SKY | 63 |
| SI | 41 |
| HP | 33 |
| JB | 93 |
| RC | 28 |
Figure 2: Relations MUMBAI_INDIANS and TEAM_INDIA
Choose the correct expression(s) that return(s) the output shown in Figure 3.
Correct answers
Correct answers
Consider a state of transactions as shown in Figure 5.
Which of the following statement(s) is/are correct according to the given figure?
T2 can be ignored and T3 needs to be redone.
T4 needs to be undone and T5 needs to be redone.
T1 needs to be redone and T4 can be undone.
T3 needs to be undone and T4 needs to be redone.
Correct answers
T2 can be ignored and T3 needs to be redone.
T1 needs to be redone and T4 can be undone.
Construct a BST for the following sequence:
41,69,30,36,79,32,53,91,72,38,27. Find the number of leaf nodes in the resultant BST. NOTE: Enter your answer to the nearest integer.
Correct answer: 6
Consider the following relations.
order
customer
In table order, is the primary key, is the foreign key referencing in table customer.
Table order contains 68 tuples and table customer contains 96 tuples.
What is the maximum number of tuples possible in the natural join customer order?
NOTE: Enter your answer to the nearest integer.
Correct answer: 68
Consider a B⁺ tree of order 3, having 4 levels. What is the maximum number of block pointers at level 2?
Note : Consider that the root node is at level 0.
NOTE: Enter your answer to the nearest integer.
Correct answer: 27