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
ER diagram on cosmetics

Define Single Value and Multivalued attribute Single value attribute comprise a single atomic value for an entity and multivalued attribute may have much more than one value f

Hierarchical model is also known by? A hierarchical model is also known as a Tree structure.

Normalize the following tables upto and including the 3NF. Submit a 1 page printout of only the final set of normalized tables in Data Architect. Just use Data Architect to do the

Prepare Heart Failure Registry database How are you today? Please I would like you to design a Heart Failure registry where doctors will log in to enter information about their

What is an object design? Object design is a very interactive method, which decides the relationship among objects, classifies operations on classes, determines overall system

What are stored-procedures? And what are the advantages of using them? Stored procedures are database objects that perform a user defined operation. A stored procedure can have

Explain the ISA relationship Answer: ISA relationship - ISA notation is employed in generalization/ specialization to depict relationship among lower and higer level entity s

Define Query Processing Query processing is the process of selecting the best plan or strategy to be employed in responding to a database request. The plan is then executed to

Index And Tree Structure Let us talk about the data structure that is used for creating indexes. Can we use Binary Search Tree (BST) as Indexes? Let us initial reconsider