Recent questions tagged goclasses-databases-practice-questions

1 1 vote
1 1 answer
155
155 views
Consider the two FD sets, $F=\{A \to B,\ B \to C,\ C \to A\}$ and $G=\{A \to C,\ C \to B,\ B \to A\}$.Which of the following statements is correct?Only $F$ is a minimal c...
1 1 vote
1 1 answer
101
101 views
Consider $F=\{AB \to CF,\ CD \to EA,\ E \to ABC,\ B \to F,\ C \to D\}$Which of the following is a minimal cover of $F$?$\{AB \to C,\ C \to D,\ C \to E,\ E \to A,\ E \to B...
3 3 votes
1 1 answer
103
103 views
Consider $F=\{P \to S,\ PQ \to ST,\ S \to RU,\ RU \to S,\ PT \to V\}$.Which of the following is a minimal cover of $F$?$\{P \to S,\ PQ \to ST,\ S \to RU,\ RU \to S,\ PT \...
1 1 vote
1 1 answer
97
97 views
Consider $F=\{A \to B,\ AB \to C\}$.Which of the following statements is correct?$B$ is extraneous in the left-hand side of $AB \to C$. $A$ is extraneous in the left-hand...
1 1 vote
1 1 answer
91
91 views
Consider the following two sets of functional dependencies:$F=\{A \to B,\ B \to C\}$$G=\{A \to B,\ B \to C,\ A \to C\}$Which of the following statements are correct?$F$ c...
1 1 vote
2 2 answers
147
147 views
Consider the relation schema $R(A,B,C,D,E)$ with $F=\{AB \to D,\ AC \to E,\ A \to B,\ BC \to E,\ A \to E\}$.Consider the following functional dependencies:$A \to D$$AC \t...
1 1 vote
1 1 answer
108
108 views
Consider the relation schema $R(A,B,C,E,F,G,H)$ with $F=\{A \to BC,\ C \to FG,\ E \to HG,\ G \to A\}$Which of the following statements are correct?$A^+=\{A,B,C,F,G\}$ $A ...
1 1 vote
1 1 answer
99
99 views
Consider the relation schema $R(A,B,C,D,E)$ with$F=\{AB \to C,\ CD \to E,\ DE \to B\}$Which attributes must necessarily occur in every candidate key of $R$?$A$ $B$ $C$ $D...
1 1 vote
1 1 answer
75
75 views
Consider the relation$Student(S,I,E,N,L)$with the functional dependencies$F=\{S \to I,\ I \to E,\ E \to S,\ N \to L\}$Which of the following are candidate keys?$SN$ $IN$ ...
1 1 vote
1 1 answer
90
90 views
Consider the relation schema $R(A,B,C,D,E,F)$ with$F=\{BE \to C,\ B \to F,\ D \to F,\ AEF \to B,\ A \to E\}$Which of the following is a candidate key of $R$?$ACD$ $AD$ $F...
1 1 vote
1 1 answer
177
177 views
Consider the relation schema $R(A,B,C,D,E,F)$ with the functional dependencies$F=\{A \to BF,\ B \to F,\ CD \to E,\ DE \to F\}$.What is $(CD)^+$?$\{C,D,E\}$ $\{C,D,E,F\}$ ...
2 2 votes
1 1 answer
111
111 views
Suppose $R(A,B,C)$ satisfies $AB \to C$ and $B \to C$.Which of the following two-tuple relation instances is a valid counterexample showing that $A \to C$ does not necess...
2 2 votes
2 2 answers
134
134 views
Suppose the following functional dependencies hold on $R(A,B,C,D)$:$A \to B$$B \to C$Which of the following functional dependencies must also hold?$A \to C$ $AC \to B$ $C...
1 1 vote
1 1 answer
95
95 views
Consider the relation schema $R(A,B,C,D)$.Which of the following are trivial functional dependencies?$AB \to A$ $A \to AB$ $ABC \to BC$ $CD \to D$ $B \to C$
1 1 vote
1 1 answer
98
98 views
Consider a relation schema $R(A,B,C)$.Which of the following statements are correct?If one legal instance of $R$ satisfies $A \to B$, then $A \to B$ must hold as a functi...
5 5 votes
1 1 answer
195
195 views
Consider the following schema:$\text{Parent(pid ~INTEGER ~PRIMARY KEY)}$$\text{Child(cid ~INTEGER, ~pid ~INTEGER,}$$\text{PRIMARY KEY(cid,~pid),}$$\text{FOREIGN KEY(pid) ...
2 2 votes
1 1 answer
111
111 views
Consider relation $S(D,E)$ with primary key $(D,E)$.The current instance of $S$ contains $(1,3)$, $(2,4)$, $(3,1)$.Relation $R(A,B,C)$ contains the foreign-key constraint...
3 3 votes
1 1 answer
111
111 views
Consider the relations $\text{Employee}(eid)$, $\text{Policy}(pid,eid)$, $\text{Dependent}(did,pid)$.The following foreign keys are defined:$\text{Policy}.eid$ $\text{ RE...
2 2 votes
1 1 answer
82
82 views
Consider the relations $Parent(pid)$ and $Child(cid,pid)$where $Parent.pid$ is the primary key and $Child.pid$ is a foreign key referencing $Parent.pid$No cascading actio...
2 2 votes
1 1 answer
114
114 views
Let $R(A,B,C)$ be a referencing relation and $S(D,E)$ be a referenced relation.Suppose $B$ is a foreign key of $R$ that references the candidate key $D$ of $S$.Which of t...
3 3 votes
1 1 answer
249
249 views
Suppose the relation $R(A)$ exists and currently contains several tuples.The following SQL statements are executed in sequence:$\text{DELETE\ FROM\ R;}$$\text{INSERT\ INT...
3 3 votes
1 1 answer
127
127 views
Consider the relation$\text{Student(sid,\ name,\ age)}$where the attributes occur in the schema in the order shown.Which of the following statements correctly inserts the...
1 1 vote
1 1 answer
116
116 views
A relation $R(A,B)$ currently contains $7$ tuples.The following SQL statement is executed:$\text{ALTER\ TABLE\ R\ ADD\ C\ INTEGER;}$Immediately after this command, and be...
2 2 votes
1 1 answer
105
105 views
A table contains the following attributes:$\text{code\ CHAR(6)}$$\text{name\ VARCHAR(10)}$Which of the following statements are correct?A value of $\text{code}$ has a fix...
2 2 votes
1 1 answer
96
96 views
Consider the following SQL statements:$\text{CREATE\ TABLE\ Student\ (sid\ INTEGER,\ name\ VARCHAR(20));}$ $\text{ALTER\ TABLE\ Student\ ADD\ age\ INTEGER;}$ $\text{UPDAT...
2 2 votes
1 1 answer
182
182 views
Let $K_1$ and $K_2$ be two distinct candidate keys of a relation $R$.Let $S_1$ and $S_2$ be two superkeys of $R$.Which of the following statements are always true?$K_1\cu...
2 2 votes
1 1 answer
129
129 views
Consider the relation schema $R(A,B,C,D,E)$.It is known that $R$ has exactly two candidate keys, and one of them is ${A,B}$.What are the maximum and minimum possible numb...
2 2 votes
1 1 answer
119
119 views
3 3 votes
1 1 answer
139
139 views
A relation schema $R$ has $6$ attributes.Assume that the empty set is not considered a key.What is the maximum possible number of superkeys of $R$?
1 1 vote
1 1 answer
109
109 views
Consider the following relation instance $R(A,B,C)$:$$\begin{array}{|c|c|c|}\hlineA & B & C \\\hline\alpha & \delta & \xi \\\beta & \delta & \psi \\\gamma & \eta & \xi \\...