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.
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...
How do we know the following relation with the following dependencies is BCNF? course ( course_id...
How do we know the following relation with the following dependencies is BCNF? course ( course_id , title , dept_name , credits ) Functional Dependencies course_id → title , dept_name , credits building , room_number → capacity course_id , sec_id , semester , year → building , room_number , time_slot_id Choose what makes the statement BCNF and why: dept_name is a superkey course_id, dept_name is a superkey course_id is a candidate key course_id is a superkey
Normalize the following data by: a) identifying the functional dependencies, b) stating your assumptions, \ c)...
Normalize the following data by: a) identifying the functional dependencies, b) stating your assumptions, \ c) creating relations, and d) identifying primary and foreign keys. Customer Number| First Name |Last Name |Phone | Invoice Number| Date |Item Type |Quantity Item Price
Consider the following functional dependencies: Z -> XYD, X -> Y. Find the minimal cover of...
Consider the following functional dependencies: Z -> XYD, X -> Y. Find the minimal cover of the above.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT