这个怎么写?我晕了……

qlxyeah 2003-12-17 03:37:40
(From this Book-----Database System Concepts (Edition Third)
who can tell me where to find the keys to exercises of this books, thanks!)

the relational database:

employee(employee-name,street,city)
works(employee-name,company-name,salary)
company(company-name,city)
manages(employee-name,manager-name)

give an expression in the relational algebra, the tuple relational calculus, and the domain relational calculus:

1)Find the names of all employees who live in the same city and on the same street as do their managers.

2)Find the names of all employees in this database who do not work for First Bank Corporation.

3)Find the names of all employees who earn more than every employee of Small Bank Corporation.

4)Assume the companies may be located in several cities. Find all companies located in every city in which Small Bank Corporation is located.
...全文
60 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
yyecho2008 2003-12-23
  • 打赏
  • 举报
回复
你可以查在某个city的所有employee呀,
jackiehua 2003-12-19
  • 打赏
  • 举报
回复
gmlxf(烛光) 说的不错,字段不全。。。。
qlxyeah 2003-12-18
  • 打赏
  • 举报
回复
大家帮我解决一下阿,满意的话立刻结贴!
yun198183 2003-12-17
  • 打赏
  • 举报
回复
头都大了
erigido 2003-12-17
  • 打赏
  • 举报
回复
看得好累啊
hglhyy 2003-12-17
  • 打赏
  • 举报
回复
up!
youngby 2003-12-17
  • 打赏
  • 举报
回复
sorry:

2.select employee-name,company-name from work where company-name not in ( select top 1 from company order by company-name )
youngby 2003-12-17
  • 打赏
  • 举报
回复
2.select employee-name,company-name from work where company-name <> 'company-name'

youngby 2003-12-17
  • 打赏
  • 举报
回复
1.select a.employee-name,a.adress,b.manager-name from (select employee-name,Adress=street+city from employee) a join manages b on a.employee-name=b.employee-name group by a.adress

1ssp 2003-12-17
  • 打赏
  • 举报
回复
看不懂!顶
gmlxf 2003-12-17
  • 打赏
  • 举报
回复
manager的city怎么没有?
company(company-name,city)?好象与其他表没有关联。
gmlxf 2003-12-17
  • 打赏
  • 举报
回复
感觉缺少字段。
zjcxc 元老 2003-12-17
  • 打赏
  • 举报
回复
看来得补英文了.

34,588

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧