Linking database entries

Hi, I am still very much at the initial learning stage and just want to check if I am doing this right. I have a section in my app where we would create what I am calling a KIT and gets stored in a database named ITEMS IN KIT. That ITEMS IN KIT data type consists of among other things a field set up as a LIST OF MATERIALS (materials being another database data type). The LIST of materials will have, let’s say 3 entries. There is another field set up as a LIST OF NUMBERS called ITEM QUANTITY that will have 3 entries, always a value of 0.3 or greater (both should always have the same entry count).

Entry 1 in both fields are related to each other (in practice only, I have done nothing to make them relate to each other on bubble, see question below), as are 2, 3 and so on. So when I load the data back onto my app it fetches the data in the stored order, and it all displays as expected.

My question, Is this correct? am I to rely on the lists being stored in the correct order and never being sorted and therefore mixing up the quantities related to each item? Is there a way I can make them relate, so bubble knows the list entry to associate with each other remembering this is a LIST OF things and one of them being a field type referencing another data type so they have to match.

Thanks All.


No, this is not correct. You can’t and shouldn’t rely on parallel lists to match data. Instead use separate objects for these.

Thank you, could you link me to any info on how I would do that?

Thanks

Gavin