I have a table called Companies. The ID field is the PK (autoincrement), not the CompanyName field because you can have the same company name as long as it is a different address.
There is a Users table as well. This has a username field and a company field and an ID field (autoincrement) as it's PK. I was hoping to make the company field an FK for the CompanyName field in the Companies table. It won't let me because CompanyName is not a PK.
So how do I successfully set this relationship up? Should I use some sort of concatenated keys for situations like this?