I am working on a website, some of the features are similar to Stackoverflow.
One of them is a few elements of the type (in SO they assume several questions).
Each element is associated with several values of a different type (City). (Assume that each quest is associated with several tags. A tag is an entry from the say Tags table).
Hence my tables:
Cities(Id, Name, IsAcive) MyItems(Id, DisplayText, AciveInCities)
Here, one myitems entry can be active in several cities.
My question is how to define the AciveInCities column in the database. Comma-separated CityIds or comma-separated city names or some where in different tables?
This is a web application in which I would like the user to be able to search MyItems by city. Therefore, storing cityname / id in one table can be quick.
Are there any issues with any of these three approaches?
If this is a duplicate question, please redirect me to fix one, I could not find it.
thanks
source share