Update Database.cpp

Made a few changes to update and delete. The program was crashing if it did not find a relation.