Have Buckets or Not?

Have Buckets or Not?


  So with accounting on computers, there is a question to have buckets or not when doing the database fields.  A bucket is used for accounting and financial reports such as total sales, etc.  There is usually a different bucket for each time period you need, such as January Total Sales or First Quarter Sales.  Why use buckets at all?  Answer - for speed for doing the daily, monthly, quarterly, and annual reports.

Choices:

    No - Reasons: 1) Just calculate it when the need arises in the future, rather than update the total field as each transaction hits.  2) Risks conflicts of trying to write the new value of the total field simultaneously when lots of concurrent transaction. 3) Calculation errors could happen by overlooking a particular transaction and accounting hates mismatches.

    Yes, Live - 1) Bucket total is up-to-date and current. 2) Faster than gathering the correct transactions and summing them.  

     Yes, But Periodically - Usually do the calculation and update the total field on close of a business day when the transactions are finalized.  How this is done is by having a Business Day table with Id, Business Date (no time), and a bunch of buckets that you want to track.  Then the Transaction table has the transaction information plus Business Date.



     

Comments

Popular posts from this blog

GHL Email Campaigns

JSON Web Tokens

Extras for New .NET Projects