Archives of the TeradataForum
Message Posted: Thu, 19 Aug 2004 @ 14:39:49 GMT
Subj: | | Re: Matrix/Array query? |
|
From: | | Jim Downey |
I have a database that had a similar requirement. For each entity, I could get from 1 to 314 attributes. These attributes were sparsely
populated. We stored the data 'vertically' . Each column you described was implemented as a row. (eg, it was stored the way you want to see it
in your query). We then denormalized the rows for reporting by building 7 wide tables with different rows represented as columns. the various
columns were grouped into categories.
Your query would be easily satisfied by the 'vertical' table.
The 'horizontal' table could be implemented physically as you did or virtually using views. It would depend on how many times you want to
query the data vertically or horizontally.
|