Account Transfer using pessimistic concurrency control

exercise No. 5

Accounts and balances

Q:

Consider the following simple schema of accounts keeping customer balances:

CREATE TABLE Account (
	      number INT NOT NULL PRIMARY KEY
	      ,balance INT NOT NULL
	      )

Write two GUI applications to:

  • Transfer amounts from one account to another

  • Get the sum of all balances

A: