Archive for January, 2007

Storing pictures in a database with Libgda/Libgnomedb

Sunday, January 14th, 2007

There are now several methods to store pictures in a database (storing actual binary data, not just a file name). Depending on the database type used, one or more methods are available. The actual (binary) data can be stored as:

  • a binary string, if supported by the DBMS (which is the case for MySQL, SQLite or PostgreSQL)
  • a BLOB (binary large object) also if supported by the DBMS (for example PostgreSQL or Oracle)
  • a BASE64 encoded string for any DBMS (with the option of serializing the data as for tags in an F-Spot database)

To test it, you’ll need the latest SVN versions of Libgda, Libgnomedb and Mergeant: