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

Define the terms entity type and entity set, Define the terms i) Entity typ...

Define the terms i) Entity type ii) Entity set Entity type: An entity type describes a collection of entities that have the similar attributes. Entity set: The set of all en

Relational database, Consider the following relational database: STUDENT (n...

Consider the following relational database: STUDENT (name, student#, class, major) COURSE (course name, course#, credit hours, department) SECTION (section identifier, course#, sem

ER DIAGRAM, NEED ER DIAGRAM WITH MINIMUM ENTITY AND RELATIONSHIP of Hospita...

NEED ER DIAGRAM WITH MINIMUM ENTITY AND RELATIONSHIP of Hospital Management System

Column constraints, Column Constraints: NOT NULL, UNIQUE, CHECK, PRIMARY K...

Column Constraints: NOT NULL, UNIQUE, CHECK, PRIMARY KEY, DEFAULT, REFERENCES, On  delete  Cascade :  Using  this  key  whenever  a  parent  row  is  removed  in  a referenced

Define partial, Partial Key : It is a group of attributes that can uniquel...

Partial Key : It is a group of attributes that can uniquely identify small entities and that are related to same base entity. It is sometime named as Discriminator.  Altern

Having clause-data manipulation language, Having clause This clause...

Having clause This clause is used for producing conditions on grouped information. Example: Find maximum salary and department number of those departments where maxim

Sql, Events4Fun is an event management company in Europe with branches in S...

Events4Fun is an event management company in Europe with branches in South America as well. The company is well-known for its efficiency, good-quality services, and affordable char

What is a state chart diagram, What is a state chart diagram? State dia...

What is a state chart diagram? State diagrams (State Chart Diagram) explain all possible states that a particular object can get into, and how object's state changes as result

Dataset, The dataset " CFOLYMPICS.XLS " contains the observations used in t...

The dataset " CFOLYMPICS.XLS " contains the observations used in the above article.  The definitions of the variables are also included in this spreadsheet.  However, for the purpo

Lossless-join decomposition, Lossless-Join Decomposition   Let us sh...

Lossless-Join Decomposition   Let us show an intuitive decomposition of a relation. We require a better basis for deciding decompositions since intuition may not always be r

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