3 ms·
In general, only store things as integers if it might be meaningful to do math on them. I saw a database once that stored phone numbers as ints. elsewhere in t
by NickNameNick 11y ago
In general, only store things as integers if it might be meaningful to do math on them.
I saw a database once that stored phone numbers as ints. elsewhere in the software, they tried to take the mean of the wrong column. If the phone numbers had been stored as strings the error would have been obvious. As it was, the error survived in production for a disturbingly long time. The users persisted in thinking the output was meaningful even after the problem was discovered.