Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2 2 pts Recall the shopping database schema. find the customer ids and names of all those customers c1 and c2 such that c1

image text in transcribed

Question 2 2 pts Recall the shopping database schema. find the customer ids and names of all those customers c1 and c2 such that c1 and 2 are distinct (ie, are different customers) and for every store where c1 has made a Consider pairs of customers c1 and c2. Suppose we want purchase, c2 has made a purchase and vice versa. Which one of the following Tuple-Calculus queries retrieves the information described above? otace customer (CD1) - C1[CID] At[cName1) - c1[cName] a c2 e customer (t[CID2] = c2[CID] At[cName2] = c2[cName] plt purchase (p1[CID] =c1[CID] 3p2 e purchase (p2[CID) - C2CID) A p2[SID] = P1[SID)) vp3 E purchase (p3[CID] = c2[CID] 3p4 e purchase (p4[CID] =1[CID) A p4[SID] =p3[ID])))} {taci e customer (t[c1D1] - c1[cID] [cNamel] - c1[cName] a c2 e customer (ticiD2] - C2CID] At[cName2] - c2[cName] A c1[CID] c2[CD] ple purchase (p1[CID] - c1[CID] - p2 e purchase (p2[CID] - C2[CID] A p2[ID] - p1[ID])))} {t|c1 e customer (t[clD1] = c1[CID] A 3 c2 e customer [CD2] = c2[CID] pi e purchase (p1 [CID] =c1[CID] = 3p2 purchase (p2[CID] = c2[CID] , p2sID] = P1[SIDI) p3 purchase (p3[CID] - c2[CID] = ap4 purchase (p4[CID] - [CID] P4[ID] - p3[SIDIN} {t|aci e customer (t[cID1) = c1[CID] a c2 e customer (t[cID2] = c2[CID] A c1[CID] c2[CID] A v p1 e purchase (p1[CID] = C1 [CID] = ap2 purchase (p2[CID] = C2CID] Ap2[51D] = P1[SD])) vp3 purchase (p3[CID] =C2CID) =p4 e purchase (p4[CID] =c1[CID] Ap4[5ID] =p3[50])) {t| acl e customer (t[CID1] = c1[CID] [cNamel) = c1[cName] a c2 e customer (t[ciD2] = c2[CID] tcName2] = c2[cName)c1[CID] c2[CID] A vpi e purchase (p1(CID) - c1[CID] = ap2 e purchase (p2(CID) - c2[CID] Ap2[SID] = P1[SID])) vp3 purchase (p (CID) - C2CID] = =p4 e purchase (p4[CID] - C1CD Ap4[ID] =p3[SID]))))) {t | acl e customer (t[CID1] = C1 [CID] c2 e customer (t[ciD2] = c2[CID] C1[CID] => [CID] A vpl E purchase (p1[CID] = c1[CID] = ap2 e purchase (p2[CID] = c2[CID] P2[SID] =p1[ID])))}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago