PRIMARY KEY (`foreign_db`,`foreign_table`,`foreign_field`)
This makes much more sense. (The same foreign key can be in many tables, but it must always refer to the same primary key.)
hmm i don't think so, in your example clearly the order is the master table and the articles are in a detail/slave whatever you might call it table. of course the column in the mastertable that links to the details table is called foreign key, but because it links _to_ a foreign table, so articles is this foreign table that it links to.
Mike and PMA Devs:
hmm i don't think so, in your example clearly the order is the master table and the articles are in a detail/slave whatever you might call it table. of course the column in the mastertable that links to the details table is called foreign key, but because it links _to_ a foreign table, so articles is this foreign table that it links to.
I think it is much more clear to think of foreign and primary KEYS rather than foreign and master TABLES. The concept of foreign and primary keys is static. That is, it doesn't depend on which table you are looking at: Each key in each table is either a foreign or a primary key, period. Let's use that clarity since it is something that all DBAs understand.
As it is now, the relation table is very confusing. I see your point, but it is more important to use standard DBMS terminology. We want other DBA professionals to look at this and immediately understand it.
Regards,
Jay Davis