0

The simplified design of the db schema is something like this:
Document (did)
Category (cid)
Tag (tid, cid) // a tag belongs to a category
DocumentTag(did, tid) // a document may have one or more tags, a tag may be assigned to more than one documents

Now given a list of tags, I want to select documents belonging to any of the tags within in the same category, and belonging to all categories defined by the tags.

Any suggestion?

Thanks

4

0 回答 0