Question

In: Computer Science

Normalization: Answer all 4 questions. You are given the following relation R and some functional dependencies....

Normalization: Answer all 4 questions.

You are given the following relation R and some functional dependencies.

R(SID, Project, Code, ListOfSupplies, Name, Initials, Abbrev)

  • Project → ListOfSupplies
  • SID → Name
  • Name → Initials
  • Project, Initials → Abbrev
  • SID, Project → Code
  • Code → SID
  1. Is R in 1NF? If not, normalize R into a collection of 1NF relations.
  2. Is R in 2NF? If not, normalize R (or your collection of 1NF relations) into a collection of 2NF relations.
  3. Is R in 3NF? If not, normalize R (or your collection of 2NF relations) into a collection of 3NF relations.
  4. Is R in BCNF? If not, normalize R (or your collection of 3NF relations) into a collection of BCNF relations, or explain why it is impossible.

Solutions

Expert Solution

Solution:

Explanation:

=>Let say SID = A, Project = B, Code = C, ListOfSupplies = D, Name = E, Initials = F, Abbrev = G

=>Hence relation = R(A, B, C, D, E, F, G)

=>Set of functional dependencies = {B -> D, A -> E, E -> F, BF -> G, AB -> C, C -> A}

(1)

Explanation:

=>Relation R is in 1 NF because there is no multivalued or complex attributes in the relation R.

(2)

Explanation:

Finding candidate keys:

=>There is no attribute "B" at the right hand side part of any of the given functional dependencies hence attribute "B" must be present in every candidate keys as candidate key has ability to derive all the attributes of the relation.

=>(AB)+ = ABCDEFG

=>(BC)+ = ABCDEFG

=>As attribute closure of AB and BC derive all the attributes of the relation hence AB and BC are candidate keys of relation R.

=>Candidate keys = {AB, BC}

Checking 2 NF:

=>Set of functional dependencies = {B -> D, A -> E, E -> F, BF -> G, AB -> C, C -> A}

=>Candidate keys = {AB, BC}

=>Relation is not in 2 NF because there are partial functional dependencies of type X -> Y where X is proper subset of candidate key and Y is non prime attribute.

=>Functional dependencies voilating 2 NF = {B -> D, A -> E}

Converting relation in 2 NF:

=>R1(B, D) with functional dependency = {B -> D}

Candidate key = {B}

=>R2(A, E) with functional dependency = {A -> E}

Candidate key = {A}

=>R3(A, B, C, F, G) with functional dependendencies = {BF -> G, AB -> C, C -> A}

Candidate keys = {AB, BC}

=>Now relations are in 2 NF.

(3)

Explanation:

=>Relations are not in 3 NF because all the functional dependencies are not of type X -> Y where either X is super key or Y is prime attribute.

=>Functional dependencies voilating 3 NF = {BF -> G}

Converting relations into 3 NF:

=>R1(B, D) with functional dependency = {B -> D}

Candidate key = {B}

=>R2(A, E) with functional dependency = {A -> E}

Candidate key = {A}

=>R3(B, F, G) with functional dependency = {BF -> G}

Candidate key = {BF}

=>R4(A, B, C, F) with functional dependendencies = {AB -> C, C -> A}

Candidate keys = {AB, BC}

=>Now relations are in 3 NF.

(4)

Explanation:

=>Relations are not in BCNF because all the functional dependencies are not of type X - > Y where X is super key.

=>Functional dependency voilating BCNF = {C -> A}

Converting relations into BCNF:

=>R1(B, D) with functional dependency = {B -> D}

Candidate key = {B}

=>R2(A, E) with functional dependency = {A -> E}

Candidate key = {A}

=>R3(B, F, G) with functional dependency = {BF -> G}

Candidate key = {BF}

=>R4(A, C) with functional dependency = {C -> A}

Candidate key = {C}

=>R4(B, C, F) with no functional dependency

=>Now relations are in BCNF.

I have explained each and every part with the help of statements attached to the answer above.


Related Solutions

Consider a relation R (ABCDEFGH) with the following functional dependencies: ACD --> EF AG --> A...
Consider a relation R (ABCDEFGH) with the following functional dependencies: ACD --> EF AG --> A B --> CFH D --> C DF --> G F --> C F --> D Find minimal cover and identify all possible candidate keys. In order to receive full credit, please list each step taken and the rules that you applied.
Consider a relation R with five attributes ABCDE. You are given the following dependencies: A à...
Consider a relation R with five attributes ABCDE. You are given the following dependencies: A à B, BC à E, and ED à A. (1) List all candidate keys for R. Please show your steps. (4 points) (2) Is R in 3NF? Please explain your answer. (3 Points) (3) Is R in BCNF? Please explain your answer. (3 Points)
For the relation R(A,B,C,D,E) with the following Functional Dependencies: A → B, A → C, BC...
For the relation R(A,B,C,D,E) with the following Functional Dependencies: A → B, A → C, BC → D, AC → E, CE → A, list all non-trivial FDs following from the above.    Generate all possible keys for R. Check whether R is in 3NF. If it is in 3NF, explain the criteria you used. If it is not in 3NF, convert it into 3NF, showing the new relations and their FDs.
Consider the following relation R(A, B, C, D, E, G) and the set of functional dependencies...
Consider the following relation R(A, B, C, D, E, G) and the set of functional dependencies F={ A → BCD, BC → DE, B→D, D → A} Note: Show the steps for each answer. (a) Compute B+ . (b) Prove (using Armstrong’s axioms) that AG is superkey. (c) Compute Fc. (d) Give a 3NF decomposition of the given schema based on a canonical cover. (e) Give a BCNF decomposition of the given schema based on F. Use the first functional...
1. The functional dependencies for the ProAudio relation: c_id -> f_name, l_name, address, city, state, zip...
1. The functional dependencies for the ProAudio relation: c_id -> f_name, l_name, address, city, state, zip item_id -> title, price ord_no -> c_id, order_date ord_no  + item_id  -> shipped zip -> city, state Original ProAudio relation: c_id f_name I_name address city state zip ord_no item_id title price order_date shipped 01 Jane Doe 123 Elm St Ely NV 11111 1-1 12-31 More Blues 8.99 12-2-00 no 02 Fred Fish 321 Oak St Ely NV 11111 2-1 21-12 Jazz Songs 9.99 11-9-00 yes 01...
1. The functional dependencies for the ProAudio relation: c_id -> f_name, l_name, address, city, state, zip...
1. The functional dependencies for the ProAudio relation: c_id -> f_name, l_name, address, city, state, zip item_id -> title, price ord_no -> c_id, order_date ord_no  + item_id  -> shipped zip -> city, state Original ProAudio relation: c_id f_name I_name address city state zip ord_no item_id title price order_date shipped 01 Jane Doe 123 Elm St Ely NV 11111 1-1 12-31 More Blues 8.99 12-2-00 no 02 Fred Fish 321 Oak St Ely NV 11111 2-1 21-12 Jazz Songs 9.99 11-9-00 yes 01...
Answer all questions. Explain what each of the following is in relation to thermocouples: (a) extension...
Answer all questions. Explain what each of the following is in relation to thermocouples: (a) extension leads, (b) compensating leads, (c) law of intermediate metals, (d) law of intermediate temperature.
1. Let R be the relation on A = {1, 2, 3, 4, 5} given by...
1. Let R be the relation on A = {1, 2, 3, 4, 5} given by R = {(1, 1),(1, 3),(2, 2),(2, 4),(2, 5),(3, 1),(3, 3),(4, 2),(4, 4),(4, 5),(5, 2),(5, 4),(5, 5)}. (a) Draw the digraph which represents R. (b) Give the 0 -1 matrix of R with respect to the natural ordering. (c) Which of the five properties (reflexive, irreflexive, symmetric, antisymmetric, transitive) does R have? Give a brief reason why or why not each property holds. 2. Let...
Determine the Functional Dependencies that exist in the following Orders table. This table lists customer and...
Determine the Functional Dependencies that exist in the following Orders table. This table lists customer and order data. Orders (SupplierNum, SupplierName, Supp_Phone, ProductNum, Description, Product_type, QuotedPrice) . Normalize the above relation to 3 rd normal form, ensuring that the resulting relations are dependency-preserving and specify the primary keys in the normalized relations by underlining them.
Please answer ALL 3 questions and provide explanations :) 4. A given mass of oxygen at...
Please answer ALL 3 questions and provide explanations :) 4. A given mass of oxygen at room temperature occupies a volume of 500.0 mL at 1.50 atm pressure. What will be the pressure if the volume is reduced to 150.0 mL? 5. Gases are sold in large cylinders for laboratory use. What pressure, in atmospheres, will be exerted by 2,500 g of oxygen gas (O2) when stored at 22°C in a 40.0 L cylinder? 6. Consider the following reaction at...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT