added sensor_id variable
changed the build_database to create database with field sensor_id
store the sensor_id into record