I have a table with the information of the items, articles, that I can have in many locations. For example, I can have the item in the warehouse or in the shop. So I have a table with the shops information and other table with the information of the warehouse.
How is the best way to relation the itms with the location in which can be?
I think that an option is to have in the table items two foreign keys, one for the shop and other for the warehouse. If I have a FK in shop, the FK of the warehouse must be null. If in the future the item can be in other locations, I can add new field in the items table.
But when I want to show the information, I must check which FK is not null and show the information of the concrete location. But if I use a view to show the information of the items and the main information of the location, I have many fields null because is not the location in which is the item.
But is this the best way? There is other options or is this is the most correct way to do it?
Thanks.