Commit to write changes to database