Using SQL queries would be pretty cool, but why would you need id's when you can do the relations between types like this :
If you use an ID, you will need to loop every category to find the one maching your item, like this you can just access it directly. Or am I missing something?
Type Category Field catName$ End Type Type Item Field cat.Category Field itemName End Type c1.Category=new Category c1\catName$="First Category" i1.Item=new Item i1\itemName="An Item" i1\cat=c1
If you use an ID, you will need to loop every category to find the one maching your item, like this you can just access it directly. Or am I missing something?