Application domain. Consider a simple banking application in which customers per
ID: 3806589 • Letter: A
Question
Application domain. Consider a simple banking application in which customers perform transactions on some of their accounts. For this purpose we have the database schema that consists of the following three relation schemata: CUSTOMER Cid, name, phone ACCOUNT num, type, desc TRANSACTION num, type, cid, time, amount Domains of attributes have been omitted. The following relations constitute a database, which we denote by db. ACCOUNT CUSTOMER phone num type desc cid name cl Jack 02102205945 01 cheque expenses c2 Jill 02102205945 02 cheque expenses c3 Jill 02259682104 02 online expenses TRANSACTION num type cid time amount 01 cheque cl 24-03-14 09:32 100 01 cheque cl 24-03-14- 22:11 100 02 cheque c2 24-03-14- 22:11 100 02 online c3 24-03-14- 22:11 +100Explanation / Answer
Q1 would simply get the columns cid, num, type from the TRANSACTION relation.
Q2 would do an equijoin for Q1 with Q1 to get the customers that used multiple types of accounts.
Q3 would get the customers away from Q2 who would use same types of account.
Q4 would get the cid of the customers from Q3.
Q would get rid of Q4 from CUSTOMER and just projects the cid - of the customers who uses different types of accounts.
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.