-- Oct 2000 E. Gallas
-- Look at organization of L3 database
------------------------------------------------------------------
------------------------------------------------------------------
set echo on;
set wrap off;
set pagesize 48;
set linesize 100;

spool look_l3.lst
column Name format a15;
------------------------------------------------------------------
--desc all_tables;
desc user_tables;
select OWNER,TABLE_NAME,TABLESPACE_NAME from all_tables where owner like '%TRIGGERDB%';
--select * from all_tables where owner like '%TRIGGERDB%' and table_name='FILTER_PARAMETER_VALUES';
------------------------------------------------------------------
desc  FILTER_DECLARATIONS;
desc  triggerdb.FILTER_PARAMETER_VALUES;
desc  L3_TRIGGER_BITS;
desc  OBJECT_DEFINITIONS;
desc  OBJECT_PARAMETER_DEFINITIONS;
desc  REFSET_DEFINITIONS;
desc  REFSET_PARAMETER_DECLARATIONS;
desc  TOOL_DECLARATIONS;
desc  TOOL_PARAMETER_VALUES;
desc  STREAM_INFORMATION;
desc triggerdb.trigger_list;

select count(*) from  FILTER_DECLARATIONS;
-- 8
select count(*) from  triggerdb.FILTER_PARAMETER_VALUES;
-- 49
select count(*) from  OBJECT_DEFINITIONS;
-- 72
select count(*) from  OBJECT_PARAMETER_DEFINITIONS;
-- 296
select count(*) from  TOOL_DECLARATIONS;
-- 24
select count(*) from  TOOL_PARAMETER_VALUES;
-- 128
select count(*) from  REFSET_PARAMETER_DECLARATIONS;
-- 231
select count(*) from  REFSET_DEFINITIONS;
-- 44
select count(*) from  STREAM_INFORMATION;
-- 0
select count(*) from  L3_TRIGGER_BITS;
-- 3
select count(*) from  triggerdb.trigger_list;
-- 9
------------------------------------------------------------------
------------------------------------------------------------------
column ID format 99999;
column OBJ_DEF_ID format 99999;
column PRIMARY_FILTER format a15;
column FILTER_KEY format a12;
column RFS_DECL_ID format 999;
column L3TRIGBITS_ID format 99999;

column OBJECT_NAME    format a15;
column LEVEL_NUMBER   format a3;
column OBJECT_VERSION format a15;
column OBJ_DEF_TYPE   format a15;
column VERSION_NUMBER format 999;

column PARAMETER_NAME  format a15;
column OBJECT_DATATYPE format a15;
column DEFAULT_VALUE   format a13;
column MINIMUM_VALUE   format a7;
column MAXIMUM_VALUE   format a7;
column OBJ_DEF_ID      format 99999;
column PARAMETER_SEQ   format 99999;

column REFSET_NAME     format a15;
column TRIG_LIST_ID    format 99999; 

column PARAMETER_VALUE format a15;
column TOOL_DECL_ID    format 99999;
column OBJ_PARM_ID     format 99999;

column NAME            format a20;
column FILT_DECL_ID    format 99999;

column TRIGGER_BIT_NAME format a20;

select * from  OBJECT_DEFINITIONS order by id;
select * from  OBJECT_PARAMETER_DEFINITIONS order by obj_def_id;

select * from  FILTER_DECLARATIONS order by obj_def_id;
select * from  triggerdb.FILTER_PARAMETER_VALUES order by filt_decl_id;
select * from  triggerdb.FILTER_PARAMETER_VALUES order by obj_parm_id;

select * from  TOOL_DECLARATIONS order by obj_def_id;
select * from  TOOL_PARAMETER_VALUES order by TOOL_DECL_ID;

select * from  REFSET_DEFINITIONS order by obj_def_id;
select * from  REFSET_PARAMETER_DECLARATIONS order by rfs_decl_ID;

select * from  STREAM_INFORMATION;
select * from  triggerdb.trigger_list;
select * from  L3_TRIGGER_BITS order by trig_list_id;
select * from  FILTER_DECLARATIONS order by l3trigbits_id;
select * from  TOOL_DECLARATIONS order by trig_list_id;

------------------------------------------------------------------
------------------------------------------------------------------
spool 