Matt Jones wrote:
> Maybe not directly relevant, but have you considered that you may have
> normalized your database into nonfunctionality? From the queries
> you've shown, most of the tables have one data field(?!), a date, and
> a foreign key field for the team. This would be an appropriate
> structure for describing a system where each type of statistic might
> be generated at different times, but it seems completely inappropriate
> for your application where all the stats are (obviously) generated
> simultaneously.
> 
> Why did you decide to go this way, vs a single 'stats' table for
> everything?
> 
> --Matt Jones

Hi Matt,

There are approx. 37 different categories of statistics for NCAA 
football.  Each category houses up to 14 columns.  I would never attempt 
to build one table that housed 518 fields.

All of the stats are not generated simultaneously.  They are built into 
separate weeks.  Each statistics table houses 120 rows of data paired to 
the given week it was compiled.  So, if there's say 17 weeks (counting 
bowls) for college football, then there will be 17 weeks worth of data 
(17 x 120 rows).

Yes, I could simply place all of that into one giant table (1 stats 
table with 518 columns that contains 2040 rows per year.  That's not 
going to happen.  It's inefficient and difficult to manage.  If the 
table gets corrupted, very likely given that type of scenario, it kills 
my entire site at once.  You also have to account for 3 x /tmp space for 
the largest table you have in your database.  Given the nature of this, 
and the fact that these stats will not be deleted for years, that can 
hit a server pretty hard.

My tables are normalized properly.

Thanks.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to