3 ms·
Another advantage of that approach is that if you make sure you always persist the serial number in the canonical format, and immediately parse the incoming val
by bigbizisverywyz 6y ago
Another advantage of that approach is that if you make sure you always persist the serial number in the canonical format, and immediately parse the incoming value into the canonical form, then comparing 2 serial numbers is easy and consistent - including e.g. when constructing db queries.
I encountered a similar problem where an identity number could be represented in different formats, and the solution had been to store the string representation in all its glorious permutations. Doing db queries to find anything by that key was then impossible until the representation had been made consistent.
Then when e.g. creating reports for different systems we could format the output as per that systems expectation.