A schedule of three database transactions \(T_1\), \(T_2\), and \(T_3\) is shown. \(R_i(A)\) and \(W_i(A)\) denote read and write of data item A by transaction \(T_i\), \(i = 1, 2, 3\). The transaction \(T_1\) aborts at the end. Which other transaction(s) will be required to be rolled back?
The first value in the output of a SQL query (given below) when run on a table having name “Table-1” is?
SQL Query: SELECT LastName FROM Table-1 WHERE State = "IN" ORDER BY FirstName
LastName | FirstName | StreetNumber | StreetName | City | State |
---|---|---|---|---|---|
Squires | Edwin | 4589 | Shamar Rd. | Upland | IN |
Rothrock | Paul | 91657 | Carex Ave. | Upland | IN |
Ramirez | Douglas | 123 | Fake St. | Springfield | IN |
Peterson | Chris | 4687 | Windthrow Way | Kane | PA |
Gibson | David | 354 | Bluestem St. | Carbondale | IL |
The table below is an attribute table about employee records. Which attribute can be used as a primary key?
Employee | Name | Designation | Department |
---|---|---|---|
(Emp_ID) | (Emp_Name) | (Emp_Desig) | (Emp_Dept) |
100260 | Prashant | Software Developer | Information Technology |
100265 | Dinesh | Junior Engineer | Embedded System |
100252 | Somya | HR Manager | Management |
100271 | Dinesh | Junior Engineer | Information Technology |
Consider the following database tables of a sports league. player (\( pid \), \( pname \), \( age \)) coach (\( cid \), \( cname \)) team (\( tid \), \( tname \), \( city \), \( cid \)) members (\( pid \), \( tid \)) An instance of the table and an SQL query are given.
Player table
coach table:
team table:
members table:
SQL query: \[ {SELECT MIN(P.age)} \] \[ {FROM player P} \] \[ {WHERE P.pid IN (} \] \[ { SELECT M.pid} \] \[ { FROM team T, coach C, members M} \] \[ { WHERE C.cname = 'Mark'} \] \[ { AND T.cid = C.cid} \] \[ { AND M.tid = T.tid)} \] The value returned by the given SQL query is _________. (Answer in integer)
A disk of size 512M bytes is divided into blocks of 64K bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves 4 bytes to store the pointer to the next data block. The link part of the last data block contains a NULL pointer (also of 4 bytes). Suppose a file of 1M bytes needs to be stored in the disk. Assume, 1K = \(2^{10}\) and 1M = \(2^{20}\). The amount of space in bytes that will be wasted due to internal fragmentation is ___________. (Answer in integer)
Three villages P, Q, and R are located in such a way that the distance PQ = 13 km, QR = 14 km, and RP = 15 km, as shown in the figure. A straight road joins Q and R. It is proposed to connect P to this road QR by constructing another road. What is the minimum possible length (in km) of this connecting road?
Note: The figure shown is representative.