문제

Suppose you have two tables:

Purchase(cardID,itemID)

MembershipCard(cardID,clientID,companyName)

How can I get all cardID's which were not used in a purchase using relational algebra?

It seems like division to me but I'm not sure

도움이 되었습니까?

해결책

You have to take all MembershipCards and remove all the ones that are in Purchase:

πcardID(MembershipCard) - πcardID(Purchase)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top