2,362 views
1 votes
1 votes

Is set difference operator (-) used in relational algebra associative?

2 Answers

Best answer
4 votes
4 votes

No it is not associtive.

suppose we have three relations A,B and C

take A as

s.no name
1 abc
2 xyz

take B as

s.no name
1 abc
3 mno

take C as

s.no name
1 abc
4 stu

The result of set difference is tuples which are present in one relation but not in another.

the result of

(A-B)-C = 

s.no name
2 xyz

and the result of

A-(B-C) =

s.no name
1 abc
2 xyz

Both are different. Therefore, it is not associative.

selected by

Related questions

0 votes
0 votes
1 answer
1
Sourabh Kumar asked Jun 26, 2015
306 views
https://gateoverflow.in/?qa=blob&qa_blobid=3717160066093697882
0 votes
0 votes
2 answers
2
Sourabh Kumar asked Jun 26, 2015
631 views
https://gateoverflow.in/?qa=blob&qa_blobid=3717160066093697882
1 votes
1 votes
1 answer
3
sid1221 asked Oct 13, 2017
709 views
int main(){unsigned int x = 1;printf("Signed Result %d \n", ~x);printf("Unsigned Result %ud \n", ~x);return 0;}some one give detailed answer ...(mainly how it works )
0 votes
0 votes
2 answers
4
Hira Thakur asked Jun 22, 2017
916 views
anyone explain this prog?? how to output is evaluvated??int main(){ int x = 10, y; y = (x++, printf("x = %d\n", x), ++x, printf("x = %d\n", x), x++); printf("y ...