I have three types of questions:
- Vocab (represented by
- Grammar (represented by
question:[list, of, answers])
- Listening (represented by
question:answer--where value is an
I avoided the term
key:value here since I'm not sure dictionaries can store audio.
Mi pregunta es:
How can I model this set of tables into a manageable design?
languages lessons lesson_types ========= ======== ============ lang_id lesson_id lt_id lang_name lang_id lt_name lesson_name lt_desc lt_id
And that's the simple part.
The part I am having trouble understanding is how I can serialize different types of objects in python to overcome the differences each type of question proposes. In a strict, DBMS-only approach, I would use a separate table for each type of question (since BLOBs hold audio, grammar questions can have upwards to a dozen parts to describe its tense, gender, etc). I'm excited to see what
sqlalchemy is able to do in terms of simplifying a database's structure.
How can I go about designing a
questions table that can handle dictionaries así como as serializable,
sqlite3-friendly audio formats?
preguntado el 01 de febrero de 12 a las 22:02
What's wrong with a table Questions
(question_id, question_text), a table Answers
(question id, answer_text), and a table Audio_Answers
(question_id, audio_blob)? (That is: Each Answer row contains uno question id, and uno answer. Where a question has multiple answers, there will be multiple entries the answer table for that question. This applies in the exact same way to the Audio_Answers table.)
That would allow you to model all three types of question with maximum flexibility. questions with a single or multiple answers can be handled in the exact same way. The two answers tables hold all of the answers, one answer per row.