I'm working with an SQL database right now, and this has always made me curious, but Google searches don't turn much up: Why the strict data types?
I understand why you'd have a few different data types, for example like how differentiating between binary and plain text data is important. Rather than storing the 1s and 0s of binary data as plaintext, I now understand that it's more efficient to store the binary data as its own format.
But what I don't understand is what the benefit is of having so many different data types:
What is the benefit of telling the database "There'll only be 256 bytes of plain text data in entries to this column." or "This column can have text entries of up to 16,777,215 bytes"?
Is it a performance benefit? If so, why does knowing the size of the entry before hand help performance? Or rather is it something else altogether?