θ连接,等值连接和自然连接之间的差异 [英] Difference between a theta join, equijoin and natural join

查看:2880
本文介绍了θ连接,等值连接和自然连接之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我来到θ连接,等值连接和自然连接时,我无法理解关系代数。有人可以帮助我更好的理解吗?如果我在θ连接上使用=符号,它与使用自然连接完全相同?

解决方案

A θjoin 允许任意的比较关系(例如≥)。





自然连接是在每个关系中具有相同名称的属性上的等值连接。



此外,自然连接删除等式比较中涉及的重复列,因此只保留每个比较列中的1个;在粗略的关系代数项中:

⋈=πR,S-a s ○⋈ a R = a S


I'm having trouble understanding relational algebra when it comes to theta joins, equijoins and natural joins. Could someone please help me better understand it? If I use the = sign on a theta join is it exactly the same as just using a natural join?

解决方案

A theta join allows for arbitrary comparison relationships (such as ≥).

An equijoin is a theta join using the equality operator.

A natural join is an equijoin on attributes that have the same name in each relationship.

Additionally, a natural join removes the duplicate columns involved in the equality comparison so only 1 of each compared column remains; in rough relational algebraic terms: ⋈ = πR,S-as ○ ⋈aR=aS

这篇关于θ连接,等值连接和自然连接之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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