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

Sql select employee from table with at least one department, Consider emplo...

Consider employee (e_no, e_name, e_salary, d_code), dept (d_code, d_name) and dependent (depndt_name, e_no, relation). Show the names of employees in purchase and accounts departm

What is called a query -execution engine, What is called a query -execution...

What is called a query -execution engine? The query implementation engine takes a query evaluation plan, implements that plan, and returns the answers to the query.

01a_ImportCasting.xlsx, 01a_Broadway_LastFirst_yyyy-mm-dd Capstone Exercise...

01a_Broadway_LastFirst_yyyy-mm-dd Capstone Exercises You work as a production assistant in the office of the Green Man Theatre. One of your duties is to maintain the company datab

State the terms designing the database and normalization, State the terms D...

State the terms Designing the database and Normalization Designing the database: Out of the ERD we have formed, it is very easy to verify the tables, the attributes which the

List any eight applications of dbms, List any eight applications of DBMS. ...

List any eight applications of DBMS. a) Universities b) Airlines c) Banking d) Credit card transactions e) Tele communication f) Sales g)Finance h) Manufac

Define the canonical cover, Define the Canonical cover Ans: A canonical...

Define the Canonical cover Ans: A canonical cover F c for F is a set of dependencies like F logically implies all dependencies in F c , and F c logically entails all dependen

horizontal fragmentation, Horizontal Fragmentation- Horizontal fragmentati...

Horizontal Fragmentation- Horizontal fragmentation groups together the tuples in a relation that are collectively used by the main transactions. A horizontal fragment is produced b

Differentiate between natural join and outer join, Differentiate between na...

Differentiate between natural join and outer join? Natural join is a binary operator which is written as (R * S) where as R and S are relations. The output of the natural join

Question, I want to buy this but I want to see a couple sample questions fi...

I want to buy this but I want to see a couple sample questions first. http://www.expertsmind.com/library/what-happens-to-rms-error-for-the-training-data-set-51564843.aspx

Write a qbe query to display names of cs department, Consider a table stude...

Consider a table student (std_id, std_name, date_of_birth, percent_marks, dept_name). Write a QBE query to display names of Computer Science department students who have scored mo

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