Steve Martocci
2008-Mar-09 15:00 UTC
Active Record attributes (has_many vs serialization vs sti)
I have a set of STI models, each have slightly different attributes. While I could create a row for each one, I feel that there may be too much null data in the database. At the moment I setup a has_many to a parameters table which stores key value pairs. I want to find the best solution for performance and simplicity. 1) STI for each field (I think new fields will be needed more than not, and will require a lot of migrations) 2) Parameters has_many association. Seems like overkill, not sure if I am getting a performance hit here. 3) Serialize params via YAML or Marshal Any recommendations? Performance is primary concern, simplicity second. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---