Alex Rivera | Logout

Store list of values (such as interests)

Asked 2011-10-14T10:24:34.960
20

I've got a table of

Users: (ID, FNAME, LNAME, INTERESTS,...)

plus another table to hold the specific set of INTERESTS they can choose from: Film, TV, Radio, Stage, Standup.

They can have more than one interest, so how can I store this information in the Users INTERESTS's field? Or what is the best alternative method to achieve this?

Edit
Report

1 Answer

3

the best solution to this is to use 3 tables (a third one for storing the connection of interests to useres):

user (id, name)
interest (id, description)
user_interest (user, interest)

this is called database normalization.

answered 2011-10-14T10:26:41.767

Your Answer