θ连接,等值连接和自然连接之间的差异 [英] Difference between a theta join, equijoin and natural join
问题描述
当我来到θ连接,等值连接和自然连接时,我无法理解关系代数。有人可以帮助我更好的理解吗?如果我在θ连接上使用=符号,它与使用自然连接完全相同?
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屋!