Thank you. That is a good explanation of indirect keys. But I don't think that is how the external keys are being using in pluto_media.
pluto_media uses these external keys:
EK_CommandGroup_Start
EK_CommandGroup_Stop
EK_Country
EK_DesignObj_Popup
EK_Device
EK_Device_Ripping
EK_MediaType
EK_Package
EK_Screen_Order
EK_Users
EK_Users_Private
I think these are the correct external mappings:
pluto_media.*.EK_Country -> pluto_main.Country.PK_Country
pluto_media.*.EK_Device -> pluto_main.Device.PK_Device
pluto_media.*.EK_MediaType -> pluto_main.MediaType.PK_MediaType
pluto_media.*.EK_Package -> pluto_main.Package.PK_Package
pluto_media.*.EK_Users -> pluto_main.Users.PK_Users
The ones that I haven't matched look like they ought to be join tables but while the first side exists in pluto_main, the second side doesn't exist in any of the pluto databases. For example: EK_CommandGroup_Start, there is a pluto_main.CommandGroup table but there is not a Start table.
EK_CommandGroup_Start
EK_CommandGroup_Stop
EK_DesignObj_Popup
EK_Device_Ripping
EK_Screen_Order
EK_Users_Private
There is some mechanism here that I just don't understand.
FYI, why I'm trying to dig so deeply is that I'm attempting to create ActiveRecord database models for pluto_media, which is the first step of writing a rails application to manage the media.
Thank you,
Roy