![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Yes, there will be different address types. Sorry, I didn't represent the address type in the example. Sorry about that. The address to office relationship will need to be a many to many relationship, because of the different address types and the need to possibly share a ship-to address between multiple offices. A manager may use his home address for a ship-to address, and share that between three different offices. tb_address_types address_type_id description (ie, Office Location, Ship-to, Mail-to, etc) tb_address_data_us address_id addr1 addr2 city state zip_code tb_address_data_ca address_id addr1 addr2 city province postal_code tb_offices office_id manager_name date_opened tb_addresses_2_offices office_id country_id address_type_id address_data_id One solution would be to create a tb_managers and change |
#3
| |||
| |||
|
|
Thanks for the reply. That solution would work, except we are anticipating adding additional countries into the application, and their address field requirements would not match up with the US or CAN layouts. This is why I was thinking it would be good to have each one in a seperate table. If you added an addr3 field in tb_address it would probably cover most |
|
I just am curious to know if it's bad database design for a single column to reference a foreign key in multiple different tables. I assume you're referring to your original idea. There was talk of this |
![]() |
| Thread Tools | |
| Display Modes | |
| |