# Recent questions and answers in Databases

1 vote
1
What is the maximum number of possible candidate key for relation on n attributes.
2
Given relation catalog(sid, pid, cost) Find pairs of sids such that the supplier with the first sid charges more for some part than the supplier with the second sid what is the relational algebra expression for this?
3
E and F are multivalued attributes. How many minimum tables which satisfy 1NF ? How many minimum tables which satisfy 2NF ? How many minimum tables which satisfy 3NF ? How many minimum tables which satisfy BCNF ?
4
How many minimum number of tables are required for this ER Diagram?
1 vote
5
Every Boyce-Codd Normal Form (BCNF) decomposition is dependency preserving not dependency preserving need be dependency preserving none of these
6
7
Consider the following relational schema for a library: member(memb_no, name, dob) books(isbn, title, authors, publisher) borrowed(memb_no, isbn, date) Write the following queries in relational algebra. a. Find the names of members who have borrowed any book published by ... into account that if a member does not borrow any books, then that member does not appear in the borrowed relation at all.
1 vote
8
Consider the following locking protocol: I. Transaction must lock all data items before begins any read or write operation. II. Transaction executes all read and write operations alongwith transaction commit. III. Transaction unlocks all data items ... no deadlock, guaranteed serializability and strict recoverability. D Guaranteed serializable and no deadlocks and may not strict recoverabl
9
A table joined with itself is called Join Self Join Outer Join Equi Join
10
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)$
11
An instance of a relational scheme $R(A, B, C)$ has distinct values for attribute $A$. Can you conclude that $A$ is a candidate key for $R$?
12
How to create relation tables for a Recursive Relationship set ? Is it same way as any other relationship set ?
1 vote
13
Relation R which satisfy 3NF and atmost one compound candidate key is also in BCNF (pls explain give counter examples for both true and false)
1 vote
14
A functional dependency of the form $x\to y$ is trivial if $y\subseteq x$ $y\subset x$ $x\subseteq y$ $x\subset y\:\text{and}\:y\subset x$
15
A primary key, if combined with a foreign key creates parent child relationship between the tables that connect them many-to-many relationship between the tables that connect them network model between the tables that connect them none of these
16
Give the following relation instance: $\begin{array}{ccc} X & Y & Z \\ \hline 1 & 4 & 2 \\ 1 & 5 & 3 \\ 1 & 6 & 3 \\ 3 & 2 & 2 \end{array}$ ... $YZ \rightarrow X \text{ and } X \rightarrow Z$ $XZ \rightarrow Y \text{ and } Y \rightarrow X$
17
Consider the schema $R=(\text{S T U V})$ and the dependencies $S \rightarrow T, T \rightarrow U, U \rightarrow V$, and $V \rightarrow S.$ If $R=(R1 \text{ and } R2)$ be a decomposition such that $R1 \cap R2= \phi$ then decomposition is not in $\text{2 NF}$ in $\text{2 NF}$ but not in $\text{3 NF}$ in $\text{3 NF}$ but not in $\text{2 NF}$ in both $\text{2 NF}$ and $\text{3 NF}$
18
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$
19
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
1 vote
20
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
21
Which of the following desired features are beyond the capability of relational algebra? Aggregate Computation Multiplication Finding transitive closure All of the above
22
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
23
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
24
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
25
E-R model uses this symbol to represent weak entity set? Dotted rectangle Diamond Doubly outlined rectangle None of these
26
What is the modality of relationship, if there is no explicit need for relationship to occur? Zero Two Three One
27
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$
28
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
29
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
30
31
In a relational Schema, each tuple is divided into fields called relations domains queries none of these
1 vote
32
The employee salary should not be greater than Rs.$2000$. This is integrity constraint. referential constraint. over-defined constraint. feasible constraint.
33
The relational algebra expression equivalent to the tuple calculus expression $\{t\mid t ​ \in ​ r \land (t[A]=10 \land t[B]=20)\}$ is $\sigma_{(A=10\:\lor\:B=20)}(r)$ $\sigma_{(A=10)}(r)\cup\sigma_{(B=20)}(r)$ $\sigma_{(A=10)}(r)\cap\sigma_{(B=20)}(r)$ $\sigma_{(A=10)}(r)-\sigma_{(B=20)}(r)$
1 vote
34
Let $R=(A,B,C,D,E,F)$ be a relation scheme with the following dependencies: $C\to F,E\to a,EC\to D, A\to B$. Which of the following is a key for $R$? $CD$ $EC$ $AE$ $AC$
35
For a database relation $R(a,b,c,d)$ where the domains of $a,b,c,d$ include only atomic values, only the following functional dependencies and those that can be inferred from them hold: $a\to c\\b\to 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 these.
36
Normalization from which is based on transitive dependency is classified as: First normal form. Second normal form. Fourth normal form. Third normal form.
37
The primary key is selected from the: Composite keys Determinants Candidate keys Foreign keys
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