I am trying to create database tables for the case shown below. I also have a specific account, but this is not important in relation to my problem.
There is a list of operations (expenses). Each operation can be performed in the specified POI, places can be grouped in chains (optional). Each operation may have a recipient, in particular a chain of stores.
My current design looks below. I could even delete the chain table in favor of a direct reference to the recipient, but it still leaves a loop between the tables. Effectively, one line can contain links to a place and an account that has a specific recipient.

The only solution I see is checking the table to rule out the described case, but I wonder: is there a better fix?
source
share