that's a very broad question.
data assist includes behaviors for doing single record inserts or updates, and for Multiple record inserts or updates.
The insert record behaviors have a section named session variable, this is used to set a session variable with the ID of the record that was just inserted.
That session can be used in a multiple record insert to create the parent child relationship when data is inserted to the child table in your database.
In the case where you are using a a linking table to create a many to many relationship, there is the Mange relational table behavior that can be used along side the single record insert or update.