in the table don't define the foriegn jeys.
you use the column as a foreign key by using the primary key values to create the relationship.
the probelm is that you have defined the keys in the tables.
the only keys needed in the tables are the primary keys.
take this example:
products:
productID - Primary Key
productName
etc
categoris:
categoryID - Primary Key
categoryName
productcategories
productcatagoryID - Primary Key
productcatagoryProductID - relates to products.productID (but do not define a foreign key)
productcatagoryCategoryID - relates to categoris.categoryID (but do not define a foreign key)
no foreign key needs to be defined, but it can still be used as a foreign key by storing the productID and categoryID to create the relationship.