Модель данных

Это описание модели данных, которая используется на schema.org.

Используемая модель данных очень универсальна и является производной от схемы RDF (который в свою очередь был получен из CycL, который в свою очередь...).

  1. У нас есть набор типов, расположенных в иерархии множественного наследования, где каждый тип может быть подтипом многих типов.
  2. У нас есть набор свойств
    1. у каждого свойства может быть один или более типов в качестве его областей. Такое свойство может использоваться для экземпляров любого из этих типов.
    2. у каждого свойства может быть один или более типов в качестве его диапазонов. Значение свойств должно быть экземплярами по крайней мере одного из этих типов.

Решение позволить многократные области и диапазоны было просто прагматично. В то время как вычислительные свойства систем с единственной областью и диапазоном легче понять, практически, это вызывает создание большого количества искусственных типов, которые существуют исключительно в качестве области / диапазона некоторых свойств.

Как много других систем, схема, представленная здесь, может быть расширена (несколькими типами Type и Property и несколькими совйствами как область и диапазон) чтобы позволить отражение, т. е. для схемы должны быть представлены в терминах самого себя. Версия микроданных такой отраженной системы здесь, а версия OWL находится здесь.

Иерархия типов, предложенная на сайте не претендует на то, чтобы быть 'глобальной онтологией' мира. Она только покрывает типы сужностей, которым мы (Microsoft, Yahoo! and Google), думаем, сможем найти применение с помощью наших поисковых систем, в ближайщем будущем.


Соответствие

While we would like all the markup we get to follow the schema, in practice, we expect a lot of data that does not. We expect schema.org properties to be used with new types. We also expect that often, where we expect a property value of type Person, Place, Organization or some other subClassOf Thing, we will get a text string. In the spirit of "some data is better than none", we will accept this markup and do the best we can.


Mapping to RDFa 1.1

Our use of Microdata maps easily into RDFa 1.1 . In fact, all of Schema.org can be used with the RDFa 1.1 syntax as is. The RDFa 1.1 version of the markup looks almost isomorphic to the Microdata version. Given below is an sample RDFa 1.1 markup, of the example given for the Product  type.   

  1. <div vocab = "http://schema.org/" typeof = "Product" >
  2.   <img rel = "image" src = "dell-30in-lcd.jpg" />
  3.   <span property = "name" > Dell UltraSharp 30" LCD Monitor </span>
  4.   <div rel = "hasAggregateRating" >
  5.     <div typeof = "http://schema.org/AggregateRating" >
  6.       <span property = "ratingValue" > 87 </span>
  7.       out of <span property = "bestRating" > 100 </span>
  8.       based on <span property = "ratingCount" > 24 </span> user ratings
  9.     </div>
  10.   </div>
  11.   <div rel = "offers" >
  12.     <div typeof = "http://schema.org/AggregateOffer" >
  13.       <span property = "lowPrice" > $1250 </span>
  14.        to <span property = "highPrice" > $1495 </span>
  15.         from <span property = "offerCount" > 8 </span> sellers
  16.     </div>
  17.   </div>
  18.   Sellers:
  19.   <div rel = "offers"   >
  20.     <div typeof = "http://schema.org/Offer" >
  21.     <a property = "url" href = "save-a-lot-monitors.com/dell-30.html" >
  22.      Save A Lot Monitors - $1250 </a>
  23.     </div>
  24.   </div>
  25.   <div rel = "offer" >
  26.     <div typeof = "http://schema.org/Offer" >
  27.     <a property = "url" href = "jondoe-gadgets.com/dell-30.html" >
  28.      Jon Doe's Gadgets - $1350 </a>
  29.     </div>
  30.   </div>
  31.   ...
  32. </div>

More specifically, itemprop is replaced by either property or rel depending on whether the value is literal or another entity. itemscope is dropped and itemtype is replaced with typeof . In addition, the attribute value pair vocab="http://schema.org/" is added to the body or some other enclosing tag.

Microdata does not have analogs for RDFa features such as CURIES, Turtles, Chaining, Typed vs Plain literals, etc.

comments powered by Disqus