89 3 차원공간질의를위한효율적인위상학적데이터모델의검증 Validation of Efficient Topological Data Model for 3D Spatial Queries Seokho Lee Jiyeong Lee 요약 키워드 Abstract Keywords
90
91
92
93
94
95
96 -- 3D Brep adjacency_ordering DECLARE VSID VARCHAR2(10); VTYPE VARCHAR2(16); RANSID VARCHAR2(10) :='s' TO_CHAR(ROUND(DBMS_RANDOM.VALUE (1001, 1046),0)); CURSOR C1 IS SELECT RID, TYPE FROM BREP_3D_ROOMTYPE WHERE SID IN (SELECT DISTINCT SID FROM BREP_3D_SOLID WHERE FACES IN (SELECT FACES FROM BREP_3D_SOLID WHERE SID IN (RANSID)) AND SID <> ALL (RANSID)); CURSOR C2 IS SELECT RID, TYPE FROM BREP_3D_ROOMTYPE WHERE SID IN (SELECT DISTINCT SID FROM BREP_3D_SOLID WHERE FACES IN (SELECT FACES FROM BREP_3D_SOLID WHERE SID IN (SELECT ID FROM BREP_ORDER_1)) AND SID <> ALL (SELECT ID FROM BREP_ORDER_1 ) AND SID <> ALL (SELECT ID FROM BREP_ORDER_0 )); CURSOR C6 IS SELECT RID, TYPE FROM BREP_3D_ROOMTYPE WHERE SID IN (SELECT DISTINCT SID FROM BREP_3D_SOLID WHERE FACES IN (SELECT FACES FROM BREP_3D_SOLID WHERE SID IN (SELECT ID FROM BREP_ORDER_5)) AND SID <> ALL (SELECT ID FROM BREP_ORDER_5) AND SID <> ALL (SELECT ID FROM BREP_ORDER_4 )); BEGIN FOR y IN 1..300 FOR x IN 1..6 IF (x=1) THEN OPEN C1; FETCH C1 INTO VSID, VTYPE; EXIT WHEN C1%notfound; INSERT INTO BREP_ORDER_1 (ID, BREP_ORDER, TYPE) VALUES (VSID, x, VTYPE); CLOSE C1; INSERT INTO BREP_ORDER_0 (ID, BREP_ORDER) VALUES (RANSID, 0); ELSIF (x=2) THEN OPEN C2; FETCH C2 INTO VSID, VTYPE; EXIT WHEN C2%notfound; INSERT INTO BREP_ORDER_2 (ID, BREP_ORDER, TYPE) VALUES (VSID, x, VTYPE); CLOSE C2; END; / -- 3D NET adjacency_ordering DECLARE VSID VARCHAR2(10); VTYPE VARCHAR2(16); RANSID VARCHAR2(5) :='s' TO_CHAR(ROUND(DBMS_RANDOM.VALUE (1001, 1046),0)); CURSOR C1 IS SELECT SID, TYPE FROM NET_3D_ROOMTYPE WHERE SID IN (SELECT BEG FROM NET_3D_ADJACENCY2 WHERE END = RANSID); CURSOR C2 IS SELECT SID, TYPE FROM NET_3D_ROOMTYPE WHERE SID IN (SELECT BEG FROM NET_3D_ADJACENCY2 WHERE END IN (SELECT ID FROM NET_ORDER_1)) AND SID<>ALL(SELECT ID FROM NET_ORDER_1) AND SID<>ALL(SELECT ID FROM NET_ORDER_0); CURSOR C6 IS SELECT SID, TYPE FROM NET_3D_ROOMTYPE WHERE SID IN (SELECT BEG FROM NET_3D_ADJACENCY2 WHERE END IN (SELECT ID FROM NET_ORDER_5)) AND SID<>ALL(SELECT ID FROM NET_ORDER_5) AND SID<>ALL(SELECT ID FROM NET_ORDER_4); BEGIN FOR y IN 1..1 FOR x IN 1..6 IF (x=1) THEN OPEN C1; FETCH C1 INTO VSID, VTYPE; EXIT WHEN C1%notfound; INSERT INTO NET_ORDER_1 (ID, NET_ORDER, TYPE) VALUES (VSID, x, VTYPE); CLOSE C1; INSERT INTO NET_ORDER_0 (ID, NET_ORDER) VALUES (RANFID, 0); ELSIF (x=2) THEN OPEN C2; FETCH C2 INTO VSID, VTYPE; EXIT WHEN C2%notfound; INSERT INTO NET_ORDER_2 (ID, NET_ORDER, TYPE) VALUES (VSID, x, VTYPE); CLOSE C2; END; /
97 -- 3D Brep connectivity_ordering DECLARE VSID VARCHAR2(5); RANSID VARCHAR2(10) :='s' TO_CHAR(ROUND(DBMS_RANDOM.VALUE (1001, 1046),0)); CURSOR C1 IS SELECT DISTINCT SID FROM BREP_3D_SOLID WHERE FACES IN (SELECT FID FROM BREP_3D_DOOR, BREP_3D_SOLID HERE BREP_3D_DOOR.FID = BREP_3D_SOLID.FACES AND SID = RANSID AND DOOR = 'y') AND SID <> RANSID; CURSOR C2 IS SELECT DISTINCT SID FROM BREP_3D_SOLID WHERE FACES IN (SELECT FID FROM BREP_3D_DOOR, BREP_3D_SOLID WHERE BREP_3D_ DOOR.FID = BREP_3D_SOLID.FACES AND SID IN (SELECT ID FROM BREP_ORDER_1) AND DOOR = 'y') AND SID <> ALL(SELECT ID FROM BREP_ORDER_1) AND SID <> all(select ID FROM BREP_ORDER_0); CURSOR C10 IS SELECT DISTINCT SID FROM BREP_3D_SOLID WHERE FACES IN (SELECT FID FROM BREP_3D_DOOR, BREP_3D_SOLID WHERE BREP_3D_DOOR.FID = BREP_3D_SOLID.FACES AND SID IN (SELECT ID FROM BREP_ORDER_9) AND DOOR = 'y') AND SID <> ALL(SELECT ID FROM BREP_ORDER_9) AND SID <> all(select ID FROM BREP_ORDER_8); BEGIN FOR y IN 1..1 loop FOR x IN 1..10 IF (x=1) THEN OPEN C1; FETCH C1 INTO VSID; EXIT WHEN C1%notfound; INSERT INTO BREP_ORDER_1 (ID, BREP_ORDER) VALUES (VSID, x); CLOSE C1; INSERT INTO BREP_ORDER_0 (ID, BREP_ORDER) VALUES ('s1011', 0); ELSIF (x=2) THEN OPEN C2; FETCH C2 INTO VSID; EXIT WHEN C2%notfound; INSERT INTO BREP_ORDER_2 (ID, BREP_ORDER) VALUES (VSID, x); CLOSE C2; END; /
98 -- 3D NET connectivity_ordering DECLARE VSID VARCHAR2(10); VTYPE VARCHAR2(16); RANSID VARCHAR2(10) :='s' TO_CHAR(ROUND(DBMS_RANDOM.VALUE (1001, 1046),0)); CURSOR C1 IS SELECT SID, TYPE FROM NET_3D_ROOMTYPE WHERE SID IN (SELECT BEG FROM NET_3D_CONNECTIVITY2 WHERE END = RANSID); CURSOR C2 IS SELECT SID, TYPE FROM NET_3D_ROOMTYPE WHERE SID IN (SELECT BEG FROM NET_3D_CONNECTIVITY2 WHERE END IN (SELECT ID FROM NET_ORDER_1)) AND SID<>ALL(SELECT ID FROM NET_ORDER_1) AND SID<>ALL(SELECT ID FROM NET_ORDER_0); CURSOR C10 IS SELECT SID, TYPE FROM NET_3D_ROOMTYPE WHERE SID IN (SELECT BEG FROM NET_3D_CONNECTIVITY2 WHERE END IN (SELECT ID FROM NET_ORDER_9)) AND SID<>ALL(SELECT ID FROM NET_ORDER_9) AND SID<>ALL(SELECT ID FROM NET_ORDER_8); BEGIN FOR y IN 1..1 FOR x IN 1..10 IF (x=1) THEN OPEN C1; FETCH C1 INTO VSID, VTYPE; EXIT WHEN C1%notfound; INSERT INTO NET_ORDER_1 (ID, NET_ORDER, TYPE) VALUES (VSID, x, VTYPE); CLOSE C1; INSERT INTO NET_ORDER_0 (ID, NET_ORDER) VALUES (RANSID, 0); ELSIF (x=2) THEN OPEN C2; FETCH C2 INTO VSID, VTYPE; EXIT WHEN C2%notfound; INSERT INTO NET_ORDER_2 (ID, NET_ORDER, TYPE) VALUES (VSID, x, VTYPE); CLOSE C2; END; /
99
100
101