Advertisements
Advertisements
Question
Explain Cartesian Product with a suitable example.
Answer in Brief
Solution
- Cross product is a way of combining two relations.
- The resulting relation contains, both relations being combined.
- A x B means A times B, where the relation A and B have different attributes.
- This type of operation is helpful to merge columns from two relations.
studno | name | studno | subject |
cs1 | Kannan | cs28 | Big Data |
cs2 | Gowri Shankar | cs62 | R language |
cs4 | Padmaja | cs25 | Python Programming |
Cartesian product; Table A x Table B
studno | name | course | subject |
cs1 | Kannan | cs28 | Big Data |
cs1 | Kannan | cs62 | . R language |
cs1 | Kannan | cs25 | Python Programming |
cs2 | Gowri Shankar | cs28 | Big Data |
cs2 | Gowri Shankar | cs’62 | R language |
cs2 | Gowri Shankar | cs25 | Python Programming |
cs4 | Padmaja | cs28 | Big Data |
cs4 | Padmaja | cs62 | R language |
cs4 | Padmaja | cs25 | Python Programming |
shaalaa.com
Relational Algebra in DBMS
Is there an error in this question or solution?