3 ms·
Correct. If only storing/retrieving was the goal, a text field would have been more than enough. But we also needed to retrieve data based on their address, a
by thatwasunusual 5y ago
Correct.
If only storing/retrieving was the goal, a text field would have been more than enough.
But we also needed to retrieve data based on their address, and to generate reports on a daily basis, which made for being able to do "JSON queries" so much easier.
So we put that logic in the application layer instead, something like:
User
- lookupByAddress(data)
GermanUser inherits from User
- overrides lookupByAddress(data)
...etc., so that we could be very specific about our queries depending on the country, or even _region_ in some countries.