Ok this is nothing related to
JDBC but more a database design q.
I have say, a 'news' table with 'sites' as one if its column,
a news item can be assigned to more than one site and so 'sites' column contains a 'list' of all site ids that this news item is assigned to.
so whenever there is a query to get all itesm related to a site, we need to do a 'like' and use regexp such as like 'sid,%' or '%,sid,%' or '%,sid' etc.
I know this is a bad design, that the news-site association should be stored in a different table etc etc... but that implies all 'getnews' queries then will have to be 'join's between news and site tables.
And if there are any such dependencies, say another field called 'categories' then teh ideal design would be to add another 'categories' table in the join to get news items for a site and a category...
And so on...
Can anybody convince me that NO MATTER WHAT, storing the ids as a list in a single column and using 'like' for searches is ALWAYS a bad idea and always a performance hit compared to the multiple table joins solution???