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.
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.
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.
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.
The date of the last modification in YYYYMMDDmmss format.
It states whether the record is in the trash or not (0 = no, 1 = yes).
Indicates the index of the archive applied to the record. If the value is 0 it is not in any archive.
The name of the user who made the last change to the record.
Contains the global IDs of users who can view the record within their devices.
Contains any calculation expressions used within the record.
If compiled, it identifies the GGUID link to a parent record.
Identifies the table containing the parent record, if any.
Identifies the row index of the record. It can have several functions and is primarily used as sorting within data grids.
Identifies the name of the user who created the record.
Identifies the date the record was created.
Additional management fields used by the program.
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.
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.