1.提供客户通过代理下订单的所有(cname、aname)对 用乘积
((ORDERS × CUSTOMERS × AGENTS)where ORDERS.cid=CUSTOMERS.cid AND ORDERS.aid=AGENTS.aid) [ cname,aname]
2.提供客户通过代理下订单的所有(cname、aname)对 用自然链接
(ORDERS ⋈CUSTOMERS⋈AGENTS)[cname,aname]
3.get pids and pname of products that are stored in the city as one of the agents who sold these products.( 取出商品的pname,and pid,要求这些商品所在的城市和某个销售过该商品的代理商所在的城市相同。)用乘积!
((ORDERS×PRODUCTS×AGENTS)where ORDERS.pid=PRODUCTS.pid and ORDERS.aid=AGENTS.aid and PRODUCTS.city=AGENTS.city)[pname,pid]
4 get pids and panmes of priducts that are stored
in the city as one of the agents who sold these products
(取出商品的pname and pid,要求这些商品所在的城市和某个销售过该商品的代理商所在的城市相同。)用自然链接!
(PRODUCTS⋈ORDERS⋈AGENTS )[pname,pid]
5.retrieve aids of agents with the largest percent.
检索具有最大百分比的代理的aids
A1:=AGENTS A2:=AGENTS
T1:=(A1× A2 where A1.percent<A2.percent )[ A1.aid,A1.percent]
T2=(Agents[aid,percent]-T1)[cid]
6.Get names of agents who places orders for all products that ordered by any
customer at all.
获取为所有被每一个顾客订购的产品下订单的代理商的姓名。
((ORDERS[aid,pid]÷ ORDERS[pid]) ⋈AGENTS)[aname]