0

So I have 4 tables that I would like referenced: Client, Systems, Devices and PaymentHistory.

Amongst other columns:

  • Client has the column ClientID as its Primary Key
  • Systems has the column SystemID as its Primary Key and ClientID as its Foreign Key, which references the Client's Primary Key.
  • Devices has the column SystemID as its Foreign Key which references the Systems' Primary Key.
  • PaymentHistory has the column ClientID as its Foreign Key which references the Client's Primary Key.

Now, the Client, Systems and Devices are referenced to each other normally, but when I attempt to reference the PaymentHistory to Client, MySQL Workbench gives me this error:

http://pastebin.com/fpjDD6iZ

Google wasn't very helpful but suggested to attempt to create a new table that would right from the get-go be referenced to Client. So I did that - named crudely *new_table*, with the Foreign Key named *new_tablecol*. Again with no success, and a following error message:

http://pastebin.com/LmYRMf1i

Am I missing something? Do I have to recreate the Client table? Can a column only be referenced by one Foreign Key? Please help...

Also, this place needs them Spoiler tags, for hiding blocks of text... >_>

Mox
  • 482
  • 2
  • 6
  • 19

0 Answers0