
-- r_waypoint
insert into r_waypoint 
       values(nextval('r_waypoint_waypoint_id_seq'), 
              1, '2005-04-05 23:23:56');
insert into r_waypoint 
       values(nextval('r_waypoint_waypoint_id_seq'), 
              1, '2005-04-05 23:24:01');


-- t_data_sensor_values

insert into t_data_sensor_values 
       values(nextval('t_data_sensor_values_value_id_seq'), 
              23.5, (select sensor_id from t_data_sensors where label='temperature'), 
              (select waypoint_id from r_waypoint where time='2005-04-05 23:23:56'));

insert into t_data_sensor_values 
       values(nextval('t_data_sensor_values_value_id_seq'), 
              34, (select sensor_id from t_data_sensors where label='loudness'), 
              (select waypoint_id from r_waypoint where time='2005-04-05 23:23:56'));

insert into t_data_sensor_values 
       values(nextval('t_data_sensor_values_value_id_seq'), 
              900, (select sensor_id from t_data_sensors where label='brightness'), 
              (select waypoint_id from r_waypoint where time='2005-04-05 23:23:56'));

insert into t_data_sensor_values 
       values(nextval('t_data_sensor_values_value_id_seq'), 
              25.7, (select sensor_id from t_data_sensors where label='time_data'), 
              (select waypoint_id from r_waypoint where time='2005-04-05 23:24:01'));

insert into t_data_sensor_values 
       values(nextval('t_data_sensor_values_value_id_seq'), 
              958, (select sensor_id from t_data_sensors where label='sysload_data'), 
              (select waypoint_id from r_waypoint where time='2005-04-05 23:24:01'));

insert into t_data_sensor_values 
       values(nextval('t_data_sensor_values_value_id_seq'), 
              38, (select sensor_id from t_data_sensors where label='num_datasensor_type'), 
              (select waypoint_id from r_waypoint where time='2005-04-05 23:24:01'));


-- t_time

--insert into t_time values(nextval('t_time_time_id_seq'), '2005-04-04 17:35:25');
--insert into t_time values(nextval('t_time_time_id_seq'), '2005-04-04 17:35:35');


-- t_locations

insert into t_locations 
       values(nextval('t_locations_location_id_seq'), 
              'HB', 'Uni', 'MZH', '5', '5380', 'nix', 45.7, 95.3, 21.5, 
              (select waypoint_id from r_waypoint where time='2005-04-05 23:23:56'));

insert into t_locations 
       values(nextval('t_locations_location_id_seq'), 
              'HB', 'Uni', 'MZH', '5', '5380', 'gar nix', 45.2, 95.5, 21.3, 
              (select waypoint_id from r_waypoint where time='2005-04-05 23:24:01'));


-- t_tour

insert into t_tour 
       values(nextval('t_tour_tour_id_seq'), 
              'About a walk through our project room');


-- t_person

insert into t_person 
       values(nextval('t_person_person_id_seq'), 'Warden', 'Tobias', 'warden');
insert into t_person 
       values(nextval('t_person_person_id_seq'), 'Xing', 'Xin', 'xin');
insert into t_person 
       values(nextval('t_person_person_id_seq'), 'Pesina', 'Roman', 'romanp');


-- t_keyword

insert into t_keyword 
       values(nextval('t_keyword_keyword_id_seq'), 
              'Sommer2000, chinesische Suppe, Kaffee, Music');


-- r_tour_person

insert into r_tour_person 
       values((select tour_id from t_tour where description='About a walk through our project room'), (select person_id from t_person where name='Warden'));
insert into r_tour_person 
       values((select tour_id from t_tour where description='About a walk through our project room'), (select person_id from t_person where name='Xing'));
insert into r_tour_person 
       values((select tour_id from t_tour where description='About a walk through our project room'), (select person_id from t_person where name='Pesina'));


-- r_tour_keyword

insert into r_tour_keyword 
       values((select tour_id from t_tour where description='About a walk through our project room'), (select keyword_id from t_keyword where label='Sommer2000, chinesische Suppe, Kaffee, Music'));


-- r_annotations

insert into r_annotations 
       values(nextval('r_annotations_annotation_id_seq'), (select keyword_id from t_keyword where label='Sommer2000, chinesische Suppe, Kaffee, Music'), 1, null, null, 'no comment');


-- t_sounds und t_images können nicht gefüllt werden, da ich im Moment nicht weiss, wie man sounds und images
-- in psql speichert und die Felder sound und image nicht mit null 'gefüllt' werden können

-- t_sounds
-- insert into t_sounds values(nextval('t_sounds_sound_id_seq'), 1, null, 'bla blub');
