Relation Algebra - Relational Calculus

Click For Summary

Discussion Overview

The discussion revolves around converting expressions from relational algebra to their equivalent forms in relational calculus. Participants are examining specific expressions and their syntax, focusing on correctness and completeness in the context of set notation.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant provides a series of relational algebra expressions and their proposed relational calculus equivalents.
  • Another participant questions the syntax used in the first expression, suggesting it should be written as tuples.
  • There is a discussion about whether the shorthand notation used is acceptable in the given context.
  • Some participants express uncertainty about the correctness of the syntax and whether it aligns with standard conventions.

Areas of Agreement / Disagreement

Participants generally agree that the proposed expressions are correct, but there is disagreement regarding the syntax and whether shorthand notation is acceptable. The discussion remains unresolved on the strictness of the syntax requirements.

Contextual Notes

Participants reference notes that may contain additional context or examples, but the specific content of those notes is not detailed in the discussion.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :giggle:

Give for the following expressions of relation algebra the equivalent expression in relational calculus.
1. $\sigma_{B=A}(R(A,B,C))$
2. $\pi_{B,C}(R(A,B,C))$
3. $R(A,B,C)\cup S(A,B,C)$
4. $R(A,B,C)\cap S(A,B,C)$
5. $R(A,B,C)\setminus S(A,B,C)$
6. $R(A,B,C)\times S(D,C,E)$
7. $R(A,B,C)\Join S(B,C,E)$
8. $R(A,B) \div S(B)$I have done the following :

1. $\{x_1, x_2, x_3\mid R(x_1, x_2, x_3)\land (x_2=x_1)\}$
2. $\{y_1, y_2\mid \exists x_1\exists x_2\exists x_3 \left (R(x_1,x_2,x_3)\land y_1=x_2\land y_2=x_3\right )\}$
3. $\{x_1, x_2, x_3\mid R(x_1, x_2, x_3)\lor S(x_1, x_2, x_3)\}$
4. $\{x_1, x_2, x_3\mid R(x_1, x_2, x_3)\land S(x_1, x_2, x_3)\}$
5. $\{x_1, x_2, x_3\mid R(x_1, x_2, x_3)\land \neg S(x_1, x_2, x_3)\}$
6. $\{x_1, x_2, x_3, x_4, x_5, x_6\mid R(x_1,x_2,x_3) \land S(x_4,x_5,x_6)\}$
7. $\{ x_1, x_2, x_3, x_4 \mid R(x_1,x_2,x_3) \land S(x_2,x_3,x_4)\}$
8. $\{x_1 \mid R(x_1,x_2)\land S(x_2)\}$Is everything correct and complete? :unsure:
 
Last edited by a moderator:
Physics news on Phys.org
Hey mathmari!

Shouldn't it be for instance $\{(x_1, x_2, x_3)\mid R(x_1, x_2, x_3)\land (x_2=x_1)\}$? 🤔

Otherwise I think everything is correct. (Sun)
 
Klaas van Aarsen said:
Shouldn't it be for instance $\{(x_1, x_2, x_3)\mid R(x_1, x_2, x_3)\land (x_2=x_1)\}$? 🤔

Otherwise I think everything is correct. (Sun)

Ah you mean that we should write them as tuples? :unsure:
 
mathmari said:
Ah you mean that we should write them as tuples? :unsure:
Yes. As far as I know, we have to, or it won't be correct syntax for sets.
Then again, it is clear what it means, so there is a chance that in the particular context it is considered to be an acceptable short hand abbreviation... 🤔
 
Klaas van Aarsen said:
Yes. As far as I know, we have to, or it won't be correct syntax for sets.
Then again, it is clear what it means, so there is a chance that in the particular context it is considered to be an acceptable short hand abbreviation... 🤔

Ah ok! I wrote the above in that way because I saw the below part in the notes :

1636395916131.png
 
mathmari said:
Ah ok! I wrote the above in that way because I saw the below part in the notes :

View attachment 11436
Ok. Then I guess it is just fine. (Sun)
 
Klaas van Aarsen said:
Ok. Then I guess it is just fine. (Sun)

Great! Thank you! (Sun)
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 32 ·
2
Replies
32
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
3K