|
|
|
|
|
by cowb0yl0gic
2650 days ago
|
|
As a data manager and a database developer, I can assure you there is a big difference between "a number" and "a string of digits" (even when those digits are supposed to be a number). It's a sign of poor database design when a field type of numeric is chosen because something "looks like a number". Usually, I would only use an integer field for something like an internal record ID or lookup code, whereas an external-facing ID should be a string, enforced by a mask or limited input set. Often, as a database evolves, what starts out as a numeric ID ("Customer 1"!) can evolve into something more complex ("Let's prepend a geographic code to segment our ID space!"), which cascades through the entire application stack. It's important for a UI developer to really understand what the data domain is, rather than just blindly following the underlying data type, and to help ensure that the user is guided properly. |
|