Commit database changes