Ask a question from expert

Ask now

Banking Scenario- Database for Typical Bank ERD

5 Pages958 Words336 Views
   

Added on  2019-09-24

Banking Scenario- Database for Typical Bank ERD

   Added on 2019-09-24

BookmarkShareRelated Documents
Banking ScenarioBanking: Create a database for a typical bank ERD. We will track customers of the bank to include; last name, first name, address, and customer type (small business, large business, personal). The bank has various types of accounts that we will track (savings, checking, business). A customer may have multiple accounts of each type. Accounts also have a balance. An account may be owned by one customer only. For each account you must keep track of all thetransactions on the account. Transactions types consist of deposits, withdrawals, and transfers. Each transaction consists of the amount, type (deposit, withdrawal, transfer), date, and account(s) for the transaction. You should avoid putting FKs in ER diagrams.Requirements:1.(Using a procedure) System should be able to add new customers ensuring that no duplicates are entered, and type is valid. A message should be returned with the success or failure of the action. 2.(Using a procedure) System should be able to add a new account for an existing customer. Given a customer ID, and an account type, the system should verify that the customer id, and account type are valid, then create a new account. A message should be returned with the success or failure of the action. 3.(Using a procedure and trigger) System should be able to handle valid transactions on valid accounts for valid customers maintaining the integrity of the account balances. Specifically, the system should allow deposits to accounts (must have account number, amount), withdrawals (must have account number, amount) from accounts and transfersbetween accounts (must have 2 account numbers and an amount). When these transactions are made, the account balance must be updated (via trigger). No account balance may go below zero. A message should be returned with the success or failure of the action. 4.(Using a procedure) Given a state, display the sum of the balances by state. 5.(Using a procedure) Given a customer id and a new address, update the customer’s address. A message should be returned with the success or failure of the action. 6.(Using a procedure) Given an amount, display the account number, last name, and amount of all transactions with an amount greater than the one passed into the procedure. 7.[EXTRA CREDIT]: Write a trigger so that anytime a customer changes their address, the old address, new address, date, customer id and user ID are stored in a log. NOTE: You must use at least 2 triggers, one to maintain the account balance and one for validation. The validation trigger may be to validate the account type, customer type, the balancenot going below zero, or not allowing duplicates. A check constraint is also required. Use other table constraints as appropriate.Important: Each requirement should translate into at least one procedure depending on how youdecide to implement the requirement. #3 will require at least one procedure and one trigger.
Banking Scenario- Database for Typical Bank ERD_1
Sample examples of the work process:Step 1 : create ERD diagram Step 2 : create Physical diagramStep 3 : tables statementsStep 4 : requirements, one example out of the seven requirements (Using a procedure) System should be able to add new customers ensuring that no duplicates are entered, and Genderis valid. A message should be returned with the success or failure of the action. CREATE OR REPLACE PROCEDURE add_new_customer( input_fname CUSTOMER.CUSTOMER_FIRST_NAME%type,input_lname CUSTOMER.CUSTOMER_LAST_NAME%type, input_addr CUSTOMER.CUSTOMER_ADDR_STREET%type,input_city CUSTOMER.CUSTOMER_ADDR_CITY%type,input_zip CUSTOMER.CUSTOMER_ADDR_ZIP%type,input_state CUSTOMER.CUSTOMER_ADDR_STATE%type,input_gender CUSTOMER.CUSTOMER_GENDER%type)IS record_count NUMBER; duplicate_exception EXCEPTION; invalid_gender_exception EXCEPTION;
Banking Scenario- Database for Typical Bank ERD_2

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Database for a Typical Bank
|1
|586
|71

Banking Scenario Procedure Database SQL
|9
|1874
|471

BANKING SCENARIO PROCEDURES Faisal Jahdlai 08 December, 2016 BANKING SCENARIO PROCEDURES Faisal Jahdali 08 December, 2016 ER DIAGRAM 2 CREATE AND INSERT TABLE COMMANDS 2 SQL PROCEDURES Faisal Jahdlai
|19
|1901
|149

Banking Assignment - Procedures Database SQL
|20
|1754
|421

Customer and ATM machine - Doc
|10
|1416
|337

SQl Procedures and ER Diagram Assignment
|20
|1871
|385