I have a parent table and a child table with one-to-many relationship. Each parent record is related to one or more child records.
For example each record in PEOPLE (parent table) has one or more records in PHONE (child tables).
I have an application which generates an XML file from the result object returned from the PEOPLE table. The structure of the output is like
If I run a simple query on the PEOPLE table due to the association with the PHONE table, it runs a series of associated select on the child tables. To avoid this I make use of from the parent table onto the child table. But when I run this query I get duplicated entries for each record which has more than one phone number.
I think I have to make use of tuple queries to remove this duplication in results, but not sure how to do it. Can anyone suggest me the approach to do it.