DBmodel » History » Version 12

« Previous - Version 12/13 (diff) - Next » - Current version
trasher, 02/24/2017 08:20 AM


PAGE OUTDATED

The current page is out-of-date. Please refer to the new documentation to know about database model:
http://glpi-developer-documentation.readthedocs.io/en/latest/devapi/dbmodel.html

GLPI Database Model

Database description

Nommage des tables de la base de donnée / tables naming of database

français

Les noms des tables sont liés aux noms des classes PHP.
On préfixe 'glpi_' et on met le nom au pluriel.
Voici quelques exemples :

  • classe Ticket => table glpi_tickets
  • classe ITILCategory => table glpi_itilcategories
  • classe Computer_SoftwareVersion => glpi_computers_softwareversions
  • classe PluginExampleProfile => glpi_plugin_example_profiles

english

The table names are linked with PHP classes names.
We add prefix 'glpi_' and put class name in the plural.
This is some examples :

  • class Ticket => table glpi_tickets
  • class ITILCategory => table glpi_itilcategories
  • class Computer_SoftwareVersion => glpi_computers_softwareversions
  • class PluginExampleProfile => glpi_plugin_example_profiles

Nommage des champs foreignkey / foreignkey fields naming

français

Lorsque l'on veut avoir une référence à une autre table, on ajoute un champ dont le nommage est :

  1. On prend le nom de la table en relation
  2. On enlève le préfix glpi_
  3. On ajoute le suffixe _id

Voici des exemples

  • table glpi_tickets => champ tickets_id
  • table glpi_itilcategories => champ itilcategories_id
  • table glpi_plugin_example_profiles => champ plugin_example_profiles_id

english

When we want to have a reference to another table, we add a field with naming is:

  1. We get the table name related
  2. We remove the prefix glpi_
  3. We add the suffix _id

This is some examples

  • table glpi_tickets => field tickets_id
  • table glpi_itilcategories => field itilcategories_id
  • table glpi_plugin_example_profiles => field plugin_example_profiles_id

Mysql Workbench scheme

Created using : MySQL Workbench (for Linux, version 5.2.38)

Available diagram : Softwares, Users, Tickets

glpi072.mwb (102 KB) remi, 04/11/2009 07:09 AM

DBSoftwares.pdf (173 KB) remi, 04/11/2009 12:08 PM

DBUsers.pdf (255 KB) remi, 04/11/2009 12:09 PM

DB-Users-0.78.pdf - User's rights and groups (202 KB) remi, 05/21/2010 03:12 PM

DB-Softwares-0.78.pdf - Softwares, Licenses, Versions and Installations (171 KB) remi, 07/08/2010 03:50 PM

GLPI-0.78.mwb - GLPI 0.78 database model and EER diagrams (124 KB) remi, 07/08/2010 03:50 PM

DB-Users-0.83.pdf - GLPI 0.83: User's rights and groups (75.6 KB) remi, 02/25/2012 06:34 PM

DB-Software-0.83.pdf - GLPI 0.83: Software, Licenses, Versions and Installations (75.2 KB) remi, 02/26/2012 06:44 PM

DB-Tickets-0.83.pdf - GLPI 0.83: Tickets (76.6 KB) remi, 02/26/2012 07:09 PM

GLPI-0.83.mwb - GLPI 0.83 database model and some EER diagrams (156 KB) remi, 02/26/2012 07:14 PM

GLPI-0.84-Helpdesk.mwb - GLPI 0.84 helpdesk database model and EER diagram (108 KB) tsmr, 04/28/2014 09:30 AM

GLPI-0.84-Inventory.mwb - GLPI 0.84 inventory database model and EER diagram (223 KB) tsmr, 04/28/2014 09:32 AM