Subject | Re: [firebird-support] How to store a string in Firebird which includes #0's in it? |
---|---|
Author | Mark Rotteveel |
Post date | 2018-08-04T13:17:38Z |
On 4-8-2018 15:06, 'River~~' river14april@... [firebird-support]
wrote:
enough systems storing binary data by encoding it using hex or base64
before storing it in **binary** data types (binary columns, byte arrays,
etc). That is unnecessary and needlessly inefficient, and usually stems
from confusing presentation with storage.
'binary' in storage, but yet inefficient because it is the wrong type.
stored is like '0A' (that is bytes 0x0041 assuming ASCII) instead of the
single byte 0x0A.
The presentation might be hex, but the actual storage is not.
Mark
--
Mark Rotteveel
wrote:
> You are pedantically correct but...This may sounds pedantic, but it is not in my opinion. I have seen
>
> ALL storage in ALL modern computers is in binary.
enough systems storing binary data by encoding it using hex or base64
before storing it in **binary** data types (binary columns, byte arrays,
etc). That is unnecessary and needlessly inefficient, and usually stems
from confusing presentation with storage.
> When we declare a field as integer, char, octet, etc we are specifyingAnd yet people store date and integers in string columns, which is still
> two things: how it is presented and what manipulation we can do on it.
'binary' in storage, but yet inefficient because it is the wrong type.
> To say an octet is in hex is no more wrong than to say some number isNo, if you say it is stored in hex, it conveys the idea that the value
> stored as a float. It's all just a bucket of bits. Hex or float or
> Integer are always presentation
stored is like '0A' (that is bytes 0x0041 assuming ASCII) instead of the
single byte 0x0A.
The presentation might be hex, but the actual storage is not.
Mark
--
Mark Rotteveel