Entities like the one you propose would de-normalize the database. It is best to create the values in real time.

At first glance your proposal would seem more efficient, but when you consider the amount of code required to keep the proposed entities current, it's not.


Vinay Agarwal wrote:

Hello,

I am trying to create screen for showing customer balances similar to our
utility bills - previous balance, paid, charges, and current balance. But I
wasn't able to find appropriate entities for something like this. Of course,
the balances can be created in real time but it may be more efficient to
have some entities to consolidate prior invoices and payments.
I am thinking of creating a Balance entity as follows

            Balance

                        partyIdFrom (typically Company)

                        partyIdTo

                        fromDate

                        thruDate (entity must be created after this date to
make sure no other invoices or payments occur)

                        prevBalanceAmount

                        paymentsAmount

                        chargesAmount

                        currentBalance

Any thoughts?

Regards,

Vinay Agarwal


Reply via email to