[Bio] / Babel / bin / create_pg_tables.sql Repository:
ViewVC logotype

View of /Babel/bin/create_pg_tables.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (download) (annotate)
Fri May 6 20:53:27 2011 UTC (9 years, 1 month ago) by tharriso
Branch: MAIN
CVS Tags: mgrast_dev_08112011, mgrast_dev_08022011, mobedac_release_05302012, mgrast_dev_05262011, mgrast_version_3_2, mgrast_dev_12152011, mgrast_dev_06072011, mgrast_dev_10262011, mgrast_release_3_1_2, mgrast_release_3_1_1, mgrast_release_3_1_0, HEAD
Changes since 1.16: +14 -0 lines
added md5_lca table

DROP TABLE IF EXISTS md5_protein;
CREATE TABLE md5_protein (
_id SERIAL PRIMARY KEY,
md5 char(32) NOT NULL,
id text NOT NULL,
function integer,
organism integer,
source integer
);

DROP TABLE IF EXISTS md5_ontology;
CREATE TABLE md5_ontology (
_id SERIAL PRIMARY KEY,
md5 char(32) NOT NULL,
id text NOT NULL,
function integer,
source integer
);

DROP TABLE IF EXISTS md5_rna;
CREATE TABLE md5_rna (
_id SERIAL PRIMARY KEY,
md5 char(32) NOT NULL,
id text NOT NULL,
function integer,
organism integer,
tax_rank integer,
source integer
);

DROP TABLE IF EXISTS md5_lca;
CREATE TABLE md5_lca (
md5 text PRIMARY KEY,
tax_domain text,
tax_phylum text,
tax_class text,
tax_order text,
tax_family text,
tax_genus text,
tax_species text,
tax_strain text,
level integer
);

DROP TABLE IF EXISTS aliases_protein;
CREATE TABLE aliases_protein (
_id SERIAL PRIMARY KEY,
id text NOT NULL,
alias_id text,
alias_source text
);

DROP TABLE IF EXISTS functions;
CREATE TABLE functions (
_id SERIAL PRIMARY KEY,
name text NOT NULL
);

DROP TABLE IF EXISTS contigs;
CREATE TABLE contigs (
_id SERIAL PRIMARY KEY,
name text NOT NULL,
description text,
length integer,
organism integer
);

DROP TABLE IF EXISTS id2contig;
CREATE TABLE id2contig (
_id SERIAL PRIMARY KEY,
id text NOT NULL,
contig integer,
strand integer,
low integer,
high integer
);

DROP TABLE IF EXISTS organisms_ncbi;
CREATE TABLE organisms_ncbi (
_id SERIAL PRIMARY KEY,
name text NOT NULL,
tax_domain text,
tax_kingdom text,
tax_phylum text,
tax_class text,
tax_order text,
tax_family text,
tax_genus text,
tax_species text,
taxonomy text,
ncbi_tax_id integer
);

DROP TABLE IF EXISTS ontology_seed;
CREATE TABLE ontology_seed (
_id SERIAL PRIMARY KEY,
level1 text,
level2 text,
level3 text,
level4 text,
id text
);

DROP TABLE IF EXISTS ontology_kegg;
CREATE TABLE ontology_kegg (
_id SERIAL PRIMARY KEY,
level1 text,
level2 text,
level3 text,
level4 text,
id text
);

DROP TABLE IF EXISTS ontology_eggnog;
CREATE TABLE ontology_eggnog (
_id SERIAL PRIMARY KEY,
level1 text,
level2 text,
level3 text,
id text,
type text
);

DROP TABLE IF EXISTS sources;
CREATE TABLE sources (
_id SERIAL PRIMARY KEY,
name text NOT NULL,
source text,
description text,
type text,
url text,
email text,
link text,
title text,
version text,
download_path text[],
download_file text[],
download_date date NOT NULL DEFAULT CURRENT_DATE,
protein_ids integer,
ontology_ids integer,
rna_ids integer,
md5s integer,
uniq_md5s integer,
organisms integer,
ncbi_organisms integer,
contigs integer,
functions integer
);

DROP TABLE IF EXISTS counts;
CREATE TABLE counts (
type text PRIMARY KEY,
count integer
);

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3