How to design this kind of database?

Discussion created by jiang_aq on Sep 16, 2018
Latest reply on Sep 16, 2018 by Jason Wood

I'm trying to build a financial app, as i am a newbie, one of the biggest headache thing is below case, for example:


Date    Account_begin       Consume       Account_end

3/18     10,000                        1,000             9,000

3/19     9,000                          3,000             6,000

3/21     6,000                          2,000             4,000


1) How to set these fields as auto calculate smartly or is there any basic script idea?

2) What if modify 3/19 consume cost, for example, change to 4,000, or even delete this record or insert a new record, what I can figure out is that I have to use Loop script to re-calculate ALL records for updating the account_begin and account_end fields, is this the only way to do?

3) Any finance demo fm12 file can I reference to?