Following on from [this question](https://dba.stackexchange.com/questions/254513/what-principles-should-i-follow-when-entering-data-into-a-complex-relational-dat/254517#254517). I have a dictionary file written in XML. I've written a program in VB.NET to parse this file and store all the data in Class objects, and now I want to write a subroutine to insert all of this data into an Access database. What I'm struggling with is working out how to use SQL to `INSERT` all of the data.

There are 20 tables, and the main table is called `Entry`, which all the other tables link back to. To give a simplified example of the data structure, there is also a `Keyword` table, which links back to the `Entry`. And there is the `Keyword_Priority` table, which links back to `Keyword`. Both relationships are one-to-many, as below:

[![enter image description here](https://i.stack.imgur.com/L2qM3.png)](https://i.stack.imgur.com/L2qM3.png)

**My question**

I can use SQL `INSERT` for the `Entry` table to create one record. But how would I then create a record for the `Keyword` table, referring to the primary key of the `Entry` record I've just created? And how would I then create a record for `Keyword_Priority`, referring to the `Keyword` record? And so on.

This is all going to be done through VB.NET - I can't use Forms because there are 180,000+ entries to input. Is there any way to store a variable in SQL that I can refer to later?