Results 1 to 4 of 4

Thread: Design question

  1. #1
    Join Date
    Jun 2004

    Unanswered: Design question

    Hi, I'm creating a stats script for a webpage and I've ran into a problem when storing the data. For example I want to log which browser plugins the visitors have, but I don't know how to store it. The most natural way to do it is to have a "Plugin" table with a "date" column and one column for each plugin and then add 1 in the right column/date. But the problem is that I don't know which plugins the users have, so that table would have to grow on the width, which for me seems a bit "ugly" Do you have any ideas?

    Maybe you could have a "Plugin" table with plugin-id and plugin-name and a table with "date","plugin-id","count" ? then you would get a row per date and plugin which is not very good since I want to save hourly stats, which makes #plugins*24*365=#plugins*8760 rows/year (#plugins ~= 10-15), is it too much? any other brilliant ideas?

  2. #2
    Join Date
    May 2004
    can't you just use your second colution and periodically dump the data from the db? just tally it all up once a month and dump that data out and then you've cut the number of rows by a factor of 12. hell, do it once a week if you need to.

  3. #3
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    It appears you are confusing data collection with data reporting.

    This table get 1 record for each access.
    You can report the results any which way is required with simple SQL.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  4. #4
    Join Date
    Jun 2004
    thanks for the replies! sounds like a good idea to dump it to the disc.. the only bad thing is that the user will have to do it every once in a while.. or maybe you can force him to do it.. can't take too long to dump it.. hmm.. we'll see..

Posting Permissions

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