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_NOB_NAMEAMOUNT
L-170DELHI3000
L-230KANPUR4000

Table : BORROWER

CUST_NAMELOAN_NO
JOHNL-171
KRISHL-230
RAVYAL-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.