0% found this document useful (0 votes)
141 views24 pages

Document 5

1. The determinant of a functional dependency refers to the attribute or group of attributes on the left-hand side of the arrow. 2. A functional dependency is minimal if neither the individual attributes on the left-hand side determine the attribute on the right-hand side. 3. Bad database design can result in repetition of information, inability to represent some information, or inconsistent database states due to transactions.

Uploaded by

Huynh Duong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
141 views24 pages

Document 5

1. The determinant of a functional dependency refers to the attribute or group of attributes on the left-hand side of the arrow. 2. A functional dependency is minimal if neither the individual attributes on the left-hand side determine the attribute on the right-hand side. 3. Bad database design can result in repetition of information, inability to represent some information, or inconsistent database states due to transactions.

Uploaded by

Huynh Duong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

1.

One or more columns of a composite primary (a primary key that comprises of more than one attribute)
key can be allowed to have NULL values. TRUE / FALSE?
TRUE
FALSE

2. A foreign key of any table must refer to the primary key of its base table. TRUE/FALSE
TRUE
FALSE

3. The value of a foreign key attribute A of table R that refers to table S cannot be NULL if which of the
following holds?
If attribute A is part of a primary key attribute in R
If attribute A refers the primary key of S
If attribute A is UNIQUE
If either a or b or both holds

4. An attribute must contain only values consistent with the defined data format of that particular
attribute is called
Entity integrity
Referential integrity
User-defined integrity
Column integrity

5. The __________ property ensures that any instance of the original relation can be identified from
corresponding instances of the smaller relations.
Lossless-join
Lossy-join
Both a and b
None of the above

6. In a functional dependency AB --> C, which of the following is true?


A is Determinant of C
B is Determinant of C
Both A and B together Determine C
All of the above

7. Which of the following is also called as Subset dependencies?


Entity integrity constraints
Referential integrity constraints
User-defined integrity constraints
Column integrity constraints

8. The determinant of a functional dependency refers to the attribute, or group of attributes, on the left-
hand side of the arrow.
TRUE
FALSE

9. Assume a set of functional dependencies F = {Regno Name --> Gender, Regno --> Department, Regno
--> Gender, Name --> Branch}. Here, Regno Name --> Gender is,
Gender is fully funcionally dependent on Regno and Name
Gender is partially funcionally dependent on Regno and Name
Name and branch together form the primary key
None of the above

10. _____________ ensure that a value that appears in one relation for a given set of attributes also
appears for a certain set of attributes in another relation.
Referential integrity constraints
Weak entity sets
Entity integrity constraints
None of the above
1. __________ refers to a attribute or group of attributes mentioned in the left hand side of the arrow in a
FD.
Discriminator
Determinant
Multivalued attribute
All of the above

2. In a functional dependency X --> Y, if Y is functionally dependent on X, but not on X's proper subsets,
then we would call the functional dependency as
Full Functional Dependency
Partial Functional Dependency
Multivalued Functional Dependency
None of the above

3. Which of the following is the result of bad database design?


Repetition of Information
Inability to represent some information
Inconsistent database state due to some transaction
All of the above

4. If X is {E, G, H, M} and Y is {G, M} then X --> Y is


Augmentation Rule
Reflexivity Rule
Union Rule
Pseudotransitivity Rule

5. If X --> YZ then X --> Y and X --> Z is


Composition Rule
Reflexivity Rule
Union Rule
Decomposition Rule

6. Consider F1 and F2 as two sets of functional dependencies. If every functional dependency in F2 can
be inferred from the functional dependencies of F1 using inference rules, then F1 is _________ of F2
Cover Set
Closure Set
Minimal Set
None of the above
7. If X --> Y is a functional dependency and X and Y are sets of attributes, what is the relationship
between X and Y?
One-to-Many
Many-to-One
One-to-One
Many-to-Many

8. For a functional dependency X --> Y, it is said to be _________ if Y is the subset or equal to X.


Total
Trivial
Non-trivial
Partial

9. To check whether X (a set of one or more attributes) is a candidate key of relation R, we need to find
______ of X.
Canonical Cover
Closure
Minimal Cover
None of the above

10. (a) If every functional dependency in F1 can be inferred from F2 on application of inference rules, and
(b) removal of any one attribute from any functional dependency of F2 violates (a).
Then F2 is called ______ for F1.
Minimal Cover
Canonical Cover
Both Minimal and Canonical Cover
None of the above
1. Which of the following of a relation schema R, fully functionally determines all attributes of R?
Primary Key
Candidate Key
Both Primary and Candidate Key
Neither Primary Key nor Candidate Key

2. Any attribute that is proper subset of a primary key of a relation schema is called as
Descriptor attribute
Composite attribute
Prime attribute
Atomic attribute

3. Two sets of Functional Dependencies F and G are considered equal if F+ = G+.


TRUE
FALSE

4. The words Canonical cover and Minimal cover meant the same.
TRUE
FALSE

5. An attribute of relation schema R, that is not a part of Primary key is always considered as Non-Prime
attribute
TRUE
FALSE

6. Assume the candidate keys for a relation schema R(A,B,C,D,E) as {A,B}, {A,C}, {C,D}, and {A,B} is
chosen as the Primary key for R. Which of the following is true?
A is non-key attribute
C is non-prime attribute
E is key attribute
None of the above

7. If DNo --> {DName, DLoc}, which of the following Armstrong's axioms allow the functional dependency
DNo --> DName?
Reflexivity rule
Augmentation rule
Decomposition rule
Union rule

8. Assume that a bank relates every customer with the home branch in which the customer maintains an
account. Which of the following is true?
Branch --> Branch
Customer --> Branch
Customer --> Customer
All of the above

9. A functional dependency AB --> C is said to be minimal if


either A --> C or B --> C holds
neither A --> C nor B --> C holds
both A --> C and B --> C holds
None of the above holds

10. In a relational schema R(A, B, C) with functional dependencies A --> B, B --> C, and A --> C, which of
the functional dependencies is redundant?
A --> C
A --> B
B --> C
None of the above
1. Functional dependency analysis helps in the normalization of a relational schema. TRUE / FALSE?
TRUE
FALSE

2. Normalization attempts to reduce redundant information that are stored as part of a relation.
TRUE/FALSE?
TRUE
FALSE

3. Redundancy is at the root of insertion and deletion anomalies in a relational database. TRUE/FALSE?
TRUE
FALSE

4. A null value has exactly one interpretation, ie., one meaning. TRUE/FALSE?
TRUE
FALSE

5. A functional dependency is a relationship between an attribute "Y" and a determinant (1 or more other
attributes) such that for a given value of a determinant the value of the attribute Y is uniquely defined.
TRUE/FALSE?
TRUE
FALSE

6. Functional dependencies can be found out algorithmically (automatically) by analysis of the relation. No
semantic analysis is required. TRUE/FALSE?
TRUE
FALSE

7. In practical terms, we want non-key attributes to be functionally dependent on the primary key in any
relation. TRUE/FALSE?
TRUE
FALSE

8. Transitivity of functional dependencies means that if a →b and a→c then c→b. TRUE/FALSE?
TRUE
FALSE

9. Decomposition of functional dependencies would mean that if a→bc then a→b and a→c.
TRUE/FALSE?
TRUE
FALSE

10. Functional dependencies are reflexive, i.e., if a →b then b →a. TRUE/FALSE?


TRUE
FALSE

Let R(A, B, C, D, E, F) be a relation with set F of functional dependencies as


follows;
F = { A → B, A → C, CD → E, CD → F, B → E }
Which of the following functional dependencies does not hold in R?
(a) A → E
(b) CD → EF
(c) AD → F
(d) B → CD
Discussion:

B → CD
B → CD is not true because the only functional dependency that has B on left hand side is B → E. now neither E nor B
is not on the left hand side of any of the other functional dependencies.

A→E
A → E can be derived through the functional dependencies A → B and B → E. [ Transitivity rule ]

CD → EF
CD → EF can be derived through the functional dependencies CD → E and CD → F. [ Union rule]

AD → F
AD → F can be derived through the functional dependencies A → C and CD → F. [ Pseudo-transitivity rule]

9. Let R(A, B, C) be a relation with the following set F of functional


dependencies;
F = { A → B, B → A, A → C, C → A, B → C }
If we would like to find the minimal cover of F, then which of the following
redundancies should be eliminated? ;
(a) B → A and A → C
(b) B → C
(c) Either (a) or (b)
(d) F is already minimal
12. Let us assume a relation R (A, B, C, D, E) that is in BCNF. If BCD is the
only key for R, then which of the following functional dependencies is
guaranteed to hold for R?

(a) ABCE → D
(b) ABCD → E
(c) BCE → A
(d) None of the above
13. Let us consider a relation R with the schema R (A, B, C, D). If we expect
R to be in BCNF, then which of the following sets of functional
dependencies must hold in R?

(a) A → C, A → D, AD → C, B → A
(b) C → B, C → D, A → C, D → A
(c) C → D, CD → A, BD → A, AB → C
(d) A → D, C → A, AC → B, D → B

Answer:
(b) C → B, C → D, A → C, D → A

1. For a relation R, we are given that the domains of all attributes of R are indivisible. With this
information, we can say the relation R is in
1 NF
2 NF
3 NF
BCNF

2. In a table with the schema STU(STUNO, STUNAME, ADDRESS, COURSENO, COURSENAME) and
with the functional dependencies, STUNO --> STUNAME ADDRESS, COURSENO --> COURSENAME,
STUNO COURSENO --> STUNAME ADDRESS COURSENAME, which of the following anomalies would
present?
Insetion Anomaly
Deletion Anomaly
Update Anomaly
All of the above

3. A relation which has only atomic attributes and every non-key attribute fully functionally dependent on
candidate keys is said to be in
1 NF
2 NF
3 NF
BCNF

4. Consider the schema given in question 2. Is the relation STU in 2 NF?


YES
NO
5. What does Atomic attribute mean?
It is one type of attribute used in DBMS
An attribute whose values can be divided into meaningful subparts
An attribute whose values cannot be divided into meaningful subparts
None of the above

6. If you have removed repeated groups of values from a relation and also removed the partial key
dependencies, then we would say that the given relation is in
1 NF
2 NF
3 NF
BCNF

7. Assume a table with the schema STU(STUNO, STUNAME, ADDRESS, PINCODE) and with the
functional dependencies, STUNO --> STUNAME ADDRESS PINCODE, PINCODE --> ADDRESS. Is this
relation is in 2 NF?
YES
NO

8. A relation is said to be in 3 NF if which of the following is/are true?


No partial key dependencies
All attributes are atomic
No presence of transitive dependencies
All of the above

9. Assume a table with the schema STU(STUNO, STUNAME, ADDRESS, PINCODE) and with the
functional dependencies, STUNO --> STUNAME ADDRESS PINCODE, PINCODE --> ADDRESS. Is this
relation is in 3 NF?
YES
NO

10. Assume a table with the schema STU(STUNO, STUNAME, ADDRESS, COURSENO,
COURSENAME) and with the functional dependencies, STUNO --> STUNAME ADDRESS, COURSENO
--> COURSENAME, STUNO COURSENO --> STUNAME ADDRESS COURSENAME with no transitive
dependency. The relation STU is in _______ NF?
1 NF
2 NF
3 NF
BCNF
1. Assume that a relation R has the following properties. What is the normal form of
R?
No multi-valued attributes
No partial key dependencies
(a) First Normal Form (b) Second Normal Form
(c) Third Normal Form (d) Boyce-Codd Normal Form
2. Assume that a relation R has the following properties. What is the normal form of
R?
Has no partial key dependencies
Has multi-valued attributes
(a) First Normal Form (b) Second Normal Form
(c) Third Normal Form (d) None of the above
3. All functional dependencies must _________
(a) have attributes of the same table (b) have a single attribute on its LHS
(c) have a single attribute on its RHS (d) All of the above
4. Which one of the following is always a single-valued attribute?
(a) a person’s phone number (b) a person’s address
(c) a person’s age (d) a person’s car

Let R (A, B, C, D, E, F) be a relation with the functional dependencies A → B, A → C,


CD → E, CD → F, B → E. Use this information to answer questions 5, 6, and 7.

5. Which of the following does not hold on R?


(a) A → E (b) CD → EF
(c) AD → F (d) B → CD
6. Which of the following is holding on R?
(a) A → C (b) B → A
(c) CD → A (d) C → D
7. Which of the following does not hold on R?
(a) BC → D (b) AD → B
(c) BC → E (d) ACD → BEF
8. A functional dependency that exist between two non-key attributes is called _____
(a) Non-transitive dependency (b) Transitive dependency
(c) Partial transitive dependency (d) None of the above
9. Assume that a relation R has the following properties. What is the normal form of
R?
Has no multi-valued attributes
Has no partial key dependencies
Has attributes with atomic domains
Has transitive dependencies
(a) 1NF & 2NF (b) 1NF, 2NF, & 3NF
(c) 1NF & 3NF (d) BCNF
10. Assume a relation R with the following 3 attributes; one attribute as primary key,
one attribute as foreign key and one non-key attribute. Also, none of them is multi-
valued attribute. What is the maximum normal form R can be in?
(a) 1NF (b) 2NF
(c) 3NF (d) BCNF
1. Carefully observe the relational schema given below, and select one of the
following that would violate the 2NF property?
Student (Register_No, Name, Phone, Branch, Course_No, Course_Name)
(a) Register_No, Name (b) Course_No, Course_Name
(c) Register_No, Phone (d) Phone, Branch
Why? – It is very evident that course_name is dependent on attribute course_no,
and register_no, course_no would be the primary key for this relation.
Hence, course_name shows partial dependency. But, no partial dependency is
permitted for a relation to be in 2NF.

2. The rule that a value of a foreign key must appear as a value of some specific table
is
called a ______
(a) Referential integrity (b) Entity integrity
(c) Unique integrity (d) Dependent integrity
Why? – For referential integrity to hold in a relational database, any field in a table
that is declared a foreign key can contain either a null value, or only values from a
parent table’s referenced columns (primary key or candidate keys). In other words,
when a foreign key value is used it must reference a valid, existing primary key in the
parent table.

3. For a relation R with schema R (A, B, C, D), let us assume that A is the primary key.
And, R consists of the set of functional dependencies F = {A → B, A → C, AB → C,
C → D}. Which of the following would violate the 3NF rule?
(a) AB → C (b) C →D
(c) A → BCD (d) None of the above
Why? – 3NF – “no non-key attribute should depend on another non-key attribute”
(i.e, no Transitive dependency). In this question, a non-key attribute D is fully
functionally dependent on another non-key attribute C. Hence, it violates 3NF.

4. For a relation R (A, B, C, D), we assume that the key is (A, B), a composite key. With
this information, we would say which of the following is TRUE for R.
(a) R may be in 2NF (b) R may be in 3NF
(c) R may be in BCNF (d) Not enough information
Why? – The only information given is the primary key of the table. And the primary
is a composite key. Hence, we would say that the table can be in 2NF. We need the set
of functional dependencies for deciding further.

5. Consider a relation R (A, B, C) with F = {A → B, C → B}. Assume that we


decompose R into R1 (A, B) and R2 (A, C). Which of the following is TRUE for this
case?
(a) R1 and R2 are in BCNF (b) Dependency preserving
decomposition
(c) R1 and R2 are in 3NF (d) All of the above

Why? – If we have a relation with just two attributes we cannot look for partial key
dependency, non-key dependency, or multiple candidate keys. Hence, the relation is
in 3NF and BCNF.
The decomposition given above is not dependency preserving decomposition.
Because, the decomposition results in elimination of C → B.

1. Let F = {A → B, AB → E, BG → E, CD → I, E → C}. The closures, A+, (AE)+ and


(ADE)+ will be ________.
(a) ABCE, ABDE, ABCDEI (b) ABCE, ABCE, ABCDEI
(c) ABDE, ABCE, ABCDE (d) ABCE, ABDE, ABCDI
Solution: Visit for detailed answer here.

2. Let F = {A → B, A → C, BC → D}. Can A determine D uniquely?


(a) Yes (b) No
Solution: Visit for detailed answer here.
3. Let F = {AB → D, B → C, BC → D}. Can AC determine D uniquely?
(a) Yes (b) No
Solution: Visit for detailed answer here.

4. Let F1 = {A → C, AC → D, E → AD} and F2 = {A → CD, E → AH}. Are F1 and F2 are


equivalent?
(a) Equivalent (b) Not Equivalent
Solution: Visit for detailed answer here.

5. Find the minimal cover of the set of functional dependencies given; {A → BC,
B → C, AB → D}
(a) {A → C, B → C, AB → D} (b) {A → C, B → C, B → D}
(c) {A → B, B → C, A → D} (d) {A → BC, B → C, A → D}
Solution: Visit for detailed answer here.

6. Find the minimal cover of the set of functional dependencies given; {A → C,


AB → C, C → DI, CD → I, EC → AB, EI → C}
(a) {A → C, C → DI, C → I, E → A, EI → C} (b) {A → C, C → D, C → I, EC → A,
EC → B}
(c) {B → C, C → DI, D → I, E → AB, EI → C} (d) {A → C, C → DI, CD → I, I → C}
Solution: Visit for detailed answer here.

7. Consider a relation R with set of functional dependencies F as follows; {A → B,


C → D, AC → E, D → F}. How many keys does R have and what are they?
(a) 1, {(AC)} (b) 2, {(AC), (AD)}
(c) 3, {(AC), (BC), (ABD)} (d) 2, {(AC), (ABD)}
Solution: Visit for detailed answer here.

8. Consider a relation R(A, B, C, D, E) with FDs AB → C, CD → E, C → A, C → D,


D → B. What are the keys of R?
(a) AB, AC, D (b) AC, BD
(c) AC, AD (d) AB, AD, C
Solution: Visit for detailed answer here.
9. Consider a relation R(A, B, C, D, E) with FDs AB → C, C → A, C → BD, D → E.
What are the keys of R? Decompose R into 3NF relations.
(a) {C}, R1(ABCD), R2(DE) (b) {BD, AB}, R1(ABCD), R2(DE)
(c) {AB, C}, R1(ABCD), R2(DE) (d) {BD}, R1(ABC), R2(CDE)
Solution: Visit for detailed answer here.

10. Consider a relation with schema R(A, B, C, D) with functional


dependencies, BC → A, AD → B, CD → B, AC → D. Find all the candidate keys of R.
(a) AC, BC, CD (b) AC, BC
(c) AC, AD (d) BC, CD, A
Solution: Visit for detailed answer here.

1. We would say that {A1, A2, …, An}+ is the set of all attributes of R if and
only if (A1, A2, …, An) is a ____________ for R.
[a] Primary key [b] Candidate key
[c] Super key [d] All of the above

Answer: [d] All of the above


If the closure of set of attributes includes all attributes then we would say that the
set of attributes in question forms the key.

2. Consider a relation R(A, B, C, D, E) with FDs {A → BC, CD → E, B → D,


E → A}. Are the relations R1(A, B, C) and R2(A, D, E) resulted in a lossless
join decomposition of R?

Answer: YES
A decomposition of R into R1 and R2 is said to be lossless join decomposition if
either of the following two conditions hold;

R1 ⋂ R2 → R1
R1 ⋂ R2 → R2
As per the given question, (ABC) ⋂ (ADE) = A. A is the candidate key for R1
from the FD A → BC, hence the first condition holds. So, the decomposition is
lossless join decomposition.

3. Consider a relation R(A, B, C, D, E) with FDs {A → BC, CD → E, B → D,


E → A}. Are the relations R1(A, B, C) and R2(C, D, E) resulted in a lossless
join decomposition of R?

Answer: NO
Refer answer 2 above for rules

As per the given question, (ABC) ⋂ (CDE) = C. From the given FDs it is clear
that C alone does not uniquely identify any attributes of R. C is not a candidate
key for either of the relations. So, the decomposition is not lossless join
decomposition.

4. Let us suppose that relations R and S have r and s number of tuples


(records) respectively. What are the minimum and maximum numbers of
tuples that R ⋈ S have?
[a] 0, rs [b] 1, rs
[c] r-s, rs [d] r-s, r+s

Answer: [a] 0, rs

The operation R Natural Join S results in any tuple if at least one record of R and
one record of S satisfy the join condition.

Minimum – If no records satisfy the join condition, the result will be 0 (Zero).

Maximum – If all the records of R can be joined with all the records of S, then the
result will be r*s.
5. Assume a relation R(A, B, C) with the records (1, 2, 3), (4, 2, 3), (5, 3, 3),
(5, 3, 4). Which of the following FDs is/are true?
[a] A → B [b] BC → A
[c] B → C [d] None of the above.

Answer: [a] A → B

Consider the attribute set R = ABCDEGH and the FD set F = {AB → C, AC


→ B, AD → E, B → D, BC → A, E → G} to answer the following questions.
Q1. Which of the following relations if decomposed from R satisfies
BCNF?
a) ABC
b) ABCD
c) ABCEG
d) None of the above

View Answer
Answer: (a)
Let us say R1 = ABC. If decomposed from R, R 1 will have the following set of
functional dependencies F1;
F1 = {AB → C, AC → B, BC → A}
The candidate keys for R1 are AB, AC, and BC. As per rules governing BCNF, LHS of
all the functional dependencies must be the candidate key which is true for R1.
Hence, R1 in BCNF.

Q2. Which of the following relations if decomposed from R satisfies


BCNF?
a) ABCD
b) ABCEG
c) AECH
d) None of the above

View Answer
Answer: (c)
Let us say R1 = AECH. If decomposed from R, R1 will have no functional
dependencies. Hence, the key for R1 is AECH itself. So, R1 is in BCNF.

Q3. Which of the following relations if decomposed from R does not


satisfy 2NF?
a) ABC
b) AB
c) ABCEG
d) All of the above

View Answer
Answer: (c)
Let us say R1 = ABCEG. If decomposed from R, R 1 will have the following set of
functional dependencies F1;
F1 = { AB → C, AC → B, BC → A, E → G}
Candidate keys;
(AB)+ = ABC ≠ R1
(AC)+ = ACB ≠ R1
(BC)+ = BCA ≠ R1
(ABE)+ = ABCEG = R1. Likewise, (ACE)+ = (BCE)+ = R.
Hence, candidate keys are ABE, ACE, and BCE.
As per the rules of 2NF, there shouldn’t be any partial key dependencies.
But, in R1, the FD E → G is a partial key dependency. That is, E is not a candidate
key but a key attribute. And E alone determines another non-key attribute G
uniquely (the FD E → G). Hence, R1(ABCEG) is not in 2NF.
Q4. Let us suppose that R1 = DCEGH is a relation which is decomposed
from R satisfies the set F of functional dependencies F= {E → G}. What is
the strongest normal form currently R1 is in?
a) 1NF
b) 2NF
c) 3NF
d) BCNF

View Answer
Answer: (a)
The key is DCEH.
R1 is not in BCNF because E on the LHS of FD E → G is not a candidate key.
R1 is not in 3NF and not even in 2NF because the FD E → G is a partial key
dependency.
Hence, R1 is in 1NF.

Q5. If R1 = ABCD is decomposed from R, which of the following


decomposition of R1 satisfies BCNF?
a) R11(AB), R12(CD)
b) R11(ABC), R12(BD)
c) R11(AC), R12(BD)
d) R11(BCD), R12(AB)

View Answer
Answer: (b)
If R1(ABCD) is decomposed from R, then the set of functional dependencies holds by
R1 is as follows;
F1 = { AB → C, AC → B, B → D, BC → A }
We can take, for instance, the first FD AB → C to find the closure. The closure of AB =
ABC. So, we can create a separate table R 11(ABC) with the first FD. The remaining is
the FD B → D, and B+ is BD. This can go as R12(BD).
Hence, the decomposition results in R11(ABC), R12(BD)
1. Consider relation R(A,B,C,D,E) with functional dependencies:
AB → C, C → D, BD → E
Which of the following attribute sets does not functionally determine E ?
a) AB
b) AC
c) BC
d) ABC

View Answer
Answer: (b)
(AB)+ = ABCDE
(BC)+ = BCDE
(ABC)+ = ABCDE
(AC)+ = AC
Only the closure of AC does not include E in the result.

2. Let relation R(A,B,C,D) satisfy the following set of functional


dependencies:
S1 = {A → B, B → C, C → A}
A different set S2 of functional dependencies is equivalent to S1 if exactly the
same FDs follow from S1 and S2. Which of the following sets of functional
dependencies is equivalent to the set above? [Refer here: How to find
whether two sets of FDs are equivalent to each other or not]
a) B → AC, C → AB
b) A → B, B → A, C → A
c) A → BC, C → AB
d) A → BC, B → AC, C → AB
View Answer
Answer: (d)
Two sets of FDs are said to be equal if every FD of one of them can be inferred from
the FDs of the other and vice versa.
If the set of FDs of S2 can be inferred from FDs of S1, then we would say that S1
covers S2. We check this for the answer (d).
 The FD A → BC of S2 can be inferred from the FDs A → B and B → C of S1.
 The FD B → AC of S2 can be inferred from the FDs B → C and C → A of S1.
 The FD C → AB of S2 can be inferred from the FDs C → A and A → B of S1.
If the set of FDs of S 1 can be inferred from FDs of S 2, then we would say that S 2 covers
S1. We check this for the answer (d).
 The FD A → B of S1 can be inferred from the FDs A → BC of S2.
 The FD B → C of S1 can be inferred from the FDs B → AC of S2.
 The FD C → A of S1 can be inferred from the FDs C → AB of S2.
S1 covers S2 and S2 covers S1. Hence, we would say that S1 covers S2 and so they are
equivalent.

3. Suppose relation R(A,B,C) has tuples (0,0,0) and (1,2,0) , and it satisfies
the functional dependencies A → B and B → C . Which of the following
tuples may be inserted into R legally?
a) (0,0,1)
b) (1,2,1)
c) (0,1,1)
d) (0,0,2)

View Answer
Answer: None are correct
None of the options are correct.
If the record (0,0,1) will be inserted, it will violate the FD B → C. because, alredy there
exists a record with B value 0 and C value 0. Now we try to insert B value 0 and C
value 1. Likewise, record (b) and (d) both will violate this FD.
If the record (0,1,1) will be inserted, it will violate both FDs A → B and B → C.
4. Under what isolation level is the following schedule allowed?
R3(b); R1(b); W3(p); R2(b); R1(p); R1(c); W2(c); W1(c); R3(c); R2(c); W3(p);

[Refer here: Transaction isolation level READ UNCOMMITTED]

a) Read uncommitted
b) Read committed
c) Repeatable read
d) Serializable

View Answer
Answer: (a)
Given schedule;
R3(b); R1(b); W3(p); R2(b); R1(p); R1(c); W2(c); W1(c); R3(c); R2(c); W3(p);
In this schedule, transaction 1 reads a value (R1(p)) which was written by transaction
3 (W3(p)) before T3 commits. Hence, the read was a dirty read. The transaction
isolation level that permits this type of read is READ UNCOMMITTED. [Other
violating instructions also highlighted].
[Refer here: Transaction isolation level READ UNCOMMITTED]

5. Consider the following relational schema and set F of functional


dependencies;
R(A,B,C,D,E,F,G), F = {E → C, G → AD, B → E, C → BF}. Which of the
following is E+?
a) EC
b) ECG
c) BCEF
d) ABCEF

View Answer
Answer: (c)
E+ is the closure of E. This can be calculated using the given FD.
E+ = EC from FD E → C
= ECBF from FD C → BF
= ECBF from FD B → E (no change)
No more FDs with any of the attributes or combination of E, C, B, and F. Hence,
closure finding algorithm stops here.
[Refer here: How to find closure of a set of attributes here]

1. For a relation R(A, B, C), if A → B and A → C holds, then A → BC also holds. Which of the following rule
ensures this?

(a) Augmentation rule

(b) Union rule

(c) Decomposition rule

(d) None of the above

Answer:

(b) Union rule

2. For a relation R(A, B, C, D, E) with the set of functional dependencies F = {A → B, CD → E, B → D, E →


A}, which of the following are the candidate keys (minimal keys) of R?

(a) AB, CD

(b) AC, BC, CD, CE

(c) AC, BC, AEC

(d) A, D, DE

Answer:

(b) AC, BC, CD, CE

3. Assume a relation R with the schema R(A, B, C, D, E). The primary key of R is A. Which of the following
is correct for R?
(a) R is in 1NF only

(b) R is in both 1NF and 2NF

(c) R is in 3NF

(d) R is in BCNF

Answer:

(b) R is in both 1NF and 2NF

4. Assume a relation R with the schema R(A, B, C, D, E) and a set F of functional dependencies as follows;
F = {A → B, C → D, D → E} The relation R is not in Second Normal Form (2NF). Why?

(a) R has no repeating groups

(b) R has transitive functional dependencies

(c) R has partial functional dependencies

(d) R has no key

Answer:

(c) R has partial functional dependencies

5. Given the following relation R and the set of functional


dependencies S that hold on R, which of the following options shows
the valid candidate keys for R. R(A, B, C, D, E, F) S: {DF → C, BC → F,
E → A, ABC → E}

(a) ABC, DEF


(b) ABD, BDE
(c) ABCD, BDEF
(d) DEF, ACD, BCF

7. Assume a relation R(A, B, C, D, E) with the set of


functional dependencies F = { A → B, BC → D } and
the candidate key (ACE). The relation is not in BCNF.
Which of the following is the dependency preserving
decomposition for R into BCNF relations?
(a) R1(B, C, D), R2(A, B), R3(A, C, E)
(b) R1(A, B), R2(A, C, D), R3(A, C, E)
(c) R1(A, B), R2(A, C, D, E)
(d) All of the above

10. Assume a relation R(A, B, C, D, E) with set F of functional dependencies


as follows;

F = {A → BC, CD → E, B → D, E → A}

If R is decomposed in to R1(A, B, C) and R2(A, D, E), which of the


following holds?

(a) Decomposition is Loss-less Join Decomposition

(b) Decomposition is Dependency Preserving Decomposition


(c) Decomposition is both (a) and (b)
(d) Decomposition is Lossy-Join Decomposition

11. Consider the relation R(A, B, C, D, E) with set of functional


dependencies F = {A → B, C → D}. Let us assume that R is in 1NF.
Which of the following is the correct BCNF decomposition of R?

(a) R1 (A, C, D, E) and R2 (A, B)


(b) R1 (A, B, C, E) and R2 (C, D)
(c) R1 (A, B), R3 (C, D), and R3 (A, C, E)
(d) All of the above.
1. Let us assume that a relation R (A, B, C, D, E) with set of functional
dependencies F = {A → BC, C → D} is decomposed into relations R1 (A, B,
C) and R2 (A, D, E). This decomposition is ___________.
a) Lossless join decomposition
b) Dependency preserving decomposition
c) Not a dependency preserving decomposition
d) Lossy decomposition
2. Let us assume that a relation R (A, B, C, D, E, F, G, H) with set of
functional dependencies F = {AB → E, C → D, D → E, FG → A} is
decomposed into relations R1(ABE), R2(CD), R3(FGA) and R4(BCFGH).
The decomposition _____.
a) is resulted in all BCNF relations
b) is dependency preserving decomposition
c) is not a dependency preserving decomposition
d) is lossless decomposition
3. Consider a relation R(A, B, C, D, E) with the set of functional
dependencies F = {A → B, B → E, E → A}. Relation R is in ____.
a) Un-normalized form
b) Third Normal Form
c) Boyce-Codd Normal Form
d) Domain Key Normal Form

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy