# Recent questions tagged databases

1 vote
1
Consider following schedules involving two transactions: $S_{1}: \: r_{1}(X);r_{1}(Y);r_{2}(X);r_{2}(Y);w_{2}(Y);w_{1}(X)$ $S_{2}: \: r_{1}(X);r_{2}(X);r_{2}(Y);w_{2}(Y);r_{1}(Y);w_{1}(X)$ Which of the ... . $S_1$ is conflict serializable and $S_2$ is not conflict serializable $S_1$ is not conflict serializable and $S_2$ is conflict serializable Both $S_1$ and $S_2$ are not conflict serializable
1 vote
2
Let $pk(R)$ denotes primary key of relation $R$. A many-to-one relationship that exists between two relation $R_1$ and $R_2$ can be expressed as follows: $pk(R_2)\rightarrow pk(R_1)$ $pk(R_1)\rightarrow pk(R_2)$ $pk(R_2)\rightarrow R_1 \cap R_2$ $pk(R_1)\rightarrow R_1 \cap R_2$
3
For database relation $R(A,B,C,D)$ where the domains of $A,B,C$ and $D$ include only atomic values, only the following functional dependencies and those that can be inferred from them are: $A \rightarrow C$ $B \rightarrow D$ The relation $R$ is in First ... well as in second normal form Second normal form but not in third normal form. Both in second normal form as well as in third normal form.
4
Consider the following relation: Works(emp_name, company_name,salary) Here,emp name is primary key. Consider the following SQL query Select emp name From works T where salary > (select avg(salary) from works S where T. company name = S. company name) The above ... salary of all employees all the companies. Find all employees who earn more than the average salary of all employees of their company.
5
If following sequence of keys are inserted in a $B+$ tree with $K(=3)$ pointers: $8,5,1,7,3,12,9,6$ Which of the following shall be correct $B+$ tree?
6
An attribute $A$ of datatype varchar $(20)$ has value 'Ram' and the attribute $B$ of datatype char $(20)$ has value 'Sita' in oracle. The attribute $A$ has ________ memory spaces and $B$ has _______ memory spaces. $20,20$ $3,20$ $3,4$ $20,4$
7
Integrity constraints ensure that changes made to the database by authorized users do not result into loss of data consistency. Which of the following statement(s) is (are) true w.r.t.the examples of integrity constraints? An instructor Id. No. cannot be null, provided Instructor Id No. being primary ... b and c are true. a false, b and c are true. a and b are true; c false. a,b and c are false.
8
Let $M$ and $N$ be two entities in an $E-R$ diagram with simple single value attributes. $R_{1}$ and $R_{2}$ are two relationship between $M$ and $N$, where as $R_{1}$, is one-to-many and $R_{2}$, is many-to-many. The minimum number of tables required to represent $M, N, R_{1}$, and $R_{2}$, in the relational model are ___________. $4$ $6$ $7$ $3$
9
Consider a schema $R(MNPQ)$ and functional dependencies $M\rightarrow N, P\rightarrow Q$. Then the decomposition of $R$ into $R_{1} \left (MN \right )$ and $R_{2} \left (PQ \right )$ is __________. Dependency preserving but not lossless join Dependency preserving and lossless join Lossless join but not dependency preserving Neither dependency preserving nor lossless join.
10
The order of a leaf node in a $B^{+}$ tree is the maximum number of children it can have. Suppose that block size is $1$ kilobytes, the child pointer takes $7$ bytes long and search field value takes $14$ bytes long. The order of the leaf node is _________. $16$ $63$ $64$ $65$
11
__________ refers loosely to the process of semi-automatically analyzing large databases to find useful patterns. Datamining Data warehousing DBMS Data mirroring
12
Consider a relational database containing the following schemas. $\begin{array}{c} \text{Catalogue} \end{array}$ ... (cost) FROM Catalogue WHERE pno = P4' GROUP BY pno) ; The number of rows returned by the above SQL query is $4$ $5$ $0$ $2$
13
Which one of the following is used to represent the supporting many-one relationships of a weak entity set in an entity-relationship diagram? Diamonds with double/bold border Rectangles with double/bold border Ovals with double/bold border Ovals that contain underlined identifiers
14
Consider a relational table $R$ that is in $3NF$, but not in BCNF. Which one of the following statements is TRUE? $R$ has a nontrivial functional dependency $X \rightarrow A$, where $X$ is not a superkey and $A$ is a prime attribute. $R$ has a nontrivial functional dependency ... $X$ is a proper subset of some key A cell in $R$ holds a set instead of an atomic value.
15
Consider a schedule of transactions $T_1$ and $T_2$: $\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|} \hline T_1 & RA & & & RC & & WD & & WB & \text{Commit} & \\ \hline T_2 & & RB & WB & & RD & & WC & & & \text{Commit} \\ \hline \end{array}$ Here, RX stands for Read(X) and WX ...
16
Consider a database implemented using $\text{B+}$ tree for file indexing and installed on a disk drive with block size of $\text{4 KB}$. The size of search key is $\text{12 bytes}$ and the size of tree/disk pointer is $\text{8 bytes}$. ... memory. Consider that each record fits into one disk block. The minimum number of disk accesses required to retrieve any record in the database is _______
17
Properties of $\text{ DELETE'}$ and $\text{ TRUNCATE'}$ commands indicate that After the execution of $\text{ TRUNCATE'}$ operation, $\text{COMMIT}$, and $\text{ROLLBACK}$ statements cannot be performed to retrieve the lost data, while $\text{ DELETE'}$ allow it ... not allow it After the execution of $\text{ DELETE'}$ and $\text{ TRUNCATE'}$ operation no retrieval is possible for the lost data
18
The SQL query SELECT columns FROM TableA RIGHT OUTER JOIN TableB ON A.columnName = B.columnName WHERE A.columnName IS NULL returns the following: All rows in Table $B$, which meets equality condition above and, none from Table $A$ which meets the condition. All rows ... condition. All rows in Table $B$, which meets the equality condition All rows in Table $A$, which meets the equality condition
19
If every non-key attribute functionally dependent on the primary key, then the relation will be in First normal form Second normal form Third normal form Fourth Normal form
1 vote
20
Raymonds tree based algorithm ensures no starvation, but deadlock may occur in rare cases no deadlock, but starvation may occur neither deadlock nor starvation can occur deadlock may occur in cases where the process is already starved
21
Given two tables $\mathrm{R_1(x,y)}$ and $\mathrm{R_2(y,z)}$ with $50$ and $30$ number of tuples respectively . Find maximum number of tuples in the output of natural join between tables $\mathrm {R_1}$ and $\mathrm{R_2}$ $1)\;30$ $2)\; 20$ $3) \;50$ $4)\; 1500$
22
The multivalued dependencies (MVDs) can be eliminated using ______ normal form on _____ normal form relations. $1$st, $2$nd $2$nd, $3$rd $3$rd, BCNF $4$th, BCNF
23
Is basic 2 phase locking always recoverable?
1 vote
24
How to represent referential integrity constraint in ER model? pls explain with diagram
25
1 vote
26
R(A,B,C) is a relation.Which of the following don't have dependency preserving BCNF decomposition? A->B, B->C A->B,B->C,C->A AB->C,C->A None of these
27
how many tables are required?
A' is set of all possible schedules 'C' is set of all possible schedules that are guaranteed to produce a correct final result 'S' is the set of all serializable schedules 'P' is the set of all schedules possible under 2-phase locking protocol Which is FALSE? $P\subseteq C$ $S\subset P$ $S\subseteq P$ $P\subset C$