Inserting images as BLOBs - any way to avoid using base64encode?

Andre Garzia andre at andregarzia.com
Mon Aug 6 13:46:39 EDT 2007


Terry,
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.

Best
andre

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
> was
> 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
> 30%
> to the file size, which for this project could add an extra 100 MB or more
> to the database file.
>
> Terry...
>
> --
> Dr Terry Judd
> Lecturer in Educational Technology (Design)
> Biomedical Multimedia Unit
> Faculty of Medicine, Dentistry & Health Sciences
> The University of Melbourne
> Parkville VIC 3052
> AUSTRALIA
>
> 61-3 8344 0187
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list