Reputation: 485
I have two tables; to make the example easy, let's call them lawnmower
and lawn
.
The intuitive solution:
This gives a circular dependency. What is the best solution to avoid this? I'm currently considering a responsiblefor
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.
Upvotes: 0
Views: 455
Reputation: 1270181
First, you want a junction table because this is fundamentally an n-m relationship. This table would have one row per lawnmower and per lawn (I would called it LawnmowerLawns
or something like that).
Now to handle the bullet points:
Upvotes: 1