Set difference, Database Management System

Set Difference

If R1 and R2 are two union compatible relations or relations then result of R3 =R1- R2 is the relation that have only those tuples that are in R1 but not in R2.

Incase, R3 will have tuples such that R3 = {t | R1 ∋ t ∧ t∉R2}.

 

Example:

 

R1

 

X

Y

A1

B1

A7

B7

A2

B2

A4

B4

 

 

 

  R2  

A

B

A1

B1

A2

B2

A3

B3

A4

B4

 

 

R1-R2 =

 

 

 

R1-R2 =

A

B

A3

B3

 

R2-R1=

 

 

 

R2-R1=

A

B

A7

B7

 

 

 

Note: -1) Difference operation is not commutative, i.e.,

 R1 - R2 ≠ R2 - R1

2) Difference operation is not associative, i. e.,

R1 - (R2 - R3) ≠ (R1 - R2) - R3

Posted Date: 3/6/2013 5:46:06 AM | Location : United States







Related Discussions:- Set difference, Assignment Help, Ask Question on Set difference, Get Answer, Expert's Help, Set difference Discussions

Write discussion on Set difference
Your posts are moderated
Related Questions
Define Signal. It allows methods to respond to events triggered by themselves or by other processes. Each signal corresponds to an exacting event. A signal is represented in Sy

What are uncommitted modifications? The immediate-modification technique permits database modifications to be output to the database whereas the transaction is still in the act

What are the uses of ODBC? Under what circumstances we use this technology? ODBC expose database capabilities within a standardized way to the application programmer by an ap

The JOIN operation is applied on two relations. When we want to choose related tuples from two given relation join is used. The join operation need that both the joined relations m

Which operator is used to compare a value to a list of literals values that have been specified? BETWEEN operator is used to compare a value to a list of literals values that h

Birla Institute of Technology & Science, Pilani Work-Integrated Learning Programmes Division Second Semester 2012-2013 EC-1 Assignment 2 (7.5% of the grade) Course No. : SS ZG

Explain Dynamic Two-Phase Locking Here a transaction locks a data item instantly earlier than any operation is applied on the data item.  After finishing all the operations on

Nested Queries Let us see some more complex queries in this section. Sub-queries: Some of the basic concerns of sub-queries are: A sub-query is a SELECT statemen

Example : Create a sequence named SEQSS that starts at 105, has a step of 1 and can take maximum value as 2000.  CREATE SEQUENCE SEQSS START WITH 105 INCREMENT BY 1 MAX VA

A table joined with itself is called ? A table joined with itself is known as self join table. Normal 0 false false false EN-IN X-NONE X-NONE