ms wrote:
[...]
> What to do now? How would you argue? Should I use a join model anyhow
> or should I really decide to model the membership in the second way?

You should use a junction table and habtm or has_many :through. 
Repeating fields may seem more intuitively appealing, but they are a 
terrible DB design technique.  Please read some articles on DB 
normalization (the ones on Wikipedia are excellent), and feel free to 
ask if you have any further questions.  Generally speaking, most 
applications should have their tables at least in Third Normal Form 
(3NF).

> Maybe: Is there a formal approach to decide this?

Yes.  Never use repeating fields. :)

> 
> There are other examples, where I have got to model some kind of
> composition: in this case I have got entities which are components of
> other entities, which only can exist through out these associations.

Can you post an example?

> In this case, it is somehow more intuitive to model the foreign keys
> directly as attributes not using a join model.

But the intuitive solution is not *always* the best (although it's often 
a good place to start).
> 
> Thanks for you suggestions!
> 
> Cheers,
> ms

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to