Question

In: Computer Science

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)

Solutions

Expert Solution

Solution:-

Functional dependencies:
A -> B , BC -> E , ED -> A

1) Since attributes C , D cannot be derived from any of the functional dependencies. So there are definitely present in the Candidate key.
Since, Closure of CD = CD. So now trying possible combinations of CD.
Closure of ACD = ABCDE
Closure of BCD = ABCDE
Closure of ECD = ABCDE

Therefore, Candidate Keys = { ACD , BCD , ECD }.

2) For a relation to be in 3NF it is mandatory that in every non trivial functional dependency Left hand side attribute must be a super key of relation OR Right hand side attribute must be prime attribute of relation.

Prime attributes = { A , B , C , D , E }

Right hand side attribute of each functional dependency: { B , E , A } are Prime attributes.

Therefore, Relation is in 3NF.

3) For a relation to be in BCNF it is mandatory that in every non trivial functional dependency Left hand side attribute must be a super key of relation.

Left hand side attribute of each functional dependency: { A , BC , ED } are not the Super Keys of the Relation.

Therefore, Relation is not in BCNF.


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.
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 Is R in 1NF? If not, normalize R into a collection of 1NF relations. Is R in 2NF? If not, normalize R (or your collection of 1NF relations) into a collection of 2NF relations. Is R in...
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.
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
Let R be the relation on the set of people given by aRb if a and...
Let R be the relation on the set of people given by aRb if a and b have at least one parent in common. Is R an equivalence relation? (Equivalence Relations and Partitions)
Consider the relation R on N such that xRy if and only if the sum of...
Consider the relation R on N such that xRy if and only if the sum of the digits of x and y coincide. (i) Prove or disprove R is an equivalence relation. (ii) What are the equivalence classes of R.
Given the following binary relations R on two sets, for each relation: Draw the arrow diagram...
Given the following binary relations R on two sets, for each relation: Draw the arrow diagram of R. Is R a function, and why? If R is a function, determine if it is injective or surjective. Is the function bijective? Justify your answers. R = {(a, 3), (c, 1)} on domain {a, b, c} and codomain {1, 2, 3} R = {(1, a), (3, c), (2, b)} on domain {1, 2, 3} and codomain {a, b, c} R = {(a,...
Consider the list of animals and their attributes given below cell (CELL_Q3_INPUT). The objective is to...
Consider the list of animals and their attributes given below cell (CELL_Q3_INPUT). The objective is to obtain the print outs in the subsequent cell (CELL_Q3_OUTPUT). Note that the attributes of each animal are 'name', 'species', 'color', and 'age'. You must use collections.namedtuple to add readable attribute references, which then will be used to generate the desired output in CELL_Q3_OUTPUT. # CELL_Q3_INPUT lassie = ('Lassie', 'dog', 'black', 12) buddy = ('Buddy', 'pupper', 'red', 0.5)   astro = ('Astro', 'doggo', 'grey', 15) mrpb...
Given the following relation, { ( A, A ), ( A, B ), ( A, D...
Given the following relation, { ( A, A ), ( A, B ), ( A, D ), ( B, B ), ( B, C ), ( B, E ), ( C, B ), ( C, C ), ( C, D ), ( D, A ), ( D, B ), ( D, C ), ( D, E ), ( E, D ), ( E, E ) } i) Draw the digraph of the relation, ii) construct the matrix diagram for the...
Al + HCl à AlCl3 + H2 Given that you start with 62 grams of Al...
Al + HCl à AlCl3 + H2 Given that you start with 62 grams of Al and 526ml of 10M HCl, which is your limiting reactant? How many grams of Hydrogen will you make and how much of the non-limiting is left?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT