Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Recall the shopping database schema. Consider pairs of customers c1 and c2. Suppose we want to find the customer ids and names of all those
Recall the shopping database schema. Consider pairs of customers c1 and c2. Suppose we want to find the customer ids and names of all those customers c1 and c2 such that c1 and 2 are distinct i.e., are different customers) and for every store where c1 has made a purchase, c2 has made a purchase and vice versa. Which one of the following Tuple-Calculus querles retrieves the Information described above? otaci e customer (t[c1D1] =c1[CID] At[cName1] =c1[cName] c2 e customer (t[cID2] - C2CID] A t[cName2] - c2[cName] p1 e purchase (p1[CID] - [CID] 3 p2 & purchase (2[CID] - C2[CID] ^ p2[SID] - p1[SDI) p3 e purchase (p3[CID] = C2[CID] + ap4 e purchase (p4[CID] = C1[CID] A p4[SID] =p3[sID]))} It acte customer (t[cID1] = C1 [CID] At[cName1] = c1[cName] = c2 e customer (t[ciD2] = c2[CID] t[cName2] = c2[cName) C1[CID] c2(CID) vpi e purchase (p1 [CID- CICID) 3p2 e purchase (p2[CID] - c2[CID] p2[51D] - p1sIDX it acl e customer (t[cID1] = c1[CID] ac2 e customer (t[cID2] = c2[CID] v pl e purchase (p1[CID= c1[CID] => p2 e purchase (p2[CID] = c2[CID] p2sID] = p1(SID) vp3 e purchase (p3[CID] = 2[CID] = ap4 e purchase (04[CID] = C1 [CID] Ap4[SID] =p3[SID)) {t acl e customer (t[CID1] = C1[CID] ac2 customer (t[] = c2[CID] c1[CID] c2[CID) vple purchase (p1 [CID] =c1[CID] = ap2 e purchase (p2[CID] = c2[cID] ^ p2(SID) = P1 [SD]]) vp3 e purchase (p3[CID] - c2[CID] = p4 E purchase (p4[CID] =c1[CID] 04[SID] =p3sID)) {taci e customer (t[CID1] = c1[CID] At[cNamel] = c1[cName] C2 customer (t[CID2] = c2[CID] t[cName2] = c2[cName] AC1[CID] c2[CID] vple purchase (p1[CID] = C1[CID] ap2 E purchase (p2[CID] = c2[CID] A P2(SID) = P1[SID) vp3 e purchase (p3[CID] = c2[CID] ap4 E purchase (p4[CID] = c1[CID] A p4(SID] =p3[SID]]M {taci e customer (t[cID1] - c1[CID] 3 c2 e customer (t/c D21 - C2[CID] c1[CID] C2CID) vple purchase (D1[CID] - CHID 3 p2 e purchase (p2[CID] = c2[CID] Ap2SD) - P1[ID])))}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started