Inserting images as BLOBs - any way to avoid using base64encode?
sunshine at public.kherson.ua
Tue Aug 7 00:46:58 EDT 2007
On 6/8/07 8:46 PM, "Andre Garzia" <andre at andregarzia.com> wrote:
1) If DBMS is REALLY fine to work with BLOBs then no need use any encodings.
The fact you need use encoding (i.e. Convert it into TEXT form),
says that DB cannot keep true BLOBs.
I believe that e.g. Valentina and mySQL do not require encodings.
2) Andre, as you know we have "Valentina for Director", and developers of
Director ARE the most heavy users of MEDIA contents. So we see that really
some of them keep movies, pictures in separate folder, but some developers
choose Valentina EXACTLY BECAUSE it is able effectively store BLOBs inside
of DB files, and even COMPRESS and ENCRYPT them. Encryption is important for
developers who sale CD/DVD with commercial content.
> why not keeping the images as external files and putting a field in the
> database with the file path? this would lead to databases with less chunk in
> it since to use the images you'd have to output them to files anyway.
> something like this:
> Hard Drive Image ID Table
> My Database
> myImage.jpg <---------> Record that match id to file <------------------>
> field image_id
> This is a simple solution where you use a intermediary table to match id's
> with files, this way if you change a file name or path, you just need to
> update one table entry and not all your database entries that deal with that
> file. This makes easy to "reconnect" lost media files if things move around
> in the Hard Drive.
> I would not put media files inside SQL Databases.
> On 8/5/07, Terry Judd <tsj at unimelb.edu.au> wrote:
>> Hi - I'm about to use SQLite to store all the resources for a large ed
>> application I'm about to start building and was wondering whether there
>> any way to get images into and out of the database without having to
>> base64encode/decode them. It looks like the encoding process adds about
>> to the file size, which for this project could add an extra 100 MB or more
>> to the database file.
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
[I feel the need: the need for speed]
More information about the use-livecode