Recent questions tagged goclasses-databases-practice-questions

2 2 votes
2 2 answers
208
208 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...
2 2 votes
1 1 answer
168
168 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 ...
2 2 votes
1 1 answer
151
151 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...
3 3 votes
1 1 answer
123
123 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$ ...
2 2 votes
1 1 answer
145
145 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...
2 2 votes
1 1 answer
222
222 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\}$ ...
3 3 votes
1 1 answer
158
158 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...
3 3 votes
3 3 answers
231
231 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...
2 2 votes
1 1 answer
139
139 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
146
146 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...
7 7 votes
1 1 answer
253
253 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) ...
3 3 votes
1 1 answer
169
169 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...
4 4 votes
1 1 answer
170
170 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...
3 3 votes
1 1 answer
136
136 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...
4 4 votes
1 1 answer
179
179 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...
4 4 votes
1 1 answer
307
307 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...
4 4 votes
1 1 answer
186
186 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...
2 2 votes
1 1 answer
182
182 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...
3 3 votes
1 1 answer
151
151 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...
3 3 votes
1 1 answer
134
134 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
250
250 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
186
186 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
176
176 views
4 4 votes
1 1 answer
199
199 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
171
171 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 \\...
6 6 votes
1 1 answer
446
446 views
Consider the relation schema $R(A,B,C)$.The domain sizes of the attributes are:$|D_A|=2$$|D_B|=2$$|D_C|=3$Assume that there are no constraints other than the domain const...
2 2 votes
1 1 answer
258
258 views
Consider the relation schema$\text{STUDENT}(Sid:\text{Integer}, ~Name:\text{String}, ~Age:\text{Integer}[0,120])$Which of the following operations change the schema of $\...
2 2 votes
1 1 answer
254
254 views
Consider the relation schema $R(A,B,C,D)$.Five row occurrences are obtained during data collection:$(1,p,10,x)$$(2,q,20,y)$$(1,p,10,x)$$(3,r,30,z)$$(4,s,40,x)$These row o...
2 2 votes
1 1 answer
213
213 views
Which one of the following statements about the pure relational model and its database implementation is correct?A relation in the relational model is represented concept...
2 2 votes
1 1 answer
236
236 views
A company maintains employee information using ordinary operating-system files. Several application programs directly depend on the physical layout of these files.The com...