Re: computational model of transactions



Let's say that you're account starts out with a balance of $550.

At time T1 a transaction is started to post a check for $500.
At time T2 a transaction is started to post a check for $100.
At time T3 a transaction is started to post a check for $75.
At time T4 the $100 transaction completes, recording a balance of $450.
At time T5 the $75 transaction completes, recording a balance of $375.
At time T6 the $500 transaction completes, recording a balance of $-125.

The error is that these transactions are "allowed to run concurrently".

Since each of them wants to update the very same resource (the same
attribute of the same tuple of the same relvar), these transactions
should be serialized anyway.

No two things can be in the same place at the same time.

.



Relevant Pages

  • (LONG) Student Question: constructors and setMethods
    ... program requires two classes, an App class and a Worker class, and several ... methods within the worker class (a constructor, a transaction method, a ... and forth to manipulate the balance and continue to adjust it with each ... //Get the starting balance, deposits, and withdrawals from the first user. ...
    (comp.lang.java.help)
  • Re: Design Question - Accounts/Transactions
    ... 'Balance' column to the transaction, ... Further, when you need to compute the balance for an account, you only need to scan the part of the table for that account. ... A trigger is certainly a possibility. ...
    (microsoft.public.sqlserver.programming)
  • Re: Calculated value dilemma
    ... the database accurate, easy to use, and able to expand (the current ... I am considering having a transaction ... and I should therefore simply calculate the balance ... aggregate and the values that combine to form the aggregate is not due to a ...
    (comp.databases.theory)
  • (LONG) More newbie questions on constructor/set+get methods
    ... I set the starting balance to 0. ... I input the "initial" balance (that is, the opening account balance ... I immediately assign it to 'transaction'. ... I set up my calculation method. ...
    (comp.lang.java.help)
  • Re: Need help with a tracking table design
    ... Credits and balance due amounts would be associated with a transaction # in most cases but not always. ... Things I would need to track is who, what (credit, balance due, refund and transaction if applicable), when it was settled and a how. ... For the "what", you might want a list of choices (links to a Table listing such choices as "Credit for unneeded late payment", "Refund of unused rent", "Transfer from another account", "Transfer to another account", "Ordinary rent payment"). ...
    (microsoft.public.access.gettingstarted)