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
My background isn’t in DB designs. I went looking for something that
me with the design related stuff from an ActiveRecord perspective (i.e.
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
any help at all would be appreciated.