October 16, 2008 at 7:55 am
Hello,
I've got a typical table design situation where a transaction can be comprised of multiple accounts with each account having a portion of the total transaction amount.
For example:
---Parent row---
TranID: 7
Date: 10/10/2008
Type: Deposit
Total Amount: $6000
---3 Children---
TranID: 7
Acct: 15
Amount: $1000
TranID: 7
Acct: 18
Amount: $3000
TranID: 7
Acct: 4
Amount: $2000
This is similar to SalesOrderHeader and SalesOrderDetail in AdventureWorks db.
I'm struggling on whether or not to store the Total Amount in the parent table. Our site is unique in that the transaction amounts are large (>$100M), but the volume is low (<1000 trans per day and only Mon-Fri). Right now, I'm leaning against storing total amount in parent.
Advice anyone? Pro's and con's?
Thanks,
Joe
October 16, 2008 at 8:11 am
If properly indexed you should be able to sum the details efficiently so there is no reason to store the data in my opinion.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply