Re: Tables cities and table user

From: Axel Schwenke <axel.schwenke_at_gmx.de>
Date: Tue, 12 Feb 2019 15:15:30 +0100
Message-ID: <q3uke3$63q$1_at_dont-email.me>


On 12.02.2019 13:58, Kees Nuyt wrote:

>>> A country can have multiple cities with the same name.
>>> Even a province / state (and maybe even county) can have more
>>> than one city with the same name.
>>
>> but a different unique ID.

>
> Of course, but IMHO an n:m relationship between city and country
> is overkill.

It definitely is. A certain city (identified _not_ by its name, but by its id) belongs to exactly _one_ country. But a country will normally inhabit multiple cities, so from the data model point of view this is a 1:n relation. And it is implemented by putting a country_id into each row of the cities table. Received on Tue Feb 12 2019 - 15:15:30 CET

Original text of this message