Implemented DB iteraction for Sensors and Server