Let say I have the following schema.
Table A has a 1-M relationship with Table B.
Table B has a 1-M relationship with Table C.
I want to get related rows from Table C by given
Table A's primary key. The following is pseduo
code from application layer.
1. Get all related rows from B by providing A's pk
2. For each row of B, get all rows from c.
U see if I have 1..n rows of B, then I have to
loop through 1..n times to retrieve Cs. All these
code is from app layer, and therefor it is
involved the network traffic..etc.
What is the best way to solve this problem?
Sent via Deja.com http://www.deja.com/
Before you buy.