Use factory pattern to create SensorDB instances