Difference between a theta join, equijoin and natural join

后端 未结 7 607
眼角桃花
眼角桃花 2020-11-29 17:20

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 t

7条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-29 17:57

    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

提交回复
热议问题