Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Business logic question.

Status
Not open for further replies.

R00K

Technical User
Dec 8, 2003
79
CA
I have a database that keeps track of several "bank" accounts and the total value of all deposits - withdrawals. All the accounts combined equal the pot.

The post grows and shrinks according to how the post is invested (kinda like a fund). In turn the indivual accounts grow or shrink.

The question is:

1. Is it better to calculate the total growth as a percentage and apply that percentage to each account: The pot grew 10% today so account 'b' grew 10%.

OR

2. Should I calculate the percentage that each account is of the pot and allocate that percentage of the total growth to the account: The pot grow by $1000 and account 'b' is worth 10% of the pot an in turn receives $100 (10% of the growth).
_______________________________

Some of the variables:

-Different accounts have different terms (ie. 70% of the profit goes to the account holder and 30% to the 'house').

-The individual accounts can change at any time.

-The managers have accounts and are paid to their accounts from other accounts.(I'm thinking of adding a "transfer" column to accomodate this.

Any suggestions welcomed gratefully.
 
The answer to your question really depends on what is more important for you to track.

If the total fund growth is what needs to be tracked and the individual account shrinkage and growth is not paramount then the first option makes sense.

If however the individual tracking of the account which lead to the overall growth of the pot needs to be known then the second option would be the way to go.

From a strict business point of view the more detail that can be provided the more flexibility you will allowed in doing analysis and providing answers to the business.
 
Thank you for your reply, SteveR77.

The most important item to track is the performance of the accounts (not in terms of deposits and withdrawals) with regard to the growth of the pot: John Doe wants to how much his account is worth today.

So, it seems the second option makes the most sense as the performance of the pot is paramount to John(his portion of it to be specific).

Any tips? Has anyone developed this kind of thing before?

I think I can handle the queries and will run with option 2 for now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top