Consider the following schema and functional dependencies:
SHIPPING (ShipName, ShipType, VoyageID, Cargo, Port, ArrivalDate) Key: ShipName, ArrivalDate FD1: ShipName > ShipType FD2: VoyageID > ShipName, Cargo FD3: ShipName, ArrivalDate > VoyageId, Port
1.Please list the final set of 3NF schema including all its keys.
2.Do any of the finalized 3NF schema have determinates that are not candidate keys? If yes, explain - which schema(s)? Why?
Answer:------------
Given,
Relation, SHIPPING (ShipName, ShipType, VoyageID, Cargo,
Port, ArrivalDate)
Key is ShipName and ArrivalDate
FD1: ShipName > ShipType
FD2: VoyageID > ShipName, Cargo
FD3: ShipName, ArrivalDate > VoyageId, Port
Firstly we need to normalize it in 2NF.
Starting with the initial relation:
Shipping (ShipName, ShipType, VoyageID, Cargo, Port,
ArrivalDate)
We have a partial key dependency as ShipName alone can determine
ShipType. So we normalize to:
SHIPS( ShipName, ShipType)
ShipName -> ShipType
VOYAGES (ShipName, VoyageID, Cargo, Port,
ArrivalDate)
ShipName, ArrivalDate -> VoyageID, Port
VoyageID -> ShipName, Cargo
Now normalize in 3NF:--------
As in 2NF, VOYAGES has a transitive dependency:
ShipName, ArrivalDate -> VoyageID -> Cargo,
So normalize VOYAGES:
SHIPPORTS (ShipName, VoyageID, Port,
ArrivalDate)
ShipName, ArrivalDate -> VoyageID, Port
VoyageID -> ShipName
CARGO (VoyageID, Cargo)
VoyageId -> Cargo
SHIPS( ShipName, ShipType)
ShipName -> ShipType
Consider the following schema and functional dependencies: SHIPPING (ShipName, ShipType, VoyageID, Cargo, Port, ArrivalDate) Key: ShipName,...
The right side of any functional dependency must contain a candidate key. TRUE FALSE » Given a set of functional dependencies F, there always exists a canonical cover of F TRUE FALSE Some schemas cannot be transformed into BCNF FALSE TRUE Every schema can be transformed into 3NF, and the resulting schema is dependency- preserving TRUE FALSE . Any schema that is in BCNF is also in 3NF FALSE TRUE The right side of any functional dependency must contain a...
Consider the following relation R, where {A, B} is its PK. Assume that R is in the first normal form (INF). R (A, B, C, D, E, F) Functional dependencies: FD1: BàC FD2: AàDE FD3: ABàF Why is this table not in 2NF? Specify which FDs make R violate 2NF. Normalize the data shown in this table to second normal form (2NF). Specify the primary and foreign key (if any) in each table of your 3NF relations. Normalize the data...
Language: SQL - Normalization and Functional Dependencies Part 4 Normalization and Functional Dependencies Consider the following relation R(A, B, C, D)and functional dependencies F that hold over this relation. F=D → C, A B,A-C Question 4.1 (3 Points) Determine all candidate keys of R Question 4.2 (4 Points) Compute the attribute cover of X-(C, B) according to F Question 43 (5 Points) Compute the canonical cover of F.Show each step of the generation according to the algorithm shown in class....
Write the complete proof. Consider the relational schemas given below and the respective sets of functional dependencies valid in the schemas For each one of the relational schemas, determine the highest normal form, which is valid for a schema. Justify your answer If a schema is not in BCNF, then decompose it into a minimum number of schemas so that each one of them is in BCNF. Justify your answers. Justification must include the derivations of minimal keys from the...
Consider a relation R(A,B,C,D,E) with the following functional dependencies: 8. AB C BCD CDE DEA (a) Specify all candidate keys for R. (b) Which of the given functional dependencies are Boyce-Codd Normal Form (BCNF) violations'? (c) Give a decomposition of R into BCNF based on the given functional dependencies. (d) Give a different decomposition of R into BCNF based on the given functional dependencies. (e) Give a decomposition of R into 3NF based on the given functional dependencies. Consider a...
Question 1: Functional Dependencies [7 marks Consider a relation R on attributes (A, B, C, D, E, F,G, H) and the following functional dependen- cies. B →G C →D DE →GC → EF DEF → H (a) What is the closure of [F, G, Hy? (b) List all of the candidate keys of R under the dependencies above. (c) List all of the FDs above that are 3NF violations (d) List all of the FDs above that are BCNF violations....
Consider a relation R(A,B,C,D,E) with the following functional dependencies: 8. AB C BCD CDE DEA (a) Specify all candidate keys for R. (b) Which of the given functional dependencies are Boyce-Codd Normal Form (BCNF) violations'? (c) Give a decomposition of R into BCNF based on the given functional dependencies. (d) Give a different decomposition of R into BCNF based on the given functional dependencies. (e) Give a decomposition of R into 3NF based on the given 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} Give a 3NF decomposition of the given schema based on a canonical cover
Databases question Consider the following relation that stores information about students living in dormitories at a college: a. Using these assumptions and stating any others you need to make, list all the non-trivial functional dependencies for this relation b. What are the candidate keys for this relation? Identify the primary keys c. Is this relation in third normal form? if not find a 3NF lossless join decomposition of College that preserves dependencies. d.Is the relation or the resulting set of...
Dependency Very Good dependency (key dependency) : XA where Table Very good If all dependencies in a table are '"very good", the table is in BCNF X is a candidate key Good Good dependency: X-> A where If all dependencies in a table are "very good" or "good", the table is in 3NF X is not a candidate key X is a part of a candidate key A is prime attribute Bad Bad dependency (Transitive Dependency): X A where If...