SHARE
TWEET

Pastebin Example Star Schema Dataset

bkaempgen Mar 22nd, 2014 302 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Example SSB dataset for olap4ld testing
  2. # Author: Benedikt Kämpgen
  3.  
  4. @prefix rdf:      <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
  5. @prefix rdfs:     <http://www.w3.org/2000/01/rdf-schema#> .
  6. @prefix owl:      <http://www.w3.org/2002/07/owl#> .
  7. @prefix xsd:      <http://www.w3.org/2001/XMLSchema#> .
  8. @prefix skos:     <http://www.w3.org/2004/02/skos/core#> .
  9. @prefix void:     <http://rdfs.org/ns/void#> .
  10. @prefix dct:      <http://purl.org/dc/terms/> .
  11. @prefix foaf:     <http://xmlns.com/foaf/0.1/> .
  12. @prefix org:      <http://www.w3.org/ns/org#> .
  13. @prefix admingeo: <http://data.ordnancesurvey.co.uk/ontology/admingeo/> .
  14. @prefix interval: <http://reference.data.gov.uk/def/intervals/> .
  15.  
  16. @prefix qb:       <http://purl.org/linked-data/cube#> .
  17. @prefix qb4o:     <http://purl.org/olap#> .
  18.  
  19. @prefix sdmx:            <http://purl.org/linked-data/sdmx#> .
  20. @prefix sdmx-concept:    <http://purl.org/linked-data/sdmx/2009/concept#> .
  21. @prefix sdmx-dimension:  <http://purl.org/linked-data/sdmx/2009/dimension#> .
  22. @prefix sdmx-attribute:  <http://purl.org/linked-data/sdmx/2009/attribute#> .
  23. @prefix sdmx-measure:    <http://purl.org/linked-data/sdmx/2009/measure#> .
  24. @prefix sdmx-metadata:   <http://purl.org/linked-data/sdmx/2009/metadata#> .
  25. @prefix sdmx-code:       <http://purl.org/linked-data/sdmx/2009/code#> .
  26. @prefix sdmx-subject:    <http://purl.org/linked-data/sdmx/2009/subject#> .
  27.  
  28. @prefix :               <http://pastebin.com/raw.php?i=839G2u72#> .
  29.  
  30. # -- Data Set --------------------------------------------
  31.  
  32. :ds
  33.         a qb:DataSet ;
  34.         rdfs:label "Pastebin Example Star Schema Dataset"@en ;
  35.         qb:structure :dsd.     
  36.  
  37. # -- Data structure definition ----------------------------
  38.  
  39. :dsd
  40.         rdfs:label "Example Star Schema Benchmark Datastructuredefinition"@en ;
  41.         a qb:DataStructureDefinition ;
  42.         qb:component
  43.                 [ qb:dimension :lo_orderdate ],
  44.                 [ qb:dimension :lo_custkey ],
  45.                 [ qb:dimension :lo_partkey ],
  46.                 [ qb:dimension :lo_suppkey ];
  47.         qb:component
  48.                 [ qb:measure :lo_quantity; qb4o:hasAggregateFunction qb4o:sum ],
  49.                 [ qb:measure :lo_discount; qb4o:hasAggregateFunction qb4o:avg ],
  50.                 [ qb:measure :lo_extendedprice; qb4o:hasAggregateFunction qb4o:sum ],
  51.                 [ qb:measure :lo_revenue; qb4o:hasAggregateFunction qb4o:sum ],
  52.                 [ qb:measure :lo_supplycost; qb4o:hasAggregateFunction qb4o:sum ];
  53.         .
  54.  
  55. # -- Dimensions and measures  -----------------------------
  56.  
  57. :lo_orderdate a rdf:Property, qb:DimensionProperty;
  58.     rdfs:label "Dates"@en ;
  59.     rdfs:range skos:Concept ;
  60.     qb:codeList :lo_orderdateCodeList ;
  61.     .
  62.  
  63. :lo_custkey a rdf:Property, qb:DimensionProperty;
  64.     rdfs:label "Customers"@en ;
  65.     rdfs:range skos:Concept ;
  66.     qb:codeList :lo_custkeyCodeList ;
  67.     .
  68.  
  69. :lo_partkey a rdf:Property, qb:DimensionProperty;
  70.     rdfs:label "Products"@en ;
  71.     rdfs:range skos:Concept ;
  72.     qb:codeList :lo_partkeyCodeList ;
  73.     .
  74.  
  75. :lo_suppkey a rdf:Property, qb:DimensionProperty;
  76.     rdfs:label "Suppliers"@en ;
  77.     rdfs:range skos:Concept ;
  78.     qb:codeList :lo_suppkeyCodeList ;
  79.     .
  80.  
  81. :lo_quantity  a rdf:Property, qb:MeasureProperty;
  82.     rdfs:label "quantity"@en ;
  83.     rdfs:subPropertyOf sdmx-measure:obsValue;
  84.     rdfs:range xsd:decimal ;
  85.     .
  86.  
  87. :lo_discount  a rdf:Property, qb:MeasureProperty;
  88.     rdfs:label "discount"@en ;
  89.     rdfs:subPropertyOf sdmx-measure:obsValue;
  90.     rdfs:range xsd:decimal ;
  91.     .
  92.  
  93. :lo_extendedprice  a rdf:Property, qb:MeasureProperty ;
  94.     rdfs:label "extendedprice"@en ;
  95.     rdfs:subPropertyOf sdmx-measure:obsValue ;
  96.     rdfs:range xsd:decimal ;
  97.     .
  98.  
  99. :lo_revenue  a rdf:Property, qb:MeasureProperty;
  100.     rdfs:label "revenue"@en ;
  101.     rdfs:subPropertyOf sdmx-measure:obsValue;
  102.     rdfs:range xsd:decimal ;
  103.     .
  104.  
  105. :lo_supplycost  a rdf:Property, qb:MeasureProperty;
  106.     rdfs:label "supplycost"@en ;
  107.     rdfs:subPropertyOf sdmx-measure:obsValue;
  108.     rdfs:range xsd:decimal ;
  109.     .
  110.  
  111. # -- Code lists -------------------------------------------
  112.  
  113. :lo_orderdateCodeList a skos:ConceptScheme, sdmx:CodeList;
  114.         rdfs:label "Dates"@en ;
  115.     skos:hasTopConcept :date_19940101;
  116.     skos:hasTopConcept :date_19940601;
  117.     .
  118.  
  119. :lo_custkeyCodeList a skos:ConceptScheme, sdmx:CodeList;
  120.         rdfs:label "Customers"@en ;
  121.     skos:hasTopConcept :customer_1;
  122.     skos:hasTopConcept :customer_2;
  123.     skos:hasTopConcept :customer_3;    
  124.     .
  125.  
  126. :lo_partkeyCodeList a skos:ConceptScheme, sdmx:CodeList;
  127.         rdfs:label "Products"@en ;
  128.     skos:hasTopConcept :part_1;
  129.     skos:hasTopConcept :part_2;
  130.     skos:hasTopConcept :part_3;
  131.     .
  132.  
  133. :lo_suppkeyCodeList a skos:ConceptScheme, sdmx:CodeList;
  134.         rdfs:label "Suppliers"@en ;
  135.     skos:hasTopConcept :supplier_1;
  136.     skos:hasTopConcept :supplier_2;
  137.     .
  138.  
  139. # -- Concepts -----------------------------------------
  140. :date_19940101 a skos:Concept;
  141.         skos:inScheme :lo_orderdateCodeList
  142.         .
  143. :date_19940601 a skos:Concept;
  144.         skos:inScheme :lo_orderdateCodeList
  145.         .
  146.  
  147. :customer_1 a skos:Concept;
  148.         skos:inScheme :lo_custkeyCodeList
  149.         .
  150. :customer_2 a skos:Concept;
  151.         skos:inScheme :lo_custkeyCodeList
  152.         .
  153. :customer_3 a skos:Concept;
  154.         skos:inScheme :lo_custkeyCodeList
  155.         .
  156.  
  157. :part_1 a skos:Concept;
  158.         skos:inScheme :lo_partkeyCodeList
  159.         .
  160. :part_2 a skos:Concept;
  161.         skos:inScheme :lo_partkeyCodeList
  162.         .
  163. :part_3 a skos:Concept;
  164.         skos:inScheme :lo_partkeyCodeList
  165.         .
  166.  
  167. :supplier_1 a skos:Concept;
  168.         skos:inScheme :lo_suppkeyCodeList
  169.         .
  170. :supplier_2 a skos:Concept;
  171.         skos:inScheme :lo_suppkeyCodeList
  172.         .
  173.  
  174. # -- Observations -----------------------------------------
  175.  
  176. :lineorder_1_1
  177.     a :lineorder ;
  178.     a qb:Observation ;
  179.     qb:dataSet :ds ;
  180.     :lo_orderdate :date_19940101 ;
  181.     :lo_custkey :customer_1 ;
  182.     :lo_partkey :part_1 ;
  183.     :lo_suppkey :supplier_1 ;
  184.     :lo_quantity 17 ;
  185.     :lo_discount 100 ;
  186.     :lo_extendedprice 2471035e0 ;
  187.     :lo_supplycost 87213 ;
  188.     :lo_revenue 2372193 ;
  189.     .
  190.  
  191. :lineorder_1_2
  192.     a :lineorder ;
  193.     a qb:Observation ;
  194.     qb:dataSet :ds ;
  195.     :lo_orderdate :date_19940101 ;
  196.     :lo_custkey :customer_2 ;
  197.     :lo_partkey :part_1 ;
  198.     :lo_suppkey :supplier_1 ;
  199.     :lo_quantity 17 ;
  200.     :lo_discount 4e0 ;
  201.     :lo_extendedprice 2471035e0 ;
  202.     :lo_supplycost 87213 ;
  203.     :lo_revenue 2372193 ;
  204.     .
  205.  
  206. :lineorder_1_3
  207.     a :lineorder ;
  208.     a qb:Observation ;
  209.     qb:dataSet :ds ;
  210.     :lo_orderdate :date_19940101 ;
  211.     :lo_custkey :customer_1 ;
  212.     :lo_partkey :part_3 ;
  213.     :lo_suppkey :supplier_1 ;
  214.     :lo_quantity 17 ;
  215.     :lo_discount 4e0 ;
  216.     :lo_extendedprice 2471035e0 ;
  217.     :lo_supplycost 87213 ;
  218.     :lo_revenue 2372193 ;
  219.     .
  220.  
  221. :lineorder_1_4
  222.     a :lineorder ;
  223.     a qb:Observation ;
  224.     qb:dataSet :ds ;
  225.     :lo_orderdate :date_19940101 ;
  226.     :lo_custkey :customer_2 ;
  227.     :lo_partkey :part_1 ;
  228.     :lo_suppkey :supplier_2 ;
  229.     :lo_quantity 17 ;
  230.     :lo_discount 4e0 ;
  231.     :lo_extendedprice 2471035e0 ;
  232.     :lo_supplycost 87213 ;
  233.     :lo_revenue 2372193 ;
  234.     .
  235.  
  236. :lineorder_1_5
  237.     a :lineorder ;
  238.     a qb:Observation ;
  239.     qb:dataSet :ds ;
  240.     :lo_orderdate :date_19940101 ;
  241.     :lo_custkey :customer_2 ;
  242.     :lo_partkey :part_3 ;
  243.     :lo_suppkey :supplier_2 ;
  244.     :lo_quantity 17 ;
  245.     :lo_discount 100 ;
  246.     :lo_extendedprice 2471035e0 ;
  247.     :lo_supplycost 87213 ;
  248.     :lo_revenue 2372193 ;
  249.     .
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top