Database:Documentation

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Removed unneeded <br/> markups)
m (Removed unneeded <br/> markups. Additional markup changes.)
Line 126: Line 126:
 
<table>
 
<table>
 
<tr>
 
<tr>
<td align=left>Services:</td>
+
<td colspan="2">'''Services:'''</td>
 
<tr>
 
<tr>
<td>&nbsp;</td>
+
<td colspan="2">&nbsp;</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[agents]]<br /></td><td>Records agent (Avatar/User) login details</td>
+
<td>[[agents]]</td><td>Records agent (Avatar/User) login details</td>
 
<tr>
 
<tr>
<td>[[assets]]<br /></td><td>Comprehensive grid assets including textures and avatar inventories</td>
+
<td>[[assets]]</td><td>Comprehensive grid assets including textures and avatar inventories</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[avatarappearance]]<br /></td><td>Persistence of the visual appearance of avatars between logins</td>
+
<td>[[avatarappearance]]</td><td>Persistence of the visual appearance of avatars between logins</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[avatarattachments]]<br /></td><td>Items attached to avatars</td>
+
<td>[[avatarattachments]]</td><td>Items attached to avatars</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[inventoryfolders]]<br /></td><td>Inventory folder-related details *except contents*</td>
+
<td>[[inventoryfolders]]</td><td>Inventory folder-related details *except contents*</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 148: Line 148:
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[inventoryitems]]<br /></td><td>All inventory item details (including folder associations) except contents - contents are referenced</td>
+
<td>[[inventoryitems]]</td><td>All inventory item details (including folder associations) except contents</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>&nbsp;</td><td>in the [[assets]] table<br /><br /></td>
+
<td>&nbsp;</td><td>Contents are referenced in the [[assets]] table</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 166: Line 166:
 
</tr>
 
</tr>
 
</table>
 
</table>
<br /><br />
+
<br />
 +
<br />
 +
 
 
<table>
 
<table>
 
<tr>
 
<tr>
<td align=left>Simulator:</td>
+
<td colspan="2">'''Simulator:'''</td>
 
<tr>
 
<tr>
<td>&nbsp;</td>
+
<td colspan="2">&nbsp;</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[estate groups]]<br /></td><td>Narrowly purposed at present. Appears to associate UUIDs under an Estate ID</td>
+
<td>[[estate groups]]</td><td>Narrowly purposed at present. Appears to associate UUIDs under an Estate ID</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[estate managers]]<br /></td><td>Associates UUIDs with Estate ID</td>
+
<td>[[estate managers]]</td><td>Associates UUIDs with Estate ID</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[estate map]]<br /></td><td>Associates Regions with Estates By Estate ID</td>
+
<td>[[estate map]]</td><td>Associates Regions with Estates By Estate ID</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[estate settings]]<br /></td><td>Settings for Estates</td>
+
<td>[[estate settings]]</td><td>Settings for Estates</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[estate users]]<br /></td><td>Users allowed on the Estate</td>
+
<td>[[estate users]]</td><td>Users allowed on the Estate</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[estateban]]<br /></td><td>Users banned from the Estate</td>
+
<td>[[estateban]]</td><td>Users banned from the Estate</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[land]]<br /></td><td>Parcel Properties</td>
+
<td>[[land]]</td><td>Parcel Properties</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[landaccesslist]]<br /></td><td>Parcel Access List</td>
+
<td>[[landaccesslist]]</td><td>Parcel Access List</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[migrations]]<br /></td><td>Supports 'automagic' upgrade to new database formats</td>
+
<td>[[migrations]]</td><td>Supports 'automagic' upgrade to new database formats</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[primitems]]<br /></td><td>contains the prim's inventory, which is not at all unlike the avatars'<br />inventory with the exception of folders</td>
+
<td>[[primitems]]</td><td>Contains the prim's inventory, which is not at all unlike the avatars</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[Prims_(database_table)|prims]]<br /></td><td>All rezzed prim details *except shape and contents*</td>
+
<td>&nbsp;</td><td>inventory with the exception of folders</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[Database:Primshapes|primshapes]]<br /></td><td>Properties of all rezzed prims</td>
+
<td>[[Prims_(database_table)|prims]]</td><td>All rezzed prim details *except shape and contents*</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[regionban]]<br /></td><td>Per-Region ban list</td>
+
<td>[[Database:Primshapes|primshapes]]</td><td>Properties of all rezzed prims</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[regionsettings]]<br /></td><td>Per-Region settings</td>
+
<td>[[regionban]]</td><td>Per-Region ban list</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>[[terrain]]<br /></td><td>Terrain mesh revision history</td>
+
<td>[[regionsettings]]</td><td>Per-Region settings</td>
 +
</tr>
 +
<tr>
 +
<td>[[terrain]]</td><td>Terrain mesh revision history</td>
 
</tr>
 
</tr>
 
</table>
 
</table>
  
 
[[Category:Database]]
 
[[Category:Database]]

Revision as of 16:43, 11 April 2016

Contents

Introduction

This page documents the databases tables used in OpenSimulator.

Tables are split up into Common, Services and Simulator.

On a grid, the grid services will contain the Services and Common tables, whilst each simulator instance will access the Simulator tables.

A standalone will contain Common, Services and Simulator tables, with the exception of the regions table, which is not currently persisted for standalones.

SQLite is generally not considered appropriate for this use case and will not be covered here; however the table structures are very similar and most of what is here will be useful in that context as well.

Note that some of these tables may be relics, some may be planned for future use, and some may see heavy use but have columns which are relics, not yet properly updated or not yet used at all.

Code

There is a common package for database code, OpenSim.Data and each database has its own package (e.g. OpenSim.Data.MySQL).

Each database package has to supply implementations for the interfaces in OpenSim.Data. For instance, IAssetData is the asset interface, used by OpenSimulator to store and retrieve asset data.

Organization

OpenSimulator 0.7.2 onwards

Common

migrationsSupports automatic upgrade to new database formats

Services

AvatarsPersistence of the visual appearance of avatars between logins and attached objects
FriendsA list of an avatars friends, friendship requests, and permissions granted to friends
GridUserInformation about a user in this particular grid, for everyone who uses the grid, local and foreign. This includes their home region, last region, online status and last login/logout. This is distinct from auth information
Presence Region and session information for currently logged in users. Used for IM routing amongst other things.
UserAccountsUser account information, such as name, user level and e-mail. Just local accounts.
assetsGrid assets including such things as textures and sounds
authUser authentication information
inventoryfoldersInventory folder-related details *except contents*
 Contents are in the inventoryitems table and point back to inventoryfolders
inventoryitemsAll inventory item details (including folder associations) except contents - contents are referenced in the assets table
regions
Regions known to the grid
tokensUnused.

Simulator

estate groupsNarrowly purposed at present. Appears to associate UUIDs under an Estate ID
estate managersAssociates UUIDs with Estate ID
estate map
Associates Regions with Estates By Estate ID
estate settingsSettings for Estates
estate usersUsers allowed on the Estate
estatebanUsers banned from the Estate
landParcel Properties
landaccesslistParcel Access List
primitemsContains the prim's inventory, which is not at all unlike the avatars'
inventory with the exception of folders
primsAll rezzed prim details *except shape and contents*
primshapesProperties of all rezzed prims
regionbanPer-Region ban list
regionsettingsPer-Region settings
regionwindlightWindlight region settings
terrainTerrain mesh revision history

Older information

This mainly pertains to OpenSimulator 0.6.9.

Services:
 
agentsRecords agent (Avatar/User) login details
assetsComprehensive grid assets including textures and avatar inventories
avatarappearancePersistence of the visual appearance of avatars between logins
avatarattachmentsItems attached to avatars
inventoryfoldersInventory folder-related details *except contents*
 Contents are in the inventoryitems table and point back to inventoryfolders
inventoryitemsAll inventory item details (including folder associations) except contents
 Contents are referenced in the assets table
migrationsSupports 'automagic' migration to new database formats
regionsRegions known to the grid
userfriendsFriends list registration
usersStored user profile



Simulator:
 
estate groupsNarrowly purposed at present. Appears to associate UUIDs under an Estate ID
estate managersAssociates UUIDs with Estate ID
estate mapAssociates Regions with Estates By Estate ID
estate settingsSettings for Estates
estate usersUsers allowed on the Estate
estatebanUsers banned from the Estate
landParcel Properties
landaccesslistParcel Access List
migrationsSupports 'automagic' upgrade to new database formats
primitemsContains the prim's inventory, which is not at all unlike the avatars
 inventory with the exception of folders
primsAll rezzed prim details *except shape and contents*
primshapesProperties of all rezzed prims
regionbanPer-Region ban list
regionsettingsPer-Region settings
terrainTerrain mesh revision history
Personal tools
General
About This Wiki