People,
    I have a design question. It is regarding the retrieval of parent and
child objects in the best possible manner. For eg. Let's say there is a
Person object with properties such as ssn, lastName and firstname. It also
has a list child objects ( "Address" ) of addresses and a list of previous
employees ( "Employee" ). The Person, Address and Employee objects are
separate tables in the DB linked thru ssn.

Now what do you guys think is the most efficient way of retrieving a
complete Person. 

The simplest way is ofcourse issue 3 queries one for person, other for the
list of address and the third for previous employees. But this does not
scale well with increasing size of the table data. For 100 rows of Person
201 queries are issued. 1 which gets 100 persons, 100 each for there
subequent address and previous employees. Similarly for a 1000,  2001
queries. 

Complex queries may be a solution which relies on filtering the resultset
but is there a more simple and intelligent approach.

Is there a problem with the inherent design itself or is this a common
problem.

Thanks and Regards
Avinash

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to