Monday, March 19, 2012

Best Practice for Statistical Data Organization in databases

I'm completely new to databases. What is the best practice for organizing
statistical data in a database? I have 400+ parameters for 185 countries for
20+ years each. How many tables should I use and how should they be
structured (e.g. countries in rows, years in columns, etc).
Thanks!On 26.12.2006 22:04, Beth wrote:
> I'm completely new to databases. What is the best practice for organizing
> statistical data in a database? I have 400+ parameters for 185 countries f
or
> 20+ years each. How many tables should I use and how should they be
> structured (e.g. countries in rows, years in columns, etc).
Difficult to tell without more detail. With what you disclosed I'd
create a single table with columns (country, year, parm1, parm2, ...
parm400). Reason: I assume all these parameters are different values.
With this layout you can easily do calculations for one parameter
through several years etc.
If the number of parameters changes and they all have the same type
(numeric) then you could also do (country, year, parameter_name,
parameter_value). This design is discouraged, there are recent threads
about this concept (called "entity attribute value"), one of them is here:
http://groups.google.com/group/micr...414fe0399e3540f
Kind regards
robert

No comments:

Post a Comment