create table SURVEY (ID integer, PARENT_ID integer, NAME varchar(10), FULL_NAME varchar(14), TITLE varchar(25));
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(11), 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(6), 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(10), TITLE varchar(25), PROJID integer, LENGTH real, DEPTH real);
create table SCRAPS (ID integer, SURVEY_ID integer, NAME varchar(10), 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 (21, 1, 'pod30', 'pod30', 'Pod Tridsiatkou');
 insert into CENTRELINE values (22, 21, NULL, NULL, NULL, 0.00, 0.00, 0.00);
 insert into SURVEY values (23, 21, 'padavka', 'padavka.pod30', 'Dom Padavky, Klenotnica');
 insert into CENTRELINE values (24, 23, NULL, NULL, NULL, 0.00, 0.00, 0.00);
 insert into CENTRELINE values (25, 23, NULL, '1986-12-31', NULL, 175.90, 0.00, 0.00);
 insert into PERSON values (1, 'Evzen', 'Janousek');
insert into TOPO values (1, 25);
 insert into PERSON values (2, 'Gabriela', 'Rekosova');
insert into TOPO values (2, 25);
 insert into PERSON values (3, 'Stanislav', 'Vanecek');
insert into TOPO values (3, 25);
 insert into SHOT values (1, 1, 2, 25, 18.700, 304.00, -37.00, 18.696, 304.00, -36.99, 0.004, 135.21, 65.79);
insert into SHOT values (2, 2, 3, 25, 11.200, 78.00, 0.00, 11.195, 77.99, 0.00, 0.005, 284.81, 0.00);
insert into SHOT values (3, 3, 4, 25, 4.300, 47.00, -41.00, 4.301, 47.12, -40.97, 0.007, 116.35, 8.17);
insert into SHOT values (4, 2, 5, 25, 17.000, 288.00, -9.00, 17.002, 288.00, -9.00, 0.002, 321.76, -19.16);
insert into SHOT values (5, 2, 6, 25, 14.600, 238.00, 6.00, 14.594, 238.01, 5.98, 0.008, 39.63, -46.70);
insert into SHOT values (6, 6, 7, 25, 8.400, 222.00, 4.00, 8.316, 222.75, 5.38, 0.244, 354.96, 52.71);
insert into SHOT values (7, 7, 8, 25, 7.100, 263.00, 20.00, 7.092, 264.19, 21.16, 0.199, 16.39, 41.44);
insert into SHOT values (8, 8, 9, 25, 2.900, 258.00, 0.00, 2.903, 258.07, 0.00, 0.004, 311.12, 0.00);
insert into SHOT values (9, 9, 10, 25, 5.000, 150.00, 37.00, 5.003, 149.97, 36.99, 0.004, 117.91, 13.47);
insert into SHOT values (10, 10, 11, 25, 6.100, 269.00, -19.00, 6.104, 269.01, -19.03, 0.005, 281.59, -50.87);
insert into SHOT values (11, 11, 12, 25, 4.000, 239.00, 30.00, 3.999, 239.06, 30.01, 0.004, 350.61, -0.00);
insert into SHOT values (12, 12, 13, 25, 2.800, 204.00, 13.00, 2.798, 204.03, 13.01, 0.002, 352.15, 3.28);
insert into SHOT values (13, 8, 14, 25, 6.000, 288.00, 11.00, 6.029, 289.20, 11.97, 0.163, 14.71, 40.29);
insert into SHOT values (14, 14, 15, 25, 4.500, 19.00, 27.00, 4.650, 18.92, 27.26, 0.151, 16.23, 35.10);
insert into SHOT values (15, 15, 16, 25, 5.900, 63.00, 10.00, 5.866, 62.99, 10.41, 0.054, 244.29, 40.77);
insert into SHOT values (16, 16, 17, 25, 18.900, 94.00, 3.00, 18.882, 94.54, 3.89, 0.342, 195.51, 58.25);
insert into SHOT values (17, 17, 18, 25, 8.600, 80.00, -4.00, 8.246, 77.92, -4.38, 0.470, 299.40, -3.67);
insert into SHOT values (18, 15, 19, 25, 8.300, 262.00, 3.00, 8.302, 262.03, 3.04, 0.007, 330.15, 53.87);
insert into SHOT values (19, 19, 20, 25, 4.000, 270.00, -20.00, 4.002, 270.00, -20.02, 0.002, 270.00, -57.36);
insert into SHOT values (20, 20, 21, 25, 6.600, 313.00, -14.00, 6.593, 312.97, -14.04, 0.009, 154.60, -21.81);
insert into SHOT values (21, 21, 22, 25, 11.000, 278.00, -32.00, 11.003, 278.01, -32.00, 0.003, 307.32, -17.39);
insert into SURVEY values (27, 21, 'nad_pad', 'nad_pad.pod30', 'Nad Padavkou');
 insert into CENTRELINE values (28, 27, NULL, NULL, NULL, 0.00, 0.00, 0.00);
 insert into CENTRELINE values (29, 27, NULL, '2000-08-01', NULL, 63.23, 0.00, 0.00);
 insert into PERSON values (4, 'Martin', 'Budaj');
insert into TOPO values (4, 29);
 insert into PERSON values (5, 'Stacho', 'Mudrak');
insert into TOPO values (5, 29);
 insert into PERSON values (6, 'Libor', 'Stubna');
insert into TOPO values (6, 29);
 insert into SHOT values (22, 23, 24, 29, 6.048, 162.90, 39.60, 6.045, 163.26, 40.68, 0.118, 321.89, 46.19);
insert into SHOT values (23, 24, 25, 29, 4.512, 74.70, -5.40, 4.458, 73.93, -4.63, 0.101, 305.45, 39.98);
insert into SHOT values (24, 25, 26, 29, 2.573, 81.00, -1.80, 2.579, 80.17, -1.33, 0.043, 0.20, 28.89);
insert into SHOT values (25, 26, 27, 29, 5.837, 74.70, 9.90, 5.816, 73.94, 10.80, 0.121, 318.21, 45.78);
insert into SHOT values (26, 27, 28, 29, 5.942, 49.50, -28.80, 5.898, 48.74, -28.12, 0.108, 314.05, 50.12);
insert into SHOT values (27, 25, 29, 29, 3.898, 15.30, -23.40, 3.851, 14.94, -23.57, 0.053, 220.08, 8.56);
insert into SHOT values (28, 26, 30, 29, 3.494, 356.40, -25.20, 3.529, 356.95, -25.15, 0.046, 39.66, -15.21);
insert into SHOT values (29, 30, 29, 29, 1.536, 261.00, 0.90, 1.477, 261.43, 0.78, 0.061, 70.41, -3.91);
insert into SHOT values (30, 28, 31, 29, 6.576, 100.80, 3.60, 6.514, 100.29, 4.49, 0.132, 320.87, 47.18);
insert into SHOT values (31, 31, 32, 29, 8.314, 182.70, 41.40, 8.418, 179.72, 42.16, 0.358, 91.91, 25.15);
insert into SHOT values (32, 32, 33, 29, 3.485, 199.80, 55.80, 3.547, 196.95, 56.56, 0.125, 106.14, 38.63);
insert into SHOT values (33, 33, 34, 29, 1.651, 264.60, -7.20, 1.725, 264.99, -5.66, 0.087, 273.02, 25.01);
insert into SHOT values (34, 34, 35, 29, 2.755, 161.10, -3.60, 2.678, 161.70, -2.78, 0.091, 320.51, 28.35);
insert into SHOT values (35, 35, 36, 29, 4.128, 231.30, 10.80, 4.192, 232.13, 11.70, 0.109, 281.45, 44.82);
insert into SHOT values (36, 35, 37, 29, 2.477, 89.10, 15.30, 2.480, 89.04, 15.44, 0.007, 27.33, 66.60);
insert into SURVEY values (31, 21, 'nad_pad2', 'nad_pad2.pod30', 'Prepoj Traverz-Padavka');
 insert into CENTRELINE values (32, 31, NULL, NULL, NULL, 0.00, 0.00, 0.00);
 insert into CENTRELINE values (33, 31, NULL, '2000-08-12', NULL, 27.81, 0.00, 0.00);
 insert into TOPO values (4, 33);
 insert into PERSON values (7, 'Peter', 'Sterba');
insert into TOPO values (7, 33);
 insert into TOPO values (6, 33);
 insert into SHOT values (37, 38, 39, 33, 4.109, 262.80, -57.60, 4.107, 262.94, -57.66, 0.007, 35.58, -6.45);
insert into SHOT values (38, 39, 40, 33, 7.738, 18.90, -50.40, 7.731, 18.84, -50.44, 0.010, 230.73, 11.08);
insert into SHOT values (39, 40, 41, 33, 5.213, 29.70, -48.60, 5.294, 32.84, -47.77, 0.222, 91.14, -2.53);
insert into SHOT values (40, 40, 42, 33, 10.752, 219.60, 30.60, 10.923, 224.19, 29.15, 0.820, 291.18, -10.77);
insert into SURVEY values (35, 21, 'nad_pad3', 'nad_pad3.pod30', 'Nad Padavkou');
 insert into CENTRELINE values (36, 35, NULL, NULL, NULL, 0.00, 0.00, 0.00);
 insert into CENTRELINE values (37, 35, NULL, '2000-08-12', NULL, 80.59, 0.00, 0.00);
 insert into TOPO values (4, 37);
 insert into TOPO values (7, 37);
 insert into TOPO values (6, 37);
 insert into SHOT values (41, 43, 44, 37, 2.208, 145.80, 40.50, 2.207, 146.96, 39.38, 0.055, 198.36, -37.95);
insert into SHOT values (42, 44, 45, 37, 5.184, 120.60, 63.00, 5.119, 121.62, 62.24, 0.103, 175.32, -59.62);
insert into SHOT values (43, 45, 46, 37, 6.365, 144.00, 53.10, 6.336, 144.77, 51.81, 0.155, 172.77, -45.17);
insert into SHOT values (44, 46, 47, 37, 4.896, 185.40, 30.60, 4.943, 185.59, 29.31, 0.121, 193.91, -36.58);
insert into SHOT values (45, 47, 48, 37, 6.048, 214.20, 55.80, 6.023, 213.87, 54.28, 0.164, 204.42, -43.31);
insert into SHOT values (46, 48, 49, 37, 3.360, 235.80, -21.60, 3.485, 235.77, -21.02, 0.130, 235.11, -5.78);
insert into SHOT values (47, 49, 50, 37, 6.240, 280.80, -22.50, 6.337, 279.90, -21.96, 0.146, 241.07, 7.04);
insert into SHOT values (48, 50, 51, 37, 5.616, 280.80, -27.00, 5.699, 279.92, -26.36, 0.130, 243.33, 8.68);
insert into SHOT values (49, 51, 52, 37, 7.104, 321.30, -55.80, 7.105, 320.05, -55.56, 0.092, 246.48, 9.72);
insert into SHOT values (50, 52, 53, 37, 5.376, 7.20, -44.10, 5.298, 6.24, -44.60, 0.111, 222.64, 11.02);
insert into SHOT values (51, 53, 54, 37, 6.288, 298.80, 32.40, 6.351, 297.71, 32.16, 0.123, 241.79, 5.02);
insert into SHOT values (52, 54, 55, 37, 3.264, 23.40, 15.30, 3.151, 22.68, 15.65, 0.121, 221.95, -5.36);
insert into SHOT values (53, 56, 57, 37, 1.459, 172.80, -58.50, 1.461, 172.41, -58.81, 0.010, 34.69, -36.75);
insert into SHOT values (54, 57, 58, 37, 8.112, 0.00, -90.00, 8.110, 90.00, -90.00, 0.002, 0.00, 90.00);
insert into SHOT values (55, 58, 59, 37, 5.040, 176.40, 5.40, 5.042, 176.46, 5.35, 0.007, 245.85, -37.83);
insert into SHOT values (56, 59, 55, 37, 4.032, 270.90, -14.40, 4.027, 270.88, -14.38, 0.006, 105.48, 28.39);
insert into SCRAPS values (39, 21, 'nad_pad_s1', 1, 55.36702, 1.60507);
 insert into SCRAPS values (179, 21, 'nad_pad_r1', 2, 0.00000, 0.00000);
 insert into SCRAPS values (183, 21, 'padavka_s1', 1, 40.89037, 0.88001);
 insert into CENTRELINE values (254, 21, NULL, NULL, NULL, 0.00, 0.00, 0.00);
 insert into MAPS values (263, 21, 'pad_m', 'Dom Padavky', 1, 347.529, -26.120);
 insert into MAPITEMS values (263, 4, 39);
 insert into MAPITEMS values (263, 4, 183);
 insert into STATION values (1, '86', 23, 0.00, 0.00, 0.00);
insert into STATION values (2, '87', 23, -12.38, 8.35, -11.25);
insert into STATION values (3, '88', 23, -1.43, 10.68, -11.25);
insert into STATION values (4, '89', 23, 0.95, 12.89, -14.07);
insert into STATION values (5, '1087', 23, -28.35, 13.54, -13.91);
insert into STATION values (6, '90', 23, -24.69, 0.66, -9.73);
insert into STATION values (7, '91', 23, -30.31, -5.42, -8.95);
insert into STATION values (8, '92', 23, -36.89, -6.09, -6.39);
insert into STATION values (9, '93', 23, -39.73, -6.69, -6.39);
insert into STATION values (10, '94', 23, -37.73, -10.15, -3.38);
insert into STATION values (11, '95', 23, -43.50, -10.25, -5.37);
insert into STATION values (12, '96', 23, -46.47, -12.03, -3.37);
insert into STATION values (13, '97', 23, -47.58, -14.52, -2.74);
insert into STATION values (14, '98', 23, -42.46, -4.15, -5.14);
insert into STATION values (15, '99', 23, -41.12, -0.24, -3.01);
insert into STATION values (16, '100', 23, -35.98, 2.38, -1.95);
insert into STATION values (17, '101', 23, -17.20, 0.89, -0.67);
insert into STATION values (18, '102', 23, -9.16, 2.61, -1.30);
insert into STATION values (19, '103', 23, -49.33, -1.39, -2.57);
insert into STATION values (20, '104', 23, -53.09, -1.39, -3.94);
insert into STATION values (21, '105', 23, -57.77, 2.97, -5.54);
insert into STATION values (22, '106', 23, -67.01, 4.27, -11.37);
insert into STATION values (23, '0', 27, -41.12, -0.24, -3.01);
insert into STATION values (24, '1', 27, -39.80, -4.63, 0.93);
insert into STATION values (25, '2', 27, -35.53, -3.40, 0.57);
insert into STATION values (26, '3', 27, -32.99, -2.96, 0.51);
insert into STATION values (27, '4', 27, -27.50, -1.38, 1.60);
insert into STATION values (28, '5', 27, -23.59, 2.05, -1.18);
insert into STATION values (29, '6', 27, -34.62, 0.01, -0.97);
insert into STATION values (30, '7', 27, -33.16, 0.23, -0.99);
insert into STATION values (31, '8', 27, -17.20, 0.89, -0.67);
insert into STATION values (32, '9', 27, -17.17, -5.35, 4.98);
insert into STATION values (33, '10', 27, -17.74, -7.22, 7.94);
insert into STATION values (34, '11', 27, -19.45, -7.37, 7.77);
insert into STATION values (35, '12', 27, -18.61, -9.91, 7.64);
insert into STATION values (36, '13', 27, -21.85, -12.43, 8.49);
insert into STATION values (37, '14', 27, -16.22, -9.87, 8.30);
insert into STATION values (38, '0', 31, -10.50, -4.77, 12.05);
insert into STATION values (39, '1', 31, -12.68, -5.04, 8.58);
insert into STATION values (40, '2', 31, -11.09, -0.38, 2.62);
insert into STATION values (41, '3', 31, -9.16, 2.61, -1.30);
insert into STATION values (42, '4', 31, -17.74, -7.22, 7.94);
insert into STATION values (43, '0', 35, -24.69, 0.66, -9.73);
insert into STATION values (44, '1', 35, -23.76, -0.77, -8.33);
insert into STATION values (45, '2', 35, -21.73, -2.02, -3.80);
insert into STATION values (46, '3', 35, -19.47, -5.22, 1.18);
insert into STATION values (47, '4', 35, -19.89, -9.51, 3.60);
insert into STATION values (48, '5', 35, -21.85, -12.43, 8.49);
insert into STATION values (49, '6', 35, -24.54, -14.26, 7.24);
insert into STATION values (50, '7', 35, -30.33, -13.25, 4.87);
insert into STATION values (51, '8', 35, -35.36, -12.37, 2.34);
insert into STATION values (52, '9', 35, -37.94, -9.29, -3.52);
insert into STATION values (53, '10', 35, -37.53, -5.54, -7.24);
insert into STATION values (54, '11', 35, -42.29, -3.04, -3.86);
insert into STATION values (55, '12', 35, -41.12, -0.24, -3.01);
insert into STATION values (56, '13', 35, -37.63, 5.46, 6.88);
insert into STATION values (57, '14', 35, -37.53, 4.71, 5.63);
insert into STATION values (58, '15', 35, -37.53, 4.71, -2.48);
insert into STATION values (59, '16', 35, -37.22, -0.30, -2.01);
