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
What is the main goal of RAID technology? Describe the levels 1 through 5. RAID stands for Redundant Array of Inexpensive (or sometimes "Independent")Disks. RAID is a met

Primary Key The primary key is the candidate key that is selected by the database designer as the principal denotes of identifying entities within an entity set. The left candi

Explain cursors in SQL? Cursors in SQL - An object used to store the output of a query for row-through-row processing through the application programs. Cursors are constructs

What sorts of tables one can se in designing the hierarchy of a LDB? Tables, which are having Foreign Key relations.

Convert the following ER - diagram (Entity Relationship Diagram) into a relational database (the primary keys are underlined): 2160_Convert the following ER - diagram into a

What is difference between primary index and secondary index? Primary Index a) It is an ordered file whose records are of fixed length along with two fields. b) Only base

What do you mean by persistence? How you will make your data persistent? Persistent data is the data, which has a longer lifetime than program which has created it. Enabling th

An employee record has the following structure struct employee { int eno; char name[22]; float salary; char dept[10];}; (i) Calculate the record size R in bytes.

Implementing software control To implement software control designer must redesign strategy of state event model which is present in dynamic model. There are three basic ap

Explain DML with some examples? DML - Data Manipulation Language: statements used for managing data within schema objects. Some examples: • SELECT - retrieve data from the a da