[Biojava-dev] BioJava Nightly Build + BioSQL/MySQL problem...

Thomas Down td2 at sanger.ac.uk
Tue Aug 3 14:09:03 EDT 2004


On 3 Aug 2004, at 18:56, Michael Griffith wrote:

> Thomas,
>
> Thanks!  Not being an expert with mySQL -- how do you change the field 
> def?
> I added [BINARY] after the Varchar def and tried creating the field as
> Binary.  How should it be defined?

Actually, it looks like the solution to this may depend on the version 
of MySQL you're using.  See:

       http://dev.mysql.com/doc/mysql/en/CHAR.html

But on the version I'm running (4.0.17 I think), the following seems to 
work:

CREATE TABLE term (
         term_id   INT(10) UNSIGNED NOT NULL auto_increment,
         name               VARCHAR(255) BINARY NOT NULL,
         definition         TEXT,
         identifier         VARCHAR(40),
         is_obsolete        CHAR(1),
         ontology_id        INT(10) UNSIGNED NOT NULL,
         PRIMARY KEY (term_id),
         UNIQUE (name,ontology_id),
         UNIQUE (identifier)
) TYPE=INNODB;


Hope this works for you,

       Thomas.



More information about the biojava-dev mailing list