Database

Databases are the files physically containing the data entered by users. Inside the databases all the information regarding their structure and the rules of operation and display are also stored.

Nios4 allows you to manage infinite databases with the same program. Each operating system uses a specific database format: Windows uses the MS-Access format and MS SQL Server; Android and iOS use the SQL Lite format and the Web uses the MYSQL format. It’s not possible to bring a database from one platform to another without using the data synchronization system.

You can manipulate the data in the database file directly with other tools, however, this is not recommended if you have no computer programming knowledge. It’s possible to modify the data to such an extent that it does not allow the program to work correctly. The benefit is that you can connect other programs to the same database allowing you to read and write directly into it.

Data structure in the database file

Nios4 performs the tasks of managing and modifying data in a database. All tools and functions are used to allow users to easily manage processes that would normally be complicated.

The need to know how this data is actually stored within the database file allows direct connection to data outside of Nios4.

We reiterate the concept that this type of operation can lead to the program freezing if not carried out correctly.

Within each database there are tables containing the data. Each table contains data that are classified according to their name. The customers table contains the customers, and the articles table contains the articles. These tables are owned by the user, i.e. they are the data tables that the user, through Nios4 functions, creates and manages.

Tables whose name starts with so_ and lo_ all belong to the program and within them are stored the information for the proper functioning of the database. These tables are for the exclusive use of the program and modifying the data inside them will almost certainly lead to the malfunction of the whole system. Deleting a table or a field without using the functions of Nios4 will lead to a malfunction.

Relations between tables

Nios4 as a data management model is inspired by NOSQL, i.e. the relational mechanisms typical of databases are not exploited.

The relations between the tables are managed by the program using a specific type of field that creates the relations between the keys of the father-son model tables. In this way, using a purely horizontal management, it was possible to transport data from one type of database to another in a relatively simple way.

Please note that the data, not being linked in a relational way, are copied from one table to another. For example: if the customer is selected within an invoice, the field will automatically fill in the name, address, etc. If, on the other hand, within the customer's personal data, the address is changed, the address will not be updated within the invoice, but will remain the previous one. If you want to update this value, you will have to open the invoice and force the update. If instead you need to update all the invoices, then you will need to proceed via script or SQL string.

Base Fields

All the tables in the database have a set of basic fields to allow the correct functioning of the system.

These fields are present both in the program tables and in the user's tables. When a new table is created, these fields will also be automatically created by the program.

GGUID

The alphanumeric field with index function of the record. Guarantees that there are no duplicates in the system. It is generated automatically when the new record is created.

TID

The date of the last modification in YYYYMMDDmmss format.
ELI

It states whether the record is in the trash or not (0 = no, 1 = yes).

ARC

Indicates the index of the archive applied to the record. If the value is 0 it is not in any archive.

UT

The name of the user who made the last change to the record.

UTA

Contains the global IDs of users who can view the record within their devices.

EXP

Contains any calculation expressions used within the record.

GGUIDP

If compiled, it identifies the GGUID link to a parent record.

TAP

Identifies the table containing the parent record, if any.

IND

Identifies the row index of the record. It can have several functions and is primarily used as sorting within data grids.

UTC

Identifies the name of the user who created the record.

TIDC

Identifies the date the record was created.

DSP,DSC

DSQ1,DSQ2

Additional management fields used by the program.

Creating a new database

To create a new database, use the appropriate page within the Options section or through the quick database navigation button, placed on the colored band, showing the name of the current database.

Create a cloud database

To create a cloud database, open the quick navigation menu and select New Cloud Database. If you have not connected a D-One account, the program will ask for your credentials to continue.

If you do not have an account, you can create one from the window. The required data is an email, which will be used as a name, and a password.


The next step is the choice of the database to be created, the name and the type of subscription to subscribe. In addition to the three sizes of the cloud, which vary depending on the manageable amount of data, you can activate a 30-day free trial.

Once your subscription has expired, you will still be able to access data locally and on all devices that have been synchronized up to that point, but the ability to synchronize other data will be blocked.

Create a local database

To create a local database: open the quick navigation menu and select New local database.

You can create a new database, connect an existing one, indicating the path to find the file, or manage an advanced connection. The latter allows you to connect to an SQL Server type database.

Once you select New local database, the program will ask you which type to create:

- The first entry creates a completely empty database.

- Current database creates an exact copy of the database in use at that time.

- Online Templates allow you to choose the database from the types currently available online.

- Load database template allows you to create it from a data file.

Once the type has been selected, the program will proceed to create the database.

Database management

The management is shown on the appropriate page in the Options section.


Database

Indicates the name of the database

Seed

Indicates the seed, i.e. the type of the database. This seed is used to prevent installing data packages created from databases with other seeds.

Register

It's the unique code in the database.

Type

Identifies the type of license applied on the database.

C.S.

Indicates the type of subscription if the database is a cloud type.

CLOUD Expiration

Indicates the subscription expiration date if the database is a cloud type.

Database path

Indicates the path to the physical database file. This path refers only to access-type databases.

Database export

You can create a database export file and can contain both the structure and the data.

You can also create a template file to share with other users that contains the database structure and only the data of the tables selected by the user.

To create the file, use the appropriate button and select the type of export you want to perform.