Question: SECTION B: SQL QUESTIONS (2 QUESTIONS, 40 MARKS) Instruction: Answer ALL questions (a) The bank opens a new branch with following details: Location Perak Phone

 SECTION B: SQL QUESTIONS (2 QUESTIONS, 40 MARKS) Instruction: Answer ALL

SECTION B: SQL QUESTIONS (2 QUESTIONS, 40 MARKS) Instruction: Answer ALL questions (a) The bank opens a new branch with following details: Location Perak Phone No. : 055462563 Insert this information into the related table in the database. Question 1 Tables below are extracted from a bank database: a [2 marks] Table 1: BRANCH Branch Id Location Tel No 1 Kuala Lumpur 0321625321 2 Selangor 0356378924 3 Melaka 062356892 4 Negeri Sembilan 067698521 (b) A customer whose ID is 1002, changed his address to Kajang Update this information accordingly in the database (4 marks) The bank manager wants to obtain all transaction information of an account with ID 12345678987 [4 marks] Table 2: CUSTOMER Cust.Id Acc. ld 1001 12345678987 1002 12345678988 1003 12345678989 1004 12345678990 1234567899 1006 12345678992 Name Siti Aminah Mohd Ali Nur Arifah James Wong Nurafifah Jovian Address Kota Damansara Shah Alam Alor Gajah Kuala Pilah Klang Kajang 1005 (d) The bank manager wants to display the number of accounts that are related to each branch Sample result Branch Id Total Accounts 1 1 2 3 3 1 4 1 [4 marks) Table 3: ACCOUNT Acc 10 Branch Id 123456789871 12345678988 2 123456789893 123456789904 123456789912 123456789922 CustId Acc. Type 1001 Saving 1002 Current 1003 Saving 1004 Saving 1005 Current 1006 Saving Acc Balance 1985.22 562.35 9870.50 56000.25 160.32 16000.00 (e) The bank manager wants to obtain customer information (CustId Name) and their associated account information (Acc.Id AccType. Acc. Balans) of all customers [6 marks] Table 4: TRANSACTION Trans Acc Id 123456 12345678987 123498 12345678988 123457 12345678987 Type Deposit Deposit Withdrawal Amount 1000 500 250 Based on the tables, write an SQL statement for each of the question below

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!