Re: Lookup tables
От | Thiemo Kellner |
---|---|
Тема | Re: Lookup tables |
Дата | |
Msg-id | c77aae45-5914-4973-8d32-9b6efa6545d9@gelassene-pferde.biz обсуждение исходный текст |
Ответ на | Re: Lookup tables (Michał Kłeczek <michal@kleczek.org>) |
Ответы |
Re: Lookup tables
|
Список | pgsql-general |
El 04-02-25 a las 18:08, Michał Kłeczek escribió: >> Reality tends to become so ambiguous as to not be >> reflectable (two entirely different restaurants eventually, >> within the flow of time, carry the very same name). >> >> A primary key is very likely not the proper place to reflect >> arbitrary business logic (is it the same restaurant or not ? >> what if two restaurants have the same name at the same time > These are of course problems ( and beyond the scope of my contrived example ). > > The point is though, that having surrogate PK not only does not solve these issues but makes them worse by kicking thecan down the road and allowing for inconsistencies. Only if you do not see the primary key as the main immutable value identifying an object, entity, you name it. Having said that, it is very questionable that a natural key (names to name one) can be a suitable primary key (think of typo).
В списке pgsql-general по дате отправления: