[DB-SIG] About LOB

Chris Clark Chris.Clark at ingres.com
Mon May 2 17:15:56 CEST 2011

M.-A. Lemburg wrote:
> Kwon, Chan Young wrote:
>> Hi, 
>> Let me describe more...
>> 1. My suggestion of LOB object is kind of Locator object. It does not contain whole massive data. It just passes small piece of data when its methods are called.
>> 2. buffer object is not enough to handle various kinds of LOB types. For example, character LOB, binary LOB and unicode character LOB.
>> In my company, this LOB class is already used as extension of DBAPI spec 2.0.
>> All colleagues like LOB class because it is very simple and easy to use.
>> So I sent this for your information.
> There are various ways large binary/text objects are handled by
> databases at the API level.
> Some databases provide APIs which allow reading/writing such
> data in chunks, others provide file descriptors which can be use
> used for this, yet others maintain the files outside the database
> and provide "locator" objects for these.
> Since all of these approaches use a file-like interface in one
> way or another, perhaps we could agree on a common DB-API extension
> that defines the minimum interface of such objects and a constructor
> that turns an existing file into an object which can then be passed
> to the database (much like the Binary() constructor we have for
> binary data).
> Do you have documentation for the LOB object you are using available
> on the web ?

Excellent idea, here are Java Docs for the JDBC clob/blob locator classes:


If we add this, I think we need clearly separate classes for the 2 
types. In the same way Python 2.x has str/unicode and Python 3.x as 


More information about the DB-SIG mailing list