List:General Discussion« Previous MessageNext Message »
From:Sam Evans Date:May 7 2003 2:38am
Subject:mySQL Design Question
View as plain text  
I've been faced with an interesting design dilemma..  I have a pretty 
straight forward table such as:

| keyid (INT) |  site (VARCHAR 250) | hits (INT) | bytes (INT) | dts 

This table will keep track of 7 days worth of data..  What I'm tasked 
with, is to come up with a method that will take the 7 days of data, and 
produce a top X sites over the 7 day period based on either cumulative 
hits / bytes.

For example, to show the stop 25 Websites by way of hits for the last 7 

In perl/php I could easily select * from table WHERE (dts BETWEEN 
start_date AND end_date), push the results into a hash and do my 
additions from within the hash.  Unfortunately, the language I am 
programming this in, is not perl/php but is cold fusion.  

My question, does it make sense to create a stored procedure that does 
this, and just returns the data I want to present to the user?  Or, 
should I figure out some way for Cold Fusion to emulate the perl/php 
hash method?  (And no, I can't ditch Cold Fusion -- I tried already. ;)  )

Thanks for any tips / help.


mySQL Design QuestionSam Evans7 May
  • Re: mySQL Design QuestionDan Nelson7 May
  • Re: mySQL Design QuestionCurtis Maurand8 May