CBSE · 083Class XII · 2023Section C3 marks
Question 26(1)
30 March 2023 · Computer Science (083)
Consider the following tables – LOAN and BORROWER :
Table : LOAN
| LOAN_NO | B_NAME | AMOUNT |
|---|---|---|
| L-170 | DELHI | 3000 |
| L-230 | KANPUR | 4000 |
Table : BORROWER
| CUST_NAME | LOAN_NO |
|---|---|
| JOHN | L-171 |
| KRISH | L-230 |
| RAVYA | L-170 |
How many rows and columns will be there in the natural join of these two tables ?
Answer
Rows : 2
Columns : 4
Explanation
Natural join matches rows on the common attribute LOAN_NO. L-170 and L-230 match in both tables (2 rows); L-171 has no match. Columns = (LOAN_NO, B_NAME, AMOUNT, CUST_NAME) — the shared LOAN_NO appears only once.