Ok, then
thanks alot.
Per Westermark wrote:
>You just have to add an extra field to store the container id.
>
>To connect items you need relations, and relations need something to match
>against. Hence an extra field.
>
>/Per W
>
>On Sun, 3 Oct 2004, David McKen wrote:
>
>
>
>>What is the best structure to use when saving nested data in a database?
>>
>>I wantto use an embeded database to store character info and am a bit
>>stuck on the inventory. How do I use the databse to handle container
>>items which can have items in them. If possible I am interested in a
>>method that would allow me to nest indefinely (let the code limit how
>>far we can nest).
>>
>>So far the best I can come up with is an extra field which can be NULL
>>and has the item number of the object it is contained in. I was hoping
>>to not have to add another field to do this.
>>
>>Any thoughts appreciated.
>>
>>Signed
>>David McKen
>>
>>
>
>
>
>
|