mgm_03 Posted June 20, 2003 Share Posted June 20, 2003 My application has many categories and subcategories with which I need to match with businesses. After giving it alot of thought, I don\'t see how to avoid creating many tables, each being a map of many-to-many relationships. From my understanding, many2many has disadvantages but I\'d like to know why. Can anyone enlighten me so I don\'t regret this strategy. Using \"1 to many\" will require between 100 and 200 tables so, it doesn\'t appeat to be an elegant solution :? Quote Link to comment Share on other sites More sharing options...
shivabharat Posted June 21, 2003 Share Posted June 21, 2003 How do you implement one-to-one, one-to-many and many-to-many relationships while designing tables? One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships.One-to-Many relationships are implemented by splitting the data into two tables with primary key and foreign key relationships.Many-to-Many relationships are implemented using a junction table with the keys from both the tables forming the composite primary key of the junction table. It will be a good idea to read up a database designing fundamentals text book. Quote Link to comment Share on other sites More sharing options...
mgm_03 Posted June 21, 2003 Author Share Posted June 21, 2003 Thanks for trying to help me with this. I have read the books about database design and normalizing, etc. I understand it all but one book made a point to say that you should avoid making tables that have many2many relationships. I know how they\'re made and how to use them but before I implement it I just want to know if down the road, after insertions, updates, deletes, etc....will this approach turn out to be a nightmare....OR, should I force every table into a one-to-many structure. sorry if I wasn\'t being clear on that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.