|
|
|
|
|
by DaiPlusPlus
2106 days ago
|
|
I compare it to "defence-in-depth" (i.e. data validation at every level). Ever since RDMBS moved-away from XBase-style table-files database textual/string column length limits are conceptually the same thing as having a CHECK CONSTRAINT on the length of a string (something that SQLite does support!). e.g. https://stackoverflow.com/questions/8252875/how-to-restrict-... |
|
Most character values in a database are not really text entered by a person, it's typically a symbol for some kind of enumeration or key referring to external semantics, e.g. compass direction "N", "NNE", etc. Or street names or postal codes or country names and so on. You can either model this directly or if it makes no difference, accept whatever you get. Actually examining the data can be interesting; I noticed once in a database with 50 billion stored dollar amounts there were only about 50,000 unique values. This led me to assert the dollar amounts were actually symbols in the system.
Sorry, my comment was truncated in my original post and I didn't notice it in time to edit it.