Maybe it would make sense to get a bit of history to understand how it works. In earlier versions of App Inventor, TinyDB only ever wrote to the same backing file (TinyDB1.xml). This was useful for persisting data across app restarts and passing data between screens, since every instance of TinyDB in the app would read/write the same backing store.
However, we also observed that many people were surprised by the fact that if they create multiple TinyDBs on the same screen that data would randomly "appear" in one TinyDB written to another. Conceptually people expected these different TinyDBs to be backed by different data stores and not share the same data.
We introduced the Namespace property to address the confusion around having multiple TinyDB instances on the same screen. While they still initialize Namespace to "TinyDB1" to simulate the old behavior, you can change the Namespace property to store data in a new file (
<namespace>.xml). For example, if you change Namespace to be "People", then you'll end up with a "People.xml" file. and so forth. For two TinyDB (same screen or different) to manipulate the same data, they need to have the same Namespace property. You can programmatically set the Namespace, so even if you have one instance of the TinyDB component it can write to many different backing files. Or you can have many TinyDB each with a fixed Namespace property.