Create fields or create new tables

Hi,

I have a table called ‘user’. It’s to store the user’s information, and I want to store the path of user’s avatar and user’s pages in the social media such as Facebook and Twitter. What is the correct way to store these information, is it to create fields within the user table or create a new table for each data? I mean a table called ‘avatar’ and ‘social_media’ and link these tables to user table. What is the better way? Thanks :smile:

add the new columns to the user table

separate tables might make sense if each user could have hundreds of social media pages, but for just a few, you’ll be fine with one table

1 Like

Just please, don’t put them all in one field !
i.e.
social_media varchar … —> No
facebook varchar …
twitter varchar …
etc. → Yes

Okay thanks, after I read some articles, I found that no need to create new tables because the data is won’t change for each user :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.