Consider a bank database given as follows: branch (bName, bCity, assets) custome
ID: 3849644 • Letter: C
Question
Consider a bank database given as follows: branch (bName, bCity, assets) customer (cName, street, city) loan (loanNo, bName, amount) borrow(cName, loanNo) account (accountNo, bName, balance) deposit (cName, accountNo) Write the corresponding relational algebra expression for the following queries: A.) List the names of depositing customers whose account balance is more than exist10,000. B.) List the names of depositing customers whose account balance is more than exist10,000 at the "Richardson" branch.Explanation / Answer
1.) Cname( balance>10000( (account) (deposit) (Customer)))
explanations: first of all take union of the three tables account , deposit and customer. because these three are interrelated. now select all rows having balance greater than 10,000. then project the only customer name .
2.) Cname( balance>10000 and bname='Richardson'( (account) (deposit) (Customer) (branch)))
explantions: this is same like first one. the only difference is we have to perform one more union operation and extra condition on branch name for 'RICHARDSON'
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.