I agree. The database is already checking this for you. It's not like if you don't check nobody does. There's a performance hit to the additional checks, and it's pretty safe to assume the database engine can check this faster than you can.
Consider that if you send a query to the database engine to find the record, the database engine has to do all the work to parse the query, load up the appropriate table, and perform the search. Then you tell it do delete, and it has to parse a new query, search for the record from scratch, (this is the second time its searched this index now. Even if it's cached there's a hit there), check to see that it was found, and delete it.
That doesn't mean don't check to see that the delete took place. By all means check to see that your delete worked. If you expect somethign deleted and it wasn't deleted you may have some integrity problems. But if the database system is going to check for the file anyways, let it do the work.
This happens in other programming as well. I see programmers do this all the time:
if (myPointer != NULL)
delete[] myPointer;
The C++ spec already requires the delete operator to check for a NULL before attempting a delete. No need to do it again in your code.
So full agreement from me.
@JetsUnderPats--------------
I stand by what I said. The code you gave absolutely will crash, and the C++ specification does not require delete to check here. But this isn't the case I was talking about. Nor, by the way, is it possible or practical to test this. Your SAFE_MEMORY_DELETION macro isn't any safer. In the same circumstances it would also crash (assuming, as it appears, you are just checking that the pointer is non-zero. It looks like it was truncated by Yahoo Answers.)
If you have this:
int * pointer = 0; //note the = 0 here
delete[] pointer;
This is safe. Feel free to try it. The C++ standard requires that delete check for a null pointer. This is what I was saying is duplicate work. (To be fair it's possible to write your own delete operator. I refer to the standard library new and delete. If you don't set it to NULL then you have undefined behavior.)
This is what so many programmers check for that I objected to:
if (pointer)
delete pointer;
This is a pointless check, which does nothing to protect you from deleting a pointer twice or deleting a pointer that was never allocated. It only prevents you from deleting a null pointer which, ironically, is perfectly safe. And yet I see this code time after time after time. Since the delete has to check for NULL anyways the check is performed twice. I am told (but can't vouch for this) that some compilers optimize the check away.
Incidentally, you wrote that this would work:
char * silly = new char[100];
delete silly;
This is a whole seperate discussion. You should be using delete[] rather than delete.