This table provides a list of components for each web site. This information needs a data entry page. The components are placed together in the specified order to form a displayable page. Each component specifies an include file and/or text which forms part of the final content.
A web site component is accessed using its associated web site code and sequence number.
Source romber_web_site_components_tbl.sql
create table romber_page.web_site_components ( page_component_include romber_base.generic_include not null, page_component_type_id romber_page.component_type_id not null, web_site_id romber_page.web_site_id not null );
Source romber_web_site_components_pk.sql
alter table romber_page.web_site_components add constraint romber_web_site_components_pk primary key ( web_site_id, page_component_type_id );
Source romber_web_site_components_fk1.sql
alter table romber_page.web_site_components add constraint romber_web_site_components_fk1 foreign key ( web_site_id ) references romber_page.web_sites ( web_site_id );
Source romber_web_site_components_fk2.sql
alter table romber_page.web_site_components add constraint romber_web_site_components_fk2 foreign key ( page_component_type_id ) references romber_page.component_types ( page_component_type_id );
Source romber_web_site_components_load.sql
insert into romber_page.web_site_components ( page_component_include, page_component_type_id, web_site_id ) values ( 'page_begin.inc', ( select page_component_type_id from romber_page.component_types where page_component_type_code = 'BEGIN' ), ( select web_site_id from romber_page.web_sites where web_site_code = 'ROMBER' ) ); insert into romber_page.web_site_components ( page_component_include, page_component_type_id, web_site_id ) values ( 'page_middle.inc', ( select page_component_type_id from romber_page.component_types where page_component_type_code = 'MIDDLE' ), ( select web_site_id from romber_page.web_sites where web_site_code = 'ROMBER' ) ); insert into romber_page.web_site_components ( page_component_include, page_component_type_id, web_site_id ) values ( 'page_end.inc', ( select page_component_type_id from romber_page.component_types where page_component_type_code = 'END' ), ( select web_site_id from romber_page.web_sites where web_site_code = 'ROMBER' ) );
Using views:
insert into romber_page.web_site_components ( page_component_include, page_component_type_id, web_site_id, values ( '/page_begin.inc', ( select page_component_type_id from romber_page.component_types where page_component_type_code = 'BEGIN' ), ( select web_site_id from romber_page.web_site_details where business_code = 'ROMBER' and region_code = 'WORLD' ) );
Using only tables:
insert into romber_page.web_site_components ( page_component_include, page_component_type_id, web_site_id ) values ( '/page_begin.inc', ( select page_component_type_id from romber_page.component_types where page_component_type_code = 'BEGIN' ), ( select web_site_id from romber_page.web_sites where web_site_code = 'ROMBER' ) );