I find it far easier to maintain normalized tables that produced
non-normalized ones (for things like data warehousing) than it is to
maintain non-normalized tables and trying to produce normalized data
from that.
Ok, I do understand that.
So, instead of the earlier mentioned database design, I would have
something like this:
- one table for the country names/ids/etc. (Afghanistan, 1;
Albania, 2....)
- one table for the variable names/ids/etc. (GDP, 1; Population,
2; Fish Catch, 3;....)
- one table for the years names/ids/etc. (1970, 1; 1971, 2;
1973, 3; ....)
and
- one table for all "statistical data" with four fields -
id_variable, id_country, id_year, and the actual value
You say
I find it far easier to maintain normalized tables that produced
non-normalized ones (for things like data warehousing) than it is to
maintain non-normalized tables and trying to produce normalized data
from that.
What is your view about (having 500 different variables/data sets)
using a single table for all data versus one table for each variable.
In terms of "readability" I guess the second solution would be
better. But, then,.... I don't know...
Thanks for any views....
Stef
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match