Lets say a table had a column called price defined as N(11, 4 ) Now it is found that the number of different prices is much less then 10^11, but something more like 10,000 ( Or more specifically much less then the limit of VFPs integer's type ). Because this column has repeated values that are not a foreign key is not following good normalization ( OK OK note the title Fanatical Normalization ). Therefore the column could be changed to use an integer F-Key to a lookup table of prices, and the bonus is that the column would be using 4/11 of the space it did before.
Now in the real world I would only CONSIDER doing this if space and/or network transfer speeds were a major concern. ( Yes I know PKZIP etc. could help also ) Well as I type this I'm thinking maybe I would do it if the number of prices was tiny <<100 so that I could use 1 or 2 character codes.
In the real world I can see the following problems: -Makes reading the data difficult, e.g. one has to do something like a SQL-Select to join the 2 tables. -Too Complex for the benefit -The savings are too small to matter -This is taking data normalization too far, use some common sense.
I am sure other real world disadvantages can be seen.
My question is from a fanatics point of view is there anything wrong with this suggestion?
Anthony
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
©2004 Anthony Testi |