added new database-scheme, using threading for polling sensors.