हिंदी

From the following two tables, write the output of the Cartesian product. Also write primary key of customer and product table. Customer Cust. No. 111 222 333 444

Advertisements
Advertisements

प्रश्न

From the following two tables, write the output of the Cartesian product. Also write primary key of customer and product table.

                                   Customer

Cust. No. Name Address Phone No.
111 Rohan Aggarwal Delhi 28756389
222 Kanika Jain Delhi 29807654
333 Keshav Gupta Mumbai 25678945
444 Dharna Bambay 24675678

                 Product

P. No. P. Name Price Qty
101 Computer 35000 3
103 Scanner 20000 2
105 Printer 15000 1
विस्तार में उत्तर
Advertisements

उत्तर

Primary keys:

  • Customer table: Cust. No.
  • Product table: P. No.

The Customer table has 4 rows and the Product table has 3 rows. Therefore, the Cartesian product has 12 rows and 8 columns.

Cust. No. Name Address Phone No. P. No. P. Name Price Qty
111 Rohan Aggarwal Delhi 28756389 101 Computer 35000 3
111 Rohan Aggarwal Delhi 28756389 103 Scanner 20000 2
111 Rohan Aggarwal Delhi 28756389 105 Printer 15000 1
222 Kanika Jain Delhi 29807654 101 Computer 35000 3
222 Kanika Jain Delhi 29807654 103 Scanner 20000 2
222 Kanika Jain Delhi 29807654 105 Printer 15000 1
333 Keshav Gupta Mumbai 25678945 101 Computer 35000 3
333 Keshav Gupta Mumbai 25678945 103 Scanner 20000 2
333 Keshav Gupta Mumbai 25678945 105 Printer 15000 1
444 Dharna Bambay 24675678 101 Computer 35000 3
444 Dharna Bambay 24675678 103 Scanner 20000 2
444 Dharna Bambay 24675678 105 Printer 15000 1
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 9: Databases Concepts and SQL - EXERCISE [पृष्ठ १७४]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
अध्याय 9 Databases Concepts and SQL
EXERCISE | Q 24. | पृष्ठ १७४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×