CREATE OR REPLACE VIEW structural_dependency_v AS -- T->M SELECT entity_stage.linkto AS source_objID, entity_stage.linkfrom AS target_objID FROM interlink entity_stage WHERE entity_stage.linkfromrole = 'BindingOperator' AND entity_stage.linktorole = 'ReferencingObject' AND entity_stage.linkto IS NOT NULL UNION SELECT entity_stage.linkto AS source_objID, map_operator.parentid AS target_objID FROM pctree map_operator, interlink entity_stage WHERE map_operator.parentrole = 'OperatorOwner' AND entity_stage.linkfrom = map_operator.childid AND entity_stage.linkto IS NOT NULL UNION -- X->M SELECT mapfunction_activity.linkto AS source_objID, mapfunction_activity.linkfrom AS target_objID FROM interlink mapfunction_activity WHERE mapfunction_activity.linktorole = 'CopyOf' AND mapfunction_activity.linkto IS NOT NULL UNION -- T(u) -> T(f) SELECT source_rel.parentid AS source_objID, target_rel.parentid AS target_objID FROM interlink, pctree source_rel, pctree target_rel WHERE interlink.linktorole = 'UniqueKey' AND interlink.linkfromrole = 'ForeignKeys' AND source_rel.childid = interlink.linkto AND target_rel.childid = interlink.linkfrom -- AND source_rel.parentid != target_rel.parentid UNION -- M->PF SELECT map_processactivity.linkto AS source_objID, process_activity.parentid AS target_objID FROM pctree process_activity, interlink map_processactivity WHERE process_activity.parentrole = 'OwningBaseProcess' AND map_processactivity.linkfrom = process_activity.childid AND -- without these two ANDs, task flow will show up just as if it were process flow map_processactivity.linkto IS NOT NULL AND map_processactivity.linktorole <> 'TaskImplementation' UNION -- F->ET SELECT rec_ext.linkto AS source_objID, rec_ext.linkfrom AS target_objID FROM interlink rec_ext WHERE rec_ext.linktorole = 'RefersTo' AND rec_ext.linkfromrole = 'Representation' AND rec_ext.linkto IS NOT NULL UNION SELECT rec_file.parentid AS source_objID, rec_ext.linkfrom AS target_objID FROM interlink rec_ext, pctree rec_file WHERE rec_ext.linktorole = 'RefersTo' AND rec_ext.linkfromrole = 'Representation' AND rec_ext.linkto = rec_file.childid AND rec_file.parentrole = 'OwningFile' AND rec_file.parentid IS NOT NULL UNION -- for dataflow between queryItem/reportItem and design object SELECT sourceRel.parentid AS source_objid, targetObj.parentid AS target_objid FROM interlink itemCon, pctree sourceRel, pctree targetObj WHERE itemCon.linkfromrole = 'IntelligenceItems' AND itemCon.linkto = sourceRel.childid AND itemCon.linkfrom = targetObj.childid AND sourceRel.parentid IS NOT NULL UNION -- for dataflow between queryItem (as source) and LOV (Defining) SELECT sourceObj.parentid AS source_objid, itemCon.linkfrom AS target_objid FROM interlink itemCon, pctree sourceObj WHERE itemCon.linkfromrole = 'ItemClassesUsingValues' AND itemCon.linkto = sourceObj.childid AND sourceObj.parentid IS NOT NULL UNION -- for dataflow between queryItem (as source) and LOV (Ordered) SELECT sourceObj.parentid AS source_objid, itemCon.linkfrom AS target_objid FROM interlink itemCon, pctree sourceObj WHERE itemCon.linkfromrole = 'ItemClassesOrdered' AND itemCon.linkto = sourceObj.childid AND sourceObj.parentid IS NOT NULL UNION -- for dataflow between LOV (as source) and queryItem SELECT itemCon.linkto AS source_objid, targetObj.parentid AS target_objid FROM interlink itemCon, pctree targetObj WHERE itemCon.linkfromrole = 'QueryItems' AND itemCon.linkfrom = targetObj.childid AND itemCon.linkto IS NOT NULL UNION -- for dataflow between Simple QueryItem and Complex QueryItem/QueryCondition SELECT sourceObj.parentid AS source_objid, targetObj.parentid AS target_objid FROM interlink srcItem, pctree trgItem, pctree sourceObj, pctree targetObj WHERE (srcItem.linktorole = 'ReferencedSCO' OR srcItem.linktorole = 'ReferencedFunction') AND trgItem.parentrole = 'QueryExpOwner' AND srcItem.linkfrom = trgItem.childid AND srcItem.linkto = sourceObj.childid AND trgItem.parentid = targetObj.childid AND sourceObj.parentid IS NOT NULL UNION -- for dataflow between QueryItem and DrillLevel SELECT sourceObj.parentid AS source_objid, targetObj.parentid AS target_objid FROM interlink srcItem, pctree trgItem, pctree sourceObj, pctree targetObj WHERE srcItem.linkfromrole = 'DrillItems' AND trgItem.childrole = 'OwnedAttributes' AND srcItem.linkfrom = trgItem.childid AND srcItem.linkto = sourceObj.childid AND trgItem.parentid = targetObj.childid AND sourceObj.parentid IS NOT NULL UNION -- for dataflow between derivationSourceSCO and derivedSCO SELECT sourceObj.parentid AS source_objid, targetObj.parentid AS target_objid FROM interlink itemCon, pctree sourceObj, pctree targetObj WHERE itemCon.linktorole = 'DerivationSourceSCO' AND itemCon.linkto = sourceObj.childid AND itemCon.linkfrom = targetObj.childid AND sourceObj.parentid IS NOT NULL -- for dimension and cube UNION SELECT dim_level.parentid AS source_objID, cube_dimref.parentid AS target_objID FROM interlink level_dimref, pctree dim_level, pctree cube_dimref WHERE level_dimref.linkfromrole = 'ReferencingCubeDimRef' AND level_dimref.linktorole = 'ReferencedLevel' AND dim_level.parentrole = 'OwningDimension' AND dim_level.childid = level_dimref.linkto AND cube_dimref.parentrole = 'OwningCube' AND cube_dimref.childid = level_dimref.linkfrom AND dim_level.parentid IS NOT NULL -- for implementation table and cube UNION SELECT source_table.parentid AS source_objID, target_cube.parentid AS target_objID FROM interlink column_measure, pctree source_table, pctree target_cube WHERE column_measure.linktorole = 'BindingAttribute' AND source_table.childid = column_measure.linkto AND target_cube.parentrole = 'OwningCube' AND target_cube.childid = column_measure.linkfrom AND source_table.parentid IS NOT NULL -- for implementation table and dimension UNION SELECT source_table.parentid AS source_objID, target_dim.parentid AS target_objID FROM interlink column_lvattr, pctree source_table, pctree dim_level, pctree target_dim WHERE (column_lvattr.linktorole = 'BindingAttribute' OR column_lvattr.linktorole = 'BindingDimensionKeyAttr') AND source_table.childid = column_lvattr.linkto AND dim_level.parentrole = 'OwningLevel' AND dim_level.childid = column_lvattr.linkfrom AND target_dim.parentrole = 'OwningDimension' AND dim_level.parentid = target_dim.childid AND source_table.parentid IS NOT NULL -- icon -> element UNION SELECT link.linkto AS source_objID, link.linkfrom AS target_objID FROM interlink link WHERE link.linktorole = 'IconObject' AND link.linkfromrole = 'Element' AND link.linkto IS NOT NULL -- location -> location usage UNION SELECT link.linkto AS source_objID, source.parentid AS target_objID FROM interlink link, pctree source WHERE link.linkfromrole = 'LocationUsages' AND link.linktorole = 'Location' AND source.childid = link.linkfrom AND link.linkto IS NOT NULL -- named configuration -> physical config UNION SELECT link.linkto AS source_objID, source.parentid AS target_objID FROM interlink link, pctree source WHERE link.linkfromrole = 'PhysicalConfigs' AND link.linktorole = 'NamedConfiguration' AND source.childid = link.linkfrom AND link.linkto IS NOT NULL -- control center -> named configuration usage UNION SELECT link.linkto AS source_objID, link.linkfrom AS target_objID FROM interlink link WHERE link.linktorole = 'RuntimeLocation' AND link.linkfromrole = 'ConfigurationUsages' AND link.linkto IS NOT NULL -- sequence -> dimension UNION SELECT link.linkto AS source_objID, link.linkfrom AS target_objID FROM interlink link WHERE link.linktorole = 'DimensionKeySequence' AND link.linkfromrole = 'KeyedDimensions' AND link.linkto IS NOT NULL -- default location -> external table UNION SELECT link.linkto AS source_objID, link.linkfrom AS target_objID FROM interlink link WHERE link.linktorole = 'DefaultLocation' AND link.linkfromrole = 'ExternalTables' AND link.linkto IS NOT NULL -- referenced relation -> profile table UNION SELECT link.linkto AS source_objID, link.linkfrom AS target_objID FROM interlink link WHERE link.linktorole = 'ReferencedRelation' AND link.linkfromrole = 'ReferencingPrfTable' AND link.linkto IS NOT NULL -- rule definition -> rule usage UNION SELECT link.linkto AS source_objID, source.parentid AS target_objID FROM interlink link, pctree source WHERE link.linkfromrole = 'RuleUsage' AND link.linktorole = 'RuleDefinition' AND source.childid = link.linkfrom AND link.linkto IS NOT NULL -- PLS Record (return type) -> referring cursor UNION SELECT link.linkto AS source_objID, link.linkfrom AS target_objID FROM interlink link WHERE link.linktorole = 'ReturnType' AND link.linkfromrole = 'ReferringCursor' AND link.linkto IS NOT NULL -- time dimension map -> time dimension UNION SELECT link.linkto AS source_objID, link.linkfrom AS target_objID FROM interlink link WHERE link.linktorole = 'TimeDimPopulationMap' AND link.linkfromrole = 'TimeDimensions' AND link.linkto IS NOT NULL -- ref process -> subprocess UNION SELECT link.linkto AS source_objID, source.parentid AS target_objID FROM interlink link, pctree source WHERE link.linktorole = 'CopyOf' AND link.linkto IS NOT NULL AND source.childid = link.linkfrom -- FCO -> business area UNION SELECT link.linkto AS source_objID, source.parentid AS target_objID FROM interlink link, pctree source WHERE link.linktorole = 'FCO' AND link.linkfromrole = 'BusinessAreaShortcut' AND source.childid = link.linkfrom AND link.linkto IS NOT NULL -- logicalObject -> physicalConfig 02/07/08 Added. UNION SELECT link.linkto AS source_objID, link.linkfrom AS target_objID FROM interlink link WHERE link.linktorole = 'LogicalObject' AND link.linkfromrole = 'PhysicalConfigs' AND link.linkto IS NOT NULL -- TypeDefinition -> TypedObject(FCO) 02/07/08 Added. UNION SELECT link.linkto AS source_objID, link.linkfrom AS target_objID FROM interlink link WHERE link.linktorole = 'TypeDefinition' AND link.linkfromrole = 'TypedObject' AND link.linkto IS NOT NULL AND -- to exclude references to seeded TypeDefinitions link.linkto > 50000 UNION -- CMPMapAttributeGroup Map -> Referencing Object SELECT mapattributegroup.linkto AS source_objID, targetobj.parentid AS target_objID FROM interlink mapattributegroup, pctree mapoperator, pctree targetObj WHERE mapattributegroup.linkfromrole = 'AttributeGroup' AND mapattributegroup.linktorole = 'ReferencingObject' AND mapattributegroup.linkto IS NOT NULL AND mapattributegroup.linkfrom = mapoperator.childid AND mapoperator.parentrole = 'AttributeGroupOwner' AND mapoperator.parentid = targetObj.childid AND targetObj.parentrole = 'OperatorOwner' -- TypeDefinition -> TypedObject (SCO) 10/24/08 Added for bug 7496987. UNION SELECT link.linkto AS source_objID, source.parentid AS target_objID FROM interlink link, pctree source WHERE link.linktorole = 'TypeDefinition' AND link.linkfromrole = 'TypedObject' AND source.childid = link.linkfrom AND link.linkto IS NOT NULL AND link.linkto > 50000 -- ConfigTemplateSet -> NamedConfigurations 11/14/08 Added for bug 7566236. UNION SELECT link.linkto AS source_objID, link.linkfrom AS target_objID FROM interlink link WHERE link.linktorole = 'ConfigTemplateSet' AND link.linkfromrole = 'NamedConfigurations' AND link.linkto IS NOT NULL;