Setup parent child relation based on rowIds

I am learning Glide. I made a simple todo app. You can add lists and to each lists you can add todo Items. A list has many items and an item belongs to one list. For the relation between the lists and the items I used the name of the list. This works fine. the only thing is: when I change the name of a list, the relation brakes. Which makes sense of course.

In another post I learned that using rowIds is a way to solve this. You assign the rowId of the list to the item and you use a lookup column to show the name of the list. I understand the logic behind it, but I cannot figure out how to make this work in Glide.

How do I need to setup the relation from the list to the items correctly?
How do I need to setup the relation from the items to the lists correctly?
I want to add an item via a form. How do I assign a list to that item to setup the relation? I should be able to pick a list based on its name. And then the rowId should be stored to setup the relation. But it looks like this cannot be done with an choice dropdown.

As you alread said you need a row id column in your parent table.
In your child table create a column named parent id for example.
The cohoice box has a option to show the name in the gui and write the rowid to your child table.

I discovered where I went wrong. I thought I needed to make a relation column from the Parent ID. But I couldn’t set the relation column to the ID in the choice dropdown.

Now I created a text Parent ID in the child table and added a relation column mapping the Parent ID column to the List->RowID column.

Et voila, lesson learned.

Thanks.