Wednesday, March 15, 2006

Oh!

Yes, we can store and retrive BLOBs into and from database!

But they're gone after the transaction.

Because...

From http://www-css.fnal.gov/dsg/external/freeware/Repl_mysql_vs_psql.html

In Postgres, Large Objects are very special beasties. To create them special lo_create function is used that stores the result in a regular table. Large object support is broken in Postgres - pg_dump cannot dump LOBs; you need
to develop your own backup mechanism. To export Oracle raw data type it has to be the latest version of postgres jdbc driver. jdbc7.1-1.2.jar.does not work. Also, autocommit should be off, because the LargeObject reference is only valid within a transaction. As soon as the sql is executed to get the large object reference, it is autocommitted and then this reference can't be used anymore since the transaction ended. To turn autocommit off use the setAutoCommit() method in Connection:
Connection con = DriverManager.getConnection(url,user,password);
con.setAutoCommit(false);

Switch to MySQL?

Not yet. Future work na lang. Let's store na lang the directory path where the video and thumbnail is stored.

Advantage: Encryption and decryption become easier. I suppose.

0 Comments:

Post a Comment

<< Home