Database design for summarized data

Posted by holden on Stack Overflow See other posts from Stack Overflow or by holden
Published on 2010-02-22T14:42:20Z Indexed on 2010/03/12 11:27 UTC
Read the original article Hit count: 787

I have a new table I'm going to add to a bunch of other summarized data, basically to take some of the load off by calculating weekly avgs.

My question is whether I would be better off with one model over the other. One model with days of the week as a column with an additional column for price or another model as a series of fields for the DOW each taking a price.

I'd like to know which would save me in speed and/or headaches? Or at least the trade off.

IE.

ID   OBJECT_ID   MON  TUE  WED  THU  FRI  SAT  SUN   SOURCE

OR

ID   OBJECT_ID   DAYOFWEEK   PRICE   SOURCE

© Stack Overflow or respective owner

Related posts about sql

Related posts about database-design