Re: Using BLOBs with several DBMS - Mailing list pgsql-interfaces

From Stephen Crawley
Subject Re: Using BLOBs with several DBMS
Date
Msg-id 200106080530.f585UO601918@piglet.dstc.edu.au
Whole thread Raw
In response to Using BLOBs with several DBMS  (Ricardo Maia <rjmaia@student.dei.uc.pt>)
Responses Re: Using BLOBs with several DBMS  (Ricardo Maia <rmaia@criticalsoftware.com>)
List pgsql-interfaces
> My question is: how can i create a table with one BLOB field, in a DBMS 
> independent way?
>
> I am using PostgreSQL7.1 and Oracle 8 but I want to make it be able to work 
> with other DBMSs.

It is difficult, because:
 *  Different versions of SQL use different names for the BLOB type.
 *  Some DBMS don't support blobs at all.
 *  Some DBMS treat blobs differently to other SQL types and    require you to use special APIs to access them.
 *  Not all JDBC drivers support the JDBC 2.0 Blob APIs.  Of those    that do, many implement them in part only.

Given this mess, you've got two choices:
 *  Define a Java interface for all of your database interactions.      Create a different implementation for each DBMS
youplan to support,    complete with embedded SQL statements, table schemas, etc.
 
 *  Define wrapper classes for JDBC, and try to isolate the DBMS     differences in "adapters".  This (more or less)
allowsyou to    share SQL statements / table schemas across DBMS, but it is     kind of hard getting the wrapper /
adapterAPIs right.
 

-- Steve






pgsql-interfaces by date:

Previous
From: Richard Poole
Date:
Subject: Re: DBI::Pg problems
Next
From: "J. 'FIK' Brand"
Date:
Subject: ODBC+Access2000, Win2k and Win98