I want to build a ER-model for companies.
Some fields for companies are the same, like the name
, legal_address
and others, but some fields are defined based on the country, where the company is registered.
For example if we take Russia
, the company should have fields like inn
, ogrn
, etc.. (don't matter the names).
If we will take another country - the company will have another set of fields.
I need an advice of how to plan (architect) this.
Any ideas would be great.
At the moment I have this done:
[locations]
id
country
city
lat
lng
zip_code
[companies]
id
location_id
name
director
legal_address
actual_address
[company_russia]
id
company_id
inn
kpp
ogrn
stat_codes
reg_number_fss
reg_number_pfr
But I think there will be problems joining the tables and that each other country requires a separate table - is not a good approach.