Why in the world would I have_many relationships?
问题 I just ran into an interesting situation about relationships and databases. I am writing a ruby app and for my database I am using postgresql. I have a parent object "user" and a related object "thingies" where a user can have one or more thingies. What would be the advantage of using a separate table vs just embedding data within a field in the parent table? Example from ActiveRecord: using a related table: def change create_table :users do |i| i.text :name end create_table :thingies do |i|