mandriva

Inventory database documentation

Nicolas Noirbent

$Id$

Revision History
Revision 92009-05-12NR

Documentation updated for schema v.9

Revision 22008-10-06NN

Documentation updated for schema v.2

Abstract

The Inventory database schema documentation


1. The inventory database design

The inventory database holds data on the computers managed by Pulse 2, namely their hardware (available storage, memory, connected printers/modems etc.) and software (installed software packages, registry keys etc.) configuration.

The inventory database has a number of hardware/software element tables, each describing a given computer part in detail, with fields specific to the part (e.g. the available space, in the Drive table).

Every table is linked to the Inventory and Machine tables using a table dedicated to this linking feature. For example, the Modem table is linked to the Inventory and Machine tables using the hasModem table.

2. The "Inventory" table

This table holds a list of the inventories stored in the database.

id

The table primary key

Date

The date the inventory was retrieved

Time

The time the inventory was retrieved

Last

Whether this inventory is the last one we retrieved for this machine

3. The "Machine" table

id

The table primary key

Name

The machine's name

lastId

A foreign key to the "Inventory" table, pointing to the last inventory retrieved for this machine.

4. The "Xxx" and "hasXxx" tables

The "hasXxx" tables (e.g. "hasModem", "hasStorage", etc.) are used to link the "Machine", "Inventory" and parts tables. For example, the "hasStorage" table links together the "Machine", "Inventory" and "Storage" tables.

For example, the "hasStorage" table :

machine

A foreign key to the "Machine" table

inventory

A foreign key to the "Inventory" table

storage

A foreign key to the "hasStorage" table. For the "Modem" table it would be "modem" and "hasModem", for the "Drive" table it would be "drive" and "hasDrive", etc.

A column from hasXxx links together:

  • an inventory,

  • an equipement,

  • and an item.

5. Registry and related tables

The Registry, hasRegistry and nomRegistryPath are a special case. The "hasRegistry" table holds the following informations:

machine

A foreign key to the "Machine" table

inventory

A foreign key to the "Inventory" table

registry

A foreign key to the "Registry" table.

path

A foreign key to the "nomRegistryPath" table.

A column from "hasRegistry" links together:

  • an inventory,

  • an equipement,

  • and an registry key / value pair:

    • the key is stored into "nomRegistryPath",

    • the value is stored into "Registry".

Registry key / values are collected using the inventory server.

6. Entities and related tables

The Entity, hasEntity, UserEntity and User tables are a special case. The "hasEntity" table holds the following informations:

machine

A foreign key to the "Machine" table

inventory

A foreign key to the "Inventory" table

entity

A foreign key to the "Entity" table.

A column from "hasEntity" links together:

  • an inventory,

  • an equipement,

  • and the entity the equipment belongs to.

The entity is guessed by the inventory server.

Additionnaly the UserEntity table map the relation between a user and the entities he can see. The mapping is done by the Inventory plugin.