create table associative_rels 
	(DISPLAY_DATE VARCHAR2 (200),
	 END_DATE NUMBER (15),
	 HISTORIC_FLAG VARCHAR2 (15),
	 REL_TYPE_CODE NUMBER (10),
	 START_DATE NUMBER (15),
	 SUBJECTA_ID NUMBER (30),
	 SUBJECTB_ID NUMBER (30));

create table associative_rels_type 
	(DESCRIPTION VARCHAR2 (300),
	 FOCUS_ENTITY VARCHAR2 (100),
	 REL_TYPE_CODE NUMBER (10),
	 RELATED_CODE NUMBER (10));

create table biography
	(BIO_ID number (30),
	BIOGRAPHY varchar2 (1000), 	
	BIRTH_DATE number (15),
	BIRTH_PLACE number (30),
	CONTRIBUTOR varchar2 (20),
	DEATH_DATE number (15),
	DEATH_PLACE number (30),
	PREFERRED char (1),
	SEX char (1),
	SUBJECT_ID number (30));

create table contrib 
	(BRIEF_NAME VARCHAR2 (20),
	 CONTRIB_ID NUMBER (30),
	 FULL_NAME VARCHAR2 (200));

create table contrib_rels_subject 
	(CONTRIB_ID NUMBER (30),
	 HOST_TYPE VARCHAR2 (1),
	 SUBJECT_ID NUMBER (30));

create table contrib_rels_term 
	(CONTRIB_ID NUMBER (30),
	 PREFERRED VARCHAR2 (15),
	 SUBJECT_ID NUMBER (30),
	 TERM_ID NUMBER (30));

create table m_event
	(EVENT varchar2 (200),
	EVENT_ID number (30));

create table m_event_rels
	(DISPLAY_DATE varchar2 (200), 
	DISPLAY_ORDER number (4), 
	END_DATE number (15),
	EVENT_ID number (30), 
	PLACE number (30), 	
	PREFERRED char (1), 
	START_DATE number (15), 
	SUBJECT_ID number (30));

create table language_rels 
	(LANGUAGE_CODE VARCHAR2 (15),
	 PREFERRED VARCHAR2 (15),
	 SUBJECT_ID NUMBER (30),
	 TERM_ID NUMBER (30));

create table nationality 
	(DISPLAY_ORDER number (4),
	NATIONAL_ID number (30),
	NATIONALITY_CODE varchar2 (100),
	PREFERRED varchar2 (15),
	SUBJECT_ID number (30));

create table place
	(BRIEF_PLACE varchar2 (200),
	PLACE_NUMBER number (30),
	TGN_ID number(30));

create table ptype_role 
	(PTYPE_ROLE VARCHAR2 (100),
	 PTYPE_ROLE_ID NUMBER (30));

create table ptype_role_rels 
	(DISPLAY_DATE VARCHAR2 (200),
	 DISPLAY_ORDER NUMBER (10),
	 END_DATE NUMBER (15),
	 HISTORIC_FLAG VARCHAR2 (10),
	 PREFERRED CHAR (1),
	 PTYPE_ROLE_ID NUMBER (30),
	 START_DATE NUMBER (15),
	 SUBJECT_ID NUMBER (30));

create table revision_history 
	(ACTION VARCHAR2 (50),
	DATE_TIME VARCHAR2 (21),
	 HISTORY_ID NUMBER (30),
	 PUBLIC_NOTE VARCHAR2 (255),
	 RECORD_TYPE VARCHAR2 (10),
	 SUBJECT_ID NUMBER (30),
	 USER_NAME VARCHAR2 (16));

create table revision_history_source 
	(ACTION VARCHAR2 (50),
	DATE_TIME VARCHAR2 (21),
	 HISTORY_ID NUMBER (30),
	 PUBLIC_NOTE VARCHAR2 (255),
	 RECORD_TYPE VARCHAR2 (10),
	 SOURCE_ID NUMBER (30),
	 USER_NAME VARCHAR2 (16));

create table source 
	(BIBLIO_NOTE VARCHAR2 (2000),
	 BRIEF_CIT VARCHAR2 (200),
	 FULL_CIT VARCHAR2 (2000),
	 MERGED_STAT VARCHAR2 (10),
	 SOURCE_ID NUMBER (30));

create table source_rels_subject 
	(HOST_TYPE CHAR (1),
	 PAGE VARCHAR2 (1000),
	 SOURCE_ID NUMBER (30),
	 SUBJECT_ID NUMBER (30));

create table source_rels_term 
	(PAGE VARCHAR2 (1000),
	 PREFERRED VARCHAR2 (15),
	 SOURCE_ID NUMBER (30),
	 SUBJECT_ID NUMBER (30),
	 TERM_ID NUMBER (30));

create table subject 
	(FACET_CODE VARCHAR2 (10),
	 IMAGE VARCHAR2 (20),
	 LEGACY_ID VARCHAR2 (30),
	 MERGED_STAT VARCHAR2 (15),
	 PARENT_KEY NUMBER (30),
	 RECORD_TYPE VARCHAR2 (15),
	 SCOPE VARCHAR2 (4000),
	 SORT_ORDER NUMBER (10),
	 SPECIAL_PROJ VARCHAR2 (25),
	 SUBJECT_ID NUMBER (30));

create table subject_rels 
	(DISPLAY_DATE VARCHAR2 (200),
	 END_DATE NUMBER (15),
	 HISTORIC_FLAG CHAR (1),
	 PREFERRED CHAR (1),
	 REL_TYPE VARCHAR2 (30),
	 START_DATE NUMBER (15),
	 SUBJECTA_ID NUMBER (30),
	 SUBJECTB_ID NUMBER (30));

create table term 
	(AACR2_FLAG VARCHAR2 (10),
	 DISPLAY_DATE VARCHAR2 (200),
	 DISPLAY_NAME VARCHAR2 (15),
	 DISPLAY_ORDER NUMBER (10),
	 END_DATE NUMBER (15),
	 HISTORIC_FLAG CHAR (1),
	 OTHER_FLAGS VARCHAR2 (15),
	 PREFERRED CHAR (1),
	 QUALIFIER VARCHAR2 (100),
	 START_DATE NUMBER (15),
	 SUBJECT_ID NUMBER (30),
	 TERM VARCHAR2 (200),
	 TERM_ID NUMBER (30),
	 TERM_TYPE VARCHAR2 (20),
	 VERNACULAR CHAR (1));

