Please bear with me as I am totally new to Rails AND sql. Let's say a want a database & application for a record collection (using sql and rails). If I want the database to contain information down to the length of a song, how can I implement this using the class = table model?
For example, the way I have the db now, ignoring rails, is a table "of Contents" listing all artists (one column). Each artist then has a table listing all their albums, several columns since we want the total length of the album and (since this is a digital catalog) a location where the actual album is stored. Then we need a table for each album listing each song, with the length. Going with the class=table model, that means I will be stuck with a separate class for every single artist and album, which is beyond ridiculous if not completely unworkable. But if I organize the material differently -- eg, a table "artist" with a column "albums" (fine, if they were just objects) some single table cell would have to contain a list of all the albums. Slightly awkward, since each album will then have to be parsed out of a string of albums, but more realistic. Then I would have a table "albums" with columns/methods "artist" and "songs". But when it comes down to including the length of each song, this methodology is gonna get dunder-headed. The former model makes much more sense anyway, from any perspective *except* it would appear to be unworkable with rails. Clearly I am missing something here, I hope. Anyone want to offer me a clue? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

