“Suppose a bank which has planned to automate its data processing facility,which is currently operated manually. The bank may have several customers who will maintain one or more accounts. In case of joint accounts, a maximum of 2 customers will have shared access to a single account. A customer may have different types of accounts like savings accounts, current accounts or fixed deposits. A customer is identified by the national identity card (NIC) number. Other information about a customer such as name, address and phone number is also held. An account is held information such as account number, account type, balance and interest rate. An account is created by a staff member of the bank who has the privilege to create accounts. Such staff member may create several accounts and several staff members may be involved in creating a single account like in case where authorization is required by the senior staff members. Information about staff members like user ID, name, verification status, remarks is also stored. An account may participate in many transactions like deposits and withdrawals. A transaction ID uniquely identifies a transaction. Information like the date and the time the transaction happened, the amount which was deposited or withdrawn and the type of the transaction (whether it is a deposit or a withdrawal) is also held for each transaction. Every transaction is recorded on a ledger in the end of the day. The bank may have several such ledgers which will be identified by a unique ledger code. the date and the time when the transaction was entered into the ledger will be stored in the ledger.”
The ERD would be like this..
It is said that an account may be accessed only by 2 customers at max. But we cannot illustrate it in the ERD. So just can show it as M:N and have to control it when inserting data.
Account type is not considered as an attribute, because we can simply find the account no in those separate relations and figure it out.
Same case with the Transaction. We don’t have to mention the type of the it from it’s sub class relations.
Only one senior staff member will be participating on creating an account to authenticate.