Mapping DMN table to a OWL ontology - owl

As part of my research, I have been working on a DMN table and OWl ontology. I must map rules from the DMN table into an OCQA web ontology file and work later with SHACL to infer some rules.
In this process, as an initial step recently, my supervisor gave me a hint to map the DMN table with OWL.
His message:
"``https://www.omg.org/spec/DMN/1.2/About-DMN
You find an rdf specification on the bottom of the page.
First, you have to define the dmn schema in owl. Then you can directly define or import a dmn table into owl. Or you use the rdf schema."
I have very little idea about semantic web technology. So I studied some documents or tutorials and understood that classes, individuals, and relationships (object properties, data prop) made an ontology. Like this, I did practice an example development in Protege software also.
After his reply, I started to read what is an rdf scheme or OWL schema. But unfortunately, I didn't go further.
Can someone help me to understand the schema or help me define a relevant schema for the DMN table, as my supervisor suggested?
What should I do to define a schema? Is this nothing but making classes and individuals with relations or creating some placeholders and then getting them from the mapping of DMN? I am clueless. Should I use RDFPY library to do all these things?
"Stackoverflow is not supporting uploading DMN file. it is nothing but data in XML. below is the picture"
enter image description here DMN table for quality checks of a concrete curing method
Please, someone, help me to go further.

I would suggest making your schema in Protege. Your schema (ontology) will have a set of classes and properties between. Some ontologies will have named individuals, some will separate the named individuals out of the ontology. This is generally A-Box vs T-Box.
Personally, I use rdflib for python development but performance isn't great. For better performance you can use the redland python bindings - but it's a pain in the ass to work with.
As for your table... This is mostly an exercise in mapping from a relational data structure to a graph data structure. Each row represents a node of type 'Inspection' and has relations to the columns. For example consider the pseudo rdf,
Inspection_A rdf:type Inspection
Inspection_A hasActivity "Curing"
Inspection_A hasApprover "Site Engineer"
tldr; Your ontolgoy should have classes and relations (T-Box). Then in a separate file create instances of the classes (A-Box). T-Boxes will most likely be .owl files while the A-Box is turtle, nquads, json-ld, etc. When you load the two together in a graph database, it should be able to take the definitions in your T-Box and reason over your A-Box. You can use rdflib for programatically working with RDF. Your task is to map a table to a graph. The columns are relations, and table name is a class.

Related

What are ontology can do, but relational database can not?

I am new to ontology. After some study, I still do not know what is ontology advantage in application.
I already know ontology can provide more meaningful querying interface than database, and ontology can use reasoner to find hidden info to get better result.
But.
With building a bool table in database to represent new concept for each instance, or simple if-else rule engine. We can get same result as ontology with better performance.
So, what is the most important reason of using ontology in application exactly?
Please refer to Databases vs Ontologies by Ian Horrocks
In short:
Databases has closed world assumption, ontologies has open world
assumption
In databases each individual has a single unique name, but in ontologies individuals might have more than one name
You can infer implicit information from ontologies, in databases you can't.
The schema in an ontology is large and complex but databases have simple and smaller schema. In other words, The focus on formal semantics is much stronger in ontologies than in databases. Because the aim of ontologies is to represent meaning rather than data. Please refer to Ontologies and DB Schema: What's the Difference by Mike Uschold

Google Cloud Datastore: is it possible to "visualize" data entities in UML style?

My collegues have created a series of entities using "Google Cloud Datastore".
What I would like to achieve now is to generate a data schema from the set of entities we have got. Something like this.
It does not necessarily have to include the 1:1, 1:many, n:n archs but a UML style data structure generated for each entity would be already a good start.
The challenge is that:
when clicking on a "record" when colums are empty a data type does not show
some colum fields are "objects" (which can be complex JSON objects, not sure if I would prefer to model them as a separate entity and link them to it or to leave the word "object")
referencing between record is done by the developer and I doubt that there is a tool clever enough to understand this. Hence I do not expect to have also hte n:n relations shown.
Is there a project or a tool or a methodology to create this schema starting from an existing "Google Cloud Datastore"?

Using Jena reasoner on Neo4J db

it's my first time writing here but i'm really struck with a problem:
is it possible to use the Jena reasoner on a No-SQL database, like Neo4J, already filled with data?
I've a Neo4J's graph rappresenting a bunch of triples and I would like to use the Jena API and the Jena reasoner on them. I thought about using the SDB/TDB component of Jena but I don't get how to actually load the data into my model since the SDB component seems to work with just SQL databases and the go throught the whole TDB javadoc seems to be a bit too much.
Should I define some kind of configuration file for the TDB model too ?
Thanks very much for the help.
You should have a look at this link which describes the connection between neo4j and triplestores. Or possible connections at least.
The neo4j model is very different than the RDF model, which Jena uses. RDF is composed of triples, meaning subjects, predicates, and objects. Here is an example of a graph composed of triples. Note the use of URIs for identifying resources, and note that the nodes are typically atomic data values. They're a URI, a simple number, a string, and so on.
In Neo4j, nodes are "Property Containers". Meaning that they're not just URIs, but they're actually bundles of information. Relationships connect nodes. So RDF "predicates" are sort of like Neo4j relationships, but neo4j nodes are not like RDF resources and literals.
Your main task if you want to use reasoners over a neo4j database is going to be to suck data out of neo4j, and format it as a set of RDF triples. You can then put those RDF triples into a Jena Model. When you have that jena model in memory, you can use existing jena APIs to use reasoners with that model.
I am in the process of creating a neo4j implementation of the jena API. For this I am subclassing ObjectProperty, Individual and OntClass and implement queries to the neo4j endpoint.
The main problem is that for reasoning the whole database must be loaded in memory in order to use Jena's inmemory reasoning. My solution at the moment is to use a "reasoning"-server to process this and write new results to the main persistence layer. This, of course, is only suitable for long term recommendation systems and not for UI interactions.
Have a look here for the current state of the project:
https://github.com/uzuzjmd/Wissensmodellierung
Path:
competence-database\src\main\scala\uzuzjmd\competence\persistence\neo4j
Anyone interested to participate in this open source project feel free to contact me.
I'm a bit late to the party but you can use https://github.com/neo4j-labs/neosemantics to output the Neo4J data into triples and read that into a Jena Model

UML class diagram for database

I have an assignment for developing a hotel reservation system!
One of tasks is to develop UML class diagram! However, in the task description it is written
"Class diagram should represent your database"
I am a bit confused about the rules, notations and etc... because I can't find any official UML class diagrams specifically for databases!
Could you help me please?
Yes, the latest UML standards threw off the data diagram. Nowadays Entity Relationship Diagram is NOT the part of UML. But the Class diagram still is there in UML and it will be enough.
Simply make a usual class diagram. The only difference is that you shouldn't use n-to-m dependencies, instead make a new class between the ends and you'll have n-to-1 and 1-to-m dependencies instead. Such class diagram can be realized in a database. For better understanding in every class you can set an attribute id to be used in the DB later.
The other thing for such class diagram is that you need not to describe any methods - they don't belong to DB tables. But in the reality you need them - so, I'd create one easier diagram - with instantiable classes and without methods, and the other, more thorough - that one will include also abstract classes, interfaces and methods.
Also, on the first one you needn't put classes that belong to the UI - classes, that show your data and edit them.
First I would like to brief you about the different types of classes for a class diagram into which one can view the entire system in a static view.
Some classes are entity(model) classes which define the database model for application domain persist for longer duration. In the above mentioned case it can be customer, hotel staff, hotel menu, seating info.
Some classes define the GUI & presentation to the user such as view classes.
Some classes define the control the program logic, process user events which can be called as control classes.
Some classes can be viewed as the resource classes which are responsible for communication with external data resources.
For all the mentioned classes above the notations, rules followed in UML will be same but their usage, intent will be different.
For your problem, you need to capture these entity classes for the mentioned system through which you can model the database for your system.
I hope it will help you a bit.
The language of UML class diagrams can be used for many different purposes. For instance, for making
conceptual information models
platform-independent information design models
platform-specific data models for all kinds of executable languages dealing with data structures (including SQL and OO programming languages)
Each of these different types of models uses only certain UML class modeling elements, and not others. For instance, in SQL data models we don't use
visbility
interfaces
attributes whose type/range is another class
many-to-many (non-functional) associations
generalization
In fact, since SQL does not really have any explicit association concept, but only the concept of foreign key dependencies, which can be used for representing functional associations, we better shouldn't use any association in an SQL data model, but rather dependency arrows corresponding to foreign key dependencies.
It also makes sense to define two stereotypes for use in SQL data models:
«pkey» as an attribute stereotype for primary key attributes
«fkey» as a dependency stereotype for foreign key dependencies
See this tutorial for more information.

Tools to Generate an Ontology from a Database Schema and Content

Is there a tool that can infer an ontology from information contained in both a database schema and the content in that schema? Let's say that there are tables in the database defining the following:
The types of entities that can exist
Instances of those entities linked to type
The types of relationships that can exist
Instances of those relationships linked to type and the entities concerned
I feel that looking at the schema alone is going to give a much more general ontology than I would like.
Reveltyix has a partnership with Global IDs, a data goveranance and MDM. One of GID's data profiling tool can export RDF to us to boot strap up a good portion of the ontology, even when that spans multiple databases. The Revelytix technologies then use the resultant ontology to federate data and manage distributed information sources, without having to move the date.
Good Luck
Greg
201-232-9195

Resources