Your program should consist of a continuous loop in which:
We are not expecting anything fancy in the way of interface. For example, a menu printed via printf is OK. Also, handling of SQL errors can be quite simple. Either write an sqlerror routine that just prints the error message from Oracle or copy the error handler from a sample program (of course you should acknowledge this borrowing just as you would acknowledge any other use of someone else's work in your homework or project).
Hand in your program and a script showing the program running. Each of the options should be exercised at least once in your script.
Bids(auctionID, bidder, price, quantity) Auctions(auctionID, seller, item, quantity, expires) Ratings(seller, stars)
Design an equivalent ODL schema. You may assume that in Bids, a bidder may place several bids for one auction, but all bids by one bidder will have different prices. Indicate keys and extents.
interface Auction (extent Auctions key aID) { attribute integer aID; attribute string item; relationship Set<Bid> bids inverse Bid::theAuction; } interface Bid (extent Bids) { attribute integer amount; relationship Bidder theBidder inverse Bidder::placedBids; relationship Auction theAuction inverse Auction::bids; } interface Bidder (key name extent Bidders) { attribute string name; attribute integer limit; relationship Set<Bid> placedBids inverse Bid::theBidder; }
Write the following queries in OQL: