Skip to main content
Version: 1.23.3

Tables in Data Structure

A table is a way of organizing data that uses the model of columns and rows. An intersection of a row and a column is called a cell. A table contains a certain number of columns, but can have any number of records. Each row is identified by one or more unique values taken by its cells from a particular subset of columns. The subset of columns that uniquely identifies a row is called an identifier (ID).

Moreover, a table in SimpleOne is also a record in the Table (sys_db_table) table.

Table properties

Table properties are used to configure tables and determine their relations with other tables. In terms of data structure, the following properties are important:

  • Name – determines a system name of a table used in the business logic. The table name is set according to the following rules.
  • Is extendable – determines whether the table can be extended with child tables.
  • Parent – determines from which table a child table inherits its columns and business logic.
  • Is VCS enabled – determines whether the table is processed by the version control system.

Relations between tables

SimpleOne supports the "one-to-many" and "many-to-many" relations between tables.

"One-to-many" relation


This relation type is used when it is required to describe relations between two tables where a record in the first table can be related to multiple records in the second table. But any record in the second table can be related to only one record in the first table. For example, a record in the User (user) table can be related to multiple records in the Incident (itsm_incident) table via the Assigned user field. But each Incident can only be assigned to one user. The "one-to-many" relation is implemented in the system with the use of Reference type columns.

"Many-to-many" relation


This type is used when it is necessary to describe complex relations between the records of two tables. With such a relation, records in one table can be correlated with multiple records in another table. For example, the User (user) and Group (sys_group) tables can contain multiple records of users and groups. A user can be in more than one group and a group can contain multiple users. In this case these two tables must be related using the "many-to-many" relation. This type of relation is also used in the extended data model to create attribute collections.

Table Classification

This article describes how tables are classified according to their purposes and the type of data they store.