$Id: functional-dependencies.php,v 1.11 2006/04/10 16:32:48 bigfoot Exp $
-> | "functionally determines" |
F | full functional dependency |
P | partial functional dependency |
C | key candidate |
C! | minimal length key candidate |
T | transitive dependency to underlined dependents (experimental!) |
1. | Invoice#, Line# | -> | Quant1, Part1, Amt1 | F | C | T | |
2. | Invoice#, Line#, Quant1 | -> | Part1, Amt1 | P | C | T | |
3. | Invoice#, Line#, Quant1, Part1 | -> | Amt1 | P | C | ||
4. | Invoice#, Line#, Quant1, Amt1 | -> | Part1 | P | C | ||
5. | Invoice#, Line#, Part1 | -> | Quant1, Amt1 | P | C | T | |
6. | Invoice#, Line#, Part1, Amt1 | -> | Quant1 | P | C | ||
7. | Invoice#, Line#, Amt1 | -> | Quant1, Part1 | P | C | T | |
8. | Invoice#, Quant1 | -> | Line#, Part1, Amt1 | P | C | T | |
9. | Invoice#, Quant1, Part1 | -> | Line#, Amt1 | P | C | T | |
10. | Invoice#, Quant1, Part1, Amt1 | -> | Line# | P | C | ||
11. | Invoice#, Quant1, Amt1 | -> | Line#, Part1 | P | C | T | |
12. | Invoice#, Part1 | -> | Line#, Quant1, Amt1 | P | C | T | |
13. | Invoice#, Part1, Amt1 | -> | Line#, Quant1 | P | C | T | |
14. | Invoice#, Amt1 | -> | Line#, Quant1, Part1 | P | C | T | |
15. | Line#, Quant1 | -> | Invoice#, Part1, Amt1 | P | C | T | |
16. | Line#, Quant1, Part1 | -> | Invoice#, Amt1 | P | C | T | |
17. | Line#, Quant1, Part1, Amt1 | -> | Invoice# | P | C | ||
18. | Line#, Quant1, Amt1 | -> | Invoice#, Part1 | P | C | T | |
19. | Line#, Part1 | -> | Invoice#, Quant1, Amt1 | P | C | T | |
20. | Line#, Part1, Amt1 | -> | Invoice#, Quant1 | P | C | T | |
21. | Line#, Amt1 | -> | Invoice#, Quant1, Part1 | P | C | T | |
22. | Quant1 | -> | Invoice#, Line#, Part1, Amt1 | F | C! | T | |
23. | Quant1, Part1 | -> | Invoice#, Line#, Amt1 | P | C | T | |
24. | Quant1, Part1, Amt1 | -> | Invoice#, Line# | P | C | ||
25. | Quant1, Amt1 | -> | Invoice#, Line#, Part1 | P | C | T | |
26. | Part1 | -> | Invoice#, Line#, Quant1, Amt1 | F | C! | T | |
27. | Part1, Amt1 | -> | Invoice#, Line#, Quant1 | P | C | T | |
28. | Amt1 | -> | Invoice#, Line#, Quant1, Part1 | F | C! | T |
partially taken from Maciej Suchomski's exercise slides
(NEW: click "try it" to run the example):
(1) A B C D E --------- a b z w q e b r w p a d z w t e d r w q a f z s t e f r s ttry it
(2) (default) A B C ----- a b x a b y a d x a d y c f x c f ytry it
(3) A B C D E --------- a b x v q e b y v z a d x v t e d y v p a f x p t e f y p ztry it
Cust# Name Address ------------------- 43 Jones 121_1st 55 Smith 222_2ndtry it
Invoice# Line# Quant1 Part1 Amt1 ------------------------------------- 1001 1 200 Screw 2.00 1001 2 300 Nut 2.25 1001 3 100 Whatever 0.75 1002 1 1 Motor 52.00 1002 2 10 Saw 121.00 1003 3 5 Brace 44.44try it
Project_No Pers_ID Dept_No Job Salary ------------------------------------- 5 1 1 Analysis 13 5 1 2 Leader 18 7 1 1 Leader 18 8 1 1 Marketing 15 8 1 2 Leader 18try it
transitive dependency? A B C ----- a a 1 b a 1 c b 1 d b 1 e c 2 f c 2try it