[eluser]september28[/eluser]
Hi there,
I have a quick question.
I have a db table that stores entries of posts. each post has a country assigned to it. e.g one post might have the country code "es". However, it is possible that the post has more than 1 country. It may have 3 or 4 of even about 20. eg a post may belong to the countries: es, gb, us, fr, gr, cn etc...
My question is this: should I just add the codes into the table separated by a comma (e.g. have a field called country that would be varchar and have "es,gb,us,fr,gr,cn" OR should I create a separate table with the fields id, post_id and country_id. I know that the second method would conform to the normal form rules however i expect there to be thousands of entrys in this table and I just wondered if it would be more efficient to do it the first way (avoiding a select statement that has to scan thousands of lines to get all of the country codes for each post)
Does anyone have an opinion??
Cheers,
Dan