I am building a real - estate platform and I want to document about how to store addresses in database.
I have think some ways and show you, so please take me to the right way:
- I tried to bring to the client the flexibility to choose what fields to use for address.
Here are some of them:
Then for each of this fields he can add values. Each value has an ID and can be assigned to a property.
For example street_number
has 3 values.
At the end I have a table property_addresses
where I correlate the property_id
with the value_id
. In the picture value 20
was selected for that property.
The problem is that I can't see how can I get a list of a full correct address.