Search Postgresql Archives

One or Both Foregin Keys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
     subscribe-nomail command to majordomo@postgresql.org so that your
     message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux