2A. Consider the Bank Database schema: branch (branch name string, branch city:
ID: 3907403 • Letter: 2
Question
2A. Consider the Bank Database schema: branch (branch name string, branch city: string, assets: real) account (account mumber integer, branch name: string, balance: real) depositor (customer name: string, account number: integer customer city string) The key fields are underlined, and the domain of each field is listed after the field name. There customer_ name and account number together form the key for depositor. The depositor relation lists the customer name(s) for each account Wrije the following queries in SQL fore branch name is the key for branch, account number is the key for account, and 4M List in alphabetic order the names of all customers having an account in Gandhinagar branch f ii. Find all branches that have greater total account balance than Jayanagar branch 4 ili Find all branches, of Bangalore city, which has an account of all the customers located in CSE 2204 Page 1 of 3Explanation / Answer
2A
i.
Select customer_name from depositor inner join account on account.account_number = depositor.account_number inner join branch on branch.branch_name = account.branch_name where branch.branch_city = 'Gandhinagar' order by depositor.customer_name;
ii.
Select * from branch inner join account on branch.branch_name = account.branch_name where balance >(Select balance from account inner join branch on account.branch_name = branch.branch_name where branch_city = 'Jayanagar');
iii.
Select * from branch inner join account on branch.branch_name = account.branch_name inner join depositor on account.account_number = depositor.account_number where branch.branch_city = 'Bangalore' and depositor.customer_city = 'Delhi' ;
I assumed customer_city = 'Delhi' as question is incomplete.
1A.
He can use EXCEL sheet to maintain his daily business data for the following reasons:
1. EXCEL sheet is easy to understand and use as compared to MS Access
2. He does not need to learn the database management concept , forms,reports etc ,just need calculations on the data.
3. EXCEL provides him tools like charts,graphs to understand the data easily.
Do ask if any doubt. Please upvote.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.