Re:A humble guide to database schema design
by radihuq on Tuesday April 07, 2020 @09:36PM
(#22809291)
Hopping on the topic of addresses and not completely related to your point - but if anyone's having challenges with handling address fields I'd highly recommend checking out Shopify's address package:
https://github.com/Shopify/quilt/tree/master/packages/addres...
And corresponding blog post:
https://engineering.shopify.com/blogs/engineering/handling-a...
Re:A humble guide to database schema design
by chrischen on Friday April 10, 2020 @05:16AM
(#22831285)
This seems like it hits their graphql api. Is this free to use?
> For a few years I lived on a street who's name appeared three times in the same city
You should try going to Atlanta and finding a business on “Peachtree” street. [0]
Re:A humble guide to database schema design
by koyote on Tuesday April 07, 2020 @10:22PM
(#22809486)
I agree with everything you mentioned in your post.
That being said:
> For a few years I lived on a street who's[sic] name appeared three times in the same city
This is why you have postcodes ;p
Re:A humble guide to database schema design
by Macha on Wednesday April 08, 2020 @06:50AM
(#22811748)
>> For a few years I lived on a street who's[sic] name appeared three times in the same city
> This is why you have postcodes ;p
I guess, but it was foreign vendors which expected "Street Name, Postcode, County". Locals and the postal service were working fine with "Street Name, Locality, County"
Re:A humble guide to database schema design
by DeathArrow on Wednesday April 08, 2020 @01:40AM
(#22810367)
Just store GPS coordinates, floor number and apartment number. :D
Post codes: 5 years ago, my country brought in post codes. prior to this there were none. It was not for the benefit of our postal system, who stated they didn't really care, but for badly designed web forms (and the occasional rural house with an unhelpful address)
They also may not fit your convention of what addresses in your country are. The obvious examples are stuff like Japan and one or two central European cities that are addressed "Building number, Block Number, City", but the aforementioned unhelpful rural addresses include a former friend of mine who had to give his address as "House name, near village, County". Actually the village was not near but it got the mail to the right post office which knew what to do with it.
As a counterpoint, I've had places that have very strict fields like "Street Name" (20 char limit), City, County, Country. For a few years I lived on a street who's name appeared three times in the same city. The actual form to get it delivered was "Street name, Locality, City", but because of the length limits I had to sneak the locality into the City field, which luckily worked as the City and County shared a name.