peterbz Posted March 31, 2009 Share Posted March 31, 2009 I have a CMS site about cars with categories such as wheels, auto parts, used cars, etc I was wondering if I should have a EAV table design as the wheels, auto parts, used cars all have different attributes. Now, each of the auto parts, cars, wheels, etc also have their own categories, which would mean that creating a single Categories table very efficient. However, I just read the sticky on Anti MySQL Design Patterns and it frowns on EAV and insists on separating them into different tables, which would also mean separating the categoriy table into 3 or more (for each of the auto parts, wheels, used cars, etc). Now I can see that having them in separate tables makes life a lot easier when retrieving data as the number of joins and detecting if it's a int, char, etc would be a nightmare. However, having everything in a central table seems to be easier for searching and also easier to maintain if things ever needed to be moved around or change (also, other tables such as Images can easily reference items from a central table with one id). This is why I'm very lost and don't know which design to use. Can anyone please give me some advice? Quote Link to comment https://forums.phpfreaks.com/topic/151893-eav-table-design-or-not/ Share on other sites More sharing options...
fenway Posted April 2, 2009 Share Posted April 2, 2009 Well, won't ech individual part have different properties & attributes, too? Quote Link to comment https://forums.phpfreaks.com/topic/151893-eav-table-design-or-not/#findComment-799317 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.