I have the following tables structure:
Item:
Id,
Description
Tags:
Id,
TagName
ItemXrefTag
Id,
TagId,
ItemId
What is the best way to read all the items related to some tag and all other tags, related to the items, to be able to display list of items and all the tags related to the item?
If it's not clear I`ll give the example:
Item, Tags:
Code complete, book|programming|cool
Reactoring, book|programming|refactoring|cool
C# for dummies, book|dont like it| not cool
P.S. I'm using subsonic, but as it support getting data fro mthe query Im ok with the query that will let me get all the data. Sure I can perform join and iterate through multiple lines Ill get and make collection of items with collection of tags for each of it. Im just interested in the most efficient way to implement this.