In Postgres for example you can select if you want to get the data as 'hex', 'base64' or some octal format encoded.