Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
SQL Server MVP Deep Dives- P3: Each year Microsoft invites all the MVPs from every technology and country to Redmond for an MVP Summit—all top secret—“don’t tweet what you see!” During the MVP Summit, each product team holds a series of presentations where they explain their technologies, share their vision, and listen to some honest feedback. | 36 Chapter 3 Finding functional dependencies Table 6 Testing functional dependencies for Qty OrderNo CustomerlD Product Qty TotalPrice OrderTotal 7001 12 Gizmo 10 125.00 125.00 7002 Dooble 10 170.00 Table 7 Testing functional dependencies for TotalPrice OrderNo CustomerlD Product Qty TotalPrice OrderTotal 7001 12 Gizmo 10 125.00 125.00 7002 Dooble 20 125.00 Table 8 Testing functional dependencies for OrderTotal OrderNo CustomerlD Product Qty TotalPrice OrderTotal 7001 12 Gizmo 10 125.00 125.00 7002 15 125.00 None of these examples were rejected by the domain expert so I was able to conclude that there are no more single-column dependencies in this table. Note that I didn t produce these three examples at the same time. I created them one by one for if there had been more functional dependencies I could ve further reduced the number of tests still needed. But because there turned out to be no more dependencies I decided to combine them in this description to save space and reduce the repetitiveness. Second step finding two-attribute dependencies After following the preceding steps I can now be sure that I ve found all the cases where an attribute depends on one of the other attributes. But there can also be attributes that depend on two or even more attributes. In fact I hope there are because I m still left with a few attributes that don t depend on any other attribute. If you ever run into this it s a sure sign of one or more missing attributes on your shortlist one of the hardest problems to overcome in data modeling. The method for finding multiattribute dependencies is the same as that for singleattribute dependencies for every possible combination create a sample with two rows that duplicate the columns to test and don t duplicate any other column. If at this point I hadn t found any dependency yet I d be facing an awful lot of combinations to test. Fortunately I ve already found some dependencies which you ll find is almost always the case if you start using