Relational V1 - project-octopus/octopodes GitHub Wiki

Schema

Provenance information data represented in a relational model. The example concerns a single painting, "The Threatened Swan by Jan Asselijn".

The data follow closely the Schema.org type hierarchy, with one table for each type. We have chosen to use a class table inheritance pattern, so that common properties (like url) are not repeated in every single table. We can select a single object by joining its row with matching rows from all its superclasses.

There are five Thing objects shown in the sample. The first is a Painting created by Jan Asselijn in 1650.

The next two are WebPage objects: a Rijksmuseum page "about" the painting, and the artist's Wikipedia article. Those are followed by a WebPageElement that is part of the Wikipedia article, and a MediaObject that is a JPG of the painting.

There is one junction table creative_work_has_part with two rows to join the three records for the Wikipedia article.

The schema should be developed further to capture the "based on" relationships between works. Keep in mind that the Schema.org context says that a work can have "multiple sources".

---
thing:
  -
    id: 1
    type: "Painting"
    license: "Public Domain"
    name: "The Threatened Swan"
  -
    id: 2
    type: "WebPage"
    name: "The Threatened Swan, Jan Asselijn, c. 1650"
    license: "Public Domain"
    url: "https://www.rijksmuseum.nl/en/collection/SK-A-4"
  -
    id: 3
    type: "WebPage"
    name: "Jan Asselijn"
    license: "CC-by-sa"
    url: "http://en.wikipedia.org/wiki/Jan_Asselijn"
  -
    id: 4
    type: "WebPageElement"
    name: "The Threatened Swan, one of the top works in the Rijks...",
  -
    id: 5
    type: "MediaObject"
creative_work:
  -
    thing_id: 1
    creator: "Jan Asselijn"
    date_created: "1650"
  -
    thing_id: 2
    about: 1
    publisher: "Rijksmuseum"
  -
    thing_id: 3
    publisher: "Wikipedia"
  -
    thing_id: 4
    about: 1
  -
    thing_id: 5
creative_work_has_part:
  -
    id: 1
    work_id: 3
    part_id: 4
  -
    id: 2
    work_id: 4
    part_id: 5
media_object:
  -
    creative_work_id: 5
    contentUrl: "http://upload.wiki...Swan.jpg"
    encodes_creative_work: 1