# 如何解决门的关系代数问题？

``````∏Order1.Prod_Id (ρ(Order1, Order) Order1.Prod_Id=Order2.Prod_Id
and Order1.Agent_Id≠Order2.Agent_Id
and Order1.Order_Month=Order2.Order_Month ρ(Order2, Order))``````

Prod_Id Agent_Id Order_Month
P001 A001 JAN
P002 A002 FEB
P002 A001 FEB
P001 A002 FEB

``````(ρ(Order1, Order)Order1.Prod_Id=Order2.Prod_Id
and Order1.Agent_Id≠Order2.Agent_Id
and Order1.Order_Month=Order2.Order_Month ρ(Order2, Order))``````
Order1.Prod_Id Order1.Agent_Id Order1.Order_Month Order2.Prod_Id Order2.Agent_Id Order2.Order_Month
P001 A001 JAN P001 A001 JAN
P002 A002 FEB P001 A001 JAN
P002 A001 FEB P001 A001 JAN
P001 A002 FEB P001 A001 JAN
P001 A001 JAN P002 A002 FEB
P002 A002 FEB P002 A002 FEB
P002 A001 FEB P002 A002 FEB
P001 A002 FEB P002 A002 FEB
P001 A001 JAN P002 A001 FEB
P002 A002 FEB P002 A001 FEB
P002 A001 FEB P002 A001 FEB
P001 A002 FEB P002 A001 FEB
P001 A001 JAN P001 A002 FEB
P002 A002 FEB P001 A002 FEB
P002 A001 FEB P001 A002 FEB
P001 A002 FEB P001 A002 FEB

``````∏Order1.Prod_Id (σOrder1.Prod_Id=Order2.Prod_Id
and Order1.Prod_Id=Order3.Prod_Id
and  Order1.Agent_Id≠Order2.Agent_Id
and Order1.Agent_Id≠Order3.Agent_Id
and Order2.Agent_Id≠Order3.Agent_Id
and Order1.Order_Month=Order2.Order_Month
and Order1.Order_Month=Order3.Order_Month(ρ(Order1, Order)X ρ(Order2, Order)X ρ(Order3, Order)))``````

``σR.B=S.B (RX S)``

• 回顶