1

请任何人都可以帮助将以下两个 SQL 语句转换为关系代数

1)

SELECT D.Dname 
FROM Employee E, Department D
WHERE E.Dno = D.Dno
  AND E.Lname='Smith'
  AND S.Fname='John'

2)

SELECT B.Town
FROM Staff S, Branch B
WHERE S.BranchId = B.BranchId
  AND S.lName='Pincher'
  AND S.fName='Penny'
4

3 回答 3

4

回答 ...我想你的意思是 D.Fname = 'John' 在 WHERE 子句

于 2012-01-04T02:31:42.197 回答
1

这是第二个 SQL 语句的关系代数:

π TownlName = 'Pincher' ^ fName = 'Penny' (Staff |x| BranchId Branch))

于 2012-01-04T04:41:28.943 回答
0

π DnameLname = 'Smith' ^ Fname = 'John' (Employee |x| Dno Department))

于 2012-01-04T02:34:57.153 回答