08 Normalization II -Key

docx

School

Ohio State University *

*We aren’t endorsed by this school

Course

3241

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

2

Uploaded by JusticeSeahorse1284

Report
CSE 3241 In-Class Assignment – 08 Functional Dependencies and Normalization Names Date 1. Consider the relation R1(A, B, C, D, E, F) with functional dependencies: A {B,C,D,E}; D F; {B,C} {A,D}; B E a. What are the possible candidate keys for relation R1? {A}, {B,C} (If we have A we can get E and F via transitive dependencies. If we have B and C we get A, so we can get everything else via transitive dependencies as well) b. Is R1 in BCNF? If so why, and if not why not? Show a decomposition of R1 into BCNF No. We have B E. B is only part of a key and E is a non-prime attribute, so this violates 2NF. We also have D F which violates the definition of 3NF – D is not a superkey of R1 and F is not a prime attribute. One possible decomposition: R1a(A,B,C,D); R1b( B ,E); R1c(D ,F). Other solutions may be possible 2. Consider the relation R2(A, B, C, D, E, F) with functional dependencies: {B,D} {A,E}; C F; {E,F} {A}; E C a. What are the possible candidate keys for relation R1? Only {B,D}. Since nothing determines B and nothing determines D, both of these must be in any key we propose. And both of these determine everything, so it will be our only key. b. Is R2 in BCNF? If so why, and if not why not? Show a decomposition of R2 into BCNF No. R2 is only in 2NF. Nothing is dependent on a piece of a key (either B or D by themselves), but C F and E C and {E,F} {A}; are all dependencies where a non superkey determines a non prime attribute, and so violates 3NF. One possible breakdown that is in BCNF would be R2a(B , D , E); R2b(E , C, A); R2c(C , F). This retains the dependencies {B,D} A and {E,F} A through transitivity – since E C, C F, which means that E F. If E F we can substitute E in for F on the left side of {E,F} A and get {E,E} A, which simplifies to E A. So preserving E A also preserves {E,F} A and this breakdown preserves dependencies. 3. Consider the relation R3(A, B, C, D, E, F) with functional dependencies: {A} {F}; {E} {B,C}; {E,F} {D}; {F} {A,C} a. What are the possible candidate keys for relation R3? {A, E} and {E,F} are the possible candidate keys b. Is R3 in BCNF? If so why, and if not why not? Show a decomposition of R3 into BCNF No. R3 is not in 2NF because the dependencies {E} {B,C} and {F} {C} are partial dependencies. One possible breakdown that is in BCNF would be: R3a(E , F , D); R3b(E , B, C); R3c(F, A); This one loses the dependency F C.
4. Multiple Choice (circle only one answer): a. Given the relation schema R(A,B,C,D,E) and the dependencies: {A,B} {C,D,E}; A E We can infer the following: a. A is a key for R b. {B,E} is a key for R c. {A,B} is a key for R d. None of the above b. Given the relation schema R(A,B,C,D, E) and the functional dependencies: {A} {C,D}; D {C}; B E; {C,E} A which of the following could be the primary key of R? a. {A} b. {A,B,E} c. {B,E} d. {B,D} c. Given the relation schema R(A,B,C,D,E) and the functional dependencies: {E} {C,D}; {A,E} B; B A, what is the highest normal form of R? a. 1NF b. 2NF c. 3NF d. BCNF e. None of the above d. Given the relation schema R(A,B,C,D,E,F) and the dependencies: {C,D} {A,B,E}; A {C,D,E} We can infer the following: a. R is in 3NF b. {C,D} is a candidate key for R c. {A} is a candidate key for R d. E is a prime attribute e. F is a prime attribute f. None of the above
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help