如何为给定的模式提供关系代数? [英] How to provide relational algebra for the given schema?

查看:141
本文介绍了如何为给定的模式提供关系代数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

EMPLOYEE(PERSONNAME,STREET,CITY)

EMPLOYEE(PERSONNAME, STREET, CITY)

WORKS(PERSONNAME,COMPANYNAME,SALARY)

WORKS(PERSONNAME,COMPANYNAME, SALARY)

(COMPANYNAME,CITY)

COMPANY(COMPANYNAME, CITY)

MANAGES(PERSONNAME,MANAGERNAME)

MANAGES(PERSONNAME, MANAGERNAME)

查找此数据库中所有员工的姓名谁不为第一银行公司工作(假设所有的人只为一个公司工作,人们允许出现在数据库(例如在员工),但不出现在工作)。

Find the names of all employees in this database who do not work for First Bank Corporation (assuming that all people work for exactly one company and people are allowed to appear in the database (e.g. in employee) but not appear in works).

这里我不明白假设部分。

Here I do not understand the assumption part. What does it actually mean ?

推荐答案

正如@wildplasser指出的:假设的第一部分

As @wildplasser pointed out: The first part of the assumption


假设所有人只为一个公司工作...

assuming that all people work for exactly one company...

声明员工和公司之间有一个确切的关系。这意味着它不允许有员工没有关联到任何公司的数据记录。这是假设的第二部分在

declares the case that there is a exact one relation between employees and companies. This would imply that it is not allowed to have data records where an employee is not associated to any company. That is where the second part of the assumptions kicks in


...中出现的地方,人们被允许出现在数据库中(例如在雇员中)但不出现在作品中

... and people are allowed to appear in the database (e.g. in employee) but not appear in works

这告诉我们,甚至可以让员工不与任何公司相关联。

So this tells us that is even possible to hold employees not being associated to any company.

对我来说,我的结论是该问题要求公司和员工实体之间的<零>或关系。

For me now i would conclude that the question asks for the zero or one relation between company and employee entities.

这篇关于如何为给定的模式提供关系代数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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