# Recent questions tagged databases

1
Assume transaction $A$ holds a shared lock $R.$ If transaction $B$ also requests for a shared lock on $R.$ It will result in deadlock situation immediately be granted immediately be rejected be granted as soon as it is released by $A$
2
Given relations $R(w,x)$ and $S(y,z),$ the result of SELECT DISTINCT $w,x$ from $R,S$ $R$ has no duplicates and $S$ is non-empty $R$ and $S$ have no duplicates $S$ has no duplicates and $R$ is non-empty $R$ and $S$ has the same number of tuples
3
For a 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 hold. $a \rightarrow c$ $b \rightarrow d$ The relation is in First normal form but not in second normal form Second normal form but not in third normal form Third normal form None of the above
1 vote
4
Which of the following desired features are beyond the capability of relational algebra? Aggregate Computation Multiplication Finding transitive closure All of the above
5
When transaction $Ti$ requests a data item currently held by $Tj,Ti$ is allowed to wait only if it has a time stamp smaller than that of $Tj$ (that is $Ti$ is order than Tj). Otherwise, $Ti$ is rolled back (dies). This is Wait-die Wait-wound Wound-wait Wait
6
When transaction $Ti$ requests a data item currently held by $Tj,Ti$ is allowed to wait only if it has a timestamp smaller than that of $Tj$ (that is $Ti$ is order than Tj). Otherwise, $Ti$ is rolled back (dies). This is Wait-die Wait-wound Wound-wait Wait
7
Given relations $R(w,x)$ and $S(y,z),$ the result of SELECT DISTINCT $w,x$ from $R,S$ $R$ has no duplicates and $S$ is non-empty $R$ and $S$ have no duplicates $S$ has no duplicates and $R$ is non-empty $R$ and $S$ has the same number of tuples
8
E-R model uses this symbol to represent weak entity set? Dotted rectangle Diamond Doubly outlined rectangle None of these
9
What is the modality of relationship, if there is no explicit need for relationship to occur? Zero Two Three One
10
Assume transaction $A$ holds a shared lock $R.$ If transaction $B$ also requests for a shared lock on $R.$ It will result in deadlock situation immediately be granted immediately be rejected be granted as soon as it is released by $A$
11
Table employees has $10$ records. It has a non-NULL SALARY column which is also UNIQUE. The SQL statement SELECT COUNT(*) FROM EMPLOYEE WHERE SALARY > ALL (SELECT SALARY FROM EMPLOYEE); $10$ $9$ $5$ $0$
1 vote
12
The $2-3-4$ tree is a self-balancing data structure, which is also called : $2-4$ tree $B+$ tree $B-$ tree None of the options
13
Normalization from which is based on transitive dependency is classified as: First normal form. Second normal form. Fourth normal form. Third normal form.
14
Which of the following is a fundamental operation in relational algebra? Set intersection Assignment Natural Join None of the above
15
The primary key is selected from the: Composite keys Determinants Candidate keys Foreign keys
16
In functional dependency between two sets of attribute $A$ and $B$ then set of attributes $A$ of database is classified as: top right side down left side left hand side right hand side
17
Which type of Statement can execute parameterized queries? PreparedStatement ParameterizedStatement ParameterizedStatement and CallableStatement All kinds of Statements
18
Which of the following is a fundamental operation in relational algebra? Set intersection Natural join Assignment None of the above
19
Which one of the following statements about normal forms is FALSE? BCNF is stricter than $3$NF. Lossless, dependency-preserving decomposition into BCNF is always possible. Lossless, dependency-preserving decomposition into $3$NF is always possible. Any relation with two attributes is BCNF.
20
If attribute of relation schema $R$ is member of some candidate key then this type of attributes are classified as: atomic attribute candidate attribute non-prime attribute prime attribute
21
'AS' clause is used in SQL for Selection operation Rename operation Join Operation Projection Operation
22
Related fields in a database are grouped to form a data file data record menu bank
23
Cross Product is a Unary Operator Ternary Operator Binary Operator Not an operator
24
A table joined with itself is called Join Self Join Outer Join Equi Join
25
Consider the join of a relation $R$ with relation $S$. If $R$ has $m$ tuples and $S$ has $n$ tuples, then the maximum size of join is $mn$ $m+n$ $(m+n)/2$ $2(m+n)$
26
If an SQL query involves NOT,AND,OR with no parenthesis NOT will be evaluated first; AND will be evaluated second; OR will be evaluated last. NOT will be evaluated first; OR will be evaluated second; AND will be evaluated last. AND will be evaluated first; OR will be evaluated second;NOT will be evaluated last. The order of occurrence determines the order of evaluation.
27
In tuple relational calculus $P1\to P2$ is equivalent to $\lnot P1 \lor P2$ $P1 \lor P2$ $P1 \land P2$ $P1 \land \lnot P2$
1 vote
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
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$
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.