wiki:DB Schema

DB Schema

Peregrine DB Ontology is based on the following schema:

drop table if exists semantic_type;
drop table if exists db_link;
drop table if exists term;
drop table if exists concept;

create table concept
(
	id				integer unsigned not null auto_increment,
	disambiguationType		varchar(255) not null,
	constraint concept_pk primary key (id)
) engine=InnoDB;

create table term
(
	conceptId			integer unsigned not null,
	termId				integer unsigned not null,
	text				varchar(255) not null,
	lang				char(2) not null,
	type				varchar(255) not null,
	caseInsensitive			boolean not null,
	orderSensitive			boolean not null,
	normalised			boolean not null,
	constraint term_pk primary key (conceptId, termId),
	constraint term_fk foreign key (conceptId) references concept (id) on delete cascade
) engine=InnoDB;

create table db_link
(
	conceptId			integer unsigned not null,
	source				varchar(255) not null,
	code				varchar(8192) not null,
	constraint db_link_fk foreign key (conceptId) references concept (id) on delete cascade
) engine=InnoDB;

create table semantic_type
(
	conceptId			integer unsigned not null,
	id				varchar(255) not null,
	constraint semantic_type_fk foreign key (conceptId) references concept (id) on delete cascade
) engine=InnoDB;
Last modified 11 years ago Last modified on Sep 2, 2011, 2:51:29 PM