Database connection, existence checking