Currency control in databases and transaction processing