Using infopath to insert a header record and multiple detail records into SQL 2008

I would like to design one
form that accepts input for 2 different tables and then inserts that
data. The table structure is a header table and a detail table. So for
a stupid example lets say the tables are tblanimalheader and
tblanimaldetail.
I would like the form to accept the header value of dog and multiple
detail records of mutt, doberman, retriever, huskie, etc. The
submission would result in one header record being created (dog) and
multiple detail records being created. Lets
assume that there is an identity column that relates the 2 tables.