This can be done quite easily, though the exact 'how' depends somewhat on your domain model.
If you could post a picture of your domain model and the structure of your form, it would helpl give a more specific answer.
In general however, I would point out that you can create a custom 'action' button in your form, to replace the 'save' button. With this button you call a microflow that can execute a number of actions of your choice. In addition to saving (commit) the main object, you can also update the database as you describe.