Database design question for you all
I want to save on data storage by having an address table which stores the address of many different tables in the database. This works fine in the following example:-
Table - School
SchoolID
cola
colb
AddrID (FK to Address.AddrID)
Table - Building
BuildingID
cola
colb
AddrID (FK to Address.AddrID)
table - Address
AddrID (FK to Address.AddrID)
Addr1
Addr2
Addr3
Addr4
But if I try and have more then one address type in one of the tables SQL server gives me an error.
May cause cycles or multiple cascade paths.
Table - Person
PersonID
cola
colb
MyAddrID (FK to Address.AddrID)
MyOtherAddrID (FK to Address.AddrID)
Why is this?
And do I need a different design method.
Regards
Spangeman
I want to save on data storage by having an address table which stores the address of many different tables in the database. This works fine in the following example:-
Table - School
SchoolID
cola
colb
AddrID (FK to Address.AddrID)
Table - Building
BuildingID
cola
colb
AddrID (FK to Address.AddrID)
table - Address
AddrID (FK to Address.AddrID)
Addr1
Addr2
Addr3
Addr4
But if I try and have more then one address type in one of the tables SQL server gives me an error.
May cause cycles or multiple cascade paths.
Table - Person
PersonID
cola
colb
MyAddrID (FK to Address.AddrID)
MyOtherAddrID (FK to Address.AddrID)
Why is this?
And do I need a different design method.
Regards
Spangeman