Originally posted by Frank Verbruggen:
When name/location pair is already known in the database,
of when all fields (except the "booked" field) match the input.
This is very unclear to me since NOTHING in the DB file specifies name/location as the key for a record !
Frank, there has been much discussion on this topic, and some have felt that there needs to be some sort of unique key field in order to throw it. I actually took the opposite approach and a DuplicateKeyException was thrown if all the record's values (except customer id, don't check that one) were identical to the newly created record after trimming the record values. If so, then a DKE is thrown. I documented my decision and didn't get anything taken off because of it. It's really up to you.