Set difference, Database Management System

Assignment Help:

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


Related Discussions:- Set difference

Describe integrity and security, Describe integrity and security? a)   ...

Describe integrity and security? a)      Domain constraint b)      Referential integrity A value that appears in one relation for a given set of attributes also appear fo

Query optimization, what is meant semantic query optimization? how does it ...

what is meant semantic query optimization? how does it differ from other query optimization techniques?

Answer, what is database management system? & why it is required?

what is database management system? & why it is required?

Linear commit protocol, With the linear commit protocol, sites are connecte...

With the linear commit protocol, sites are connected in a chain, and the subtransaction at the left-hand end of the chain initiates the protocol. Propose a crash recovery protocol

Object-based models - data models, Object-based Models: Use objects as key ...

Object-based Models: Use objects as key data representation components . Examples:-   Entity-Relationship Model: It is a collection of real world objects known as entitie

Backup - restore utilities, These are designed to reduce the effects of a d...

These are designed to reduce the effects of a database failure and make sure a database is restored to a consistent state if a failure does arise. Manual backup/restore utilities n

Relationships, Let us first describe the term relationships. What Are Re...

Let us first describe the term relationships. What Are Relationships? A relationship can be defined as: A set of associations or connection, or A rule for communic

Define weak and strong entity sets, Define weak and strong entity sets?  ...

Define weak and strong entity sets?  Weak entity  set:  entity  set  that  do not  have  key  attribute  of  their  own are  known as weak entity sets.  Strong entity set

Write query to select student from math department, Consider the table stud...

Consider the table student and list names of students in the departments other than maths and computer. SELECT std_name FRM student WHERE dept_name NOT IN (‘Maths','Computer);

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd