我如何找到关系代数、域关系演算和元组关系演算中最高/最大的东西 [英] How would I find the highest/largest of something with relation algebra, domain relational calculus and tuple relational calculus

查看:40
本文介绍了我如何找到关系代数、域关系演算和元组关系演算中最高/最大的东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是家庭作业的一部分.我有几个问题要问找到薪水最高或第二高的员工的开斋节.找到获得最多飞机认证的飞行员.我不知道该怎么做.本章中没有任何示例,而且 google 证明没有那么有用.如果有人能告诉我如何只做其中一项,那会很有帮助.

This is part of a homework assignment. I've got several questions asking find the eid of the employee with the highest salary, or 2nd highest salary. Find the pilot that is certified for the most aircrafts. I don't have any idea on how to do it. There aren't any examples in the chapter, and google is proving less that helpful. If someone could show me how to do just one of these, it'll help a lot.

表格如下:

飞机(aid:整数,名称:字符串,巡航范围:整数)

Aircraft( aid: integer, aname: string, cruisingrange: integer )

已认证(eid:整数,aid:整数)

Certified( eid: integer, aid: integer )

员工(eid:整数,ename:字符串,薪水:整数)

Employees( eid: integer, ename: string, salary: int )

推荐答案

我可以给你一个关于如何获得最大值和最小值的提示:

I can give you an hint in how to obtain max and min values:

考虑一下您可以将实体连接到其自身这一事实,现在考虑您可以使用什么连接标准......然后您可以使用连接的结果从您的初始元素集中减去结果

think about the fact that you can join an entity over itself, now think what join criteria you could use.. and then you can use the result of the join to subtract results from your initial set of elements

如果您以第一薪<=第二薪的标准加入雇主,会发生什么?

what happens if you join employers with them selves with a criteria of having first salary <= second salary?

这篇关于我如何找到关系代数、域关系演算和元组关系演算中最高/最大的东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆