What is the Cartesian product operation algebra What is the-01340
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. 7.
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:
R X SThe 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 and C 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 is also commutative and associative. For Example there are two relations COURSE and STUEDNT
COURSE
crId | courseTitle |
C3456 | Database Systems |
C4567 | Financial Management |
C5678 | Money & Capital Market |
STUDENT
stId | stName |
S101 | Ali Tahir |
S103 | Farah Hasan |
COURSE X STUDENT
crId | courseTitle | stId | stName |
C3456 | Database Systems | S101 | Ali Tahir |
C3456 | Database Systems | S103 | Farah Hasan |
C4567 | Financial Management | S101 | Ali Tahir |