Portal Home > Knowledgebase > Articles Database > Row based vs Column based configuration table - pro vs cons ?


Row based vs Column based configuration table - pro vs cons ?




Posted by OpenInternet-Vince, 03-02-2010, 07:03 PM
Planning for a new application and was wondering the pros and cons for row based configuration table and a column based configuration table in mysql. I've been using column based configuration for my last few applications and I don't see any cons to it other than the initial row may become very long horizontally when doing a SELECT * So is there a significant performance, usability issue when it comes down to row vs column ?

Posted by larwilliams, 03-02-2010, 07:51 PM
Unless you have a huge table, I doubt either choice would be much different in real world performance. Personally, I prefer to have one row per setting and the columns being "settingname" and "settingvalue". It just seems more organized to me.

Posted by HivelocityDD, 03-03-2010, 12:01 PM
I agree with the above comment. If you are using multiple rows for each settings it will be more orgamized. Another advantage is you can have many attributes for a setting other than name and value. Say id, name, value, status, position etc. When it comes to a DB driven CMS or some thing

Posted by TheSimpleHost-Nathan, 03-03-2010, 12:36 PM
Plus you can add a new row into the table without altering the table itself.

Posted by OpenInternet-Vince, 03-03-2010, 06:27 PM
Thanks for the replies. After much thought about it, I think the biggest advantage is having able to add in settings without altering the table.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Gnax Network down?? (Views: 415)
Quickpacket Down ? (Views: 421)

Language: