i learnt basics of mysql
, i'm wondering this:
i have user table id, name , gender.
i want store unlimited number of websites each user don't know how store them or put them.
can store sites in 1 cell, create new column each site? correct approach considering later i'll have able process info? example check if user added particular site, count how many websites each user has, etc.
the correct approach create second table, 2 fields - user id , website.
then when want websites user x, second table find rows user id matches.
Comments
Post a Comment