Hi,

El 15/10/10 08:04, Sergi Vladykin escribió
>> Maybe something like this could be added to the documentation:
>> (Copied from wikipedia)
> I think that UUID is not a h2 specific thing so there is no reason to
> steal work from google and wikipedia.

A simple link to the relevant documentation eliminates any doubt.
Documentation "implied" is not a good idea.

>> So UUID is BINARY(16) with the 4 hyphens added to the literal
>> representation, right?
> For example postgres uses '\x123ABC' notation. So your
> description is still not exact. UUID is different type and internally
> in h2 it is even not based on BINARY. 

AFAIK, is a common practice (and is included in H2) use a literal 
representation of a byte array in Octal or hexadecimal notation. 

>> But then why should we keep VARBINARY and BLOB separate?
>>  From user's point of view there is no difference.
>> The only dilemma this separation is trying to solve is how to deal with
>> values that are big.
> For the most of cases you will be right but sometimes for performance
> reasons there should be per column distinction on how we will decide
> if this object small enough to handle it as byte array. Since there is
> no standard way to do this in sql so separation between BINARY and
> BLOB seems to be a not so bad decision, not an ideal though.

VARCHAR/CLOB and VARBINARY/BLOB are very different implementation artifacts.

VARxx are limited to a maximum size (to 256/2048/.. chars dbm dependent ) and 
behave exactly are char or small varchars in terms of in what grammar,functions 
and operators can be used in.

On the other hand, LOBS born to handle large objects with "LOCATORS" semantics. 
(http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.sql.ref.doc/doc/r0008473.html)

A locator is a pointer to large object's internal content on the server side, 
that can be used to handle the large object without reading it completely from 
the client side; and with streaming support for reading and writing the full 
content. (
http://download.oracle.com/javase/6/docs/api/java/sql/Clob.html )
LOB data type can't be used with most operators and have restricted usage in 
select clauses. 

regards,
Dario


-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to