Question 1 | MCQ
Solution
Solution
A roleDepartment_Leadhas the privilege of delete and update on all the tables of the database. A new roleEmployee1is created, and the following statement is executed.
grant Department_Lead to Employee1
What privileges will be inherited byEmployee1?
grant Department_Lead to Employee1
What privileges will be inherited byEmployee1?
Solution
Consider the following statements:
Statement 1: In case a transaction is not completely executed due to logical errors, the redo operation is used for transaction rollback.
Statement 2: A transactionT1needs to be undone, if it contains the record <T1,start> and also contains the record <T1,commit>.
Statement 3: A transactionT1needs to be redone, if it contains the record <T1,start>, but does not contain the record <T1,commit>.
Statement 4: When a transactionT1finishes its last statement successfully, the log record <T1, commit> is written.
Which among the given statements is/are correct?
Statement 1: In case a transaction is not completely executed due to logical errors, the redo operation is used for transaction rollback.
Statement 2: A transactionT1needs to be undone, if it contains the record <T1,start> and also contains the record <T1,commit>.
Statement 3: A transactionT1needs to be redone, if it contains the record <T1,start>, but does not contain the record <T1,commit>.
Statement 4: When a transactionT1finishes its last statement successfully, the log record <T1, commit> is written.
Which among the given statements is/are correct?
Solution
Consider a relational schemastudent(roll_no, name, class).
In order to insert a record in student table, which of the following category of SQL command is used for this purpose?
In order to insert a record in student table, which of the following category of SQL command is used for this purpose?
Solution
Solution
Consider the relationplayers(Name, Team, Coach, Runs) with the data:

Check whether the relationplayersis in 4NF or not. If not, then decomposed it into 4NF.
Choose the correct option.
Check whether the relationplayersis in 4NF or not. If not, then decomposed it into 4NF.
Choose the correct option.
Solution
Consider the givengrocerytable which represents the items purchased while grocery shopping

Solution
Consider the following scheduleSwith four transactions T1, T2, T3,T4:
S:R3(A);W4(A);R2(A);W2(A);R4(B);R1(B);
Where, Ri(A) denotes a read operation by transaction Ti on a data item A, Wi(A) denotes a write operation by transaction Ti on a data item A.
What is the possible number of conflict serializable schedule of the above scheduleS?
S:R3(A);W4(A);R2(A);W2(A);R4(B);R1(B);
Where, Ri(A) denotes a read operation by transaction Ti on a data item A, Wi(A) denotes a write operation by transaction Ti on a data item A.
What is the possible number of conflict serializable schedule of the above scheduleS?
Solution
Solution
Consider the relationCar(Car_num_plate,Engine_num,Model,Make, Fuel_type).
Construct a bitmap index for relationCaron the attributeFuel_type.The number of records in the relationCarisx. The size of the bitmap index file is 1000 bytes. The attributeFuel_typehas 4 different values(i.e., Petrol, Diesel, CNG, Electric). The value of thexis
Construct a bitmap index for relationCaron the attributeFuel_type.The number of records in the relationCarisx. The size of the bitmap index file is 1000 bytes. The attributeFuel_typehas 4 different values(i.e., Petrol, Diesel, CNG, Electric). The value of thexis
Solution
Consider a primary sparse index on theinstructor table. The number of records in the instructor relation is 10000. The block size is 512 bytes. The record size is 32 bytes. The size of the search key is 16 bytes and the size of the block pointer is 14 bytes. The number of the blocks in the primary sparse indexing file is
Solution
Consider thesmartphonerelation as shown below:
smartphone(IMEI,brand, color, price)
(Note: IMEI is the unique number of each smartphone.)
Construct a B tree indexing of order 8 using search key as IMEI. If the size of the block is 1024 bytes. IMEI attribute is of varchar datatype and size is 13 bytes. The size of the tree pointer is 64 bytes. The size of the record pointer of a non-leaf node of the B tree is
smartphone(IMEI,brand, color, price)
(Note: IMEI is the unique number of each smartphone.)
Construct a B tree indexing of order 8 using search key as IMEI. If the size of the block is 1024 bytes. IMEI attribute is of varchar datatype and size is 13 bytes. The size of the tree pointer is 64 bytes. The size of the record pointer of a non-leaf node of the B tree is
Solution
Consider the following case study:
An IITM Online Degree Project needs a database to store information about instructors (identified by ins_id, name and phone as attributes), courses (identified by cid, cname and credits as attributes), and health information (identified by health_id and checkup_date as attributes). The instructor can work in various courses and courses can have more than one instructor; each course is managed by an instructor and an instructor can manage more than one courses. A health information must be identified uniquely by health_id when the instructor is known. We are not interested in information about a health record once the instructor leaves the organization. Choose the correct ER-Diagram based on the given information.
An IITM Online Degree Project needs a database to store information about instructors (identified by ins_id, name and phone as attributes), courses (identified by cid, cname and credits as attributes), and health information (identified by health_id and checkup_date as attributes). The instructor can work in various courses and courses can have more than one instructor; each course is managed by an instructor and an instructor can manage more than one courses. A health information must be identified uniquely by health_id when the instructor is known. We are not interested in information about a health record once the instructor leaves the organization. Choose the correct ER-Diagram based on the given information.
Solution
Consider a RAID-4 system with 5 disks which stores the following data shown in Figure 3:

According to the figure, Disk-3 has crashed. Identify the correct data present in the three blocks of Disk-3. Also, assuming that the binary values represent 8 bit ASCII code, identify the correct data word present inside the RAID-4 storage system.
Consider the following statements and identify the correct statements.
1. Block A: 0100, Block B: 0110, Block C: 0101
2. Block A: 0100, Block B: 1011, Block C: 0010
3. Block A: 0100, Block B: 0100, Block C: 0101
4. The word is : ’leader’
5. The word is: ’LEADER’
Note:
- Assuming block size is 4 bits.
- Disk-5 is the parity disk.
- The ASCII value of ’A’ is 65 and ’a’ is 97.
According to the figure, Disk-3 has crashed. Identify the correct data present in the three blocks of Disk-3. Also, assuming that the binary values represent 8 bit ASCII code, identify the correct data word present inside the RAID-4 storage system.
Consider the following statements and identify the correct statements.
1. Block A: 0100, Block B: 0110, Block C: 0101
2. Block A: 0100, Block B: 1011, Block C: 0010
3. Block A: 0100, Block B: 0100, Block C: 0101
4. The word is : ’leader’
5. The word is: ’LEADER’
Note:
- Assuming block size is 4 bits.
- Disk-5 is the parity disk.
- The ASCII value of ’A’ is 65 and ’a’ is 97.
Solution
Consider the given schedulesS1andS2which performs independent tasks.

Which among the following statement is correct?
Which among the following statement is correct?
Solution
Consider the relation as shown in the table :

Which of the following SQL statement gives the result given below?

Which of the following SQL statement gives the result given below?
Solution
Solution
Choose the correct sets of functional dependencies for the relationR(A,B,C,D) under whichRis in 3NF but not in BCNF.
Solution
Solution
Consider a state of transactions as shown in Figure 2.

According to the above figure, which among the following statement(s) is/are incorrect?
According to the above figure, which among the following statement(s) is/are incorrect?
Solution
Consider the following scheduleSwith three transactions T1, T2 and T3:
S:R2(A);W2(A);C2;R3(A);W3(A);C3;R1(B);W1(B);R1(D);C1;
Where Ri(A) denotes a read operation by transaction Ti on a data item X, Wi(A) denotes a write operation by transaction Ti on a data item A, Ci denotes a commit by Ti.
Which among the following statement(s) is/are correct?
S:R2(A);W2(A);C2;R3(A);W3(A);C3;R1(B);W1(B);R1(D);C1;
Where Ri(A) denotes a read operation by transaction Ti on a data item X, Wi(A) denotes a write operation by transaction Ti on a data item A, Ci denotes a commit by Ti.
Which among the following statement(s) is/are correct?
Solution
Consider two logs of transaction as shown below, where immediate database modification scheme is used inTable 1and deferred database modification scheme is used inTable 2.

In Table 1 & Table 2, if a system crash occurs after the step 6 and the recovery of the system is successfully completed, identify the correct actions from the above diagram.
In Table 1 & Table 2, if a system crash occurs after the step 6 and the recovery of the system is successfully completed, identify the correct actions from the above diagram.
Solution
Consider the following relations:

Choose the correct SQL statement(s) to find names of the music which were produced by producer name ’YourFavMusic.com’ but the songs which were not sung by singer ’Lady Jaye’.
Choose the correct SQL statement(s) to find names of the music which were produced by producer name ’YourFavMusic.com’ but the songs which were not sung by singer ’Lady Jaye’.
Solution
Consider the following scheduleSwith four transactions T1, T2, T3 and T4:
S:R2(B);R1(B);R1(A);W1(A);R3(C);W3(C);R4(B)
The number of serial schedule for given scheduleSis_______
S:R2(B);R1(B);R1(A);W1(A);R3(C);W3(C);R4(B)
The number of serial schedule for given scheduleSis_______
Solution
Construct a binary search tree by inserting the following values in the following order 30, 20, 27, 86, 103, 25, 60, 90, 10, 15. What is the sum of the key values in non-leaf (including root) nodes of the constructed binary search tree?
Solution
Shape
Thickness [ / ]
3
All colors