Should I have area code stored in a separate field in my DB? It’s causing me a lot of pain in terms of parsing user input…but it would add value to have it searchable….but I’m not sure how much.
Right now we have the structure
- CountryCode
- AreaCode
- ExchangeAndSuffix
- Extension
We’re considering combining AreaCode and ExchangeAndSuffix.
What’s the standard practice here?
Thanks.
The question you have to answer is this: “Does a phone number represent a singular value, or does it represent several values who combine to form a singular tuple?” In other words, do you have actual logic (be it querying or business logic) that is dictated by these components (area code, exchange, etc.), or is a phone number just a phone number?