List:General Discussion« Previous MessageNext Message »
From:Tompkins Neil Date:September 6 2010 9:10am
Subject:Re: Best method to keep totals
View as plain text  
Just another quick question - following my initial question regarding the
best method to keep totals, I wondered if I should adopt a table to record
team league standings like based on each result like

team_id
home_win
home_draw
home_loss
home_goals
home_conceded
away_win
away_draw
away_loss
away_goals
away_conceded

Or should I try and display the league standings, based on the
fixtures/results table which contains fields like

match_id
seasons_id
week_number
home_team_id
away_team_id
home_goals
away_goals

Cheers
Neil


On Sun, Sep 5, 2010 at 7:32 AM, Neil Tompkins
<neil.tompkins@stripped>wrote:

> Thanks for all the useful information. I'm going to ensure the relevant
> fields are indexed and our db is optimised.
>
>
>
>
> On 4 Sep 2010, at 16:10, Arthur Fuller <fuller.artful@stripped> wrote:
>
>  100% agreed.
>>
>> Arthur
>>
>> The other exception is also where financial data is being stored. If you
>>
>>> have, say, a database containing sales order records, then as well as
>>> storing the individual values of each item in each order, you also need
>>> to
>>> store the total value of the order, the total price charged to the
>>> customer
>>> and the total paid by the customer. These three should, of course, be not
>>> only identical to each other but also to the sum of the individual items,
>>> so
>>> there is not only duplication but the potential for skew. But that, of
>>> course, is precisely *why* you store them, as any discrepancy indicates
>>> an
>>> error which needs to be investigated.
>>>
>>> Mark
>>>
>>>

Thread
Best method to keep totalsTompkins Neil1 Sep
  • RE: Best method to keep totalsJerry Schwartz1 Sep
    • Re: Best method to keep totalsTompkins Neil1 Sep
  • Re: Best method to keep totalsJangita3 Sep
    • Re: Best method to keep totalsArthur Fuller3 Sep
      • Re: Best method to keep totalsMark Goodge3 Sep
        • Re: Best method to keep totalsArthur Fuller4 Sep
          • Re: Best method to keep totalsNeil Tompkins5 Sep
            • Re: Best method to keep totalsTompkins Neil6 Sep
RE: Best method to keep totalsJan Steinman2 Sep
  • RE: Best method to keep totalsJerry Schwartz2 Sep
    • Re: Best method to keep totalsJan Steinman3 Sep