You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 4 Next »
In SimpeOne, a record is the basic entity for storing and representing information. A record is a container (object). It contains filled values of attributes of the table to which it refers.
The information in the records can have different nature and purpose. It can be user, transactional and historical data, as well as configuration data, system settings. For example, there are records containing the information about version configuration.
Both users and processes can interact with any record. These interactions are represented by the CRUD (create, read, update, delete) operations.
Each operation is a separate transaction. A transaction is an ordered set of actions that moves a database from one consistent state to another. Consistent state is the expected state of up-to-date information as reflected in the database.
Any record has a set of fields that are filled in by the system when creating and/or updating it:
- Record ID.
- Created by, Created at, Updated by, Updated at.
- As part of table inheritance, an attribute of Record Class type, intended to identify the table to which a particular record belongs.
- For configuration data records, Policy and Application fields are mandatory.
- Unique Number is assigned to numbered table records.
In SimpleOne, you can interact with records through user interfaces, as well as through various APIs (server, REST).
Create a record
When you create a record, you are working with a virtual object. The record does not yet exist until it is sent to the database. When such a record is sent to the database, a transaction is started, the result of which is the appearance of a real record in the database.
Access control rules (ACL) are triggered before a record is created and when it is required to create a virtual object. They check the user's rights to create records. Then the fields are filled with default values, and at the time the record is sent to the database, all engines initiated by the transaction are processed.
You can create a new record via the interface in several ways:
- Click New on the list view of the desired table.
- Click New on the record form of the desired table.
- Click the plus icon
in the Reference fields that refer to the desired table.
- Fill in the fields on the previously created record form of the desired table with other values, and create a copy of the record.
To learn how to create records using the API, see the SimpleRecord or REST API articles.
Read a record
When reading, the user of the system is given the available content of the record, i.e., attributes and their values.
This operation does not trigger transactions that change the state of a record. Access control rules (ACL) determine whether the entire record, or part of its contents, can be read.
Edit a record
Compared to the create operation, when you update a record, you work with the virtual temporary object. Unlike the create operation, the object is populated based on the information contained in the database. In order for information to be added to the database, an update transaction is initiated, for which everything is the same as for the creation transaction, except for creating the record in the database.
The update operation can be subject to restrictions through access control rules (ACL). Also, the moment of sending a record to the database fulfills all the mechanisms initiated by the transaction.
Delete a record
When deleting the record information is removed from the database, and at the time of deletion, all engines initiated by the transaction are processed.
If you want to be able to recover deleted records, activate Record Deletion Log.
- No labels