1
votes

I am relatively novice with these topics. I understand the concept of Ontologies as a knowledge representation model, with semantics of the concepts built-in. I understand the use of common/shared vocabulary in order to describe real life entities. I have narrowed down my search to an actual established ontology.

Now, I want to use this ontology to create a database/ describe a real life system. How can I do that?

1
Your question is not very precise. You want to "create a database/ describe a real life system": these two things are not mutually exclusive but not equivalent either. What kind of database (e.g., RDF database)? What kind of ontology (e.g., OWL)? Do you have existing data or do you need to create them from scratch?Antoine Zimmermann
I want to describe a real life system, specifically a network of devices in small building. I want to create an RDF database and I can create the data from scratch maybe in CSV format (but I also have some data in the configuration tool of these devices which I can export in the desired format). I have a ttl file as an ontology.Darshit Pandya

1 Answers

1
votes

For the sake of an example, let us say you have an ontology of plants and you want to create a knowledge base of trees that must be monitored. The ontology may have a hierarchy of plant species, and other things like:

onto:Tree a owl:Class .
onto:latitude a owl:DatatypeProperty .
onto:longitude a owl:DatatypeProperty .
onto:plantingTime a owl:DatatypeProperty .

You can populate the database by going to the field, the park, the forest and take note of what has been planted when and where, then do SPARQL updates to a triplestore:

INSERT DATA {
  <tree/1> a onto:Oak;
    rdfs:label "Oak tree in Saint-Étienne"@en;
    onto:plantingTime "2021-07-29T11:03:24Z"^xsd:dateTime;
    onto:latitude 45.439695;
    onto:longitude 4.3871779 .
}

You can programme a mobile application that gives you a Web form where you can input a name and automatically fills in the geolocation and date of planting. You could add all kinds of information that correspond to ontological properties from your ontology.

Another option is that you already have data, perhaps in an existing database, or perhaps in a big file, or in multiple files. In this case, you can write scripts that parse these data files, or query the database, and take the results of the queries or the parsing and inject them into SPARQL UPDATE queries. Or you can use specialised transformation languages that declare the patterns you want to extract from existing data, and declare the RDF patterns you want to generate from the extracted data (see RML or SPARQL-Generate*, for instance).

* disclaimer: I am a contributor to SPARQL-Generate.

Regardless of the technique you are using, you will end up creating RDF graphs that use concepts and properties from the ontology, that describe part of the entities of interest you need for your system. For instance, a small RDF graph for each tree you have in your park or forest. You may have to add information about entities that are not directly the topic of interest of your application, but that may be useful for managing your system, such as the organisation that takes care of some trees. So you may need to use ontologies for organisation, people, agriculture, health care, etc. You may need to devise new ontological terms that are only useful for your application or system. For instance, a property like onto:frequencyOfPruning may be useful for managing trees in cities. Then when populating your database, you can add to your triplestore:

ex:tree125648 onto:frequencyOfPruning "P6M"^xsd:duration .

perhaps with an INSERT query, or in a file that you upload to your RDF database or Linked Data Platform.

If your question was more specific, we could give you ideas of how you can define a more precise workflow, or tools that are more relevant for your task. Otherwise, my advice can look as much abstract and obscure as what you already know.