Modelling an equivalent of database NULL in RDF

前端 未结 4 1429
陌清茗
陌清茗 2021-02-08 22:36

I would like to know if there is a standard or generally accepted way of representing an equivalent of NULL used in databases for RDF data.

More specifically, I\'m inter

4条回答
  •  無奈伤痛
    2021-02-08 23:21

    I do a bit of modelling in RDF. I know of no widely used vocabulary for representing the kind of information you are looking for. There is however a widely accepted pattern which is applicable.

    In work I did about a year ago I had a similar requirement to represent properties with "nullable values". A property with a nullable value either had a value or a reason why the value wasn't present.

    I represented this by introducing a b-node as the value of the property. That b-node would have either an rdf:value property linking to a value, or a reason property linking to a reason the value is not available, e.g.

    :foo
       :aProp [a :nullableValue; rdf:value "value"] ;
       :bProp [a :nullableValue; :reason :notAvailable ]
    .
    

提交回复
热议问题