Tables
A record is one business fact: a quote, a stock move, an invoice, an employee. Records of one kind form a table. Each table has a user-facing name (Sales quotes) and an API name (salesquotes) that the API, MCP and the CLI use.
Structure
Fields
A field holds one value of a record. Each field has a name, an API name and a type: text, number, date, money, quantity, a reference to another record, a file and others. Some fields are required. Some are calculated by Netzo and read only.
Relations
Records connect in three ways:
| Relation | Means | Example |
|---|---|---|
| Owned by | The record is part of its owner and is deleted with it. | A quote line is owned by its quote. |
| Grouped by | The record belongs to a group but can exist alone. | A quote is grouped by a deal. |
| Reference | The record points to another one. | A quote references its customer. |
Identifiers
Some fields identify a record for the business: the number of an invoice, the code of a product, the tax ID of a customer. Netzo does not let two active records have the same identifier in the same scope, and it numbers the documents for you.
Derived fields
A derived field copies a value from the record it points to: a quote line takes the unit of its product. Some follow the changes of the original; others keep the value of that moment, such as the price on an issued invoice.
Behavior
What happens to a record is on three pages:
| Topic | Holds |
|---|---|
| Lifecycle | The actions, the states a record moves through, archive, block, cancel and revise |
| Rules and integrity | What Netzo refuses, and how the database applies it |
| Calculations | What Netzo calculates when an action runs: prices, taxes, costs and movements |