Chris Pollett>Old Classes>CS220, Fall 1998>Hw4

CS 220
HW#4

Due start of class Tuesday Nov 17 Read O'Neil pages 255-384.


Let T be a universal table with heading
0 1 2 3 ... NUMATTRIB (at least 6)

We can code the functional dependencies on T as table with NUMATTRIB+1 columns
and one row for each FD. A 0 in a row indicates that column does not
participate in the FD a 1 indicates it appears before the arrow and a 2 after
i.e., if NUMATTRIB is 6 then the row

0 0 2 2 0 1 2

codes the FD

5 -> 236

A row with all zeros indicates no dependency. Write a program which takes such a table and prints out a lossless decomposition of T into 3NF which preserves FDs. You may assume we have NUMFD rows and we hard code such matrices in the program. Turn in a listing of your code and what it did on three input matrices.