I have a follow-up question to a question I have previously asked on SO.
Instead of the query from my initial question, I want to convert the following into relational algebra:
List the names and phone numbers of the bidders who are not always affected by
Note: Double-bidding occurs when two different bidders bid the same price on the same exact item.
I have some ideas as to how to proceed:
- Find all bidders that have double bid (1)
- Find all bidders who have a bid that isn’t double-bidding (2)
- Find all bidders who have never placed a double-bidding bid (3)
From here, I can get the intersection of (1) and (2) and add (3) to this intersection to get the final answer. (That is my thought process, please correct me if I am wrong)
I have no issues in finding all bidders that have placed a double bid, but the consequent ideas are confusing me quite a bit. This is what I have for “all bidders that have double bid”:
BIDâ¨ITEM – (Q1)
Q1 â¨ Ïbidâbid’, iidâiid’, priceâprice’(Q1) – (Q2)
Ïbid(Ïbid != bid’(Q2) â§ Ïprice = price’(Q2) â§ Ïiid = iid’(Q2)) – (Q3)
How do I use this to find the bidders who are not always affected by double bidding?
By the way, the bolded text is merely for labeling purposes and is not part of the answer.