Results 1 to 2 of 2

Thread: Statistics

  1. #1
    Join Date
    Dec 1969

    Default Statistics

    Hi,<BR>I&#039;m setting up a database for an online store. I would like to display lots of statistical data for sales such as: best selling product, best selling day of year, of week, of month, which state/country buys the most, spikes in sales to name a few............. I&#039;m wondering if I should create a seperate table for all my statistics and insert the data as the orders come in, OR should I just form statistical data from my different tables in the database? I&#039;m not very experienced with relational databases so I don&#039;t know much about the efficiency and speed of them. Would a database be able to handle going through thousands of orders and dynamically compiling the data? The only thing I don&#039;t like about creating a seperate statistical table (or group of tables for the sole purpose of statistics) is I would be limited to the statistical data that I predefine in my colums and to add new data fields down the line would be messy. Any suggestions?? Thanks a lot - Trevor Hartman

  2. #2
    Join Date
    Dec 1969

    Default RE: Statistics

    In my limited experience, it has proven much less of a headache to just pull the data from all the tables in question. I&#039;ve worked on projects that used seperate &#039;denormalized&#039; tables for reporting, and they are just a real pain to keep clean. <BR><BR>If you were talking about tables with billions of records then a statistics table might make sense for performance reasons. But in the case of thousands, I would say don&#039;t worry about it.<BR><BR>Just my take; I&#039;ve only been doing db design for a year or two.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts