Welcome! Log In Create A New Profile

Advanced

Binary data in database text item

Posted by pietvanz 
Binary data in database text item
August 03, 2023 12:25PM
Hi,

Is it possible to store binary data (a hash buffer) in a database text item?
I feel it's a bit overkill to create a binary memo for just 32 bytes.
I know, I could just test it, but if someone has done it that would be nice.

Best regards,
Piet
Argus
Re: Binary data in database text item
August 04, 2023 07:14AM
not DIRECTLY as any binary ZERO present in your data would be interpreted as end of string and everything after it loast

You can transform your binary data in text (buffervershexa, or encoding in base 64) but this means that the data will take more space

however, I do not understand why you think that creating a binary memo is 'OVERKILL'. It's just a field.
Re: Binary data in database text item
August 04, 2023 11:26AM
Hi Argus,

I mean overkill since memo fields are separately stored in a mmo file.
But you are right it's a silly old man's fixation on saving resources and I shouldn't be doing that anymore winking smiley

Best regards,
Piet
Argus
Re: Binary data in database text item
August 12, 2023 01:37PM
I think it is a misconception to think that suing a mmo file is using MORE resources...

1. When there is no data content on a line, you are using 8 bytes
2. When there is data, you are using 8 bytes+size of the content

If you are NOT using MMO, then you need to declare a text field with a size=the LARGEST content you may have, so for each line, it doesn't matter it you have content or not, you are each time using the MAXIMUM possible value.

Using MMO SAVES resources...

It can even save time, because you can read the main record WITHOUT the MMO (faster) and ONLY read the mmo when you need it...
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: