Tables

Tables and their records, fields, relations and identifiers.

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:

groupsownsreferencesDealQuoteQuote lineCustomer
RelationMeansExample
Owned byThe record is part of its owner and is deleted with it.A quote line is owned by its quote.
Grouped byThe record belongs to a group but can exist alone.A quote is grouped by a deal.
ReferenceThe 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:

TopicHolds
LifecycleThe actions, the states a record moves through, archive, block, cancel and revise
Rules and integrityWhat Netzo refuses, and how the database applies it
CalculationsWhat Netzo calculates when an action runs: prices, taxes, costs and movements
Every table, with its fields, relations, actions, states and events, is in Domains.