Sunday, May 20, 2007

Data Diagrams

I'm feeling a small wave of confidence come over me after understanding something about migrations and how to work with multiple tables. I'm sure it will pass soon. (Note: wave of confidence passed before this entry was finished....) Here's my preliminary idea for the data structure.

Language
  • name
  • has_many: Modules
Module
  • language_id
  • name
  • level
  • number
  • has_many : Pages
Page
  • module_id
  • number
  • has_many: Units
Unit
  • page_id
  • transcription
  • speech_url
  • image_url
I think I'm also going to need tables for the images and the sound files. These will probably have to be more complicated later to allow for searches, but for now...

Speech
  • transcription # these are repeated from Unit because they don't store the same thing
  • sound_url # someone might want different text (eg, two different writing systems)
Image
  • image_url

Whew. I'm a little concerned about how I structured the main data, but I wanted to leave it as open as possible to make recoding easier later. This also seams to fall into the agile philosophy.

No comments: