Databases
This chapter describes the difference between master data and runtime data, as well as how to back up, restore and delete projects and databases. Information on these topics can be accessed in the main menu via the ‘Database’ button.
Warning
The permission for database actions should be precisely defined in order to prevent accidental data loss.

Master data and runtime data
The primasello cash register has two databases in which all system data is stored: master data and runtime data.
Master data
All data that can be configured in the system is stored in the master data. The master data is stored in primasello as a project. This includes:
Programming of the register interface
Products and product groups
Tax classes
Payment methods
Users
User roles
Document template
Cash up configuration
The database page overview first displays a graph showing the project's memory usage. The darker orange indicates the used memory space, while the lighter colour indicates the free space. Next to this is a list of the master data that is used and available. Below this are the functions that can be executed with the project database. Depending on your permission, up to three options are available: export, restore and delete.

Runtime data
The runtime data includes all data generated during the operation of the register or relating to the company itself. All data required by tax regulations is recorded and archived. This includes:
Company data
Cash register data
Individual records (receipts in the electronic journal)
Cash invoices
Cancelled invoices
Return receipts
Hospitality receipt
Change Deposits (cash deposits)
Cash withdrawals
Training bookings
The database page overview displays a graph showing the memory usage of the runtime database under the master data on the left-hand side. The darker orange indicates the used memory space, while the lighter colour indicates the free space. Next to this is a list of the used and available runtime data. Below this are the functions that can be executed with the database. Depending on your permission, up to three options are available: export, restore and delete.

Database backup
To avoid possible data loss or to transfer complex settings to another device, backups of the project and database can be created. To back up either of these, click on the orange ‘Export’ button in the overview. A window will open asking where you want to save the backup. Once you have selected the appropriate location, a project or database backup will be saved with the name ‘runtime-db-xx.db’ or ‘base-db-xx.db’. The numbers at the end of the file name are the date and time when the backup was created. The name ‘runtime-db’ stands for the runtime database and ‘base-db’ indicates that it is the project database.
Select storage medium
How to choose between different storage media is described in the chapter Saving Files.
Regular backups
It is recommended that you back up the runtime database as regularly as possible and transfer it to an external backup solution. The project should be backed up after changes to the master data (products, register interface, etc.).
Restoring the database
To upload a database backup, press the orange ‘Restore’ button below the overview. The desired backup can be selected from one of the available storage locations and will then be imported. Only files with the extension ‘.db’ can be uploaded. Please note that only ‘base-db-xx.db’ files can be used for the project database.
Deleting the old database
Restoring a database backup will delete the existing database! It is essential to create a database backup beforehand.
Backup version
Only backups created with the same version of primasello can be imported.
Select storage medium
How to choose between different storage media is described in the chapter Storing Data.
Runtime database cannot be restored
The runtime database can only be restored during initialisation when switching to a new device.
Deleting the database
Pressing the red ‘Delete’ button below the statistics will delete the selected database from the device. This function should only be performed if it is not possible to recover the database and a backup of the database to be deleted is available.
Attention!
Deleting the database will cause the system to fail and all data will be lost! The primasello cash register can only be used again once a new database has been created or an existing backup has been uploaded. Deleting the database cannot be undone!