代写 COMPSCI/SOFTENG 351 and COMPSCI 751
100%原创包过,高质代写&免费提供Turnitin报告--24小时客服QQ&微信:120591129
代写 COMPSCI/SOFTENG 351 and COMPSCI 751
Assignment
COMPSCI/SOFTENG 351 and COMPSCI 751
due Thursday 31 March 2016, 5pm
The assignment is marked out of 20. For COMPSCI/SOFTENG 351 students, it is worth
10% towards your final mark. For COMPSCI 751 students, it is worth 8% towards your final
mark.
Exercise1. The following relational database schema Auction models the business
data of an online auction system:
– Person={pid, pname, phone, location} with key {pid},
– Item={iid, iname, description, sid} with key {iid}, and foreign key [sid] ⊆ Person[pid]
– Bid={bid, iid, price} with key {bid,iid,price}, and foreign keys
[bid] ⊆ Person[pid]
[iid] ⊆ Item[iid]
– Sale={iid, bid, price} with key {iid}, and foreign keys
[iid] ⊆ Item[iid]
[bid] ⊆ Person[pid]
[iid, bid, price] ⊆ Bid[iid, bid, price]
A double-bidding occurs whenever two different bidders bid for the same item at the
same price. For each of the 5 queries in a) to e) do the following:
– Write the query in Domain Relational Calculus.
– Without using either inequalities or conjunctions or disjunctions in conditions of
the selection operators, write the query in Relational Algebra
a. List the names of items that had bids of $50 that did not sell.
(4 marks)
b. List the names of all the items that have been affected by double-bidding. (4 marks)
c. List the names of all the items that have never been affected by double-bidding.
(4 marks)
d. List the names and phone numbers of the bidders who are not always affected by
double-bidding. (4 marks)
e. List the names of bidders who have bid on every item that has sold. (4 marks)
1
代写 COMPSCI/SOFTENG 351 and COMPSCI 751