create table SURVEY (ID integer, PARENT_ID integer, NAME varchar(3), FULL_NAME varchar(3), TITLE varchar(4));
create table CENTRELINE (ID integer, SURVEY_ID integer, TITLE varchar(4), TOPO_DATE date, EXPLO_DATE date, LENGTH real, SURFACE_LENGTH real, DUPLICATE_LENGTH real);
create table PERSON (ID integer, NAME varchar(10), SURNAME varchar(10));
create table EXPLO (PERSON_ID integer, CENTRELINE_ID integer);
create table TOPO (PERSON_ID integer, CENTRELINE_ID integer);
create table STATION (ID integer, NAME varchar(5), SURVEY_ID integer, X real, Y real, Z real);
create table STATION_FLAG (STATION_ID integer, FLAG char(3));
create table SHOT (ID integer, FROM_ID integer, TO_ID integer, CENTRELINE_ID integer, LENGTH real, BEARING real, GRADIENT real, ADJ_LENGTH real, ADJ_BEARING real, ADJ_GRADIENT real, ERR_LENGTH real, ERR_BEARING real, ERR_GRADIENT real);
create table SHOT_FLAG (SHOT_ID integer, FLAG char(3));
create table MAPS (ID integer, SURVEY_ID integer, NAME varchar(3), TITLE varchar(4), PROJID integer, LENGTH real, DEPTH real);
create table SCRAPS (ID integer, SURVEY_ID integer, NAME varchar(3), PROJID integer, MAX_DISTORTION real, AVG_DISTORTION real);
create table MAPITEMS (ID integer, TYPE integer, ITEMID integer);
insert into SURVEY values (1, 0, '', '', NULL);
 insert into CENTRELINE values (2, 1, NULL, NULL, NULL, 0.00, 0.00, 0.00);
 insert into SURVEY values (33, 1, '350', '350', NULL);
 insert into CENTRELINE values (34, 33, NULL, NULL, NULL, 0.00, 0.00, 0.00);
 insert into CENTRELINE values (35, 33, NULL, '2019-08-08', NULL, 215.90, 50.95, 0.00);
 insert into PERSON values (1, 'Mykyta', 'Kozlov');
insert into TOPO values (1, 35);
 insert into PERSON values (2, 'Jolanta', 'Kozlova');
insert into TOPO values (2, 35);
 insert into PERSON values (3, 'Kestutis', 'Paulikas');
insert into TOPO values (3, 35);
 insert into SHOT values (1, 1, 2, 35, 11.42, 79.27, 29.75, 11.42, 79.27, 29.75, 0.00, 139.34, -0.11);
insert into SHOT_FLAG values(1, 'srf');
insert into SHOT values (2, 2, 3, 35, 14.04, 70.66, 33.27, 14.04, 70.66, 33.27, 0.00, 186.33, 0.00);
insert into SHOT_FLAG values(2, 'srf');
insert into SHOT values (3, 3, 4, 35, 4.81, 95.44, 32.64, 4.81, 95.44, 32.64, 0.00, 173.87, 0.00);
insert into SHOT_FLAG values(3, 'srf');
insert into SHOT values (4, 4, 5, 35, 7.46, 69.88, 42.45, 7.46, 69.88, 42.45, 0.00, 184.04, -0.01);
insert into SHOT_FLAG values(4, 'srf');
insert into SHOT values (5, 5, 6, 35, 8.02, 126.00, 35.23, 8.02, 126.00, 35.23, 0.00, 352.03, -0.21);
insert into SHOT_FLAG values(5, 'srf');
insert into SHOT values (6, 6, 7, 35, 5.22, 31.58, 59.32, 5.22, 31.58, 59.32, 0.00, 170.92, 0.01);
insert into SHOT_FLAG values(6, 'srf');
insert into SHOT values (7, 7, 8, 35, 6.77, 89.51, 41.46, 6.77, 89.51, 41.46, 0.00, 3.04, 0.01);
insert into SHOT values (8, 8, 9, 35, 4.21, 359.70, -22.18, 4.21, 359.72, -21.45, 0.05, 4.11, 70.22);
insert into SHOT values (9, 8, 10, 35, 6.70, 60.27, -29.53, 6.69, 59.96, -29.49, 0.03, 312.17, 18.77);
insert into SHOT values (10, 8, 11, 35, 8.95, 28.71, -12.96, 8.95, 29.01, -13.08, 0.05, 122.94, -21.95);
insert into SHOT values (11, 9, 11, 35, 5.67, 48.69, -4.45, 5.66, 48.85, -4.95, 0.05, 170.71, -69.27);
insert into SHOT values (12, 9, 10, 35, 5.44, 101.03, -18.85, 5.45, 101.18, -18.79, 0.02, 175.86, 18.67);
insert into SHOT values (13, 10, 11, 35, 4.97, 350.46, 14.78, 4.95, 350.26, 14.82, 0.03, 211.01, -3.95);
insert into SHOT values (14, 10, 12, 35, 7.22, 49.58, -16.61, 7.23, 49.55, -16.19, 0.05, 41.20, 68.95);
insert into SHOT values (15, 10, 13, 35, 10.59, 45.04, -12.79, 10.61, 44.95, -12.77, 0.02, 6.74, -0.88);
insert into SHOT values (16, 10, 14, 35, 11.53, 64.46, -0.77, 11.53, 64.43, -0.62, 0.03, 347.78, 78.76);
insert into SHOT values (17, 11, 12, 35, 6.93, 91.91, -28.35, 6.92, 91.97, -28.29, 0.01, 197.39, 54.03);
insert into SHOT values (18, 11, 14, 35, 11.27, 88.51, -7.17, 11.30, 88.66, -7.07, 0.04, 139.84, 23.42);
insert into SHOT values (19, 11, 13, 35, 9.25, 72.27, -22.87, 9.26, 72.20, -22.95, 0.02, 12.87, -54.12);
insert into SHOT values (20, 12, 13, 35, 3.46, 36.11, -5.65, 3.48, 35.72, -5.42, 0.03, 349.99, 19.95);
insert into SHOT values (21, 12, 15, 35, 7.94, 57.68, 12.78, 7.97, 57.86, 13.02, 0.05, 102.85, 48.54);
insert into SHOT values (22, 12, 14, 35, 5.45, 84.84, 19.92, 5.47, 84.73, 20.21, 0.04, 46.28, 66.05);
insert into SHOT values (23, 14, 15, 35, 3.93, 21.92, -1.54, 3.94, 21.80, -1.37, 0.02, 347.23, 37.76);
insert into SHOT values (24, 14, 13, 35, 4.43, 306.47, -29.88, 4.47, 307.19, -29.78, 0.06, 359.08, -11.57);
insert into SHOT values (25, 14, 9, 35, 16.04, 255.91, 6.61, 16.07, 255.58, 6.72, 0.10, 179.11, 18.77);
insert into SHOT values (26, 13, 16, 35, 3.91, 75.89, 23.45, 3.94, 76.63, 24.14, 0.07, 152.93, 49.79);
insert into SHOT values (27, 16, 15, 35, 1.25, 63.61, 22.52, 1.27, 65.28, 23.84, 0.05, 148.02, 44.30);
insert into SHOT values (28, 14, 17, 35, 6.53, 77.56, 0.37, 6.50, 77.90, 0.60, 0.05, 197.76, 29.76);
insert into SHOT values (29, 17, 18, 35, 5.80, 30.63, -4.83, 5.83, 30.29, -4.86, 0.04, 337.75, -6.52);
insert into SHOT values (30, 18, 19, 35, 4.47, 130.48, -4.04, 4.48, 131.01, -3.28, 0.07, 199.95, 52.61);
insert into SHOT values (31, 18, 20, 35, 4.82, 159.17, 10.79, 4.89, 160.04, 11.90, 0.14, 217.15, 50.77);
insert into SHOT values (32, 20, 19, 35, 2.61, 48.55, -27.84, 2.66, 48.17, -28.39, 0.05, 20.78, -53.50);
insert into SHOT values (33, 20, 17, 35, 4.62, 263.51, -6.53, 4.62, 263.51, -6.39, 0.01, 79.00, 71.37);
insert into SHOT values (34, 20, 15, 35, 9.64, 280.68, -3.80, 9.64, 280.66, -4.02, 0.04, 240.07, -82.76);
insert into SHOT values (35, 17, 15, 35, 5.39, 295.14, -1.91, 5.41, 295.15, -1.72, 0.02, 299.22, 47.49);
insert into SHOT values (36, 15, 21, 35, 3.31, 82.79, -14.18, 3.30, 82.78, -14.08, 0.02, 264.31, 36.13);
insert into SHOT values (37, 21, 18, 35, 5.21, 63.14, 5.14, 5.21, 63.55, 5.19, 0.04, 155.89, 6.77);
insert into SHOT values (38, 17, 21, 35, 3.35, 327.39, -16.59, 3.34, 327.51, -16.77, 0.01, 90.79, -49.29);
insert into SHOT values (39, 19, 21, 35, 8.01, 274.39, -1.72, 8.05, 274.44, -1.53, 0.05, 285.05, 33.19);
insert into SHOT values (40, 14, 21, 35, 6.23, 48.77, -8.13, 6.23, 48.78, -8.28, 0.02, 102.97, -82.31);
insert into CENTRELINE values (36, 33, NULL, NULL, NULL, 0.00, 0.00, 0.00);
 insert into STATION values (1, '350', 33, 732134.09, 4728426.65, 2259.53);
insert into STATION_FLAG values(1, 'fix');
insert into STATION values (2, '351', 33, 732143.83, 4728428.50, 2265.19);
insert into STATION values (3, '349', 33, 732154.90, 4728432.38, 2272.89);
insert into STATION values (4, '352', 33, 732158.93, 4728432.00, 2275.49);
insert into STATION values (5, '353', 33, 732164.10, 4728433.89, 2280.52);
insert into STATION values (6, '354', 33, 732169.40, 4728430.04, 2285.14);
insert into STATION values (7, '355', 33, 732170.79, 4728432.31, 2289.63);
insert into STATION values (8, '356', 33, 732175.86, 4728432.36, 2294.11);
insert into STATION values (9, '1', 33, 732175.84, 4728436.27, 2292.57);
insert into STATION values (10, '3', 33, 732180.90, 4728435.27, 2290.82);
insert into STATION values (11, '2', 33, 732180.09, 4728439.98, 2292.08);
insert into STATION values (12, '4', 33, 732186.18, 4728439.77, 2288.80);
insert into STATION values (13, '6', 33, 732188.21, 4728442.59, 2288.47);
insert into STATION values (14, '5', 33, 732191.30, 4728440.25, 2290.69);
insert into STATION values (15, '1.0', 33, 732192.76, 4728443.91, 2290.60);
insert into STATION values (16, '66', 33, 732191.71, 4728443.42, 2290.09);
insert into STATION values (17, '2.0', 33, 732197.66, 4728441.61, 2290.76);
insert into STATION values (18, '3.0', 33, 732200.58, 4728446.62, 2290.27);
insert into STATION values (19, '4.0', 33, 732203.96, 4728443.69, 2290.01);
insert into STATION values (20, '5.0', 33, 732202.22, 4728442.13, 2291.28);
insert into STATION values (21, '2.1', 33, 732195.94, 4728444.31, 2289.80);
