rem 
rem $Id: gobild.sql,v 1.1 1998/01/02 23:16:35 bgutierr Exp $
rem 
Rem  Copyright (c) 1992 by Oracle Corporation 
Rem    NAME
Rem      gobld.sql - Graphocal Oracle Schema.
Rem    DESCRIPTION
Rem      Contains sql/plus calls to CREATE and INDEX the ROS tables.
Rem    RETURNS
Rem      Nothing
Rem    NOTES
Rem    MODIFIED   (MM/DD/YY)
Rem     fpun       06/24/93 -  add image dither and quality 
Rem     jrhee      04/26/93 -  Change param_str_name to be long raw 
Rem     ewong      03/30/93 -  Removed exit statement 
Rem     fpun       01/06/93 -  add char_set to trigger proc_name
Rem     fpun       01/02/93 -  change the scheme. upgrade it to 2.0.6 
Rem     fpun       12/04/92 -  add exit 
Rem     fpun       12/02/92 -  Creation 
Rem     fpun       12/02/92 -  delete output spool 
Rem     fpun       11/24/92 -  No reason specified 
Rem     fpun       11/24/92 -  delete itemid 
Rem     fpun       11/24/92 -  raw(255) -> long raw 
Rem     fpun       11/24/92 -  Creation 
Rem     jrhee      09/03/92 -  Add volume info to sound table 
Rem     jrhee      08/12/92 -  Add text_invisibility column to go__document tab
Rem     jrhee      07/06/92 -  Delete copyright info from go__document 
Rem     dlai       05/26/92 -  revise 
Rem     dlai       05/26/92 -  revise 
Rem     dlai       05/21/92 -  revise 
Rem     rquach     05/08/92 -  add new field to doc table 
Rem     rquach     03/16/92 -  change unique index to index for layer table. 
Rem     rquach     03/10/92 -  add ocl version number field. 
Rem     rquach     02/24/92 -  add security to go tables. 
Rem     rquach     02/12/92 -  schema change for new de stuff. 
Rem     jwu        02/10/92 -  add sound table 
Rem     rquach     02/10/92 -  Creation 

/*--------------------------*/
/* Define go document table */
/*--------------------------*/

create table go__document (
   owner			varchar(30),	/* owner id */
   modid			integer,	/* module id */
   foreground_edge_color	integer,
   background_edge_color	integer,
   edge_pattern			integer,
   foreground_fill_color	integer,
   background_fill_color	integer,
   fill_pattern			integer,
   dash_style			integer,
   arrow_style			integer,
   symbol_size			integer,
   symbol_index			integer,
   brush_width			integer,
   trans_mode			integer,
   cap_style			integer,
   join_style			integer,
   arc_fill_style		integer,
   arc_closure			integer,
   rrect_corner_width		integer,
   rrect_corner_height		integer,
   face_name_char		integer,
   face_name_len		integer,
   face_name			raw(255),
   font_size			integer,
   font_style			integer,
   font_weight			integer,
   font_width			integer,
   image_text			integer,
   kerning			integer,
   char_set			integer,
   text_color			integer,
   text_hor_align		integer,
   text_ver_align		integer,
   text_hor_justi		integer,
   text_ver_justi		integer,
   text_spacing			integer,
   text_fixed_flag		integer,
   text_fontsc_flag		integer,
   text_wrap_flag		integer,
   text_bbox_scalability	integer,
   text_invisibility	 	integer,
   text_custom_spacing		integer,
   hor_align_mode		integer,
   ver_align_mode		integer,
   ctr_track_flag		integer,
   draw_size_width_den		integer,
   draw_size_width_num		integer,
   draw_size_height_den		integer,
   draw_size_height_num		integer,
   page_count			integer,
   active_layer			integer,
   main_editor_x		integer,
   main_editor_y		integer,
   main_editor_width		integer,
   main_editor_height		integer,
   chart_temp_hs		integer,
   chart_temp_x			integer,
   chart_temp_y			integer,
   chart_temp_width		integer,
   chart_temp_height		integer,
   datatable_hs			integer,
   datatable_x			integer,
   datatable_y			integer,
   datatable_width		integer,
   datatable_height		integer,
   const_wind_hs		integer,
   const_wind_x			integer,
   const_wind_y			integer,
   const_wind_width		integer,
   const_wind_height		integer,
   plsql_wind_hs		integer,
   plsql_wind_x			integer,
   plsql_wind_y			integer,
   plsql_wind_width		integer,
   plsql_wind_height		integer,
   plsql_prog_hs		integer,
   plsql_prog_x			integer,
   plsql_prog_y			integer,
   plsql_prog_width		integer,
   plsql_prog_height		integer,
   plsql_browser_hs		integer,
   plsql_browser_x		integer,
   plsql_browser_y		integer,
   plsql_browser_width		integer,
   plsql_browser_height		integer,
   bind_var_hs			integer,
   bind_var_x			integer,
   bind_var_y			integer,
   bind_var_width		integer,
   bind_var_height		integer,
   open_drawing_charset         integer,
   open_drawing_charlen         integer,
   open_drawing_trigname	raw(255),
   close_drawing_charset        integer,
   close_drawing_charlen        integer,
   close_drawing_trigname	raw(255),
   bind_var_char		integer,
   bind_var_len			integer,
   bind_var_name		raw(255),
   template_name_char		integer,
   template_name_len		integer,
   template_name		raw(255),
   active_query			integer,
   display_row			integer,
   ocl_version			integer,
   image_quality                integer,
   image_dither                 integer
);

create unique index igo_document on go__document
(
   owner, modid
);

create view go_document as
   select * from go__document
   where owner = user or modid in (select modid from tool_accessible)
   with check option;

create public synonym go_document for system.go_document;
 
/*-----------------------*/
/* Define go timer table */
/*-----------------------*/

create table go__timer (
   owner			varchar(30),	/* owner id */
   modid			integer,	/* module id */
   itemid			integer,	/* item id */
   timer_name_charset		integer,
   timer_name_length 		integer,
   timer_name			raw(255),
   proc_name_charset		integer,
   proc_name_length 		integer,
   proc_name			raw(255),
   timer_interval		integer,
   timer_active	        	integer         /* New for 2.5 */
);

create unique index igo_timer on go__timer
(
   owner, modid, itemid
);

create view go_timer as
   select * from go__timer
   where owner = user or modid in (select modid from tool_accessible)
   with check option;

create public synonym go_timer for system.go_timer;


/*-----------------------*/
/* Define go query table */
/*-----------------------*/

create table go__query (
   owner			varchar(30),	/* owner id */
   modid			integer,	/* module id */
   itemid			integer,	/* item id */
   query_name_char		integer,
   query_name_len		integer,
   query_name			raw(255),
   query_src_char		integer,
   query_src_len		integer,
   query_src			long raw,
   query_type			integer,
   QUERY_EXEC                   integer,        /* New for 2.5 */
   QUERY_CACHE                  integer,        /* New for 2.5 */
   QUERY_MAXFLAG                integer,        /* New for 2.5 */
   QUERY_MAXROWS                integer,        /* New for 2.5 */
   QUERY_NUMCOLS                integer,        /* New for 2.5 */
   TIMER_CHAR                   integer,        /* New for 2.5 */
   TIMER_LEN                    integer,        /* New for 2.5 */
   TIMER                        raw(255),       /* New for 2.5 */
   ALERT_CHAR                   integer,        /* New for 2.5 */
   ALERT_LEN                    integer,        /* New for 2.5 */
   ALERT                        raw(255),       /* New for 2.5 */
   POSTPROC_CHAR                integer,        /* New for 2.5 */
   POSTPROC_LEN                 integer,        /* New for 2.5 */
   POSTPROC                     raw(255),       /* New for 2.5 */
   CUSTPROC_CHAR                integer,        /* New for 2.5 */
   CUSTPROC_LEN                 integer,        /* New for 2.5 */
   CUSTPROC                     raw(255),       /* New for 2.5 */
   date_format			raw(255),
   date_format_char		integer,
   date_format_len		integer
);

create unique index igo_query on go__query
(
   owner, modid, itemid
);

create view go_query as
   select * from go__query
   where owner = user or modid in (select modid from tool_accessible)
   with check option;

create public synonym go_query for system.go_query;


/*---------------------------*/
/* Define go parameter table */
/*---------------------------*/

create table go__parameter (
   owner			varchar(30),	/* owner id */
   modid			integer,	/* module id */
   itemid			integer,	/* item id */
   param_name			raw(255),
   param_name_char		integer,
   param_name_len		integer,
   param_type			integer,
   param_str_name		long raw,
   param_str_name_char		integer,
   param_str_name_len		integer,
   row_number			integer
);

create unique index igo_parameter on go__parameter
(
   owner, modid, itemid
);

create view go_parameter as
   select * from go__parameter
   where owner = user or modid in (select modid from tool_accessible)
   with check option;

create public synonym go_parameter for system.go_parameter;


/*-------------------------------*/
/* Define go visible layer table */
/*-------------------------------*/

create table go__vislayer (
   owner			varchar(30),	/* owner id */
   modid			integer,	/* module id */
   layerid			integer
);

create index igo_vislayer on go__vislayer
(
   owner, modid
);

create view go_vislayer as
   select * from go__vislayer
   where owner = user or modid in (select modid from tool_accessible)
   with check option;

create public synonym go_vislayer for system.go_vislayer;


/*-----------------------*/
/* Define go sound table */
/*-----------------------*/

create table go__sound (
   owner			varchar(30),	
   modid			integer,	
   itemid			integer,
   name_set                     integer,
   name_len                     integer,
   name                         raw(255),
   longid                       integer,
   recvolume                    integer,
   playvolume                   integer
);

create index igo_sound on go__sound
(
   owner, modid, itemid
);

create view go_sound as
   select * from go__sound
   where owner = user or modid in (select modid from tool_accessible)
   with check option;

create public synonym go_sound for system.go_sound;


/*-----------------------*/
/* Define go column table*/
/*-----------------------*/

create table go__column (
   OWNER                varchar(30),
   MODID                integer,
   ITEMID               integer,
   COLUMN_ID            integer,
   COLUMN_NAME_CHAR     integer,
   COLUMN_NAME_LEN      integer,
   COLUMN_NAME          raw(255),
   COLUMN_TYPE          integer,
   NOT_NULL             integer,
   PRECISION            integer,
   SCALE                integer,
   DERIVED              integer,
   MAXLEN               integer,
   DATE_FORMAT_CHAR     integer,
   DATE_FORMAT_LEN      integer,
   DATE_FORMAT          raw(255)
);

create unique index igo_column on go__column
(
   owner, modid, itemid
);

create view go_column as
   select * from go__column
   where owner = user or modid in (select modid from tool_accessible)
   with check option;

create public synonym go_column for system.go_column;

