60 likes | 188 Vues
Tutorial 8 : Normalization. Question 1. Consider the following relation definition and sample data : PROJECT (ProjectID, EmployeeName, EmployeeSalary) ProjectID: name of a work project EmployeeName: name of an employee EmployeeSalary: salary of the employee.
E N D
Question 1 Consider the following relation definition and sample data: PROJECT (ProjectID, EmployeeName, EmployeeSalary) • ProjectID: name of a work project • EmployeeName: name of an employee • EmployeeSalary: salary of the employee
Assuming that all of the functional dependencies and constraints are apparent in this data, which of the following statements is true? • ProjectID EmpName • ProjectID EmpSalary • (ProjectID, EmpName) EmpSalary • EmpName EmpSalary • EmpSalary ProjectID • EmpSalary (ProjectID, EmpName) • What’s the primary key? • In what normal form is PROJECT? • Redesign this relation to get it into 3NF.
Question 2 • Consider R = {A, B, C, D, E, F, G, H} with a set of FDs • F = {CD→A, EC→H, GHB→AB, C→D, EG→A, H→B, BE→CD, EC→B} Is R w.r.t. F in 3NF?
Question 3 • Consider R = {A, B, C, D} with a set of FDs • F = {AB→CD, D→B, C→A} Is R w.r.t. F in 3NF?
Question 4 • Consider R = {A, B, C, D, E, F, G, H} with a set of FDs F = {CD→A, EC→H, GHB→AB, C→D, EG→A, H→B, BE→CD, EC→B} The candidate keys are: {BEFG, CEFG, EFGH} • Decompose R into relations in 3NF.