Hi, I'm currently producing a web application with PHP and MySQL and would like to know your recomendations on the most efficient table structure to use. I have two tables which have a many-to-many link, so naturally I would have thought of a link table which picks of the Primary Keys from each table and puts them into a list. However, when programming this, it requires a hefty lot of MySQL Queries: I loop through the link table to find what links to what, and for each row, I must perform another query to find out what each is.

As of now, I have tempoarily set up a different table strucuture which simply copies over the data from the first table, but of course this not only causes data duplication, also possibly redundancy.

Can I ask for your views on how many queries is "too much", and which method you would prefer to go ahead with? Thankyou very much!

Edit: might this be more useful?:

SELECT table1.*, table2.*
FROM table1, table2
WHERE table1.id=table2.foreiginkey