Topic: Mass post insertions.

I have a collection of questions and answers that I want to populate my forum with. Right now they are in the following format.
"Category","Subcategory","Question text","Answer text"

I would like to insert it into the database so that the category would correspond to with the matching forum category and the sub category with the forum of the same name.  Then the question text would create a topic and first post, and the answer would create a response post.

I had planned to create a script that used a SQL query to insert this information into the forum database. However, I don't think I understand the relationship between the tables enough to do this correctly.

I see that there is a post table. Would it be enough to just populate this table?

If someone could either point to a resource that outlines the table relationships or give me a rough idea of how I should approach this I am sure I can figure it out.

Re: Mass post insertions.

you need to get the forum ids for each subcategory

then for each q/a, you need to do something like:
insert into topic {corresponding forum id, title, ...}
insert into post {resultant topic id, question text, ...}
insert into post {resultant topic id, answer text, ...}
then you need to increment values as necessary

i don't know anything about punbb except for its table format. hopefully this helps. read the code!