When I look a Db schema or a diagram it is obvious to figure out if there is a many-to-many relationship between two tables.
But how can I analyze this from the computer point of view? What kind of test algorithm the code should follow to decide there is a many-to-many relatiopnship between TableA and TableB?
I would appreciate if you can suggest a way without using any specific language based methods or helpers.
Something like:
“If ‘this’ is true, then there is absolutely a many-to-many
relationship between 2 tables.”
So what should I write at the place of ‘this’ ?
Thanks
There exists a table C not equal to A or B with foreign keys corresponding to primary keys in A and B.
Just a guess. I think it’s true, though; it certainly happens when you want a m2m relationship… When it just happens to occur, I think you are OK reading a m2m relationship into it.