Re: Handling many one-to-many relationships
Posted by: Frank Jonas
Date: December 14, 2007 06:42AM

Hi,

It should not be so hard to get one resultset over all five or more tables.

SELECT * FROM t1, t2, t3, t4, t5 WHERE
t1.fk_t2 = t2.id AND
t1.fk_t3 = t3.id AND
t1.fk_t4 = t4.id AND
t1.fk_t5 = t5.id;

* should be replaced by the fields you need.

It seems to be more simple then your solutions with solution with the large number of queries. And one table with all data will bring you mere problems than a long field list. It will increase the work, when you want to change an item that you save in another table.

HTH
Kind regards
Frank

Options: ReplyQuote


Subject
Written By
Posted
Re: Handling many one-to-many relationships
December 14, 2007 06:42AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.