我的情况是我无处可去。我不知道如何解决关系代数问题。
Deposit (Branch, Acc-No, Cust-Name, Balance)
Loan (Branch, Loan-No, Cust-Name, Balance)
Branch (Branch, Assets, Branch-County)
Customer (Cust-Name, Cust-County, Branch)
生成一个显示所有分支,客户名称,余额和帐号的关系 贷款金额超过2500英镑的客户以及拥有存款账户的所有客户 余额小于100英镑。所有客户都应该在罗姆福德分公司。</ strong>
这是我到目前为止所提出的。这是对的吗?
π Branch, Acc-No, Cust-Name, Balance (
σ(Loan.Balance > 2000 ∧ branch='Romford')(Loan)
∪ σ(Deposit.Balance < 150 ∧ branch='Romford')(Customer ∩ Deposit)
)
正确的Ansers是:
π Branch, Cust-Name, Balance, Acc-No,
(σ Balance < 100^branch=”Romford” (Deposit))
∪
π Branch, Cust-Name, Balance, Loan-No,
(σ Balance > 2500 ^branch=”Romford”(Loan))
答案 0 :(得分:-3)
这是我提出的答案:
π Branch, Cust-Name, Balance, Acc-No, (σ Balance < 100^branch=”Romford” (Deposit))
∪
π Branch, Cust-Name, Balance, Loan-No, (σ Balance > 2500 ^branch=”Romford”(Loan))