Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- When to use a new Field and when to use a new Table


yaix2 - 2:54 am on Jan 10, 2011 (gmt 0)


If you add all favorites as a comma separated list into a user's table row, then it is not possible to search, on who's favorite list a particular user appears. You may want to tell a user "you are on these people's favorite list" so they can add them as well.

So its definitely better to put it into a separate table. The favorites table would be very small anyway, two INT columns probably, with the two user's ID numbers, and both should be indexed.


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4250823.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com