class DatabaseService {

    public boolean isNotExistByName(DataBaseInfo dataBaseInfo) throws SQLException {
        Long n = dataBaseDao.getCountByName(dataBaseInfo.getDbname());
        Long i = dataBaseDao.getCountByIdAndName(dataBaseInfo.getId(), dataBaseInfo.getDbname());
        if (n == 0 || (n == 1 && i == 1)) {
            return true;
        }
        return false;
    }

}