From: | Franz(dot)Rasper(at)izb(dot)de |
---|---|
To: | stefan(dot)schwarzer(at)grid(dot)unep(dot)ch |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Alias "all fields"? |
Date: | 2007-09-06 12:46:26 |
Message-ID: | 11EC9A592C31034C88965C87AF18C2A702B83682@m0000s61 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>My table design is - due to some import/update reasons - surely not
>the best one, but pretty simple:
>
>id y1970 y1971 y1972 ......
>1 23 25 28
>2 NULL NULL 5
>3 NULL 94 102
>
>What do you think?
Normally i use perl with DBD/DBI to import data into databases and it is
quite
easy to modify raw data with perl and import them.
I would prefer another table design (your import will then not be so simple,
but your "selects" will get "normally" faster and easier).
Table:
id_Table;id_row;t_year;t_year_value
1;1;y1970,23
2;1;y1971;25
...
....
20;3;y1970;NULL
21;3;y1971;94
You will need only id_row if you need all tuples in the same line of your
original line.
I yould do it so, if you have more then 3 or 4 columns of y???? .
Greetings,
-Franz
From | Date | Subject | |
---|---|---|---|
Next Message | Alban Hertroys | 2007-09-06 12:51:51 | ANY (was: Re: Alias "all fields"?) |
Previous Message | Tino Wildenhain | 2007-09-06 12:46:04 | Re: Alias "all fields"? |