Added db layer for loading sensors and sinks from mysql.