So I've got three different address tables, one for countries with states (USA, Canada, Australia), one for New Zealand were there is an ID system (NZ Post API), and another for everywhere else. (don't suggest to me that I should be using one table, I know this sounds like a ridiculous setup but I have a good reason for doing it this way)
I have used a sequence to give a key to each of these tables. Every record has key that is unique not only to it's own table but across all three.
My problem is this: I now want to reference these keys from another table, but I want the reference to look at all three tables.
Is there any easy way to do this? If not I can use a UDF but I'm looking to keep things simple.
It's really important that this database is both solid and easy to understand as many graduate level programmers will be writing code against it.