create table SURVEY (ID integer, PARENT_ID integer, NAME varchar(6), FULL_NAME varchar(6), TITLE varchar(35));
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(8));
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(4), 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(6), TITLE varchar(35), PROJID integer, LENGTH real, DEPTH real);
create table SCRAPS (ID integer, SURVEY_ID integer, NAME varchar(6), 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 (26, 1, 'rabbit', 'rabbit', 'Rabbit Cave');
 insert into CENTRELINE values (27, 26, NULL, NULL, NULL, 0.00, 0.00, 0.00);
 insert into CENTRELINE values (28, 26, NULL, '1997-08-10', NULL, 75.93, 35.18, 0.00);
 insert into PERSON values (1, 'Martin', 'Budaj');
insert into TOPO values (1, 28);
 insert into PERSON values (2, 'Miroslav', 'Hofer');
insert into TOPO values (2, 28);
 insert into PERSON values (3, 'Stacho', 'Mudrak');
insert into TOPO values (3, 28);
 insert into SHOT values (1, 1, 2, 28, 6.400, 180.00, 4.50, 6.400, 180.00, 4.48, 0.002, 0.00, -82.78);
insert into SHOT values (2, 2, 3, 28, 5.200, 65.70, -7.20, 5.197, 65.72, -7.19, 0.004, 212.69, 25.92);
insert into SHOT values (3, 3, 4, 28, 2.090, 37.80, -9.00, 2.086, 37.70, -9.10, 0.006, 258.15, -29.85);
insert into SHOT values (4, 4, 5, 28, 4.000, 73.80, 25.20, 4.007, 73.82, 25.26, 0.008, 86.81, 57.36);
insert into SHOT values (5, 5, 6, 28, 8.280, 18.90, -7.20, 8.278, 18.90, -7.22, 0.003, 206.04, -47.94);
insert into SHOT values (6, 5, 7, 28, 10.890, 318.60, -4.50, 10.896, 318.62, -4.53, 0.009, 355.46, -40.68);
insert into SHOT values (7, 7, 8, 28, 7.080, 322.20, 4.50, 7.077, 322.14, 4.54, 0.009, 209.53, 29.09);
insert into SHOT values (8, 8, 9, 28, 2.730, 234.00, 0.90, 2.721, 233.97, 0.84, 0.010, 61.90, -16.94);
insert into SHOT values (9, 9, 10, 28, 7.280, 343.80, 7.20, 7.285, 343.77, 7.18, 0.007, 310.17, -20.49);
insert into SHOT values (10, 10, 11, 28, 6.590, 277.20, 1.80, 6.585, 277.16, 1.83, 0.008, 139.03, 22.26);
insert into SHOT values (11, 11, 12, 28, 3.440, 335.70, -12.60, 3.444, 335.57, -12.58, 0.008, 271.88, 2.78);
insert into SHOT values (12, 12, 13, 28, 6.970, 248.40, -1.80, 6.962, 248.41, -1.81, 0.009, 58.15, -7.04);
insert into SHOT values (13, 12, 14, 28, 4.980, 351.00, 55.80, 4.983, 351.18, 55.77, 0.010, 56.16, 6.84);
insert into SHOT values (14, 14, 15, 28, 11.900, 265.50, 2.70, 11.900, 265.46, 2.70, 0.007, 178.86, -4.39);
insert into SHOT_FLAG values(14, 'srf');
insert into SHOT values (15, 15, 16, 28, 23.280, 153.00, 1.80, 23.276, 153.01, 1.80, 0.005, 303.05, -15.79);
insert into SHOT_FLAG values(15, 'srf');
insert into SCRAPS values (29, 26, 'ps2', 1, 30.76478, 2.75647);
 insert into SCRAPS values (39, 26, 'ps1', 1, 54.39595, 3.46660);
 insert into SCRAPS values (133, 26, 'xs1', 2, 9.04258, 0.59354);
 insert into SCRAPS values (171, 26, 'xs2', 2, 7.01114, 2.23114);
 insert into MAPS values (187, 26, 'pdx', 'Rabbit Cave -- extended elevation', 2, 75.930, -5.940);
 insert into MAPITEMS values (187, 4, 133);
 insert into MAPITEMS values (187, 4, 171);
 insert into MAPS values (188, 26, 'pdp', 'Rabbit Cave', 1, 75.930, -5.940);
 insert into MAPITEMS values (188, 4, 39);
 insert into MAPITEMS values (188, 4, 29);
 insert into STATION values (1, '0', 26, 15.93, -2.42, 627.48);
insert into STATION values (2, '1', 26, 15.93, -8.80, 627.98);
insert into STATION values (3, '2', 26, 20.63, -6.68, 627.33);
insert into STATION values (4, '3', 26, 21.89, -5.05, 627.00);
insert into STATION values (5, '4', 26, 25.37, -4.04, 628.71);
insert into STATION values (6, '5', 26, 28.03, 3.73, 627.67);
insert into STATION values (7, '6', 26, 18.19, 4.11, 627.85);
insert into STATION values (8, '7', 26, 13.86, 9.68, 628.41);
insert into STATION values (9, '8', 26, 11.66, 8.08, 628.45);
insert into STATION values (10, '9', 26, 9.64, 15.02, 629.36);
insert into STATION values (11, '10', 26, 3.11, 15.84, 629.57);
insert into STATION values (12, '11', 26, 1.72, 18.90, 628.82);
insert into STATION values (13, '12', 26, -4.75, 16.34, 628.60);
insert into STATION values (14, '13', 26, 1.29, 21.67, 632.94);
insert into STATION values (15, '14', 26, -10.56, 20.73, 633.50);
insert into STATION values (16, '15', 26, 0.00, 0.00, 634.23);
insert into STATION_FLAG values(16, 'fix');
