BIMProve’s data model defined for describing safety risks is highly connected. In other words, there exists multiple relationships between identified concepts, which sets specific requirements for a selected database technology to store this kind of data. During the recent years, the limitations of traditional databases, in particular the relational model, to cover the requirements of current application domains, has lead the development of new technologies (Angles, 2012). In particular graph databases have increased in popularity. A graph database is a database designed to treat the relationships between data as equally important to the data itself (Kumar, 2019). The main benefits of graph databases include

  • Performance – Improved performance by several orders of magnitude compared to traditional database (Dominguez-Sal et al. 2010)
  • Flexibility – Can hold data without constricting it to a pre-defined model. The structure of the graph can evolve over time as needs and requirements clarify (Vicknair et al. 2010)

In BIMprove, different safety risk related data is stored using the Apache Fuseki (Yang et al. 2018). Fuseki is a graph database server that enables storing data in an RDF (Resource Description Framework) format and querying it using the SPARQL query language. The data stored in the Fuseki database is structured according to the ontology described in the previous chapter. RDF and SPARQL are powerful, yet complex, ways to store and retrieve data. To flatten the required learning curve, a specifically designed API solution is developed in BIMProve to simplify the storing and acquiring of risk data. A high level architecture of the overall database solution is depicted in Figure 1.

Figure 1. BIMProve database solution for storing and querying risk data

As shown in Figure 1, the simplified API to utilize Fuseki database service contains two access methods. The REST (Representational State Transfer) based API enables other systems and software to programmatically update and query the database. For example, the Automated detection of safety factors and risks module described earlier utilizes this method to access the risk database. The HTML based web user interface enables human users to manage the database contents. It allows, for example, to add new database instances through a simple web page form. Additionally, it enables retrieving data contained by the database either in textual or visual form.

The above mentioned REST API accepts JSON data as input parameters. Figure 2 represents an example JSON structure that defines a risk related object that was identified from an image by the Automated detection of safety factors and risks module. As can be seen, the input parameters follow the properties of the data model described in the previous chapter. The input parameters contain, for example, the ID and URL of the image that was analysed, type of the risk related object and coordinates of the anchor box that specifies the part of the picture the object is located in.

Figure 2. Example input data defining a risk related object extracted from an image

An example of the web page UI to access Fuseki database is shown in Figure 3. In this view, results of the image analysis module are represented in a table format. The table lists images and risk related objects identified from the images. The table is sorted based on the image IDs.

Figure 3. Screenshot from the Fuseki database web UI

In the following phases of the project, both access methods to the database will be extended and updated to address various requirements of the safety functionalities and worker notifications developed in BIMProve.

Do you want to know more? Download our deliverable from here and share your opinion with us through our LinkedIn or our Twitter communities!


Angles, R. (2012) A comparison of current graph database models. In 2012 IEEE 28th International Conference on Data Engineering Workshops (pp. 171-177). IEEE.

Dominguez-Sal, D., Urbón-Bayes, P., Giménez-Vanó, A., Gómez-Villamor, S., Martínez-Bazan, N., & Larriba-Pey, J. L. (2010, July). Survey of graph database performance on the hpc scalable graph analysis benchmark. In International Conference on Web-Age Information Management (pp. 37-48). Springer, Berlin, Heidelberg.

Vicknair, C., Macias, M., Zhao, Z., Nan, X., Chen, Y., & Wilkins, D. (2010, April). A comparison of a graph database and a relational database: a data provenance perspective. In Proceedings of the 48th annual Southeast regional conference (pp. 1-6).

Yang, X., Yang, M., Yang, D., & Huang, Y. (2018, February). Research on implementation of knowledge convergence based on Apache Jena3. In 2018 International Conference on Computer Science, Electronics and Communication Engineering (CSECE 2018) (pp. 464-466). Atlantis Press