Professional Documents
Culture Documents
Column Information:
i) TransactionID – PK and Identity Function seed 500000 and increment =1
ii) Transaction Date-DateTime
iii) TransactionType – Check- as of now only allowed values are
‘OnlineFundTransfer’/ ’MobileFundTransfer’
iv) PayerAccountNumber - Col FK to Customer.AccountNumber
v) PayeeAccountNumber FK to Customer.AccountNumber
vi) TransferAmount – Money
6. Create stored procedures for insert a record in the TransactionLog table with
following conditions.
i) Payer can do any number of transactions on every day.
Online Banking DB Design
ii) Payer can transfer the funds to other only when he registered others in his
payee list. (should refer PayeeList table)-Create a trigger for this.
iii) Maximum limit on fund transfer should not exceed 1,00,000/day
iv) Payer account should have sufficient balance to transfer funds to others.
Balance should exclude minimum required amount to use account. Raise
an error as “Insufficient Funds” if the balance is less.
v) Core logic for fund transfer in the procedure should include in the
transaction management so that false transactions will be rolled back.
vi) Online Transactions should be allowed between 9AM to 7PM on each day
except Sunday-Create Trigger for this condition.
7. Create Stored procedure which will update the customer balance by adding
interest to the principle for every 90 days
i) This procedure will be used to update only balance column of customer
table.
ii) Input values are Duration and Interest Rates
iii) Interest Rates are 3.5%, 4.5, 4.75 and 5% for ‘Salary’,’Saving’, ‘Current’,
and ‘Corporate’ account types respectively – Cursor should be created
here.
8. Create User Defined function to calculate the interest required to pay for all
account holders for the given time
i) Input values are Duration and Interest Rates
ii) Interest Rates are 3.5%, 4.5, 4.75 and 5% for ‘Salary’,’Saving’, ‘Current’,
and ‘Corporate’ account types respectively
iii) Should return scalar value- Which will return the total interest required to
pay for all customers in the bank in the given duration.
Important Notes:
A. Should maintain error handing in all the procedures-use Try/Catch blocks
B. Provide comments for each object while writing scripts