Is there a way to represent temporary data in RDF?

I have a set of temporary data that I want to convert to RDF format. Is there an acceptable way to do this?


An example of tabular data that must somehow be converted to the RDF format:

| Name | Date | Salary | ----------------------------------- | John | Jan 2012 | 3,244 | | John | Feb 2012 | 4,012 | | John | Mar 2012 | 3,112 | 

I found one way to do this, however it is quite cube-shaped and presents very large dictionaries. Assuming syntax (Subject, Predicate, Object)

 (JohnJan2012, date, Jan 2012) (JohnJan2012, name, John) (JohnJan2012, salary, 3244) 

Does anyone know how best to do this?

+4
source share
2 answers

Here you can use bNodes and do something like this in Turtle syntax:

 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . :john :salary [ :amount "3244.0"^^xsd:decimal; :date "2012-01-01T00:00:00"^^xsd:datetime; ] . :john :salary [ :amount "4012.0"^^xsd:decimal; :date "2012-02-01T00:00:00"^^xsd:datetime; ] . 

Here I create two entries of these examples. the syntax [] creates an empty node, which is basically a node with no name (URI). Of each of these empty nodes in the example, we have two pieces of information about the date and quantity.

Also, make sure you use valid xsd:datetime dates if you want to use SPARQL later to query your data.

+5
source

For a more complete discussion of the various ways of representing time in RDF, see Ian Davis's blog post on this topic.

+5
source

Source: https://habr.com/ru/post/1398071/


All Articles