My addresses table used to have a single foreign key - customers. Now that "buildings" entity is introduced, I also need to store addresses of buildings of interest.
If I were at the design stages of the database, I would have created a master "address owners" table, with one-to-one relationships to "customers" and "buildings" and a one to many relationship to addresses. However, the database is in use.
In order to relate "buildings" to "addresses" with referential integrity, I added another FK column to "addresses" to hold "buildings" PK. This works as intended, however now the addresses table have two FK columns that are both destined to be half null forever. My fear is that would this structure cause problems down the road? Is it worth it to spend some hours to merge the PK's of my master tables (customers and buildings) into an "address owners" table whose sole purpose is to generate autonumber PK's for those tables?
If I were at the design stages of the database, I would have created a master "address owners" table, with one-to-one relationships to "customers" and "buildings" and a one to many relationship to addresses. However, the database is in use.
In order to relate "buildings" to "addresses" with referential integrity, I added another FK column to "addresses" to hold "buildings" PK. This works as intended, however now the addresses table have two FK columns that are both destined to be half null forever. My fear is that would this structure cause problems down the road? Is it worth it to spend some hours to merge the PK's of my master tables (customers and buildings) into an "address owners" table whose sole purpose is to generate autonumber PK's for those tables?