Our dev teams are using Ruby-on-Rails and the
activeRecord facility therein to develop databases.
While the conventions used in this product fly in the
face of conventional db design and naming conventions,
I'm stuck with the results.
Full documentation is available at
From a dba point of view, and using schemaSpy for
documentation, all tables end up as utility tables
because the implied RoR relationships follow a
particular naming convention. For example, all tables
are named as plural, e.g., "things" and the primary key
is always "id int not null" and this is so even if a
realistic pk exists.
Related tables then reference the singular of this
table by a constructed column name <thing>_id. This
becomes interesting when you have a table "persons"
(note the plural) and it's reference "people_id" (one
could argue this should be person_id) but in the RoR
world that's how they do it.
What would be really cool would be some way for
schemaSpy to map this implied relationship, or perhaps
have a flag indicating to look for it. Perhaps someone
smarter than me can look at the RoR active record
documentation and figure out how this could be done.