# A Graph DB-Based Solution for Semantic Technologies in the Future Internet
## 2 Related Work
### Bridging LPG and RDF  
The Semantic Web (SW) and RDF were conceived for different purposes than the traditional uses of local DBs. DBs focus on efficiency and scalability, while the SW focuses on interoperability and data availability. The integration between these two technologies, designed to take advantage of the strengths of both, has attracted interest since the early days of the WWW because, while the SW provides a means to share and integrate data, various factors often prevent the public distribution of data in many contexts. However, problems are posed by the structural differences between the graph models used in the SW and in DBs. Some approaches [25; 26; 27] have investigated how to collect the data available in the SW and import them into local graph DBs. This is especially relevant when there is a need to create shared knowledge on a specific topic that end-users can query. When mapping is carried out in this direction, the primary advantage is that queries in graph DBs are optimized for quicker data retrieval in a more centralized and controlled domain. However, this approach may limit the possibility of integrating this knowledge with external sources and supporting automated reasoning. Additionally, the Open-World Assumption, a fundamental aspect of the SW, may not apply in such cases. In the opposite direction (from DBs to RDF), the problem has been extensively addressed, initially focusing on relational DBs [28; 29], often using rule-based mappings [30; 31]. Entities are often represented as classes, keys as relationships, and properties as attributes. While natural, this translation lacks generality and does not apply to NoSQL models. The initial attempts at personalization, such as those in [32], used XML to express the mapping between concepts. This effort produced two W3C standards:  
* Direct mapping [33], i.e., the conversion of the relational model to the RDF through a set of fixed rules without the need for configuration;
* R2 RML [34; 35] ([[https://www.w3.org/TR/r2](https://www.w3.org/TR/r2) rml/]([https://www.w3.org/TR/r2](https://www.w3.org/TR/r2) rml/), accessed on 9 September 2023), requiring a detailed configuration of the mapping and thus enabling highly customizedbehavior. R2 RML mappings consist of one or more triple maps, each with one logical table, one subject map, and zero predicate object maps. Another straightforward strategy is available when the fixed structure of tables provides fewer mapping rules to RDF structures [36]. Ref. [37] tried to generalize the problem for graphs, but it does not allow us to customize the translation according to specific needs. The RML language [38] generalizes R2 RML to the most commonly used file formats for structured data (CSV, JSON, and XML) but not to non-relational DBs. Inspired by works on R2 RML [39; 40; 41] and RML [42; 43], we propose an approach to map the concepts of the LPG. Given the need to personalize the mapping to avoid strict rules, our approach relies on a customizable language that can specify how to map concepts from one perspective to the other. With the introduction of graph structures, research on the integration of different models has gained momentum, facilitated by both LPG and RDF being graph-based. A good example of an overall integration infrastructure is OpenBiodiv [44], which combines semantic publishing workflows, text and data mining, common standards, ontology modeling, and graph DB technologies to manage biodiversity knowledge. It is presented as Linked Open Data (LOD) [45] generated from the scientific literature. It falls short in the integration (and disambiguation) of knowledge coming from many sources. In [46], a framework for the projection and validation of a portion of an RDF graph using the graph DB formalism is described. It allows a SPARQL query to be written, translating the result into JSON and parsing it into the LPG model. It acts more as a wrapper than as a bridge between the two technologies. In [6], a mapping language between Cypher and SPARQL is proposed based on static concept mapping.