Informatics Practices
A table STUDENT has 4 rows and 2 columns and another table TEACHER has 3 rows and 4 columns. How many rows and columns will be there if we obtain the Cartesian product of these two tables ?
SQL Joins & Grouping
2 Likes
Answer
To obtain the Cartesian product of two tables, we multiply the number of rows in the first table by the number of rows in the second table, and the resulting table will have the sum of columns from both tables.
The Cartesian product of "STUDENT" and "TEACHER" will have 4 * 3 = 12 rows and 2 + 4 = 6 columns.
Therefore, the resulting Cartesian product will have 12 rows and 6 columns.
Answered By
1 Like