Devin M wrote in post #978802:
> Consider the following scaffold for a virtual machine manager.
>
> rails g scaffold virtualmachine total_memory:integer
> total_disk:integer
> rails g scaffold plan title:string price_usd:integer
> max_memory:integer max_disk:integer
>
> Now this is greatly simplified however I have around 30 values that I
> want to track for each virtual machine and for the plans as well.
> What would be the best way to do this?
It actually might depend on your design. Are these 30 some values going
to be a fixed list?
If all virtual machines in your system use the same list of attributes,
then putting them in columns is fine. It's certainly the simplest design
that could possibly work.
However, if different virtual machines may have a different set of
attributes, or if you want to be able to dynamically add new attributes
to the running system, without code changes, then it might be worth
architecting a more flexible design for your tables.
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment