i have a question. I have a site where users can select their top 10 skills. Basically the form consists of 10 different check boxes and the users can check as many as they want where each check box corresponds to a particular skill.
Now this is my question. After the users select their skills, should i get the check box values and concatenate them into one string seperated by comma's and store that one string in one text field of the database or should i have 10 different columns in the database to store these values. Is this a good practice.
Now based on these values, I need to perform a keyword search to find a user of a particular skill.
What I was planning to do is to store all the skills of a particular user as one string (seperated by comma) in the database. And while searching by keyword , retrieve this string stored in the database and check if the entered keyword exists in that string or not.
I would really appreciate any advice on the same. Is this the best way to do it. The programming language i'm using is java and the database is mysql.
Personally, I wouldn't. From a size point of view, saving a boolean value for each skill is likely to be far more efficient than having a VARCHAR field that you have to encode/decode on every change and it'll also make searching much slower.
In my mind the only question is whether this list of available skills could change, in which case you'll probably need an intersection entity: