Implemented update() in database class