1 Relational Normalization Theory. 2 Limitations of E-R Designs Provides a set of guidelines, does not result in a unique database schema Does not provide.

Slides:



Advertisements
Similar presentations
Schema Refinement: Normal Forms
Advertisements

primary key constraint foreign key constraint
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Relational Database Design Algorithms and Further Dependencies.
Lecture 21 CS 157 B Revision of Midterm3 Prof. Sin-Min Lee.
ALAK ROY. Assistant Professor Dept. of CSE NIT Agartala N ATIONAL I NSTITUTE OF T ECHNOLOGY A GARTALA Aug-Dec,2010 Normalization 2 CSE-503 :: D ATABASE.
1 Design Theory. 2 Minimal Sets of Dependancies A set of dependencies is minimal if: 1.Every right side is a single attribute 2.For no X  A in F and.
Chapter 3 Notes. 3.1 Functional Dependencies A functional dependency is a statement that – two tuples of a relation that agree on some particular set.
1 Chapter 6 Relational Normalization Theory. 2 Limitations of E-R Designs Provides a set of guidelines, does not result in a unique database schema Does.
Database Management COP4540, SCS, FIU Functional Dependencies (Chapter 14)
1 Relational Normalization Theory Chapter 8. 2 Limitations of E-R Designs Provides a set of guidelines, does not result in a unique database schema Does.
Relational Normalization Theory. Limitations of E-R Designs Provides a set of guidelines, does not result in a unique database schema Does not provide.
CSCI 4333 Database Design and Implementation Review for Midterm Exam II Xiang Lian The University of Texas – Pan American Edinburg, TX 78539
Lossless Decomposition (2) Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Relational Normalization Theory
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 227 Database Systems I Design Theory for Relational Databases.
Lossless Decomposition (2) Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Normalization DB Tuning CS186 Final Review Session.
Chapter 7: Relational Database Design. ©Silberschatz, Korth and Sudarshan7.2Database System Concepts Chapter 7: Relational Database Design First Normal.
CMSC424: Database Design Instructor: Amol Deshpande
1 CMSC424, Spring 2005 CMSC424: Database Design Lecture 9.
1 Functional Dependency and Normalization Informal design guidelines for relation schemas. Functional dependencies. Normal forms. Normalization.
Schema Refinement and Normalization Nobody realizes that some people expend tremendous energy merely to be normal. Albert Camus.
Databases 6: Normalization
Chapter 14 Advanced Normalization Transparencies © Pearson Education Limited 1995, 2005.
Chapter 8: Relational Database Design First Normal Form First Normal Form Functional Dependencies Functional Dependencies Decomposition Decomposition Boyce-Codd.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts Chapter 7: Relational Database Design First Normal Form Pitfalls in Relational Database Design.
Chapter 10 Functional Dependencies and Normalization for Relational Databases.
CS 405G: Introduction to Database Systems 16. Functional Dependency.
Chapter 7: Relational Database Design. 7.2Unite International CollegeDatabase Management Systems Chapter 7: Relational Database Design Features of Good.
Introduction to Normalization CPSC 356 Database Ellen Walker Hiram College.
Database Systems Normal Forms. Decomposition Suppose we have a relation R[U] with a schema U={A 1,…,A n } – A decomposition of U is a set of schemas.
Relational Database Design by Relational Database Design by Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany) DIRECTOR ARUNAI ENGINEERING.
Normal Forms1. 2 The Problems of Redundancy Redundancy is at the root of several problems associated with relational schemas: Wastes storage Causes problems.
CSCD34 - Data Management Systems - A. Vaisman1 Schema Refinement and Normal Forms.
Schema Refinement and Normalization. Functional Dependencies (Review) A functional dependency X  Y holds over relation schema R if, for every allowable.
Lecture 6 Normalization: Advanced forms. Objectives How inference rules can identify a set of all functional dependencies for a relation. How Inference.
Schema Refinement and Normal Forms Chapter 19 1 Database Management Systems 3ed, R.Ramakrishnan & J.Gehrke.
CS143 Review: Normalization Theory Q: Is it a good table design? We can start with an ER diagram or with a large relation that contain a sample of the.
Functional Dependencies An example: loan-info= Observe: tuples with the same value for lno will always have the same value for amt We write: lno  amt.
SCUJ. Holliday - coen 1784–1 Schedule Today: u Normal Forms. u Section 3.6. Next u Relational Algebra. Read chapter 5 to page 199 After that u SQL Queries.
BCNF & Lossless Decomposition Prof. Sin-Min Lee Department of Computer Science.
Computing & Information Sciences Kansas State University Tuesday, 27 Feb 2007CIS 560: Database System Concepts Lecture 18 of 42 Tuesday, 27 February 2007.
Chapter 6 Database Design with the Relational Normalization Theory.
Christoph F. Eick: Functional Dependencies, BCNF, and Normalization 1 Functional Dependencies, BCNF and Normalization.
CSC 411/511: DBMS Design Dr. Nan Wang 1 Schema Refinement and Normal Forms Chapter 19.
1 Schema Refinement and Normal Forms Week 6. 2 The Evils of Redundancy  Redundancy is at the root of several problems associated with relational schemas:
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Schema Refinement and Normal Forms Chapter 15.
Copyright, Harris Corporation & Ophir Frieder, The Process of Normalization.
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke1 Schema Refinement and Normal Forms Chapter 19.
Schema Refinement and Normalization Nobody realizes that some people expend tremendous energy merely to be normal. Albert Camus.
CS 405G: Introduction to Database Systems Instructor: Jinze Liu Fall 2009.
Functional Dependencies CIS 4301 Lecture Notes Lecture 8 - 2/7/2006.
CS 338Database Design and Normal Forms9-1 Database Design and Normal Forms Lecture Topics Measuring the quality of a schema Schema design with normalization.
1 Schema Refinement and Normal Forms Chapter The Evils of Redundancy  Redundancy is at the root of several problems associated with relational.
CS542 1 Schema Refinement Chapter 19 (part 1) Functional Dependencies.
CS411 Database Systems Kazuhiro Minami 04: Relational Schema Design.
Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke1 Schema Refinement and Normal Forms Chapter 19.
© D. Wong Functional Dependencies (FD)  Given: relation schema R(A1, …, An), and X and Y be subsets of (A1, … An). FD : X  Y means X functionally.
Chapter 8 Relational Database Design. 2 Relational Database Design: Goals n Reduce data redundancy (undesirable replication of data values) n Minimize.
11/06/97J-1 Principles of Relational Design Chapter 12.
Normalization and FUNctional Dependencies. Redundancy: root of several problems with relational schemas: –redundant storage, insert/delete/update anomalies.
Normal Forms Zachary G. Ives University of Pennsylvania CIS 550 – Database & Information Systems June 18, 2016 Some slide content courtesy of Susan Davidson.
Chapter 14 Functional Dependencies and Normalization Informal Design Guidelines for Relational Databases –Semantics of the Relation Attributes –Redundant.
CSC 411/511: DBMS Design Dr. Nan Wang 1 Schema Refinement and Normal Forms Chapter 19.
1 Normalization Theory. 2 Limitations of E-R Designs Provides a set of guidelines, does not result in a unique database schema Does not provide a way.
11/16/2016CENG352 Database Management Systems1 Relational Normalization Theory.
Relational Database Design by Dr. S. Sridhar, Ph. D
Relational Normalization Theory
Presentation transcript:

1 Relational Normalization Theory

2 Limitations of E-R Designs Provides a set of guidelines, does not result in a unique database schema Does not provide a way of evaluating alternative schemas Normalization theory provides a mechanism for analyzing and refining the schema produced by an E-R design

3 Redundancy Dependencies between attributes cause redundancy –Eg. All addresses in the same town have the same zip code SSN Name Town Zip 1234 Joe Stony Brook Mary Stony Brook Tom Stony Brook …………………. Redundancy

4 Example SSN Name Address Hobby 1111 Joe 123 Main biking 1111 Joe 123 Main hiking ……………. SSN Name Address Hobby 1111 Joe 123 Main {biking, hiking} ER Model Relational Model Redundancy

5 Anomalies Redundancy leads to anomalies: –Update anomaly: A change in Address must be made in several places –Deletion anomaly: Suppose a person gives up all hobbies. Do we: Set Hobby attribute to null? No, since Hobby is part of key Delete the entire row? No, since we lose other information in the row –Insertion anomaly: Hobby value must be supplied for any inserted row since Hobby is part of key

6 Decomposition PersonSolution: use two relations to store Person information –Person1 –Person1 (SSN, Name, Address) –Hobbies –Hobbies (SSN, Hobby) The decomposition is more general: people with hobbies can now be described No update anomalies: –Name and address stored once –A hobby can be separately supplied or deleted

7 Normalization Theory Result of E-R analysis need further refinement Appropriate decomposition can solve problems normalization theory functional dependencies multi-valued dependenciesThe underlying theory is referred to as normalization theory and is based on functional dependencies (and other kinds, like multi-valued dependencies)

8 Functional Dependencies functional dependencyDefinition: A functional dependency (FD) on a relation schema R is a constraint X  Y, where X and Y are subsets of attributes of R. satisfiedAn FD X  Y is satisfied in an instance r of R if for every pair of tuples, t and s: if t and s agree on all attributes in X then they must agree on all attributes in Y –Key constraint is a special kind of functional dependency: all attributes of relation occur on the right-hand side of the FD: SSN  SSN, Name, Address

9 Functional Dependencies (Examples) Address  ZipCode –Stony Brook’s ZIP is ArtistName  BirthYear –Picasso was born in 1881 Autobrand  Manufacturer, Engine type –Pontiac is built by General Motors with gasoline engine Author, Title  PublDate –Shakespeare’s Hamlet published in 1600

10 Functional Dependency - Example Brokerage firm allows multiple clients to share an account, but each account is managed from a single office and a client can have no more than one account in an office –HasAccount –HasAccount (AcctNum, ClientId, OfficeId) keys are (ClientId, OfficeId), (AcctNum, ClientId) –Client, OfficeId  AcctNum –AcctNum  OfficeId Thus, attribute values need not depend only on key values

11 Entailment, Closure, Equivalence entailsDefinition: If F is a set of FDs on schema R and f is another FD on R, then F entails f if every instance r of R that satisfies every FD in F also satisfies f –Ex: F = {A  B, B  C} and f is A  C If Streetaddr  Town and Town  Zip then Streetaddr  Zip closureDefinition: The closure of F, denoted F +, is the set of all FDs entailed by F equivalentDefinition: F and G are equivalent if F entails G and G entails F

12 Armstrong’s Axioms for FDs This is the syntactic way of computing/testing the various properties of FDs Reflexivity: If Y  X then X  Y (trivial FD) –Name, Address  Name Augmentation: If X  Y then X Z  YZ –If Town  Zip then Town, Name  Zip, Name Transitivity: If X  Y and Y  Z then X  Z

13 Derived inference rules Union: if X  Y and X  Z, then X  YZ. Decomposition: if X  YZ, then X  Y and X  Z. Pseudotransitivity: if X  Y and WY  Z, then WX  Z. These additional rules are not essential; their soundness can be proved using Armstrong’s Axioms. Exercise: Prove rules Decomposition and Pseudotransitivity using A.A.

14 Generating F + F AB  C AB  BCD A  D AB  BD AB  BCDE AB  CDE D  E BCD  BCDE Thus, AB  BD, AB  BCD, AB  BCDE, and AB  CDE are all elements of F + union aug trans aug decomp

15 Attribute Closure Calculating attribute closure leads to a more efficient way of checking entailment attribute closureThe attribute closure of a set of attributes, X, with respect to a set of functional dependencies, F, (denoted X + F ) is the set of all attributes, A, such that X  A –X + F1 is not necessarily the same as X + F2 if F1  F2 Attribute closure and entailment: –Algorithm –Algorithm: Given a set of FDs, F, then X  Y if and only if X + F  Y

16 Example - Computing Attribute Closure F: AB  C A  D D  E AC  B X X F + A {A, D, E} AB {A, B, C, D, E} (Hence AB is a key) B {B} D {D, E} Is AB  E entailed by F? Yes Is D  C entailed by F? No Result: X F + allows us to determine FDs of the form X  Y entailed by F

17 Computation of Attribute Closure X + F closure := X; // since X  X + F repeat old := closure; if there is an FD Z  V in F such that Z  closure and V  closure then closure := closure  V until old = closure – If T  closure then X  T is entailed by F

18 Example: Computation of Attribute Closure AB  C (a) A  D (b) D  E (c) AC  B (d) Problem: Compute the attribute closure of AB with respect to the set of FDs : Initially closure = {AB} Using (a) closure = {ABC} Using (b) closure = {ABCD} Using (c) closure = {ABCDE} Solution:

19 Normal Forms Each normal form is a set of conditions on a schema that guarantees certain properties (relating to redundancy and update anomalies) First normal form (1NF) is the same as the definition of relational model (relations = sets of tuples; each tuple = sequence of atomic values) Second normal form (2NF) – a research lab accident; has no practical or theoretical value – won’t discuss third normal formBoyce-Codd normal formThe two commonly used normal forms are third normal form (3NF) and Boyce-Codd normal form (BCNF)

20 BCNF Definition: A relation schema R is in BCNF if for every FD X  Y associated with R either –Y  X (i.e., the FD is trivial) or –X is a superkey of R Person1Example: Person1(SSN, Name, Address) –The only FD is SSN  Name, Address Person1 –Since SSN is a key, Person1 is in BCNF

21 (non) BCNF Examples PersonPerson (SSN, Name, Address, Hobby) –The FD SSN  Name, Address does not satisfy requirements of BCNF since the key is (SSN, Hobby) HasAccountHasAccount (AccountNumber, ClientId, OfficeId) –The FD AcctNum  OfficeId does not satisfy BCNF requirements since keys are (ClientId, OfficeId) and (AcctNum, ClientId)

22 Redundancy Suppose R has a FD A  B. If an instance has 2 rows with same value in A, they must also have same value in B (=> redundancy, if the A-value repeats twice) If A is a superkey, there cannot be two rows with same value of A –Hence, BCNF eliminates redundancy SSN  Name, Address SSN Name Address Hobby 1111 Joe 123 Main stamps 1111 Joe 123 Main coins redundancy

23 Third Normal Form A relational schema R is in 3NF if for every FD X  Y associated with R either: –Y  X (i.e., the FD is trivial); or –X is a superkey of R; or –Every A  Y is part of some key of R 3NF is weaker than BCNF (every schema that is in BCNF is also in 3NF) BCNF conditions

24 3NF Example HasAccountHasAccount (AcctNum, ClientId, OfficeId) –ClientId, OfficeId  AcctNum OK since LHS contains a key –AcctNum  OfficeId OK since RHS is part of a key HasAccountHasAccount is in 3NF but it might still contain redundant information due to AcctNum  OfficeId (which is not allowed by BCNF)

25 3NF Example HasAccountHasAccount might store redundant data: ClientId OfficeId AcctNum 1111 Stony Brook Stony Brook Stony Brook ClientId AcctNum BCNF (only trivial FDs) Decompose to eliminate redundancy: OfficeId AcctNum Stony Brook BCNF: AcctNum is key FD: AcctNum  OfficeId 3NF: OfficeId part of key FD: AcctNum  OfficeId redundancy

26 (Non) 3NF Example PersonPerson (SSN, Name, Address, Hobby) –(SSN, Hobby) is the only key. –SSN  Name violates 3NF conditions since Name is not part of a key and SSN is not a superkey

27 Decompositions Goal: Eliminate redundancy by decomposing a relation into several relations in a higher normal form losslessDecomposition must be lossless: it must be possible to reconstruct the original relation from the relations in the decomposition We will see why

28 Decomposition Schema R = (R, F) –R is a set of attributes –F is a set of functional dependencies over R decompositionof schemaThe decomposition of schema R is a collection of schemas R i = (R i, F i ) where –R =  i R i for all i (no new attributes) –F i is a set of functional dependences involving only attributes of R i –F entails F i for all i (no new FDs) decomposition of an instanceThe decomposition of an instance, r, of R is a set of relations r i =  R i (r) for all i

29 Example Decomposition Schema (R, F) where R = {SSN, Name, Address, Hobby} F = {SSN  Name, Address} can be decomposed into R 1 = {SSN, Name, Address} F 1 = {SSN  Name, Address} and R 2 = {SSN, Hobby} F 2 = { }

30 Lossless Schema Decomposition A decomposition should not lose information losslessA decomposition (R 1,…,R n ) of a schema, R, is lossless if every valid instance, r, of R can be reconstructed from its components: where each r i =  Ri (r) r = r 1 r2r2 rnrn ……

31 Lossy Decomposition r  r1r  r1 r2r2... rnrn SSN Name Address SSN Name Name Address 1111 Joe 1 Pine 1111 Joe Joe 1 Pine 2222 Alice 2 Oak 2222 Alice Alice 2 Oak 3333 Alice 3 Pine 3333 Alice Alice 3 Pine r  r1r  r1 r2r2 rnrn... r1r1 r2r2 r  The following is always the case (Think why?) : But the following is not always true : Example : The tuples (2222, Alice, 3 Pine) and (3333, Alice, 2 Oak) are in the join, but not in the original

32 Lossy Decompositions: What is Actually Lost? In the previous example, the tuples (2222, Alice, 3 Pine) and (3333, Alice, 2 Oak) were gained, not lost! –Why do we say that the decomposition was lossy? What was lost is information: –That 2222 lives at 2 Oak: In the decomposition, 2222 can live at either 2 Oak or 3 Pine –That 3333 lives at 3 Pine: In the decomposition, 3333 can live at either 2 Oak or 3 Pine

33 Testing for Losslessness A (binary) decomposition of R = (R, F) into R 1 = (R 1, F 1 ) and R 2 = (R 2, F 2 ) is lossless if and only if : –either the FD (R 1  R 2 )  R 1 is in F + –or the FD (R 1  R 2 )  R 2 is in F +

34 Example Schema (R, F) where R = {SSN, Name, Address, Hobby} F = {SSN  Name, Address} can be decomposed into R 1 = {SSN, Name, Address} F 1 = {SSN  Name, Address} and R 2 = {SSN, Hobby} F 2 = { } Since R 1  R 2 = SSN and SSN  R 1 the decomposition is lossless

35 Dependency Preservation Consider a decomposition of R = (R, F) into R 1 = (R 1, F 1 ) and R 2 = (R 2, F 2 ) –An FD X  Y of F is in F i iff X  Y  R i –An FD, f  F may be in neither F 1, nor F 2, nor even (F 1  F 2 ) + Checking that f is true in r 1 or r 2 is (relatively) easy Checking f in r 1 r 2 is harder – requires a join Ideally: want to check FDs locally, in r 1 and r 2, and have a guarantee that every f  F holds in r 1 r 2 dependency preservingThe decomposition is dependency preserving iff the sets F and F 1  F 2 are equivalent: F + = (F 1  F 2 ) + –Then checking all FDs in F, as r 1 and r 2 are updated, can be done by checking F 1 in r 1 and F 2 in r 2

36 Dependency Preservation If f is an FD in F, but f is not in F 1  F 2, there are two possibilities: –f  (F 1  F 2 ) + If the constraints in F 1 and F 2 are maintained, f will be maintained automatically. –f  (F 1  F 2 ) + f can be checked only by first taking the join of r 1 and r 2. This is costly.

37 Example Schema (R, F) where R = {SSN, Name, Address, Hobby} F = {SSN  Name, Address} can be decomposed into R 1 = {SSN, Name, Address} F 1 = {SSN  Name, Address} and R 2 = {SSN, Hobby} F 2 = { } Since F = F 1  F 2 the decomposition is dependency preserving

38 Example Schema: R= (ABC; F), F = {A  B, B  C, C  B} Decomposition: –(AC, F 1 ), F 1 = {A  C} Note: A  C  F, but in F + –(BC, F 2 ), F 2 = {B  C, C  B} A  B  (F 1  F 2 ), but A  B  (F 1  F 2 ) +. –So F + = (F 1  F 2 ) + and thus the decompositions is still dependency preserving

39 Example HasAccountHasAccount (AccountNumber, ClientId, OfficeId) f 1 : AccountNumber  OfficeId f 2 : ClientId, OfficeId  AccountNumber Decomposition: AcctOffice AcctOffice = (AccountNumber, OfficeId; {AccountNumber  OfficeId}) AcctClient AcctClient = (AccountNumber, ClientId; {}) Decomposition is lossless: R 1  R 2 = {AccountNumber} and AccountNumber  OfficeId In BCNF Not dependency preserving: f 2  (F 1  F 2 ) + HasAccountHasAccount does not have BCNF decompositions that are both lossless and dependency preserving! (Check, eg, by enumeration) Hence: BCNF+lossless+dependency preserving decompositions are not always achievable!

40 BCNF Decomposition Algorithm Input: R = (R; F) Decomp := R while there is S = (S; F’)  Decomp and S not in BCNF do Find X  Y  F’ that violates BCNF // X isn’t a superkey in S Replace S in Decomp with S 1 = (XY; F 1 ), S 2 = (S - (Y - X); F 2 ) // F 1 = all FDs of F’ involving only attributes of XY // F 2 = all FDs of F’ involving only attributes of S - (Y - X) end return Decomp

41 Example Given: R = (R; T) where R = ABCDEFGH and T = {ABH  C, A  DE, BGH  F, F  ADH, BH  GE} step 1: Find a FD that violates BCNF Not ABH  C since (ABH) + includes all attributes (BH is a key) A  DE violates BCNF since A is not a superkey (A + =ADE) step 2: Split R into: R 1 = (ADE, {A  DE }) R 2 = (ABCFGH; {ABH  C, BGH  F, F  AH, BH  G}) Note 1: R 1 is in BCNF Note 2: Decomposition is lossless since A is a key of R 1. Note 3: FDs F  D and BH  E are not in T 1 or T 2. But both can be derived from T 1  T 2 (E.g., F  A and A  D implies F  D) Hence, decomposition is dependency preserving.

42 Example (con’t) Given: R 2 = (ABCFGH; {ABH  C, BGH  F, F  AH, BH  G}) step 1: Find a FD that violates BCNF. Not ABH  C or BGH  F, since BH is a key of R 2 F  AH violates BCNF since F is not a superkey (F + =AH) step 2: Split R 2 into: R 21 = (FAH, {F  AH}) R 22 = (BCFG; {}) Note 1: Both R 21 and R 22 are in BCNF. Note 2: The decomposition is lossless (since F is a key of R 21 ) Note 3: FDs ABH  C, BGH  F, BH  G are not in T 21 or T 22, and they can’t be derived from T 1  T 21  T 22. Hence the decomposition is not dependency-preserving

43 Properties of BCNF Decomposition Algorithm A BCNF decomposition is not necessarily dependency preserving But always lossless HasAccountBCNF+lossless+dependency preserving is sometimes unachievable (recall HasAccount)

44 Exercises 1) Consider the following table. Give an example of update anomaly, an example of deletion anomaly and an example of insertion anomaly knowing that –A product has many suppliers and can have many other products as a substitute (i.e. a product can be replaced by its substitute). –The purchase price is determined by a supplier for a product, while the sale price is for a given product regardless of the supplier. –The quantity is for a given product, again regardless of the supplier.

45 Solution Update Anomaly: - Changing the quantity of a product implies updating the quantity for as many suppliers and substitutes there is for the product. Deletion Anomaly: - By deleting the only substitute of a product, the whole product entry needs to be removed. Insertion Anomaly: - We can’t add a substitute of a product if we do not know the supplier of the product.

46 Exercises (cont.) 2) Give a schema of a decomposition that avoids such anomalies. Solution: Product(ProductID, Quantity, SalePrice) Suppliers( ProductID, SupplierID, PurchasePrice) Substitutes( ProductID, Substitute)

47 Exercises 3) A table ABC has attributes A, B, C and a functional dependency A -> BC. Write an SQL assertion that prevents a violation of this functional dependency. CREATE ASSERTION FD CHECK (1 >= ALL ( SELECT COUNT(DISTINCT *) FROM ABC GROUP BY A ) )

48 4) Assume we have a relation schema R= (player, salary, team, city). An example relation instance: player salary team city Jeter 15,600,000 Yankees New York Garciaparra 10,500,000 Red Sox Boston We expect the following functional dependencies to hold: player →salary,player → team,team →city Argue that R is currently not in BCNF. Decompose R into BCNF. Argue that the decomposition is lossless-join, and that it preserves dependencies. Find an alternative decomposition of R into BCNF which is still lossless-join, but which not preserve dependencies. (State which dependency it does not preserve.) Show, by means of an example, that a decomposition into (player, salary, city) and (team, city) is not lossless-join.