another database structuring question, hope you guys dont mind :D
i am having this video quiz on my web, with this kind of flow:
- the viewer will watch a video
- that particular video has a question attached to it
- and it also has 2 questions, one of them is false and of course the other is true
so far i have figured out two database design for this
the 1st one is:
table: video
fields: id, filename, type, size, created
table: question
fields: id, question, right_answer, wrong_answer, video_id
the 2nd one, i am separating the question and the answer on each different tables
table: video
fields: id, filename, type, size, created
table: question
fields: id, video_id, question
table: answer
fields: id, answer, video_id, status
the status field in answer's table is to indicate whether the answer is right or wrong, probably using tinyint by the value of 0 and 1
which one would you guys recommend me as a better approach and why, and since i don't really understand database normalization, is there any easy to understand article so that i can improve my knowledge regarding that, any help would be much appreciated, thanks
Regards
Update:
thank you everybody for pointing out a better approach for my database design, since everyone is suggesting that i should use boolean or bit as field type and i always use tinyint for fields like this before :p, so i search over for a solution on what type should i use in mysql to represent boolean, and i stumble upon this Which MySQL Datatype to use for storing boolean values from/to PHP? and according to the answer of that question i should use tinyint(1), so i guess it's safe to say that i will keep using tinyint for now :p
thanks again everyone