Here's a contrived example:
At the user creation page the malicious user wants to get admin access.
They have their username be: admin' --
They do this because they are betting on a user named 'admin'.
Their password is: alwaysSanitizeInputs
So, a user is created named "admin' --".
Now, they go in to update their password.
The DB nicely pulls out their username, "admin' --", and it says:
UPDATE users SET password = SHA1('newPassword') WHERE username = 'admin' -- AND password = SHA1('alwaysSanitizeInputs');
So what happens? Well, the user "admin" now has a different password, and the Malicious user knows what it is. That's why you still need to sanitize.If the database could theoretically hold it according to its schema, the program should be prepared for the largest row size that is still technically legal. (Where "prepared" may simply mean that it throws a "This should never happen" error and aborts the request.)
Ideally a corrupt record only breaks the requests that read that record with an HTTP 500 or something similar.