Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Application domain. Consider a simple banking application in which customers per

ID: 3806588 • 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 +100

Explanation / Answer

Ans: B. i,e

SELECT T.type

FROM Customer C ,Transaction T

WHERE T.cid=C.cid AND C.phone= "0210800";

The query is about returning the type of accounts used by the customers with 0210800 phone number.

In the above query selected the two tables transaction and customer are related by foreign key Cid which helps in retrieving the information of type of account used .

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote