# ensGeneXref.sql was originally generated by the autoSql program, which also 
# generated ensGeneXref.c and ensGeneXref.h.  This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly 
# automatic way.

#This is the table gene_xref downloaded directly from Ensembl ftp site (18.34 release 11/04). Please refer to Ensembl site for details.  CAUTION: Ensembl sometimes changes its table definitions and some field may not contais data as its name indicates, e.g. translation_name.
CREATE TABLE ensGeneXref (
    db varchar(255) not null,	# unknown - check with Ensembl
    analysis varchar(255) not null,	# unknown - check with Ensembl
    type varchar(255) not null,	# unknown - check with Ensembl
    gene_id int not null,	# gene ID
    gene_name varchar(255) not null,	# gene name
    gene_version longblob not null,	# gene version
    transcript_id int not null,	# transcript  ID
    transcript_name varchar(255) not null,	# transcript  name
    transcript_version longblob not null,	# transcript  version
    translation_name varchar(255) not null,	# translation name
    translation_id int not null,	# translation ID
    translation_version longblob not null,	# translation version
    external_db varchar(255) not null,	# external database
    external_name varchar(255) not null,	# external name
    external_status char(10) not null,	# external status
              #Indices
    INDEX(gene_name),
    INDEX(external_db(64),external_name(64)),
    INDEX(external_name),
    INDEX(transcript_name)
);
