The Account Component


Lets start with the one of the most basic and critical components of a banking system : The Account Component.

Apparently in the analysis phase we come up with a subject area for the account. Lets make thinks simple and say that we have thre entities : the ACCOUNT, the CHEQUE BOOK and the ACCOUNT TRANSACTION entities.

While we design the ERD model in parallel we try to identify what kind of operations we want this component to supply to the outside woprld. There are two different types of components here :

  • Subtransactional Methods
    • sACREAD01-ACCOUNT-READ : this method reads an account instance and returns the values of its attributes. You may have more than one read method for differenet purposes but physically you should have one read at the very bottom of the hierarchy. Ex: Account-Read-All, Account-Read-Name, Account-Read-Balance etc. But all of them should utilise a single method that read everythin say Account-Read-All...
    • sACUPDT01-ACCOUNT-UPDATE : this method update all attributes. It should do some concurrency check in order to avoid overwritting of others' changes. It shoul basically make use the Account-Read-All then do a concurrency check and then use the Account-Update-All method. Again here you may have differenet update methods but all of them at the very bottom should make use the basic Account-Read-All and Account-Update-All physical methods
    • sACDBCR01-ACCOUNT-DB-CR : This method Debits or Credits an Account. What it does basically is to use the Account-Read-All make some checks modify attribute values and then use the Account-Update-All method to update the account.
    • sACLIST01-ACCOUNT-LIST : This is a method that read consequtive account records, according to some filters from some starting point, and returns back a certain amount of account instances.
    • ...
  • Transactional Methods
    • tACLIST01-ACCOUNT-LIST : This may be a client/server procedure or program that lists a certain number of accounts. What it actually does is to make use the sACLIST01-ACCOUNT-LIST method to retrieve the account and then may reuse it to list account recored back and forth.
    • ...