Forum: Ruby on Rails multiple relational tables theory

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.
Craig W. (Guest)
on 2006-01-31 06:41
(Received via mailing list)
I'm a little unclear on theory here.

I have a number of tables but specifically...


A client may have only 1 placement
A placement may have only 1 client but there may be many placements per
A placement may have only 1 facility
A facility may have only 1 placement but there may be many placements
per facility

I'm wondering if it is necessary to store a facility relation in the
client since the client will have one relation to the placement and the
placement will have a one relation to the facility.

I do anticipate needing frequent reports that list clients per facility
so that would be an advantage to store the facility in the client.
Should I be creating a relationship between client and facility when the
real relationship is between client and placement and the other real
relationship is between placement and facility?

This topic is locked and can not be replied to.