MySQL Forums
Forum List  »  PHP

Re: many to many relationships and PHP
Posted by: Robert S
Date: May 07, 2009 02:37AM

Thanks - it's good to know that I'm on the right track. I would also like to do most of the work in MySQL if possible - I'll have to look more on how the queries are performing with the EXPLAIN option and check if I have the indexes setup efficiently. I think I'm worried that if the data model is more like a book can have many to many relationships with authors, publishers, genres, etc., I'll have to process large result sets. So if I had a book with two authors and two publishers and one genre, I would have a result that looked like:

Book 1: 'title', 'author1', publisher1', 'genre1'
Book 1: 'title', 'author2', publisher1', 'genre1'
Book 1: 'title', 'author1', publisher2', 'genre1'
Book 1: 'title', 'author2', publisher2', 'genre1'

and if there were even more many to many relationships and more authors and publishers, etc., things just seem messy to me.

Anyways, if anyone else has any recommendations, please let me know!

Robert

Options: ReplyQuote


Subject
Written By
Posted
Re: many to many relationships and PHP
May 07, 2009 02:37AM


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.