[DATABASE] Difference between intersect and union

I have two relations namely PROPERTY and LEASE, see the PROPERTYNO attributes returned from PROPERTY and LEASE respectively:
Screenshot 2018-11-30 at 8.30.55 PM
Screenshot 2018-11-30 at 8.31.09 PM

In intersect, tuples which exists in both relations will be displayed removing duplicates.
Screenshot 2018-11-30 at 8.33.54 PM.png

In union, all tuples from property and all tuples from lease will be displayed removing duplicates:
Screenshot 2018-11-30 at 8.35.23 PM.png


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s