Forum: Ruby on Rails Help with modelling ActiveRecord associations

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
18d3c84ca5a017fe3e96490afaea28aa?d=identicon&s=25 Richard Conroy (Guest)
on 2007-05-28 16:45
(Received via mailing list)
I have been messing about with Rails and ActiveRecord for a while now,
and I have had great success in the simple cases. But I have hit a
block when it came to modelling a non-trivial problem domain.

I had hoped to absorb the knowledge by example, but fundamentally I
grok the more sophisticated associations and more importantly when to
use them.

My background isn't in DB designs. I went looking for something that
could help
me with the design related stuff from an ActiveRecord perspective (i.e.
I know
what I want my objects to look like and behave in terms of their
but how do I model that in the database).

Anyone know of any domain modelling resources with an ActiveRecord
Preferably example heavy.

I suspect that I need to get down and dirty with HABTM, or has_many
but I don't know when I need to use them.

If its any use, the problem I am trying to model is as follows.
Its a software & hardware inventory system, services run on regular PCs
have a relationship with hardware devices. All are network accessible,
the hardware devices can have a relationship with hundreds of services,
the services can have a relationship with at most 6 hardware devices
specific constraints).

any help at all would be appreciated.

This topic is locked and can not be replied to.