Engine Object Relationships
From GnuCash
The gnucash source code had a few diagrams in Linux "Dia" format presenting the relationships between various objects in the engine code. They are from a long time ago, but I'll store them here as they may still be useful as a reference to the original concepts used back then (and which haven't changed that much in essence). The two diagrams present the same information, only in a slightly different way.
In addition to these two, there is also a more recent ERD from the perspective of the sql backend: