Impalah wrote: The connection between them is assetID(inventoryItems)->id(assets) but there aren't any foreign keys.
The asset UUID in the inventory record is a foreign key. Located in one table (inventoryitems), it is the unique key to an entry in a different table (assets). The problem, in this specific example, is that if the asset record is copied whenever it is modified, for fear that some other inventory item might be pointing to it, eventually most of the asset records in my database will be junk--not referenced by any item and so unreachable. Worse yet, due to glitches and crashes, an inventory item might be pointing to a non-existent asset-ID. (Now that I know the data structure, I have already found several such situations in my database.) Frank W Sweet Backintyme Publishing. ----- Original Message ----- From: "Impalah" <[email protected]> To: "Frank W Sweet" <[email protected]>; <[email protected]> Sent: Tuesday, March 03, 2009 9:12 AM Subject: Re: [Opensim-users] Database overview needed Not, there aren't any, at least in the "original" opensim servers. Asset server is a huge store of anything, even the generated maps and terrain revisions (opensim region servers). Not only inventory assets are stored there. Asset server and inventory server are separated processes each one with their own data models. The connection between them is assetID(inventoryItems)->id(assets) but there aren't any foreign keys. You could use different databases for assets/inventory. I have only doubts about the new AssetsInventory server, I hadn't time to play with it. Greetings 2009/3/3 Frank W Sweet <[email protected]> > Thank you so much! I had no idea that section of the Wiki was out > there! > > One other question: Since there is no reference counter in "asset" > for > inventory-to-asset references (nor in "userfriend" for > user-to-userfriend references, nor in any other table receiving > one-to-many relationships, for that matter), I assume that there are > utility procedures in the code that are run periodically to purge > unreferenced records and to check referential integrity. Where in > the > code would these be, and how often are they run (at startup, > shutdown, > every so often)? > > Frank W Sweeet > Backintyme Publishing > > ----- Original Message ----- > From: "Jeff Ames" <[email protected]> > To: "Frank W Sweet" <[email protected]>; > <[email protected]> > Sent: Monday, March 02, 2009 10:58 PM > Subject: Re: [Opensim-users] Database overview needed > > > There is some existing documentation at > http://opensimulator.org/wiki/Database:Documentation and the pages > linked there. > > As for assets versus inventory items, an asset is the object itself, > whereas the inventory item simply points to the asset (via the asset > ID), and adds some information about the asset that the inventory > needs to be aware of, such as permissions. > > When assets are modified, a copy is created, since we can't be sure > that there is only one reference to the original asset. > > (I believe this is accurate, but those of you more familiar with > current asset handling, please correct me if I'm mistaken.) > > Jeff > > _______________________________________________ > Opensim-users mailing list > [email protected] > https://lists.berlios.de/mailman/listinfo/opensim-users > _______________________________________________ Opensim-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/opensim-users
