I have two tables; to make the example easy, let's call them
- The lawnmower is always mowing a lawn.
- Multiple lawnmowers can be mowing the same lawn.
- A lawn has a single lawnmower which is responsible for that lawn.
- A lawnmower can however be responsible for 3 lawns at the same
The intuitive solution:
- Let lawnmower reference the lawn it is mowing
- Let lawn reference the responsible lawnmower
This gives a circular dependency. What is the best solution to avoid this? I'm currently considering a
table with foreign keys to a lawn and a lawnmower. This however enables multiple lawnmowers to be responsible for the same lawn, which was not possible before.