"question_id": 58640
"tags": ["polls", "fun", "quotes"]
"title": "Great programming quotes"
"question_id": 184618
"tags": ["polls", "fun", "comment"]
"title": "What is the best comment in source code you have ever encountered?"
"question_id": 3734102
"tags": ["c++", "linux", "exit-code"]
"title": "Why cant' I return bigger values from main function ?"
"question_id": 2349378
"tags": ["communication", "terminology", "vocabulary"]
"title": "New programming jargon you coined?"
"question_id": 3723817
"tags": ["open-source", "project-management", "failure", "fail"]
"title": "How to make an open source project fail"
"question_id": 3699150
"tags": ["testing", "interview-questions", "job-interview"]
"title": "Interview question please help"

Case a text extract some questions which i got while using SO API.

To create this question-able, I wish to use SQLite to keep the information.

How must i keep tags column?

Because the limit here on Same with five tags, I'm able to use five posts tag1, tag2 ..., however i think there'd be some thing elegant that you can do. Something which scales to a variety of tags being there, and may also handle fundamental queries like

select title from table where tag has "c++" and "boost" but not "c"

This can be a many to a lot of relationship : questions have multiple tags, tags can be displayed in multiple questions. Which means you need to create three tables, one for that questions, one for that tags, and something for that links between these tables. The resulting query would seem like this:

SELECT title FROM question
       INNER JOIN question_tag_link USING (question_id)
       INNER JOIN tag USING (tag_id)
            WHERE tag_name IN('c++', 'boost')
              AND NOT EXISTS(
           SELECT * FROM tag t1
            WHERE t1.tag_name = 'c'
              AND t1.question_id = question.question_id);

Not too simple, but It may be the cost to pay for if you won't want to be limited. If you will find under 64 different tags, you could utilize the SET area type, however, you would loose greatly versatility (difficult to give a new tag).

alt text

select distinct a.QuestionTitle
from
(
select q.QuestionID, QuestionTitle, TagName 
from QuestionTags as x
join Question     as q on q.QuestionID = x.QuestionID 
join Tag          as t on t.TagID      = x.TagID 
where TagName in ('c++', 'boost')
) as a
left join
(
select q.QuestionID, QuestionTitle, TagName 
from QuestionTags as x
join Question     as q on q.QuestionID = x.QuestionID 
join Tag          as t on t.TagID      = x.TagID 
where TagName = 'c'
) as b on b.QuestionID = a.QuestionID
where b.QuestionTitle is null
order by a.QuestionTitle ;