Suppose you have a table
my_table
-----------
id
name
foreign_id
And you are creating another table that will reference my_table. I think that this would be enough:
other_table
-----------
id
name
my_table_id
However, when creating a diagram on MySQL workbench, if I create a relationship, whether identifying or non-identifying, 1 to 1, or 1 to many, I get this table:
other_table
-----------
id
name
my_table_id
foreign_id
As you can see, both, the id of my_table, and the foreign_key of my_table get added to the new table. Is that really necessary? I would say that other_table.foreign_id is not necessary.
I first noticed this when I was working on schemabank.com (which seems to be gone now, such a shame). And now I noticed it too on MySQL workbench.