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

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.