- #1

mathmari

Gold Member

MHB

- 5,049

- 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:

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: