Seems you want to do something like this:
(I have used the label just to display the content of the stored list of lists, you would work with global db and update it to tinydb EVERYTIME you make a change - as is shown in the Button1.Click event)
global db