Prove that R ⟕ S = R ⨝ S



  • Given the relations R(a, b, c) and S(b, d), where {R.a, R.b} is the primary key of R, {S.b} is the primary key of S, and {R.b} is the foreign key in R, which refers to {S.b} (the data is already give as sample on the website)

    Running following equations

    • R ⟕ S
    • R ⨝ S

    in https://dbis-uibk.github.io/relax/calc/local/uibk/local/0 gives the same result for both but how can it be proved like mathematically?

    R ⟕ S = R ⨝ S



  • Since {R.b} is the foreign key referencing S, each tuple in R is guaranteed to have one and only one matching tuple in S, therefore the natural join will result in all R tuples being selected exactly once.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2