MySQL Forums
Forum List  »  MySQL Workbench

Best practice - variable number of fields
Posted by: Vlad Gotlib
Date: July 03, 2009 08:45AM


I am recording user's hobbies. I have a reference table with the unique hobbies. In my "UserHobbies" table I need to associate each user with his list of hobbies. Should I have separate integer fields to record their hobbies, like "Hobby1", "Hobby2" etc (let's say up to 10, leaving extra unused ones blank), or should I have just one varchar field "Hobby" where I concatenate the hobbies separated by semicolons? Which is a best practice for such a necessity?

Much appreciated.

Options: ReplyQuote

Written By
Best practice - variable number of fields
July 03, 2009 08:45AM

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.