| От | Dennis Gearon |
|---|---|
| Тема | One or Both Foregin Keys |
| Дата | |
| Msg-id | 4092E26F.2070302@fireserve.net обсуждение исходный текст |
| Ответы |
Re: One or Both Foregin Keys
|
| Список | pgsql-general |
I am working on a design where a location for something can have:
Fully qualified address with even building names, room numbers, and
booth numbers.
**-OR-**
GPS location
**-OR-**
Both
Other than triggers, is there a way to enforce this using tables and
primary keys?
I imagine an address table, and then
either a some sort of intermediate table, in a one to many
relationship, GPS to Addresses,
or the correct columns in the address table.
Either way, I don't see a normal way to enforce EITHER or BOTH without a
trigger.
Thanks in Advance.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера