IMPORT FILE TO BLOB FIELD USING BASE64

rspadim's profile image rspadim posted 9 years ago in General Permalink
Hi guys, is a common pratice save files inside database using base64
could you include a checkbox to select between raw file or base64 encoded?
kalvaro's profile image kalvaro posted 9 years ago Permalink
It's a weird practice indeed. You use extra CPU just to waste disk space ;-P
rspadim's profile image rspadim posted 9 years ago Permalink
Considering standard engines, yes, but it's used
ansgar's profile image ansgar posted 9 years ago Permalink
I never came across a system which encodes database content in base64. It's probably something HeidiSQL should not propagate to users which are not used to such systems?

Please post some examples, which systems use base64 encoding. I don't want to put effort into something which is only used by one single system.
rspadim's profile image rspadim posted 9 years ago Permalink
email system use base64 to encode files, that's an example
ansgar's profile image ansgar posted 9 years ago Permalink
And raw email content is stored in a database?
rspadim's profile image rspadim posted 9 years ago Permalink
no problem about raw file, but some systems use base64
1) i know it consume more space
2) i know it consume more network traffic to transmit file to server using base64
but i didn't wrote the app that some servers are running here :/
jfalch's profile image jfalch posted 9 years ago Permalink
you could use this tool.
rspadim's profile image rspadim posted 9 years ago Permalink
you talk about reading right? yeap it's stored with base64 encoding as smtp protocol
but now mysql/mariadb have base64 compress/decompress functions
the only 'problem' that i have is inserting base64 file
today what i do is, create a temporary table, insert file and compress that file using base64, and after put inside send mail table (it's a background process that send mails), no problem about don't have the base64 option, but should be nice it
rspadim's profile image rspadim posted 9 years ago Permalink
hi jfalch no problem about tool, just put it with heidisql, base64 is easy (delphi example: http://www.swissdelphicenter.ch/torry/showcode.php?id=1524)
rspadim's profile image rspadim posted 9 years ago Permalink
this should be nice with image previews too, a option to execute a base64 decode and show image from blob columns using base64... just one idea i know it's cpu "expensive"
kalvaro's profile image kalvaro posted 9 years ago Permalink
I don't think the actual subject is whether it's optimal or not, or whether it's good practice or not. The key point is: is it in widespread usage as to justify the development effort and the added complexity into HeidiSQL?

I don't know the answer but that's the sensible question Anse is asking.

Please login to leave a reply, or register at first.