Insert a Record

How can I insert a record in two db table(between two db table Primary Key is there) at a time? :rolleyes:

$parentModel->save();

$childModel->parentId = $parentModel->id;

$childModel->save();