Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Aggregation of data and Queries

Author  Topic 

filf
Yak Posting Veteran

67 Posts

Posted - 2001-08-14 : 11:03:19

I have an application which utilises 3 tables. A transaction detail and a summary view as well as descriptive info relating to the client.

The summary view contains data that has been calculated from the data in the detail table. Now I am wondering wether the way I am currently querying/pulling data is correct.

The details table contains a lot of data which I am constantly aggregating to return totals, but I do not store all of these totals in the summary table, instead I aggregate then every time I need them.

Now this is good in terms of data always being correct realtime but would it be classed as redundancy if i stored these totals in the summary table.

There are points when I require these totals and some sets of data are effectively archived, ie the data is historic and no longer changing for that particular set. But just to pull that data and the totals causes a nightmare in terms of grouping, aggregation and joining.

I am really interested to know what is best practice in a situation such as this?
Thanks in advance FILF


   

- Advertisement -