If you have desiged your form's DataEnry View accurete against the constraints and relations in the database. Then only thing you have to do is to drag and drop a button control into your DataEntry view. Then in the Properties dialog box of button (opened by doubleclicking the button), just select that this was a Submit Button. When Submit Button option is selected, InfoPath designer opens another dialog box,
which asks where to submit. Select "Enable Submit" and in the combobox select "Submit To A Database". and click OK. As long as your connection string is valid, and relations between tables are stable, button will submit to the database correctly.
I hope this helps,
Good Luck,