Explain cartesian product with example-01304

Online Quiz This subjective question is related to the book/course vu eng201 Business and Technical English Writing. It can also be found in vu eng201 Mid Term Solved Past Paper No. 4.

Question 1: Explain cartesian product with example.
Answer:

Cartesian product:

The Cartesian product needs not to be union compatible. It means they can be of different degree. It is denoted by X. suppose there is a relation R with attributes (A1,A2,...,An) and S with attributes (B1, B2, …, Bn). The Cartesian product will be:

  1. R X S

The resulting relation will be containing all the attributes of R and all of S. Moreover,all the rows of R will be merged with all the rows of S. So if there are m attributes andC rows in R and n attributes and D rows in S then the relations R x S will contain m +n columns and C * D rows. It is also called as cross product. The Cartesian product isalso commutative and associative. For Example there are two relations COURSE and STUEDNT.

[Cource]

  1. crId, courseTitle

[Student]

  1. stId, stName

[Course x Student]

  1. crId, courseTitle, stId, stName

Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background