Lets take stackoverflow as an example:
Post
Postid Title Mess
--------------------------------------------------
1 Title1 This is a question
2 Title2 This is a question1
3 Title3 This is a question2
4 Title4 This is a question3
5 Title5 This is a question4
6 Title6 This is a question5
Tags
TagId PostId Name
-----------------------------
1 1 Tag1
2 1 Tag2
3 1 Tag3
4 1 Tag4
5 2 Tag5
6 3 Tag6
7 4 Tag7
8 5 Tag8
9 6 Tag9
10 3 Tag10
In this design how would I get all the questions with its associated tags in one query. is this even possible?
*Edit*
select t.*, p.* from Tags t
join post p on t.postid=p.postid
Something like this would give me all the tags for each question. But I don't think this is efficient. What do you think.