I want to track the number of file downloads and I'm wondering if any
here have thoughts on how best to do this.

At the moment I have a separate Files table for the details that
stores information such as; filename, filesize, version,
first_downloaded and downloads.

Is incrementing the 'downloads' field here the best way to record it?
Should I use a completely separate table or perhaps even a flat file?
I'm considering recording the date/time of each download, would this
affect the decision?

Now, not only do I want to record file downloads but I also want to
know how may total downloads a particular author has achieved. Should
I increment a field in the author table at the time of the file
download or, process the 'Files' table to calculate this number on the
fly? - I guess that would mean adding an author_id to the Files table.

NOTE: there's a good chance I will provide an API in the future for
third-parties to access the file database. Would this affect the
design decisions now?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to