mandriva

Dyngroup database documentation

Olivier Roussy

$Id$

Revision History
Revision 22008-10-06NN

Documentation updated for schema v.2

Revision 12008-03-05OR

Documentation for schema v.1

Abstract

The Dyngroup database schema documentation


1. The dyngroup database design

In Pulse2 a group is a way to launch an action on several machines at the same time, it contains machines and has a name. A group is associated to an user, this user can share the group with others users if wanted.

There are 3 kinds of groups:

  • Dynamic groups, these groups have a query, but are not directly associated to machines. Each time the group content is required, an algorithm execute the query on the required plugins. That implies user can remove a machine from this group.

  • Static groups, these groups don't have a query but a list of machine. Machines can be added, and removed.

  • Mixed groups, these groups have a query and are associated to machines. That way the computer list is generated from a query, but is not updated every time. That implies user can remove a machine from the group, and can also re initialize the group from the query.

2. The "Machines" table

This table holds a machine. As machine data is static, there is no need to duplicate these informations each time we need to put the machine in a group.

id

The table primary key

uuid

The machine's UUID, used by Pulse2 to handle a machine.

name

The machine's name, only used for display purposes.

3. The "Groups" table

This table contains the groups.

It is linked to the "Users" table using FK_user as constraint, this constraint is for the groups owner.

id

The table primary key

name

The group's name (the fact that the name is not the PK implies that several groups can have the same name in the database).

query

The group's query if it's a dynamic or a mixed group, else the field is empty.

bool

In case the query contains several sub queries, this field holds the data describing the relationship between the resulting lists of machines.

display_in_menu

A flag saying if the group should be displayed or hidden in menu

FK_user

A foreign key to the group's owner

4. The "Results" table

This table makes the link between a group and the machines it contains.

It is linked to the "Groups" table using FK_group as constraint.

It is linked to the "Machines" table using FK_machine as constraint.

id

The table primary key

FK_group

A Foreign Key to the "Groups" table

FK_machine

A Foreign Key to the "Machines" table

5. The "Users" table

This table contains users data.

It is linked to the "UsersType" table using type as constraint.

id

The table primary key

login

The user login

type

A Foreign Key to the "UsersType" table

6. The "UsersType" table

This table holds the various possible types of users (single user, group etc)

id

The table primary key

value

The type of user

7. The "ShareGroup" table

This table describes the link between an user and a group when this link is not ownership.

It is linked to the "Groups" table using FK_group as constraint.

It is linked to the "Users" table using FK_user as constraint.

It is linked to the "ShareGroupType" table using FK_type as constraint.

id

The table primary key

FK_group

A Foreign Key to the "Groups" table

FK_user

A Foreign Key to the "Users" table

FK_type

A Foreign Key to the "ShareGroupType" table

8. The "ShareGroupType" table

This table holds the various types of share groups privileges : view, edit...

id

The table primary key

value

The type of sharing privilege (view, edit etc)

9. The "version" table

Used to hold the database version, in the table Number.