1
I’m trying to normalize a database for addresses and zip codes. However, there is a situation in which the Post Office assigns, for the same street, a ZIP code to the side with even numbers and the other to the side with odd numbers, and another in which the streets are divided and, for each division, one CEP for the side with even numbers and the other for the side with odd numbers. As there is side in both cases, I created a single table, registering "even side" and "odd side". The problem (ambiguous external junction) appeared when I tried to connect the two types of streets to this single Lado table, because the bank probably does not know which instruction to carry out first, since the two need information from the Lado table. Below the illustrative figure:
Therefore, there is a way to eliminate this "ambiguous external junction" error without having to repeat the Side table ?
Thanks.
The diagram didn’t help me much to understand the problem, it would be interesting to explain it and also add the SQL query you are trying to do. Also consider that the ambiguity may come from not specifying in the SQL query the table name before the column
idLado
, for exampleLogradouroLado.idLado
instead of justidLado
.– Piovezan