Your data structure does not work.
Please describe your data with a sequence of sentences of the form
Each ___ has a ___
Fill in the words.
I suggest a spread sheet instead of TinyDB to preserve the data structure.
You turned TinyDB into a cross cut shredder.