Connect database with UI