Re: Best Practice for Statistical Data Organization in databases
- From: Robert Klemme <shortcutter@xxxxxxxxxxxxxx>
- Date: Fri, 29 Dec 2006 18:26:07 +0100
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 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).
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/microsoft.public.sqlserver.programming/browse_frm/thread/e6ed468f44b5f495/3414fe0399e3540f
Kind regards
robert
.
- Prev by Date: Re: Data migration from Mainframe to SQL Server
- Previous by thread: Data migration from Mainframe to SQL Server
- Index(es):
Relevant Pages
|