I have a table for the users on my site. The table consists of the the columns
user_id, fname, lname, email, password, interest1, interest2, interest3, interest4,
interest5
Now, It’s turning out to not be so practical to store the interests individually like so. What is a better way to do this. A way that keeps it easy to edit/access user interests?
Thanks.
Database normalization does what you want.
You’d create a new
intereststable with structure like this:Then, you can get all the interests for a given user with a query like this: