I am developing a table that will store objects that have a location. The objects can have a specified state/region (optional), and they always have a specified country. So, the simplified starting point is:
Now, there is a functional dependency between state (uniquely identifiable with ISO code) and country, the state determines the country. This would suggest that I create a new table: State, that has a Country_id that references another table Country. The problem is that, in the data that is to be put in the database, the "State" value can be missing and therefore be NULL, so I have nothing to put into an intermediate table.
Does the presence of NULL (resulting from missing information) in the dependency between state-country mean that the 3rd normal form is impossible to achieve here and I need to reference State and Country tables separately from the object table? Or what is the best design solution for a case like this?
EDIT: This really is a question about a practical implementation of the problem here Functional dependencies in case of nulls, about which design solution would be suitable where a possible transitive functional dependency between id-state-country can contain a null value for state.