Hello community,
Let’s say I have an Invoices table. Those Invoices can be owned by a Users table, a Groups table and a Compagnies table.
What’s the best approach? One foreign key named FK_owner or three? One for each table.
Pro/Cons?
Thank you.
Hello community,
Let’s say I have an Invoices table. Those Invoices can be owned by a Users table, a Groups table and a Compagnies table.
What’s the best approach? One foreign key named FK_owner or three? One for each table.
Pro/Cons?
Thank you.
If you think what you want to accomplish can be done with a single FK, you can as well use just one “owner” table.
Those are three columns in Invoices and 3 different FKs
Your right, can’t do that in My-SQL (one foreign-key for two+ tables)
This is asked a lot:
Thank you.
Apart from that, I think it is not a good practice to see such a thing.