I am trying to implement an online auction program - very similar to eBay.
At the moment I have tables including Users, Auctions (linked Auctions.SellerID -> Users.UserID), Bids (Bids.Bidder -> Auctions.UserID, Bids.AuctionID -> Auctions.AuctionID)...you get the idea.
The issue I'm facing now is the feedback system... I want one similar to ebay where for each auction, once finished, the seller gets to leave feedback for the buyer and vice versa. So here's what I've thought of so far:
Feedback table, with AuctionID, BuyerID, SellerID and a flag indicating if its a Buyer-to-Seller feedback (ie the Seller gets the feedback rating) or Seller-to-Buyer.
Is this normalised? In theory I could get the highest bidder (ie the Buyer) from the Bids table and the seller from the Auctions table.
OR
Sales table with AuctionID, BuyerID, SellerID - an entry in here means that the Auction is complete and is now a "Sale". From here I have a Feedback table linking to the correct Sale (ie 2 rows in the Feedback table per Sale row if both buyer and seller leaves feedback)....
Is this normalised??!
Basically I havent really got any decent ideas on how to create this in a normalised way.
Can someone help?
At the moment I have tables including Users, Auctions (linked Auctions.SellerID -> Users.UserID), Bids (Bids.Bidder -> Auctions.UserID, Bids.AuctionID -> Auctions.AuctionID)...you get the idea.
The issue I'm facing now is the feedback system... I want one similar to ebay where for each auction, once finished, the seller gets to leave feedback for the buyer and vice versa. So here's what I've thought of so far:
Feedback table, with AuctionID, BuyerID, SellerID and a flag indicating if its a Buyer-to-Seller feedback (ie the Seller gets the feedback rating) or Seller-to-Buyer.
Is this normalised? In theory I could get the highest bidder (ie the Buyer) from the Bids table and the seller from the Auctions table.
OR
Sales table with AuctionID, BuyerID, SellerID - an entry in here means that the Auction is complete and is now a "Sale". From here I have a Feedback table linking to the correct Sale (ie 2 rows in the Feedback table per Sale row if both buyer and seller leaves feedback)....
Is this normalised??!
Basically I havent really got any decent ideas on how to create this in a normalised way.
Can someone help?