Data Model - database load

Anthony alanthonyc at gmail.com
Tue Apr 14 16:33:19 EDT 2009


Hello,

I'm making a statistics tracking application and was wondering how my
chosen data model design would affect performance.  I'm not sure if
I'm breaking up my objects into too granular a level in the interests
of flexibility.

class ParentStats
    """Summary level groups of stats"""

class ChildStats
    """Detail level groups of stats.
       Sum of individual children stats x,y,z= individual parent stats
x,y,z"""
    foreign key to ParentStats

class StatLine
    """A group of stats being tracked."""
    foreign key to ChildStats

class StatField
     """a statistic object being tracked'''
    foreign key to StatLine
    statgroup (e.g. Temperature Related Stats, etc.)
    value
    name

Today, I know that I will want to track stats "Units Made" and "Units
Consumed."  In the future, I may want to start tracking "Units Wasted"
or some other unknown statistic.

Will I be placing too much of a burden on the database if the
application is built for serving up relatively low volumes of
Statlines (including parent level summaries) to high volumes of users?



More information about the Python-list mailing list