6 Data injection into the GloSIS database
The translation of soil data into the GloSIS database has been fully automated within the glosis-shiny
application. The steps to complete this process include creating a database to store the data and selecting a soil data .xlsx
file that meets the requirements outlined in the previous section. Errors in this step are exclusively linked to improper data formatting in the .xlsx
file. In such cases, please review the .xlsx
file to identify any mistakes made during its preparation.
When creating a new database, the system connects to the GloSIS GitHub repository to obtain the latest stable version of the database (ISO_28258_v_stable.sql
) and uses it to generate an empty template for populating the data. During this process, the ISO_28258_v_stable.sql
file is stored in the init-scripts
folder within the working directory.
Details on using the application for data injection are presented in the following sections of this chapter.
6.1 Create a new database
Open the glosis-shiny
application in your web browser at http://localhost:3838/iso28258/
. This site will display the main window of the application.
The window contains a SELECT DATABASE
dropdown menu listing all existing databases in the system (empty if running for the first time), a Connect
button to connect to the selected database, a New Database
button to create a new database, and a Remove
button to delete an existing database.
The first step is to create a new database to store the soil data using the New Database
button (Figure 6.1).

Figure 6.1: Creation of a new database.
A dialog window will pop up asking for the database name (Figure 6.2). Enter a name in the field and click the Confirm
button. A message will appear asking for and administrative password. Leave this option empty and click Confirm
.

Figure 6.2: Name the database.
A new message in green will appear in the sidebar, indicating that the database has been successfully created (Figure 6.3). If the database already exists, the message will indicate this as well.

Figure 6.3: Name the database.
The new database will be stored in the data
folder within the working directory and will become available in the SELECT DATABASE
dropdown menu.
6.2 Data injection
Select the database to be filled from the SELECT DATABASE
dropdown menu and click on the Connect
button. At this point, the main body of the application will display the column names for each table, but the records will still be empty. If the database already contains data, the tables will show the previously inserted records.
A new section, INJECT DATA (.xlsx)
, will appear in the sidebar. This section includes a Browse
button to select the .xlsx
file containing the data to be inserted into the database. Click this button to choose the .xlsx
file, then click the Use
button. The file will be uploaded and injected into the database.
A message will appear indicating that the data is being processed for inclusion in the database (Figure 6.4).

Figure 6.4: Message indicating data is being processed for injection into the database.
Once the process is complete, the database will display the data for each table (Figure 6.5).

Figure 6.5: GloSIS database populated showing the records for the table of physic and chemical analytical results.
The database can be now accessed from other applications and updated with new record using the same glosis-shiny
application.
6.3 Delete an existing database
Databases can also be deleted using this application. However, database deletion should be performed with caution and requires security confirmation, such as a password. For educational purposes, the password is left blank by default, but it can be changed for development purposes.
The Delete
button is only available when disconnected from databases. To delete a database, select the database to remove from the SELECT DATABASE
menu and click the Delete
button. After confirmation (Figure 6.6), the database will be permanently removed.

Figure 6.6: Deletion of a database.