def check_if_tuple_exists(cursor, table_name, kennziffer, year):
    """
    Checks if the tuple is already in te DB.
    :param cursor: for the db to check
    :param table_name: name of the table to check in
    :param kennziffer: this value is checked
    :param year: this value is checked
    :return: True if the tuple exists in the table false if it does not
    """
    cursor.execute("""SELECT * FROM %s WHERE `KENNZIFFER`= %s AND `YEAR` = '%s'"""
                   % (table_name, kennziffer, year))
    tuples = cursor.fetchall()
    if tuples:
        return True
    return False