Subject: Seed Dictionaries

Create Table DCC.Abbrevation (
	Id		varchar2(20)
				constraint nn_DAB_Id		not null
				constraint ck_DAB_Id
					check (id = upper(id)),
	Description	varchar2(50),
	Class		char(2)
				constraint nn_DAB_Class		not null
				constraint ck_DAB_Class
					check (Class in 
					     ('CT','NO','CL','ST','IT','DT')),
	Select		varchar2(30),
   constraint pk_DAB__Primary_Key
		Primary Key (ID)
)  Tablespace Maint_1;

Create Table DCC.Unit (
	Id		varchar2(20)
				constraint nn_DUN_Id		not null
				constraint ck_DUN_Id
					check (Id=upper(Id)),
	Description	varchar2(50),
   constraint pk_DUN__Primary_Key
		Primary Key (Id)
)  Tablespace Maint_1

Create Table DCC.Comment_Definition (
	Id		number(7)	
				constraint nn_DCD_Id		not null,
	Type		char(1)
				constraint nn_DCD_Type		not null
				constraint ck_DCD_Type
					check (Type in ('S','C')),
	Text		varchar2(70)
				constraint nn_DCD_Text		not null,
	Unit		varchar2(20)
				constraint fk_DCD_Unit
					references DCC.Unit(Id),
   constraint pk_DCD
)
	
The Comment Definiton Dictionary:

Create Table Comment_Definition (
	ID 		number NOT NULL,
	TYPE		char(1) NOT NULL,
	TEXT		char(70) NOT NULL,
	UNIT		char(20),
	PRIMARY KEY	(ID),
	FOREIGN KEY	(UNIT) REFERENCES UNIT(ID) )

The Format Dictionary:

Create Table Format (
	ID char(20) NOT NULL, CHECK ( ID = UPPER (ID) ),
	FAMILY		number NOT NULL,
	NAME		char(50) NOT NULL,
	NUMBER_KEYS	number NOT NULL,
	KEY_1		char(80),
	KEY_2		char(80),
	KEY_3		char(80),
	KEY_4		char(80),
	KEY_5		char(80),
	KEY_6		char(80),
	KEY_7		char(80),
	KEY_8		char(80),
	KEY_9		char(80),
	KEY_10		char(80),
	PRIMARY KEY	(ID) );


----- End Included Message -----


