English

Differentiate between union and Cartesian product.

Advertisements
Advertisements

Question

Differentiate between union and Cartesian product.

Distinguish Between
Advertisements

Solution

Basis of Difference Union Cartesian Product
Purpose Combines rows of two compatible relations. Combines every row of one relation with every row of another.
Requirement Both tables must have the same degree and compatible data types. The two tables need not have the same number of columns.
Resultant degree Same as the degree of either table. Sum of the degrees of both tables.
Resultant cardinality Number of distinct rows after removing duplicates. Product of the cardinalities of the two tables.
Operation type Adds records vertically. Combines records horizontally.
shaalaa.com
  Is there an error in this question or solution?
Chapter 9: Databases Concepts and SQL - EXERCISE [Page 174]

APPEARS IN

CBSE Computer Science with Python [English] Class 12
Chapter 9 Databases Concepts and SQL
EXERCISE | Q 20. | Page 174
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×