I have about 1 million data in users table.
Now I want each user can have multiple colors their like.
Example user_id = 1 like color blue, green, yellow, black etc. So here what is the good database structure to store this color value?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If each user can have any number of colors, then you should create another table, something like this:
Then each user can have any number of colors, so if a user has three colors associated with them, they will have three entries in the
userColorstable.