silverbadger Posted November 21, 2008 Share Posted November 21, 2008 I've been working with MAMP on MAC and find it amazing. However I am now faced with designing a database for a client that looks like the following: customer needs to: see categories (eg plylining), then click on manufacturer (eg citroen), then vehicle (eg Citroen 96>02), then variation (short wheel/medium wheel etc) and see an image and description. I am stumped as to how to set this database up. Can someone please help Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/133581-database-question-noob/ Share on other sites More sharing options...
xtopolis Posted November 21, 2008 Share Posted November 21, 2008 Read up on database normalization: http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html You will be looking at "one-to-many" and "many-to-many" relationships between data. ie)Plylining could be manufactured by Citroen, and SomeOtherManuf, and AnotherManuf Therefore, Plylining has a "one-to-many" relationship with the manufactures. Graphically [pre] +-- Citroen [plylining] -------+-- SomeOtherManuf +-- AnotherManuf [/pre] Link to comment https://forums.phpfreaks.com/topic/133581-database-question-noob/#findComment-694893 Share on other sites More sharing options...
DarkWater Posted November 21, 2008 Share Posted November 21, 2008 You'd want an intermediate table to handle the many-to-many relationships: categories ------> categories_manufacturers <------- manufacturers Link to comment https://forums.phpfreaks.com/topic/133581-database-question-noob/#findComment-695116 Share on other sites More sharing options...
silverbadger Posted November 21, 2008 Author Share Posted November 21, 2008 Excellent. Thank you. Will get to grips with the many to many. Thanks again. Link to comment https://forums.phpfreaks.com/topic/133581-database-question-noob/#findComment-695243 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.