I think your suggestion is a correct solution which satisfy both the BCNF and the initial FDs. I was thinking on something similar: AB → C, C → B to become AB → D, D → C, C → B where D is a unique foreign key attribute in one of the new created relations (explained below). In my example there are 3 relations with the following schemas: 1. PersonToShopType relation with attributes(Person(A), ShopType(B), PersonToShopTypeID(D)) and PrimaryKey(Person(A), ShopType(B)) and a unique ForeignKey(PersonToShopTypeID(D)). Note: Here PersonToShopTypeID(D) could be also a candidate for a PrimaryKey. Functional dependencies in this relation are: AB → D. Or in case of PrimaryKey(PersonToShopTypeID(D)): D -> A, D -> B.
2. NearestShop relation with attributes(PersonToShopTypeID(D), ShopName(C)) and PrimaryKey(PersonToShopTypeID(D)). Functional dependencies in this relation are: D → C.
3. Shop relation with attributes(ShopName(C), ShopType(B)) and PrimaryKey(ShopName(C)). Functional dependencies in this relation are: C → B.
All these 3 relations are in BCNF and also the initial idea of functional dependencies is maintained (only slightly extended with the help of the transitive rule: AB → D, D → C lead to AB → C). Please someone let me know if/where I am wrong in my thoughts.
Welcome to this talk page
Talk pages are where people discuss how to make content on Wikipedia the best that it can be. Use this page to start a discussion about the edits made from this IP address. What you say here will be public for others to see. Many IP addresses change periodically, and are often shared by several people.
This is the discussion page for an IP user, identified by the user's IP address. Many IP addresses change periodically, and are often shared by several users. If you are an IP user, you may create an account or log in to avoid future confusion with other IP users. Registering also hides your IP address. |