[BioSQL-l] Problems in DB2 with VARCHAR,	TEXT and CLOB using BioJava
    Hilmar Lapp 
    hlapp at gmx.net
       
    Sat Jul 11 11:47:34 UTC 2009
    
    
  
Hi Florian:
On Jul 9, 2009, at 11:16 AM, Florian Mittag wrote:
> [...]
> 2) Change the data type to something comparable with "=", like  
> VARCHAR.
That's the way to go. The reason they are not VARCHAR in MySQL is  
because it is limited to 256 characters there.
> [...]
> Although VARCHARs in DB2 can have a length of theoretically 32767,  
> in reality
> they are limited by the page size of the database, which can be 32K at
> maximum. Since this particular table "reference" has three columns  
> of this
> type, the sum of their lengths must not exceed 32767, so they could  
> only be
> something like VARCHAR(10000).
That sounds great though. You may have noticed that the columns are  
all of type VARCHAR in the Oracle version of the schema with the  
following widths:
        Title                VARCHAR2(1000)
        Authors              VARCHAR2(4000)
        Location             VARCHAR2(512)
That has always served me well. Feel free to use larger widths though  
if you think you need them.
	-hilmar
-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================
    
    
More information about the BioSQL-l
mailing list