CREATE OR REPLACE VIEW map_detailview_v AS SELECT map_operator.parentid AS map_id, map_grp.parentid AS map_operator_id, map_grp.childid AS map_group_id, map_attr.childid AS map_attr_id, connectfrom.linkto AS map_attr_connectfrom FROM pctree map_grp, pctree map_operator, pctree map_attr, intralink connectfrom WHERE map_operator.parentrole = 'OperatorOwner' AND map_grp.parentrole = 'AttributeGroupOwner' AND map_attr.parentrole = 'AttributeGroup' AND connectfrom.linkfromrole = 'ConnectTo' AND connectfrom.linktorole = 'ConnectFrom' AND map_grp.parentid = map_operator.childid AND map_grp.childid = map_attr.parentid AND map_attr.childid = connectfrom.linkfrom;