From 46db89e6f22ef83e665111c7b55e8dbd46b22137 Mon Sep 17 00:00:00 2001 From: bcogrel Date: Wed, 17 Jan 2024 13:24:02 +0000 Subject: [PATCH] deploy: ontop/ontop-website@d3895ff0eb5334879581ccf96ed7e922241fbd9d --- 404.html | 6 +++--- ...styles.6c58b99e.css => 0.styles.2b9f24ec.css} | 2 +- assets/js/{10.2e10abfc.js => 10.25fa0812.js} | 2 +- assets/js/{11.9c479812.js => 11.63a0c1c6.js} | 2 +- assets/js/{12.473c4f1c.js => 12.6ee50bb8.js} | 2 +- assets/js/{13.9330117e.js => 13.82c8b4b6.js} | 2 +- assets/js/{19.c55473af.js => 19.864fd591.js} | 2 +- assets/js/{20.8c67cb7d.js => 20.e0fa11bb.js} | 2 +- assets/js/{26.d98cd04f.js => 26.0de7f634.js} | 2 +- assets/js/{27.906526eb.js => 27.1d29815b.js} | 2 +- assets/js/{28.2b7b77b2.js => 28.2770c070.js} | 2 +- assets/js/{29.6957445c.js => 29.a693cec1.js} | 2 +- assets/js/{31.de926e6b.js => 31.5d03035b.js} | 2 +- assets/js/{32.bbc94ac1.js => 32.a9697747.js} | 2 +- assets/js/{35.c0d60fb0.js => 35.0691db52.js} | 2 +- assets/js/{36.c44deccc.js => 36.69b1ebb1.js} | 2 +- assets/js/{43.9e2da8d6.js => 43.1f88b050.js} | 2 +- assets/js/{44.b45be0fb.js => 44.3141a4aa.js} | 2 +- assets/js/{5.01119bb7.js => 5.e8e9de00.js} | 2 +- assets/js/{50.5d9fdced.js => 50.a6d14188.js} | 2 +- assets/js/{51.55dfa97d.js => 51.db247110.js} | 2 +- assets/js/{53.baae48e1.js => 53.7504f725.js} | 2 +- assets/js/{54.ea19806d.js => 54.fc0ed059.js} | 2 +- assets/js/{56.f6297f24.js => 56.4b4edba3.js} | 2 +- assets/js/{57.8c96a344.js => 57.a635467f.js} | 2 +- assets/js/{58.57f1759b.js => 58.5d967bf0.js} | 2 +- assets/js/{59.c250e2f7.js => 59.73194a85.js} | 2 +- assets/js/{6.a180f86f.js => 6.e48edabd.js} | 2 +- assets/js/61.543bfa7a.js | 1 + assets/js/61.e93e67cb.js | 1 - assets/js/{62.da84513e.js => 62.6fd12f06.js} | 2 +- assets/js/{63.88b74908.js => 63.ab25da0d.js} | 2 +- assets/js/{64.62ca893d.js => 64.ef1c6023.js} | 2 +- assets/js/{65.7c651a30.js => 65.1955838d.js} | 2 +- assets/js/{66.494844b3.js => 66.a8296a9b.js} | 2 +- assets/js/{67.aabf2d98.js => 67.5d0d2637.js} | 2 +- assets/js/{68.5b14c426.js => 68.3d5a8aed.js} | 2 +- assets/js/{70.390c1b51.js => 70.d4fb42d5.js} | 2 +- assets/js/{71.22635f37.js => 71.b3774464.js} | 2 +- assets/js/{72.0b75bd8c.js => 72.a13877f6.js} | 2 +- assets/js/{74.601e7783.js => 74.557f1c4c.js} | 2 +- assets/js/{75.5f9e9c52.js => 75.480169f5.js} | 2 +- assets/js/{76.96406f20.js => 76.01ab5275.js} | 2 +- assets/js/{77.4257ac6f.js => 77.af4d3740.js} | 2 +- assets/js/{78.8c0cdac5.js => 78.6102aa0a.js} | 2 +- assets/js/{79.28837695.js => 79.367b0f4a.js} | 2 +- assets/js/{81.6698c80e.js => 81.0b6c0419.js} | 2 +- assets/js/{82.110d224d.js => 82.73bb5cad.js} | 2 +- assets/js/{83.62e77972.js => 83.4fccdf57.js} | 2 +- assets/js/{86.88b669e2.js => 86.5aa5781f.js} | 2 +- assets/js/{87.0bff43af.js => 87.075e04c7.js} | 2 +- assets/js/{92.94a50a19.js => 92.f9e01cfa.js} | 2 +- assets/js/{93.345dfe74.js => 93.54e43d53.js} | 2 +- assets/js/{95.e683cb7a.js => 95.5ebe6cd9.js} | 2 +- assets/js/{96.38400e7b.js => 96.399936b5.js} | 2 +- assets/js/{97.eb71dfa4.js => 97.95667eff.js} | 2 +- assets/js/{98.f5e3d29a.js => 98.f718a3ad.js} | 2 +- assets/js/{app.2f6e9b01.js => app.9b715b54.js} | 4 ++-- community/contributing/bug-report.html | 8 ++++---- community/contributing/documentation.html | 8 ++++---- community/contributing/index.html | 8 ++++---- community/contributing/pull-request.html | 8 ++++---- community/index.html | 8 ++++---- community/organizations.html | 8 ++++---- community/support.html | 8 ++++---- dev/build.html | 8 ++++---- dev/db-adapter.html | 8 ++++---- dev/debug-jetty.html | 8 ++++---- dev/debug-protege.html | 8 ++++---- dev/git.html | 8 ++++---- dev/index.html | 8 ++++---- dev/internals/guice.html | 8 ++++---- dev/internals/iq.html | 8 ++++---- dev/new-release.html | 8 ++++---- dev/outdated/known-issues.html | 8 ++++---- dev/stats.html | 8 ++++---- guide/advanced/caching.html | 8 ++++---- guide/advanced/configuration.html | 8 ++++---- guide/advanced/lenses.html | 8 ++++---- guide/advanced/logging.html | 8 ++++---- guide/advanced/predefined.html | 8 ++++---- guide/advanced/views.html | 8 ++++---- guide/cli.html | 8 ++++---- guide/compliance.html | 8 ++++---- guide/concepts.html | 8 ++++---- guide/databases/athena.html | 8 ++++---- guide/databases/bigquery.html | 8 ++++---- guide/databases/databricks.html | 8 ++++---- guide/databases/db2.html | 8 ++++---- guide/databases/denodo.html | 8 ++++---- guide/databases/dremio.html | 8 ++++---- guide/databases/duckdb.html | 8 ++++---- guide/databases/dynamodb.html | 8 ++++---- guide/databases/generic.html | 8 ++++---- guide/databases/h2.html | 8 ++++---- guide/databases/mariadb.html | 8 ++++---- guide/databases/mssql.html | 8 ++++---- guide/databases/mysql.html | 8 ++++---- guide/databases/oracle.html | 8 ++++---- guide/databases/postgres.html | 8 ++++---- guide/databases/presto.html | 8 ++++---- guide/databases/redshift.html | 8 ++++---- guide/databases/snowflake.html | 8 ++++---- guide/databases/spark.html | 8 ++++---- guide/databases/trino.html | 8 ++++---- guide/db.html | 8 ++++---- guide/getting-started.html | 8 ++++---- guide/glossary.html | 8 ++++---- guide/index.html | 8 ++++---- guide/materialization.html | 8 ++++---- guide/releases.html | 16 ++++++++-------- guide/troubleshooting/faq.html | 8 ++++---- index.html | 6 +++--- jobs/index.html | 8 ++++---- obda-pages/index.html | 8 ++++---- research/index.html | 8 ++++---- research/iq-formal.html | 8 ++++---- research/notation.html | 8 ++++---- research/optimization.html | 8 ++++---- research/publications.html | 8 ++++---- research/tutorials/cikm-2018.html | 8 ++++---- tutorial/api/index.html | 8 ++++---- tutorial/basic/setup.html | 8 ++++---- tutorial/basic/university-1.html | 8 ++++---- tutorial/basic/university-2.html | 8 ++++---- tutorial/endpoint/endpoint-cli.html | 8 ++++---- tutorial/endpoint/endpoint-docker.html | 8 ++++---- tutorial/endpoint/endpoint-tomcat.html | 8 ++++---- tutorial/endpoint/index.html | 8 ++++---- tutorial/external-tutorials.html | 8 ++++---- tutorial/federation/denodo/index.html | 8 ++++---- tutorial/federation/dremio/index.html | 8 ++++---- tutorial/federation/index.html | 8 ++++---- tutorial/federation/teiid/index.html | 8 ++++---- tutorial/index.html | 8 ++++---- tutorial/interact/cli.html | 8 ++++---- tutorial/interact/jupyter.html | 8 ++++---- tutorial/lenses/basic-lens.html | 8 ++++---- tutorial/lenses/flatten-lens.html | 8 ++++---- tutorial/lenses/index.html | 8 ++++---- tutorial/lenses/join-lens.html | 8 ++++---- tutorial/lenses/setup.html | 8 ++++---- tutorial/lenses/sql-lens.html | 8 ++++---- tutorial/lenses/union-lens.html | 8 ++++---- tutorial/mapping/existential.html | 8 ++++---- tutorial/mapping/foreign-keys.html | 8 ++++---- tutorial/mapping/index.html | 8 ++++---- tutorial/mapping/primary-keys.html | 8 ++++---- tutorial/mapping/uri-templates.html | 8 ++++---- tutorial/materialization/materialization.html | 8 ++++---- 150 files changed, 431 insertions(+), 431 deletions(-) rename assets/css/{0.styles.6c58b99e.css => 0.styles.2b9f24ec.css} (96%) rename assets/js/{10.2e10abfc.js => 10.25fa0812.js} (98%) rename assets/js/{11.9c479812.js => 11.63a0c1c6.js} (95%) rename assets/js/{12.473c4f1c.js => 12.6ee50bb8.js} (98%) rename assets/js/{13.9330117e.js => 13.82c8b4b6.js} (97%) rename assets/js/{19.c55473af.js => 19.864fd591.js} (99%) rename assets/js/{20.8c67cb7d.js => 20.e0fa11bb.js} (97%) rename assets/js/{26.d98cd04f.js => 26.0de7f634.js} (99%) rename assets/js/{27.906526eb.js => 27.1d29815b.js} (95%) rename assets/js/{28.2b7b77b2.js => 28.2770c070.js} (99%) rename assets/js/{29.6957445c.js => 29.a693cec1.js} (98%) rename assets/js/{31.de926e6b.js => 31.5d03035b.js} (99%) rename assets/js/{32.bbc94ac1.js => 32.a9697747.js} (99%) rename assets/js/{35.c0d60fb0.js => 35.0691db52.js} (99%) rename assets/js/{36.c44deccc.js => 36.69b1ebb1.js} (98%) rename assets/js/{43.9e2da8d6.js => 43.1f88b050.js} (98%) rename assets/js/{44.b45be0fb.js => 44.3141a4aa.js} (98%) rename assets/js/{5.01119bb7.js => 5.e8e9de00.js} (67%) rename assets/js/{50.5d9fdced.js => 50.a6d14188.js} (98%) rename assets/js/{51.55dfa97d.js => 51.db247110.js} (98%) rename assets/js/{53.baae48e1.js => 53.7504f725.js} (98%) rename assets/js/{54.ea19806d.js => 54.fc0ed059.js} (98%) rename assets/js/{56.f6297f24.js => 56.4b4edba3.js} (98%) rename assets/js/{57.8c96a344.js => 57.a635467f.js} (91%) rename assets/js/{58.57f1759b.js => 58.5d967bf0.js} (98%) rename assets/js/{59.c250e2f7.js => 59.73194a85.js} (96%) rename assets/js/{6.a180f86f.js => 6.e48edabd.js} (89%) create mode 100644 assets/js/61.543bfa7a.js delete mode 100644 assets/js/61.e93e67cb.js rename assets/js/{62.da84513e.js => 62.6fd12f06.js} (99%) rename assets/js/{63.88b74908.js => 63.ab25da0d.js} (97%) rename assets/js/{64.62ca893d.js => 64.ef1c6023.js} (89%) rename assets/js/{65.7c651a30.js => 65.1955838d.js} (98%) rename assets/js/{66.494844b3.js => 66.a8296a9b.js} (99%) rename assets/js/{67.aabf2d98.js => 67.5d0d2637.js} (96%) rename assets/js/{68.5b14c426.js => 68.3d5a8aed.js} (99%) rename assets/js/{70.390c1b51.js => 70.d4fb42d5.js} (98%) rename assets/js/{71.22635f37.js => 71.b3774464.js} (98%) rename assets/js/{72.0b75bd8c.js => 72.a13877f6.js} (92%) rename assets/js/{74.601e7783.js => 74.557f1c4c.js} (99%) rename assets/js/{75.5f9e9c52.js => 75.480169f5.js} (99%) rename assets/js/{76.96406f20.js => 76.01ab5275.js} (92%) rename assets/js/{77.4257ac6f.js => 77.af4d3740.js} (97%) rename assets/js/{78.8c0cdac5.js => 78.6102aa0a.js} (99%) rename assets/js/{79.28837695.js => 79.367b0f4a.js} (99%) rename assets/js/{81.6698c80e.js => 81.0b6c0419.js} (92%) rename assets/js/{82.110d224d.js => 82.73bb5cad.js} (99%) rename assets/js/{83.62e77972.js => 83.4fccdf57.js} (99%) rename assets/js/{86.88b669e2.js => 86.5aa5781f.js} (99%) rename assets/js/{87.0bff43af.js => 87.075e04c7.js} (98%) rename assets/js/{92.94a50a19.js => 92.f9e01cfa.js} (99%) rename assets/js/{93.345dfe74.js => 93.54e43d53.js} (99%) rename assets/js/{95.e683cb7a.js => 95.5ebe6cd9.js} (98%) rename assets/js/{96.38400e7b.js => 96.399936b5.js} (99%) rename assets/js/{97.eb71dfa4.js => 97.95667eff.js} (99%) rename assets/js/{98.f5e3d29a.js => 98.f718a3ad.js} (99%) rename assets/js/{app.2f6e9b01.js => app.9b715b54.js} (76%) diff --git a/404.html b/404.html index ecd8a3068..1eaff831c 100644 --- a/404.html +++ b/404.html @@ -6,11 +6,11 @@ Ontop - - + +
- + diff --git a/assets/css/0.styles.6c58b99e.css b/assets/css/0.styles.2b9f24ec.css similarity index 96% rename from assets/css/0.styles.6c58b99e.css rename to assets/css/0.styles.2b9f24ec.css index 8420e8d04..7e7531abe 100644 --- a/assets/css/0.styles.6c58b99e.css +++ b/assets/css/0.styles.2b9f24ec.css @@ -1 +1 @@ -code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.theme-default-content code{color:#476582;padding:.25rem .5rem;margin:0;font-size:.85em;background-color:rgba(27,31,35,.05);border-radius:3px}.theme-default-content code .token.deleted{color:#ec5975}.theme-default-content code .token.inserted{color:#3eaf7c}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.4;padding:1.25rem 1.5rem;margin:.85rem 0;background-color:#282c34;border-radius:6px;overflow:auto}.theme-default-content pre[class*=language-] code,.theme-default-content pre code{color:#fff;padding:0;background-color:transparent;border-radius:0}div[class*=language-]{position:relative;background-color:#282c34;border-radius:6px}div[class*=language-] .highlight-lines{-webkit-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.4}div[class*=language-] .highlight-lines .highlighted{background-color:rgba(0,0,0,.66)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent;position:relative;z-index:1}div[class*=language-]:before{position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:hsla(0,0%,100%,.4)}div[class*=language-]:not(.line-numbers-mode) .line-numbers-wrapper{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlighted{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlighted:before{content:" ";position:absolute;z-index:3;left:0;top:0;display:block;width:3.5rem;height:100%;background-color:rgba(0,0,0,.66)}div[class*=language-].line-numbers-mode pre{padding-left:4.5rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers-wrapper{position:absolute;top:0;width:3.5rem;text-align:center;color:hsla(0,0%,100%,.3);padding:1.25rem 0;line-height:1.4}div[class*=language-].line-numbers-mode .line-numbers-wrapper br{-webkit-user-select:none;user-select:none}div[class*=language-].line-numbers-mode .line-numbers-wrapper .line-number{position:relative;z-index:4;-webkit-user-select:none;user-select:none;font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;z-index:2;top:0;left:0;width:3.5rem;height:100%;border-radius:6px 0 0 6px;border-right:1px solid rgba(0,0,0,.66);background-color:#282c34}div[class~=language-js]:before{content:"js"}div[class~=language-ts]:before{content:"ts"}div[class~=language-html]:before{content:"html"}div[class~=language-md]:before{content:"md"}div[class~=language-vue]:before{content:"vue"}div[class~=language-css]:before{content:"css"}div[class~=language-sass]:before{content:"sass"}div[class~=language-scss]:before{content:"scss"}div[class~=language-less]:before{content:"less"}div[class~=language-stylus]:before{content:"stylus"}div[class~=language-go]:before{content:"go"}div[class~=language-java]:before{content:"java"}div[class~=language-c]:before{content:"c"}div[class~=language-sh]:before{content:"sh"}div[class~=language-yaml]:before{content:"yaml"}div[class~=language-py]:before{content:"py"}div[class~=language-docker]:before{content:"docker"}div[class~=language-dockerfile]:before{content:"dockerfile"}div[class~=language-makefile]:before{content:"makefile"}div[class~=language-javascript]:before{content:"js"}div[class~=language-typescript]:before{content:"ts"}div[class~=language-markup]:before{content:"html"}div[class~=language-markdown]:before{content:"md"}div[class~=language-json]:before{content:"json"}div[class~=language-ruby]:before{content:"rb"}div[class~=language-python]:before{content:"py"}div[class~=language-bash]:before{content:"sh"}div[class~=language-php]:before{content:"php"}.custom-block .custom-block-title{font-weight:600;margin-bottom:-.4rem}.custom-block.danger,.custom-block.tip,.custom-block.warning{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-block.tip{background-color:#f3f5f7;border-color:#42b983}.custom-block.warning{background-color:rgba(255,229,100,.3);border-color:#e7c000;color:#6b5900}.custom-block.warning .custom-block-title{color:#b29400}.custom-block.warning a{color:#2c3e50}.custom-block.danger{background-color:#ffe6e6;border-color:#c00;color:#4d0000}.custom-block.danger .custom-block-title{color:#900}.custom-block.danger a{color:#2c3e50}.custom-block.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:#eee}.custom-block.details h4{margin-top:0}.custom-block.details figure:last-child,.custom-block.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-block.details summary{outline:none;cursor:pointer}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-bottom:6px solid #ccc}.arrow.down,.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent}.arrow.down{border-top:6px solid #ccc}.arrow.right{border-left:6px solid #ccc}.arrow.left,.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent}.arrow.left{border-right:6px solid #ccc}.theme-default-content:not(.custom){max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.theme-default-content:not(.custom){padding:2rem}}@media (max-width:419px){.theme-default-content:not(.custom){padding:1.5rem}}.table-of-contents .badge{vertical-align:middle}body,html{padding:0;margin:0;background-color:#fff}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;color:#2c3e50}.page{padding-left:20rem}.navbar{z-index:20;right:0;height:3.6rem;background-color:#fff;box-sizing:border-box;border-bottom:1px solid #eaecef}.navbar,.sidebar-mask{position:fixed;top:0;left:0}.sidebar-mask{z-index:9;width:100vw;height:100vh;display:none}.sidebar{font-size:16px;background-color:#fff;width:20rem;position:fixed;z-index:10;margin:0;top:3.6rem;left:0;bottom:0;box-sizing:border-box;border-right:1px solid #eaecef;overflow-y:auto}.theme-default-content:not(.custom)>:first-child{margin-top:3.6rem}.theme-default-content:not(.custom) a:hover{text-decoration:underline}.theme-default-content:not(.custom) p.demo{padding:1rem 1.5rem;border:1px solid #ddd;border-radius:4px}.theme-default-content:not(.custom) img{max-width:100%}.theme-default-content.custom{padding:0;margin:0}.theme-default-content.custom img{max-width:100%}a{font-weight:500;text-decoration:none}a,p a code{color:#3eaf7c}p a code{font-weight:400}kbd{background:#eee;border:.15rem solid #ddd;border-bottom:.25rem solid #ddd;border-radius:.15rem;padding:0 .15em}blockquote{font-size:1rem;color:#999;border-left:.2rem solid #dfe2e5;margin:1rem 0;padding:.25rem 0 .25rem 1rem}blockquote>p{margin:0}ol,ul{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25}.theme-default-content:not(.custom)>h1,.theme-default-content:not(.custom)>h2,.theme-default-content:not(.custom)>h3,.theme-default-content:not(.custom)>h4,.theme-default-content:not(.custom)>h5,.theme-default-content:not(.custom)>h6{margin-top:-3.1rem;padding-top:4.6rem;margin-bottom:0}.theme-default-content:not(.custom)>h1:first-child,.theme-default-content:not(.custom)>h2:first-child,.theme-default-content:not(.custom)>h3:first-child,.theme-default-content:not(.custom)>h4:first-child,.theme-default-content:not(.custom)>h5:first-child,.theme-default-content:not(.custom)>h6:first-child{margin-top:-1.5rem;margin-bottom:1rem}.theme-default-content:not(.custom)>h1:first-child+.custom-block,.theme-default-content:not(.custom)>h1:first-child+p,.theme-default-content:not(.custom)>h1:first-child+pre,.theme-default-content:not(.custom)>h2:first-child+.custom-block,.theme-default-content:not(.custom)>h2:first-child+p,.theme-default-content:not(.custom)>h2:first-child+pre,.theme-default-content:not(.custom)>h3:first-child+.custom-block,.theme-default-content:not(.custom)>h3:first-child+p,.theme-default-content:not(.custom)>h3:first-child+pre,.theme-default-content:not(.custom)>h4:first-child+.custom-block,.theme-default-content:not(.custom)>h4:first-child+p,.theme-default-content:not(.custom)>h4:first-child+pre,.theme-default-content:not(.custom)>h5:first-child+.custom-block,.theme-default-content:not(.custom)>h5:first-child+p,.theme-default-content:not(.custom)>h5:first-child+pre,.theme-default-content:not(.custom)>h6:first-child+.custom-block,.theme-default-content:not(.custom)>h6:first-child+p,.theme-default-content:not(.custom)>h6:first-child+pre{margin-top:2rem}h1:focus .header-anchor,h1:hover .header-anchor,h2:focus .header-anchor,h2:hover .header-anchor,h3:focus .header-anchor,h3:hover .header-anchor,h4:focus .header-anchor,h4:hover .header-anchor,h5:focus .header-anchor,h5:hover .header-anchor,h6:focus .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid #eaecef}h3{font-size:1.35rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;opacity:0}a.header-anchor:focus,a.header-anchor:hover{text-decoration:none}.line-number,code,kbd{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}ol,p,ul{line-height:1.7}hr{border:0;border-top:1px solid #eaecef}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto}tr{border-top:1px solid #dfe2e5}tr:nth-child(2n){background-color:#f6f8fa}td,th{border:1px solid #dfe2e5;padding:.6em 1em}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.no-navbar .theme-default-content:not(.custom)>h1,.theme-container.no-navbar h2,.theme-container.no-navbar h3,.theme-container.no-navbar h4,.theme-container.no-navbar h5,.theme-container.no-navbar h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .sidebar{top:0}@media (min-width:720px){.theme-container.no-sidebar .sidebar{display:none}.theme-container.no-sidebar .page{padding-left:0}}@media (max-width:959px){.sidebar{font-size:15px;width:16.4rem}.page{padding-left:16.4rem}}@media (max-width:719px){.sidebar{top:0;padding-top:3.6rem;transform:translateX(-100%);transition:transform .2s ease}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translateX(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width:419px){h1{font-size:1.9rem}.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}#nprogress{pointer-events:none}#nprogress .bar{background:#3eaf7c;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #3eaf7c,0 0 5px #3eaf7c;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border-color:#3eaf7c transparent transparent #3eaf7c;border-style:solid;border-width:2px;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}mjx-container[jax=SVG][display=true]{display:block;text-align:center;margin:1em 0}mjx-container[jax=SVG][justify=left]{text-align:left}mjx-container[jax=SVG][justify=right]{text-align:right}mjx-container[jax=SVG]>svg{overflow:visible}mjx-container[jax=SVG]>svg a{fill:#00f;stroke:#00f}g[data-mml-node=merror]>g{fill:red;stroke:red}g[data-mml-node=merror]>rect[data-background]{fill:#ff0;stroke:none}g[data-mml-node=mtable]>line[data-line],g[data-mml-node=mtable]>rect[data-frame]{stroke-width:70px;fill:none}g[data-mml-node=mtable]>.mjx-dashed{stroke-dasharray:140}g[data-mml-node=mtable]>.mjx-dotted{stroke-linecap:round;stroke-dasharray:0,140}g[data-mml-node=mtable]>svg{overflow:visible}[jax=SVG] mjx-tool{display:inline-block;position:relative;width:0;height:0}[jax=SVG] mjx-tool>mjx-tip{position:absolute;top:0;left:0}mjx-tool>mjx-tip{display:inline-block;padding:.2em;border:1px solid #888;font-size:70%;background-color:#f8f8f8;color:#000;box-shadow:2px 2px 5px #aaa}g[data-mml-node=maction][data-toggle]{cursor:pointer}mjx-status{display:block;position:fixed;left:1em;bottom:1em;min-width:25%;padding:.2em .4em;border:1px solid #888;font-size:90%;background-color:#f8f8f8;color:#000}.MathJax path{stroke-width:3}mjx-container[display=true]{overflow-x:auto;overflow-y:hidden}.icon.outbound{color:#aaa;display:inline-block;vertical-align:middle;position:relative;top:-1px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.home{padding:3.6rem 2rem 0;max-width:960px;margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.8rem auto}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:#6a8bad}.home .hero .action-button{display:inline-block;font-size:1.2rem;color:#fff;background-color:#3eaf7c;padding:.8rem 1.6rem;border-radius:4px;transition:background-color .1s ease;box-sizing:border-box;border-bottom:1px solid #389d70}.home .hero .action-button:hover{background-color:#4abf8a}.home .features{border-top:1px solid #eaecef;padding:1.2rem 0;margin-top:2.5rem;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:stretch;justify-content:space-between}.home .feature{flex-grow:1;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:#3a5169}.home .feature p{color:#4e6e8e}.home .footer{padding:2.5rem;border-top:1px solid #eaecef;text-align:center;color:#4e6e8e}@media (max-width:719px){.home .features{flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width:419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.search-box{display:inline-block;position:relative;margin-right:1rem}.search-box input{cursor:text;width:10rem;height:2rem;color:#4e6e8e;display:inline-block;border:1px solid #cfd4db;border-radius:2rem;font-size:.9rem;line-height:2rem;padding:0 .5rem 0 2rem;outline:none;transition:all .2s ease;background:#fff url(/assets/img/search.83621669.svg) .6rem .5rem no-repeat;background-size:1rem}.search-box input:focus{cursor:auto;border-color:#3eaf7c}.search-box .suggestions{background:#fff;width:20rem;position:absolute;top:2rem;border:1px solid #cfd4db;border-radius:6px;padding:.4rem;list-style-type:none}.search-box .suggestions.align-right{right:0}.search-box .suggestion{line-height:1.4;padding:.4rem .6rem;border-radius:4px;cursor:pointer}.search-box .suggestion a{white-space:normal;color:#5d82a6}.search-box .suggestion a .page-title{font-weight:600}.search-box .suggestion a .header{font-size:.9em;margin-left:.25em}.search-box .suggestion.focused{background-color:#f3f4f5}.search-box .suggestion.focused a{color:#3eaf7c}@media (max-width:959px){.search-box input{cursor:pointer;width:0;border-color:transparent;position:relative}.search-box input:focus{cursor:text;left:0;width:10rem}}@media (-ms-high-contrast:none){.search-box input{height:2rem}}@media (max-width:959px) and (min-width:719px){.search-box .suggestions{left:0}}@media (max-width:719px){.search-box{margin-right:0}.search-box input{left:1rem}.search-box .suggestions{right:0}}@media (max-width:419px){.search-box .suggestions{width:calc(100vw - 4rem)}.search-box input:focus{width:8rem}}.sidebar-button{cursor:pointer;display:none;width:1.25rem;height:1.25rem;position:absolute;padding:.6rem;top:.6rem;left:1rem}.sidebar-button .icon{display:block;width:1.25rem;height:1.25rem}@media (max-width:719px){.sidebar-button{display:block}}.dropdown-enter,.dropdown-leave-to{height:0!important}.dropdown-wrapper{cursor:pointer}.dropdown-wrapper .dropdown-title,.dropdown-wrapper .mobile-dropdown-title{display:block;font-size:.9rem;font-family:inherit;cursor:inherit;padding:inherit;line-height:1.4rem;background:transparent;border:none;font-weight:500;color:#2c3e50}.dropdown-wrapper .dropdown-title:hover,.dropdown-wrapper .mobile-dropdown-title:hover{border-color:transparent}.dropdown-wrapper .dropdown-title .arrow,.dropdown-wrapper .mobile-dropdown-title .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.dropdown-wrapper .mobile-dropdown-title{display:none;font-weight:600}.dropdown-wrapper .mobile-dropdown-title font-size inherit:hover{color:#3eaf7c}.dropdown-wrapper .nav-dropdown .dropdown-item{color:inherit;line-height:1.7rem}.dropdown-wrapper .nav-dropdown .dropdown-item h4{margin:.45rem 0 0;border-top:1px solid #eee;padding:1rem 1.5rem .45rem 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper{padding:0;list-style:none}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper .dropdown-subitem{font-size:.9em}.dropdown-wrapper .nav-dropdown .dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active,.dropdown-wrapper .nav-dropdown .dropdown-item a:hover{color:#3eaf7c}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{content:"";width:0;height:0;border-left:5px solid #3eaf7c;border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.dropdown-wrapper .nav-dropdown .dropdown-item:first-child h4{margin-top:0;padding-top:0;border-top:0}@media (max-width:719px){.dropdown-wrapper.open .dropdown-title{margin-bottom:.5rem}.dropdown-wrapper .dropdown-title{display:none}.dropdown-wrapper .mobile-dropdown-title{display:block}.dropdown-wrapper .nav-dropdown{transition:height .1s ease-out;overflow:hidden}.dropdown-wrapper .nav-dropdown .dropdown-item h4{border-top:0;margin-top:0;padding-top:0}.dropdown-wrapper .nav-dropdown .dropdown-item>a,.dropdown-wrapper .nav-dropdown .dropdown-item h4{font-size:15px;line-height:2rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem{font-size:14px;padding-left:1rem}}@media (min-width:719px){.dropdown-wrapper{height:1.8rem}.dropdown-wrapper.open .nav-dropdown,.dropdown-wrapper:hover .nav-dropdown{display:block!important}.dropdown-wrapper.open:blur{display:none}.dropdown-wrapper .nav-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:#fff;padding:.6rem 0;border:1px solid;border-color:#ddd #ddd #ccc;text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}}.nav-links{display:inline-block}.nav-links a{line-height:1.4rem;color:inherit}.nav-links a.router-link-active,.nav-links a:hover{color:#3eaf7c}.nav-links .nav-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:2rem}.nav-links .nav-item:first-child{margin-left:0}.nav-links .repo-link{margin-left:1.5rem}@media (max-width:719px){.nav-links .nav-item,.nav-links .repo-link{margin-left:0}}@media (min-width:719px){.nav-links a.router-link-active,.nav-links a:hover{color:#2c3e50}.nav-item>a:not(.external).router-link-active,.nav-item>a:not(.external):hover{margin-bottom:-2px;border-bottom:2px solid #46bd87}}.navbar{padding:.7rem 1.5rem;line-height:2.2rem}.navbar a,.navbar img,.navbar span{display:inline-block}.navbar .logo{height:2.2rem;min-width:2.2rem;margin-right:.8rem;vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:#2c3e50;position:relative}.navbar .links{padding-left:1.5rem;box-sizing:border-box;background-color:#fff;white-space:nowrap;font-size:.9rem;position:absolute;right:1.5rem;top:.7rem;display:flex}.navbar .links .search-box{flex:0 0 auto;vertical-align:top}@media (max-width:719px){.navbar{padding-left:4rem}.navbar .can-hide{display:none}.navbar .links{padding-left:1.5rem}.navbar .site-name{width:calc(100vw - 9.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.page-edit{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-edit{padding:2rem}}@media (max-width:419px){.page-edit{padding:1.5rem}}.page-edit{padding-top:1rem;padding-bottom:1rem;overflow:auto}.page-edit .edit-link{display:inline-block}.page-edit .edit-link a{color:#4e6e8e;margin-right:.25rem}.page-edit .last-updated{float:right;font-size:.9em}.page-edit .last-updated .prefix{font-weight:500;color:#4e6e8e}.page-edit .last-updated .time{font-weight:400;color:#767676}@media (max-width:719px){.page-edit .edit-link{margin-bottom:.5rem}.page-edit .last-updated{font-size:.8em;float:none;text-align:left}}.page-nav{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-nav{padding:2rem}}@media (max-width:419px){.page-nav{padding:1.5rem}}.page-nav{padding-top:1rem;padding-bottom:0}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid #eaecef;padding-top:1rem;overflow:auto}.page-nav .next{float:right}.page{padding-bottom:2rem;display:block}.sidebar-group .sidebar-group{padding-left:.5em}.sidebar-group:not(.collapsable) .sidebar-heading:not(.clickable){cursor:auto;color:inherit}.sidebar-group.is-sub-group{padding-left:0}.sidebar-group.is-sub-group>.sidebar-heading{font-size:.95em;line-height:1.4;font-weight:400;padding-left:2rem}.sidebar-group.is-sub-group>.sidebar-heading:not(.clickable){opacity:.5}.sidebar-group.is-sub-group>.sidebar-group-items{padding-left:1rem}.sidebar-group.is-sub-group>.sidebar-group-items>li>.sidebar-link{font-size:.95em;border-left:none}.sidebar-group.depth-2>.sidebar-heading{border-left:none}.sidebar-heading{color:#2c3e50;transition:color .15s ease;cursor:pointer;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0;border-left:.25rem solid transparent}.sidebar-heading.open,.sidebar-heading:hover{color:inherit}.sidebar-heading .arrow{position:relative;top:-.12em;left:.5em}.sidebar-heading.clickable.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-heading.clickable:hover{color:#3eaf7c}.sidebar-group-items{transition:height .1s ease-out;font-size:.95em;overflow:hidden}.sidebar .sidebar-sub-headers{padding-left:1rem;font-size:.95em}a.sidebar-link{font-size:1em;font-weight:400;display:inline-block;color:#2c3e50;border-left:.25rem solid transparent;padding:.35rem 1rem .35rem 1.25rem;line-height:1.4;width:100%;box-sizing:border-box}a.sidebar-link:hover{color:#3eaf7c}a.sidebar-link.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-group a.sidebar-link{padding-left:2rem}.sidebar-sub-headers a.sidebar-link{padding-top:.25rem;padding-bottom:.25rem;border-left:none}.sidebar-sub-headers a.sidebar-link.active{font-weight:500}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .nav-links{display:none;border-bottom:1px solid #eaecef;padding:.5rem 0 .75rem}.sidebar .nav-links a{font-weight:600}.sidebar .nav-links .nav-item,.sidebar .nav-links .repo-link{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar>.sidebar-links{padding:1.5rem 0}.sidebar>.sidebar-links>li>a.sidebar-link{font-size:1.1em;line-height:1.7;font-weight:700}.sidebar>.sidebar-links>li:not(:first-child){margin-top:.75rem}@media (max-width:719px){.sidebar .nav-links{display:block}.sidebar .nav-links .dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar>.sidebar-links{padding:1rem 0}}.properties-table-key-header[data-v-6d27166d]{max-width:17rem;white-space:pre-line;overflow-wrap:break-word}.badge[data-v-15b7b770]{display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:#fff}.badge.green[data-v-15b7b770],.badge.tip[data-v-15b7b770],.badge[data-v-15b7b770]{background-color:#42b983}.badge.error[data-v-15b7b770]{background-color:#da5961}.badge.warn[data-v-15b7b770],.badge.warning[data-v-15b7b770],.badge.yellow[data-v-15b7b770]{background-color:#e7c000}.badge+.badge[data-v-15b7b770]{margin-left:5px}.theme-code-group__nav[data-v-deefee04]{margin-bottom:-35px;background-color:#282c34;padding-bottom:22px;border-top-left-radius:6px;border-top-right-radius:6px;padding-left:10px;padding-top:10px}.theme-code-group__ul[data-v-deefee04]{margin:auto 0;padding-left:0;display:inline-flex;list-style:none}.theme-code-group__nav-tab[data-v-deefee04]{border:0;padding:5px;cursor:pointer;background-color:transparent;font-size:.85em;line-height:1.4;color:hsla(0,0%,100%,.9);font-weight:600}.theme-code-group__nav-tab-active[data-v-deefee04]{border-bottom:1px solid #42b983}.pre-blank[data-v-deefee04]{color:#42b983}.theme-code-block[data-v-759a7d02]{display:none}.theme-code-block__active[data-v-759a7d02]{display:block}.theme-code-block>pre[data-v-759a7d02]{background-color:orange} \ No newline at end of file +code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.theme-default-content code{color:#476582;padding:.25rem .5rem;margin:0;font-size:.85em;background-color:rgba(27,31,35,.05);border-radius:3px}.theme-default-content code .token.deleted{color:#ec5975}.theme-default-content code .token.inserted{color:#3eaf7c}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.4;padding:1.25rem 1.5rem;margin:.85rem 0;background-color:#282c34;border-radius:6px;overflow:auto}.theme-default-content pre[class*=language-] code,.theme-default-content pre code{color:#fff;padding:0;background-color:transparent;border-radius:0}div[class*=language-]{position:relative;background-color:#282c34;border-radius:6px}div[class*=language-] .highlight-lines{-webkit-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.4}div[class*=language-] .highlight-lines .highlighted{background-color:rgba(0,0,0,.66)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent;position:relative;z-index:1}div[class*=language-]:before{position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:hsla(0,0%,100%,.4)}div[class*=language-]:not(.line-numbers-mode) .line-numbers-wrapper{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlighted{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlighted:before{content:" ";position:absolute;z-index:3;left:0;top:0;display:block;width:3.5rem;height:100%;background-color:rgba(0,0,0,.66)}div[class*=language-].line-numbers-mode pre{padding-left:4.5rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers-wrapper{position:absolute;top:0;width:3.5rem;text-align:center;color:hsla(0,0%,100%,.3);padding:1.25rem 0;line-height:1.4}div[class*=language-].line-numbers-mode .line-numbers-wrapper br{-webkit-user-select:none;user-select:none}div[class*=language-].line-numbers-mode .line-numbers-wrapper .line-number{position:relative;z-index:4;-webkit-user-select:none;user-select:none;font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;z-index:2;top:0;left:0;width:3.5rem;height:100%;border-radius:6px 0 0 6px;border-right:1px solid rgba(0,0,0,.66);background-color:#282c34}div[class~=language-js]:before{content:"js"}div[class~=language-ts]:before{content:"ts"}div[class~=language-html]:before{content:"html"}div[class~=language-md]:before{content:"md"}div[class~=language-vue]:before{content:"vue"}div[class~=language-css]:before{content:"css"}div[class~=language-sass]:before{content:"sass"}div[class~=language-scss]:before{content:"scss"}div[class~=language-less]:before{content:"less"}div[class~=language-stylus]:before{content:"stylus"}div[class~=language-go]:before{content:"go"}div[class~=language-java]:before{content:"java"}div[class~=language-c]:before{content:"c"}div[class~=language-sh]:before{content:"sh"}div[class~=language-yaml]:before{content:"yaml"}div[class~=language-py]:before{content:"py"}div[class~=language-docker]:before{content:"docker"}div[class~=language-dockerfile]:before{content:"dockerfile"}div[class~=language-makefile]:before{content:"makefile"}div[class~=language-javascript]:before{content:"js"}div[class~=language-typescript]:before{content:"ts"}div[class~=language-markup]:before{content:"html"}div[class~=language-markdown]:before{content:"md"}div[class~=language-json]:before{content:"json"}div[class~=language-ruby]:before{content:"rb"}div[class~=language-python]:before{content:"py"}div[class~=language-bash]:before{content:"sh"}div[class~=language-php]:before{content:"php"}.custom-block .custom-block-title{font-weight:600;margin-bottom:-.4rem}.custom-block.danger,.custom-block.tip,.custom-block.warning{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-block.tip{background-color:#f3f5f7;border-color:#42b983}.custom-block.warning{background-color:rgba(255,229,100,.3);border-color:#e7c000;color:#6b5900}.custom-block.warning .custom-block-title{color:#b29400}.custom-block.warning a{color:#2c3e50}.custom-block.danger{background-color:#ffe6e6;border-color:#c00;color:#4d0000}.custom-block.danger .custom-block-title{color:#900}.custom-block.danger a{color:#2c3e50}.custom-block.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:#eee}.custom-block.details h4{margin-top:0}.custom-block.details figure:last-child,.custom-block.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-block.details summary{outline:none;cursor:pointer}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-bottom:6px solid #ccc}.arrow.down,.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent}.arrow.down{border-top:6px solid #ccc}.arrow.right{border-left:6px solid #ccc}.arrow.left,.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent}.arrow.left{border-right:6px solid #ccc}.theme-default-content:not(.custom){max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.theme-default-content:not(.custom){padding:2rem}}@media (max-width:419px){.theme-default-content:not(.custom){padding:1.5rem}}.table-of-contents .badge{vertical-align:middle}body,html{padding:0;margin:0;background-color:#fff}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;color:#2c3e50}.page{padding-left:20rem}.navbar{z-index:20;right:0;height:3.6rem;background-color:#fff;box-sizing:border-box;border-bottom:1px solid #eaecef}.navbar,.sidebar-mask{position:fixed;top:0;left:0}.sidebar-mask{z-index:9;width:100vw;height:100vh;display:none}.sidebar{font-size:16px;background-color:#fff;width:20rem;position:fixed;z-index:10;margin:0;top:3.6rem;left:0;bottom:0;box-sizing:border-box;border-right:1px solid #eaecef;overflow-y:auto}.theme-default-content:not(.custom)>:first-child{margin-top:3.6rem}.theme-default-content:not(.custom) a:hover{text-decoration:underline}.theme-default-content:not(.custom) p.demo{padding:1rem 1.5rem;border:1px solid #ddd;border-radius:4px}.theme-default-content:not(.custom) img{max-width:100%}.theme-default-content.custom{padding:0;margin:0}.theme-default-content.custom img{max-width:100%}a{font-weight:500;text-decoration:none}a,p a code{color:#3eaf7c}p a code{font-weight:400}kbd{background:#eee;border:.15rem solid #ddd;border-bottom:.25rem solid #ddd;border-radius:.15rem;padding:0 .15em}blockquote{font-size:1rem;color:#999;border-left:.2rem solid #dfe2e5;margin:1rem 0;padding:.25rem 0 .25rem 1rem}blockquote>p{margin:0}ol,ul{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25}.theme-default-content:not(.custom)>h1,.theme-default-content:not(.custom)>h2,.theme-default-content:not(.custom)>h3,.theme-default-content:not(.custom)>h4,.theme-default-content:not(.custom)>h5,.theme-default-content:not(.custom)>h6{margin-top:-3.1rem;padding-top:4.6rem;margin-bottom:0}.theme-default-content:not(.custom)>h1:first-child,.theme-default-content:not(.custom)>h2:first-child,.theme-default-content:not(.custom)>h3:first-child,.theme-default-content:not(.custom)>h4:first-child,.theme-default-content:not(.custom)>h5:first-child,.theme-default-content:not(.custom)>h6:first-child{margin-top:-1.5rem;margin-bottom:1rem}.theme-default-content:not(.custom)>h1:first-child+.custom-block,.theme-default-content:not(.custom)>h1:first-child+p,.theme-default-content:not(.custom)>h1:first-child+pre,.theme-default-content:not(.custom)>h2:first-child+.custom-block,.theme-default-content:not(.custom)>h2:first-child+p,.theme-default-content:not(.custom)>h2:first-child+pre,.theme-default-content:not(.custom)>h3:first-child+.custom-block,.theme-default-content:not(.custom)>h3:first-child+p,.theme-default-content:not(.custom)>h3:first-child+pre,.theme-default-content:not(.custom)>h4:first-child+.custom-block,.theme-default-content:not(.custom)>h4:first-child+p,.theme-default-content:not(.custom)>h4:first-child+pre,.theme-default-content:not(.custom)>h5:first-child+.custom-block,.theme-default-content:not(.custom)>h5:first-child+p,.theme-default-content:not(.custom)>h5:first-child+pre,.theme-default-content:not(.custom)>h6:first-child+.custom-block,.theme-default-content:not(.custom)>h6:first-child+p,.theme-default-content:not(.custom)>h6:first-child+pre{margin-top:2rem}h1:focus .header-anchor,h1:hover .header-anchor,h2:focus .header-anchor,h2:hover .header-anchor,h3:focus .header-anchor,h3:hover .header-anchor,h4:focus .header-anchor,h4:hover .header-anchor,h5:focus .header-anchor,h5:hover .header-anchor,h6:focus .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid #eaecef}h3{font-size:1.35rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;opacity:0}a.header-anchor:focus,a.header-anchor:hover{text-decoration:none}.line-number,code,kbd{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}ol,p,ul{line-height:1.7}hr{border:0;border-top:1px solid #eaecef}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto}tr{border-top:1px solid #dfe2e5}tr:nth-child(2n){background-color:#f6f8fa}td,th{border:1px solid #dfe2e5;padding:.6em 1em}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.no-navbar .theme-default-content:not(.custom)>h1,.theme-container.no-navbar h2,.theme-container.no-navbar h3,.theme-container.no-navbar h4,.theme-container.no-navbar h5,.theme-container.no-navbar h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .sidebar{top:0}@media (min-width:720px){.theme-container.no-sidebar .sidebar{display:none}.theme-container.no-sidebar .page{padding-left:0}}@media (max-width:959px){.sidebar{font-size:15px;width:16.4rem}.page{padding-left:16.4rem}}@media (max-width:719px){.sidebar{top:0;padding-top:3.6rem;transform:translateX(-100%);transition:transform .2s ease}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translateX(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width:419px){h1{font-size:1.9rem}.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}#nprogress{pointer-events:none}#nprogress .bar{background:#3eaf7c;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #3eaf7c,0 0 5px #3eaf7c;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border-color:#3eaf7c transparent transparent #3eaf7c;border-style:solid;border-width:2px;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}mjx-container[jax=SVG][display=true]{display:block;text-align:center;margin:1em 0}mjx-container[jax=SVG][justify=left]{text-align:left}mjx-container[jax=SVG][justify=right]{text-align:right}mjx-container[jax=SVG]>svg{overflow:visible}mjx-container[jax=SVG]>svg a{fill:#00f;stroke:#00f}g[data-mml-node=merror]>g{fill:red;stroke:red}g[data-mml-node=merror]>rect[data-background]{fill:#ff0;stroke:none}g[data-mml-node=mtable]>line[data-line],g[data-mml-node=mtable]>rect[data-frame]{stroke-width:70px;fill:none}g[data-mml-node=mtable]>.mjx-dashed{stroke-dasharray:140}g[data-mml-node=mtable]>.mjx-dotted{stroke-linecap:round;stroke-dasharray:0,140}g[data-mml-node=mtable]>svg{overflow:visible}[jax=SVG] mjx-tool{display:inline-block;position:relative;width:0;height:0}[jax=SVG] mjx-tool>mjx-tip{position:absolute;top:0;left:0}mjx-tool>mjx-tip{display:inline-block;padding:.2em;border:1px solid #888;font-size:70%;background-color:#f8f8f8;color:#000;box-shadow:2px 2px 5px #aaa}g[data-mml-node=maction][data-toggle]{cursor:pointer}mjx-status{display:block;position:fixed;left:1em;bottom:1em;min-width:25%;padding:.2em .4em;border:1px solid #888;font-size:90%;background-color:#f8f8f8;color:#000}.MathJax path{stroke-width:3}mjx-container[display=true]{overflow-x:auto;overflow-y:hidden}.icon.outbound{color:#aaa;display:inline-block;vertical-align:middle;position:relative;top:-1px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.home{padding:3.6rem 2rem 0;max-width:960px;margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.8rem auto}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:#6a8bad}.home .hero .action-button{display:inline-block;font-size:1.2rem;color:#fff;background-color:#3eaf7c;padding:.8rem 1.6rem;border-radius:4px;transition:background-color .1s ease;box-sizing:border-box;border-bottom:1px solid #389d70}.home .hero .action-button:hover{background-color:#4abf8a}.home .features{border-top:1px solid #eaecef;padding:1.2rem 0;margin-top:2.5rem;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:stretch;justify-content:space-between}.home .feature{flex-grow:1;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:#3a5169}.home .feature p{color:#4e6e8e}.home .footer{padding:2.5rem;border-top:1px solid #eaecef;text-align:center;color:#4e6e8e}@media (max-width:719px){.home .features{flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width:419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.search-box{display:inline-block;position:relative;margin-right:1rem}.search-box input{cursor:text;width:10rem;height:2rem;color:#4e6e8e;display:inline-block;border:1px solid #cfd4db;border-radius:2rem;font-size:.9rem;line-height:2rem;padding:0 .5rem 0 2rem;outline:none;transition:all .2s ease;background:#fff url(/assets/img/search.83621669.svg) .6rem .5rem no-repeat;background-size:1rem}.search-box input:focus{cursor:auto;border-color:#3eaf7c}.search-box .suggestions{background:#fff;width:20rem;position:absolute;top:2rem;border:1px solid #cfd4db;border-radius:6px;padding:.4rem;list-style-type:none}.search-box .suggestions.align-right{right:0}.search-box .suggestion{line-height:1.4;padding:.4rem .6rem;border-radius:4px;cursor:pointer}.search-box .suggestion a{white-space:normal;color:#5d82a6}.search-box .suggestion a .page-title{font-weight:600}.search-box .suggestion a .header{font-size:.9em;margin-left:.25em}.search-box .suggestion.focused{background-color:#f3f4f5}.search-box .suggestion.focused a{color:#3eaf7c}@media (max-width:959px){.search-box input{cursor:pointer;width:0;border-color:transparent;position:relative}.search-box input:focus{cursor:text;left:0;width:10rem}}@media (-ms-high-contrast:none){.search-box input{height:2rem}}@media (max-width:959px) and (min-width:719px){.search-box .suggestions{left:0}}@media (max-width:719px){.search-box{margin-right:0}.search-box input{left:1rem}.search-box .suggestions{right:0}}@media (max-width:419px){.search-box .suggestions{width:calc(100vw - 4rem)}.search-box input:focus{width:8rem}}.sidebar-button{cursor:pointer;display:none;width:1.25rem;height:1.25rem;position:absolute;padding:.6rem;top:.6rem;left:1rem}.sidebar-button .icon{display:block;width:1.25rem;height:1.25rem}@media (max-width:719px){.sidebar-button{display:block}}.dropdown-enter,.dropdown-leave-to{height:0!important}.dropdown-wrapper{cursor:pointer}.dropdown-wrapper .dropdown-title,.dropdown-wrapper .mobile-dropdown-title{display:block;font-size:.9rem;font-family:inherit;cursor:inherit;padding:inherit;line-height:1.4rem;background:transparent;border:none;font-weight:500;color:#2c3e50}.dropdown-wrapper .dropdown-title:hover,.dropdown-wrapper .mobile-dropdown-title:hover{border-color:transparent}.dropdown-wrapper .dropdown-title .arrow,.dropdown-wrapper .mobile-dropdown-title .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.dropdown-wrapper .mobile-dropdown-title{display:none;font-weight:600}.dropdown-wrapper .mobile-dropdown-title font-size inherit:hover{color:#3eaf7c}.dropdown-wrapper .nav-dropdown .dropdown-item{color:inherit;line-height:1.7rem}.dropdown-wrapper .nav-dropdown .dropdown-item h4{margin:.45rem 0 0;border-top:1px solid #eee;padding:1rem 1.5rem .45rem 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper{padding:0;list-style:none}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper .dropdown-subitem{font-size:.9em}.dropdown-wrapper .nav-dropdown .dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active,.dropdown-wrapper .nav-dropdown .dropdown-item a:hover{color:#3eaf7c}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{content:"";width:0;height:0;border-left:5px solid #3eaf7c;border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.dropdown-wrapper .nav-dropdown .dropdown-item:first-child h4{margin-top:0;padding-top:0;border-top:0}@media (max-width:719px){.dropdown-wrapper.open .dropdown-title{margin-bottom:.5rem}.dropdown-wrapper .dropdown-title{display:none}.dropdown-wrapper .mobile-dropdown-title{display:block}.dropdown-wrapper .nav-dropdown{transition:height .1s ease-out;overflow:hidden}.dropdown-wrapper .nav-dropdown .dropdown-item h4{border-top:0;margin-top:0;padding-top:0}.dropdown-wrapper .nav-dropdown .dropdown-item>a,.dropdown-wrapper .nav-dropdown .dropdown-item h4{font-size:15px;line-height:2rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem{font-size:14px;padding-left:1rem}}@media (min-width:719px){.dropdown-wrapper{height:1.8rem}.dropdown-wrapper.open .nav-dropdown,.dropdown-wrapper:hover .nav-dropdown{display:block!important}.dropdown-wrapper.open:blur{display:none}.dropdown-wrapper .nav-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:#fff;padding:.6rem 0;border:1px solid;border-color:#ddd #ddd #ccc;text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}}.nav-links{display:inline-block}.nav-links a{line-height:1.4rem;color:inherit}.nav-links a.router-link-active,.nav-links a:hover{color:#3eaf7c}.nav-links .nav-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:2rem}.nav-links .nav-item:first-child{margin-left:0}.nav-links .repo-link{margin-left:1.5rem}@media (max-width:719px){.nav-links .nav-item,.nav-links .repo-link{margin-left:0}}@media (min-width:719px){.nav-links a.router-link-active,.nav-links a:hover{color:#2c3e50}.nav-item>a:not(.external).router-link-active,.nav-item>a:not(.external):hover{margin-bottom:-2px;border-bottom:2px solid #46bd87}}.navbar{padding:.7rem 1.5rem;line-height:2.2rem}.navbar a,.navbar img,.navbar span{display:inline-block}.navbar .logo{height:2.2rem;min-width:2.2rem;margin-right:.8rem;vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:#2c3e50;position:relative}.navbar .links{padding-left:1.5rem;box-sizing:border-box;background-color:#fff;white-space:nowrap;font-size:.9rem;position:absolute;right:1.5rem;top:.7rem;display:flex}.navbar .links .search-box{flex:0 0 auto;vertical-align:top}@media (max-width:719px){.navbar{padding-left:4rem}.navbar .can-hide{display:none}.navbar .links{padding-left:1.5rem}.navbar .site-name{width:calc(100vw - 9.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.page-edit{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-edit{padding:2rem}}@media (max-width:419px){.page-edit{padding:1.5rem}}.page-edit{padding-top:1rem;padding-bottom:1rem;overflow:auto}.page-edit .edit-link{display:inline-block}.page-edit .edit-link a{color:#4e6e8e;margin-right:.25rem}.page-edit .last-updated{float:right;font-size:.9em}.page-edit .last-updated .prefix{font-weight:500;color:#4e6e8e}.page-edit .last-updated .time{font-weight:400;color:#767676}@media (max-width:719px){.page-edit .edit-link{margin-bottom:.5rem}.page-edit .last-updated{font-size:.8em;float:none;text-align:left}}.page-nav{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-nav{padding:2rem}}@media (max-width:419px){.page-nav{padding:1.5rem}}.page-nav{padding-top:1rem;padding-bottom:0}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid #eaecef;padding-top:1rem;overflow:auto}.page-nav .next{float:right}.page{padding-bottom:2rem;display:block}.sidebar-group .sidebar-group{padding-left:.5em}.sidebar-group:not(.collapsable) .sidebar-heading:not(.clickable){cursor:auto;color:inherit}.sidebar-group.is-sub-group{padding-left:0}.sidebar-group.is-sub-group>.sidebar-heading{font-size:.95em;line-height:1.4;font-weight:400;padding-left:2rem}.sidebar-group.is-sub-group>.sidebar-heading:not(.clickable){opacity:.5}.sidebar-group.is-sub-group>.sidebar-group-items{padding-left:1rem}.sidebar-group.is-sub-group>.sidebar-group-items>li>.sidebar-link{font-size:.95em;border-left:none}.sidebar-group.depth-2>.sidebar-heading{border-left:none}.sidebar-heading{color:#2c3e50;transition:color .15s ease;cursor:pointer;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0;border-left:.25rem solid transparent}.sidebar-heading.open,.sidebar-heading:hover{color:inherit}.sidebar-heading .arrow{position:relative;top:-.12em;left:.5em}.sidebar-heading.clickable.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-heading.clickable:hover{color:#3eaf7c}.sidebar-group-items{transition:height .1s ease-out;font-size:.95em;overflow:hidden}.sidebar .sidebar-sub-headers{padding-left:1rem;font-size:.95em}a.sidebar-link{font-size:1em;font-weight:400;display:inline-block;color:#2c3e50;border-left:.25rem solid transparent;padding:.35rem 1rem .35rem 1.25rem;line-height:1.4;width:100%;box-sizing:border-box}a.sidebar-link:hover{color:#3eaf7c}a.sidebar-link.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-group a.sidebar-link{padding-left:2rem}.sidebar-sub-headers a.sidebar-link{padding-top:.25rem;padding-bottom:.25rem;border-left:none}.sidebar-sub-headers a.sidebar-link.active{font-weight:500}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .nav-links{display:none;border-bottom:1px solid #eaecef;padding:.5rem 0 .75rem}.sidebar .nav-links a{font-weight:600}.sidebar .nav-links .nav-item,.sidebar .nav-links .repo-link{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar>.sidebar-links{padding:1.5rem 0}.sidebar>.sidebar-links>li>a.sidebar-link{font-size:1.1em;line-height:1.7;font-weight:700}.sidebar>.sidebar-links>li:not(:first-child){margin-top:.75rem}@media (max-width:719px){.sidebar .nav-links{display:block}.sidebar .nav-links .dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar>.sidebar-links{padding:1rem 0}}.properties-table-key-header[data-v-6d27166d]{max-width:17rem;white-space:pre-line;overflow-wrap:break-word}.badge[data-v-15b7b770]{display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:#fff}.badge.green[data-v-15b7b770],.badge.tip[data-v-15b7b770],.badge[data-v-15b7b770]{background-color:#42b983}.badge.error[data-v-15b7b770]{background-color:#da5961}.badge.warn[data-v-15b7b770],.badge.warning[data-v-15b7b770],.badge.yellow[data-v-15b7b770]{background-color:#e7c000}.badge+.badge[data-v-15b7b770]{margin-left:5px}.theme-code-block[data-v-759a7d02]{display:none}.theme-code-block__active[data-v-759a7d02]{display:block}.theme-code-block>pre[data-v-759a7d02]{background-color:orange}.theme-code-group__nav[data-v-deefee04]{margin-bottom:-35px;background-color:#282c34;padding-bottom:22px;border-top-left-radius:6px;border-top-right-radius:6px;padding-left:10px;padding-top:10px}.theme-code-group__ul[data-v-deefee04]{margin:auto 0;padding-left:0;display:inline-flex;list-style:none}.theme-code-group__nav-tab[data-v-deefee04]{border:0;padding:5px;cursor:pointer;background-color:transparent;font-size:.85em;line-height:1.4;color:hsla(0,0%,100%,.9);font-weight:600}.theme-code-group__nav-tab-active[data-v-deefee04]{border-bottom:1px solid #42b983}.pre-blank[data-v-deefee04]{color:#42b983} \ No newline at end of file diff --git a/assets/js/10.2e10abfc.js b/assets/js/10.25fa0812.js similarity index 98% rename from assets/js/10.2e10abfc.js rename to assets/js/10.25fa0812.js index 3ee46d7aa..b230a37c4 100644 --- a/assets/js/10.2e10abfc.js +++ b/assets/js/10.25fa0812.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{387:function(e,t,r){"use strict";r.r(t);var a=r(51),n=Object(a.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"people"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#people"}},[e._v("#")]),e._v(" People")]),e._v(" "),r("p",[e._v("Ontop has been initiated by "),r("a",{attrs:{href:"/research"}},[e._v("the eponymous research group at the Free University of Bozen-Bolzano")]),e._v(" which is still highly involved into the development of the project and into the research around it. Over the years, new members from diverse horizons have joined the project, forming a vibrant international community.")]),e._v(" "),r("p",[e._v("Here we list the people who has been involved in the development of the Ontop project.\nFor the research side, "),r("a",{attrs:{href:"/research"}},[e._v("see the dedicated page")]),e._v(".")]),e._v(" "),r("h2",{attrs:{id:"active-core-team-members"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#active-core-team-members"}},[e._v("#")]),e._v(" Active Core Team Members")]),e._v(" "),r("p",[e._v("The development of Ontop is guided by an international team (reverse lexicographical order).")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"http://www.ghxiao.org/",target:"_blank",rel:"noopener"}},[e._v("Guohui Xiao"),r("OutboundLink")],1),e._v(" (Unibz, Ontopic)")]),e._v(" "),r("li",[e._v("Albulen Pano (Unibz)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.inf.unibz.it/~dlanti/",target:"_blank",rel:"noopener"}},[e._v("Davide Lanti"),r("OutboundLink")],1),e._v(" (Unibz)")]),e._v(" "),r("li",[r("a",{attrs:{href:"http://www.dcs.bbk.ac.uk/~roman/",target:"_blank",rel:"noopener"}},[e._v("Roman Kontchakov"),r("OutboundLink")],1),e._v(" (Birkbeck)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://scholar.google.it/citations?user=SDaIlasAAAAJ&hl=en",target:"_blank",rel:"noopener"}},[e._v("Sarah Komla-Ebri"),r("OutboundLink")],1),e._v(" (Ontopic)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://scholar.google.it/citations?user=pT6E42UAAAAJ&hl=en",target:"_blank",rel:"noopener"}},[e._v("Julien Corman"),r("OutboundLink")],1),e._v(" (Unibz)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://github.com/bcogrel/",target:"_blank",rel:"noopener"}},[e._v("Benjamin Cogrel"),r("OutboundLink")],1),e._v(" (Ontopic)")]),e._v(" "),r("li",[r("a",{attrs:{href:"http://www.inf.unibz.it/~calvanese/",target:"_blank",rel:"noopener"}},[e._v("Diego Calvanese"),r("OutboundLink")],1),e._v(" (Unibz, Ontopic)")])]),e._v(" "),r("h2",{attrs:{id:"core-team-emeriti"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#core-team-emeriti"}},[e._v("#")]),e._v(" Core Team Emeriti")]),e._v(" "),r("p",[e._v("Here we honor some no-longer-active core team members who have made important contributions in the past.")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://sites.google.com/site/marianomuro/",target:"_blank",rel:"noopener"}},[e._v("Mariano Rodriguez-Muro"),r("OutboundLink")],1),e._v(" (Google, USA)")]),e._v(" "),r("li",[r("a",{attrs:{href:"http://www.martinrezk.com/",target:"_blank",rel:"noopener"}},[e._v("Martin Rezk"),r("OutboundLink")],1),e._v(" (Google, USA)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://profiles.stanford.edu/josef-hardi",target:"_blank",rel:"noopener"}},[e._v("Josef Hardi"),r("OutboundLink")],1),e._v(" (Stanford University, USA)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://scholar.google.it/citations?user=WYEhpZYAAAAJ&hl=en",target:"_blank",rel:"noopener"}},[e._v("Elem Güzel Kalaycı"),r("OutboundLink")],1),e._v(" (Virtual Vehicle Research GmbH, Austria)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.kent.ac.uk/computing/people/3838/botoeva-elena",target:"_blank",rel:"noopener"}},[e._v("Elena Botoeva"),r("OutboundLink")],1),e._v(" (University of Kent, UK)")])]),e._v(" "),r("h2",{attrs:{id:"contributors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#contributors"}},[e._v("#")]),e._v(" Contributors")]),e._v(" "),r("p",[e._v("Some members of the Ontop community have so enriched it, that they deserve special mention.")]),e._v(" "),r("ul",[r("li",[e._v("Lukas Sundqvist")]),e._v(" "),r("li",[e._v("Mindaugas Slusnys")]),e._v(" "),r("li",[e._v("Damian Rovara")]),e._v(" "),r("li",[e._v("Sergey Pugacs")]),e._v(" "),r("li",[e._v("Tomas Kovachev")]),e._v(" "),r("li",[e._v("Dag Hovland")]),e._v(" "),r("li",[e._v("Manfred Gerstgrasser")]),e._v(" "),r("li",[e._v("Uğur Dönmez")]),e._v(" "),r("li",[e._v("Timea Bagosi")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{390:function(e,t,r){"use strict";r.r(t);var a=r(51),n=Object(a.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"people"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#people"}},[e._v("#")]),e._v(" People")]),e._v(" "),r("p",[e._v("Ontop has been initiated by "),r("a",{attrs:{href:"/research"}},[e._v("the eponymous research group at the Free University of Bozen-Bolzano")]),e._v(" which is still highly involved into the development of the project and into the research around it. Over the years, new members from diverse horizons have joined the project, forming a vibrant international community.")]),e._v(" "),r("p",[e._v("Here we list the people who has been involved in the development of the Ontop project.\nFor the research side, "),r("a",{attrs:{href:"/research"}},[e._v("see the dedicated page")]),e._v(".")]),e._v(" "),r("h2",{attrs:{id:"active-core-team-members"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#active-core-team-members"}},[e._v("#")]),e._v(" Active Core Team Members")]),e._v(" "),r("p",[e._v("The development of Ontop is guided by an international team (reverse lexicographical order).")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"http://www.ghxiao.org/",target:"_blank",rel:"noopener"}},[e._v("Guohui Xiao"),r("OutboundLink")],1),e._v(" (Unibz, Ontopic)")]),e._v(" "),r("li",[e._v("Albulen Pano (Unibz)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.inf.unibz.it/~dlanti/",target:"_blank",rel:"noopener"}},[e._v("Davide Lanti"),r("OutboundLink")],1),e._v(" (Unibz)")]),e._v(" "),r("li",[r("a",{attrs:{href:"http://www.dcs.bbk.ac.uk/~roman/",target:"_blank",rel:"noopener"}},[e._v("Roman Kontchakov"),r("OutboundLink")],1),e._v(" (Birkbeck)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://scholar.google.it/citations?user=SDaIlasAAAAJ&hl=en",target:"_blank",rel:"noopener"}},[e._v("Sarah Komla-Ebri"),r("OutboundLink")],1),e._v(" (Ontopic)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://scholar.google.it/citations?user=pT6E42UAAAAJ&hl=en",target:"_blank",rel:"noopener"}},[e._v("Julien Corman"),r("OutboundLink")],1),e._v(" (Unibz)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://github.com/bcogrel/",target:"_blank",rel:"noopener"}},[e._v("Benjamin Cogrel"),r("OutboundLink")],1),e._v(" (Ontopic)")]),e._v(" "),r("li",[r("a",{attrs:{href:"http://www.inf.unibz.it/~calvanese/",target:"_blank",rel:"noopener"}},[e._v("Diego Calvanese"),r("OutboundLink")],1),e._v(" (Unibz, Ontopic)")])]),e._v(" "),r("h2",{attrs:{id:"core-team-emeriti"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#core-team-emeriti"}},[e._v("#")]),e._v(" Core Team Emeriti")]),e._v(" "),r("p",[e._v("Here we honor some no-longer-active core team members who have made important contributions in the past.")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://sites.google.com/site/marianomuro/",target:"_blank",rel:"noopener"}},[e._v("Mariano Rodriguez-Muro"),r("OutboundLink")],1),e._v(" (Google, USA)")]),e._v(" "),r("li",[r("a",{attrs:{href:"http://www.martinrezk.com/",target:"_blank",rel:"noopener"}},[e._v("Martin Rezk"),r("OutboundLink")],1),e._v(" (Google, USA)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://profiles.stanford.edu/josef-hardi",target:"_blank",rel:"noopener"}},[e._v("Josef Hardi"),r("OutboundLink")],1),e._v(" (Stanford University, USA)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://scholar.google.it/citations?user=WYEhpZYAAAAJ&hl=en",target:"_blank",rel:"noopener"}},[e._v("Elem Güzel Kalaycı"),r("OutboundLink")],1),e._v(" (Virtual Vehicle Research GmbH, Austria)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.kent.ac.uk/computing/people/3838/botoeva-elena",target:"_blank",rel:"noopener"}},[e._v("Elena Botoeva"),r("OutboundLink")],1),e._v(" (University of Kent, UK)")])]),e._v(" "),r("h2",{attrs:{id:"contributors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#contributors"}},[e._v("#")]),e._v(" Contributors")]),e._v(" "),r("p",[e._v("Some members of the Ontop community have so enriched it, that they deserve special mention.")]),e._v(" "),r("ul",[r("li",[e._v("Lukas Sundqvist")]),e._v(" "),r("li",[e._v("Mindaugas Slusnys")]),e._v(" "),r("li",[e._v("Damian Rovara")]),e._v(" "),r("li",[e._v("Sergey Pugacs")]),e._v(" "),r("li",[e._v("Tomas Kovachev")]),e._v(" "),r("li",[e._v("Dag Hovland")]),e._v(" "),r("li",[e._v("Manfred Gerstgrasser")]),e._v(" "),r("li",[e._v("Uğur Dönmez")]),e._v(" "),r("li",[e._v("Timea Bagosi")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/11.9c479812.js b/assets/js/11.63a0c1c6.js similarity index 95% rename from assets/js/11.9c479812.js rename to assets/js/11.63a0c1c6.js index e8c853e3f..2f7d30681 100644 --- a/assets/js/11.9c479812.js +++ b/assets/js/11.63a0c1c6.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{388:function(t,o,n){"use strict";n.r(o);var i=n(51),r=Object(i.a)({},(function(){var t=this,o=t.$createElement,n=t._self._c||o;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"how-to-contribute"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#how-to-contribute"}},[t._v("#")]),t._v(" How to contribute")]),t._v(" "),n("p",[t._v("Contributions from the community are essential for an open-source project like Ontop and are warmly welcomed.")]),t._v(" "),n("p",[t._v("You can contribute in many differents ways, including:")]),t._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"/community/contributing/bug-report"}},[t._v("Filling a bug report")])]),t._v(" "),n("li",[n("a",{attrs:{href:"/community/contributing/pull-request"}},[t._v("Proposing a pull request")])]),t._v(" "),n("li",[n("a",{attrs:{href:"/community/contributing/documentation"}},[t._v("Improving the documentation")])]),t._v(" "),n("li",[n("a",{attrs:{href:"/community/support"}},[t._v("Participating to the mailing list")])]),t._v(" "),n("li",[t._v("Posting about Ontop")]),t._v(" "),n("li",[n("a",{attrs:{href:"/community/contributing/jobs"}},[t._v("Applying to a job position related to Ontop")])])])])}),[],!1,null,null,null);o.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{387:function(t,o,n){"use strict";n.r(o);var i=n(51),r=Object(i.a)({},(function(){var t=this,o=t.$createElement,n=t._self._c||o;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"how-to-contribute"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#how-to-contribute"}},[t._v("#")]),t._v(" How to contribute")]),t._v(" "),n("p",[t._v("Contributions from the community are essential for an open-source project like Ontop and are warmly welcomed.")]),t._v(" "),n("p",[t._v("You can contribute in many differents ways, including:")]),t._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"/community/contributing/bug-report"}},[t._v("Filling a bug report")])]),t._v(" "),n("li",[n("a",{attrs:{href:"/community/contributing/pull-request"}},[t._v("Proposing a pull request")])]),t._v(" "),n("li",[n("a",{attrs:{href:"/community/contributing/documentation"}},[t._v("Improving the documentation")])]),t._v(" "),n("li",[n("a",{attrs:{href:"/community/support"}},[t._v("Participating to the mailing list")])]),t._v(" "),n("li",[t._v("Posting about Ontop")]),t._v(" "),n("li",[n("a",{attrs:{href:"/community/contributing/jobs"}},[t._v("Applying to a job position related to Ontop")])])])])}),[],!1,null,null,null);o.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/12.473c4f1c.js b/assets/js/12.6ee50bb8.js similarity index 98% rename from assets/js/12.473c4f1c.js rename to assets/js/12.6ee50bb8.js index 74ab2bf1a..3cc95bcd8 100644 --- a/assets/js/12.473c4f1c.js +++ b/assets/js/12.6ee50bb8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{389:function(e,t,o){"use strict";o.r(t);var a=o(51),r=Object(a.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"bug-report"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#bug-report"}},[e._v("#")]),e._v(" Bug report")]),e._v(" "),o("p",[e._v("If you are sure you found a bug, use "),o("a",{attrs:{href:"https://github.com/ontop/ontop/issues",target:"_blank",rel:"noopener"}},[e._v("GitHub Issues"),o("OutboundLink")],1),e._v(" to submit the report; otherwise, start a discussion in the "),o("a",{attrs:{href:"https://groups.google.com/d/forum/ontop4obda",target:"_blank",rel:"noopener"}},[e._v("mailing list"),o("OutboundLink")],1),e._v(".")]),e._v(" "),o("p",[e._v("When reporting a bug, please make sure that you are using "),o("a",{attrs:{href:"/guide/getting-started"}},[e._v("the latest version of Ontop")]),e._v(" and provide a minimal reproducible example.")]),e._v(" "),o("h2",{attrs:{id:"reporting-a-possible-bug"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#reporting-a-possible-bug"}},[e._v("#")]),e._v(" Reporting a possible bug")]),e._v(" "),o("ul",[o("li",[e._v("Perform a search between current and past issues. If it is an open issue, add a comment to the existing issue instead of opening a new one.")]),e._v(" "),o("li",[e._v("Let us know which version and which setting of Ontop you are using (Protégé, SPARQL endpoint, CLI, Java API)")]),e._v(" "),o("li",[e._v("State what happened and also state what you expected to see.")]),e._v(" "),o("li",[e._v("If you have precise steps to reproduce the bug, explain each step and send us a set of ontology/mappings/query (as small as possible) so we can reproduce the problem. Otherwise send us the complete ontology, mapping and query files.")]),e._v(" "),o("li",[e._v("If you cannot reliably reproduce the test provide details about how often the problem happens and under which conditions it normally happens.")]),e._v(" "),o("li",[e._v("If the program generated an error, report what the error message was and how it occurred.")]),e._v(" "),o("li",[e._v("Add the log file in debug mode to help us to track the issue (more information follows).")])]),e._v(" "),o("h3",{attrs:{id:"how-to-generate-the-log-file"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#how-to-generate-the-log-file"}},[e._v("#")]),e._v(" How to generate the log file")]),e._v(" "),o("h4",{attrs:{id:"enable-protege-log"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#enable-protege-log"}},[e._v("#")]),e._v(" Enable Protégé log")]),e._v(" "),o("p",[e._v("You should go to the folder "),o("em",[e._v("conf")]),e._v(" of Protégé and modify the line of the "),o("em",[e._v("logback.xml")]),e._v(" file from "),o("code",[e._v('')]),e._v(" to "),o("code",[e._v('')]),e._v(".\nWhen you restart Protégé you will have more information in the command line, that can be useful to understand the problem.\nYou can send us the generated log file from Protégé starting from "),o("em",[e._v("Window -> Show log... -> Show log file -> protege.log")])]),e._v(" "),o("h4",{attrs:{id:"enable-command-line-interface-log"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#enable-command-line-interface-log"}},[e._v("#")]),e._v(" Enable Command Line Interface log")]),e._v(" "),o("p",[e._v("Go to the folder "),o("em",[e._v("log")]),e._v(" and modify the line of the "),o("em",[e._v("logback.xml")]),e._v(" file from "),o("code",[e._v('')]),e._v(" to "),o("code",[e._v('')]),e._v(".")]),e._v(" "),o("h4",{attrs:{id:"enable-logging-in-the-docker-image"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#enable-logging-in-the-docker-image"}},[e._v("#")]),e._v(" Enable logging in the Docker image")]),e._v(" "),o("p",[e._v("Define the environment variable "),o("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[o("code",[e._v("ONTOP_DEBUG")]),o("OutboundLink")],1),e._v(" ("),o("code",[e._v('ONTOP_DEBUG = "true"')]),e._v(").")]),e._v(" "),o("h2",{attrs:{id:"asking-for-help-or-information"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#asking-for-help-or-information"}},[e._v("#")]),e._v(" Asking for help or information")]),e._v(" "),o("p",[e._v("See "),o("a",{attrs:{href:"/community/support"}},[e._v("the support page")]),e._v(".")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{388:function(e,t,o){"use strict";o.r(t);var a=o(51),r=Object(a.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"bug-report"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#bug-report"}},[e._v("#")]),e._v(" Bug report")]),e._v(" "),o("p",[e._v("If you are sure you found a bug, use "),o("a",{attrs:{href:"https://github.com/ontop/ontop/issues",target:"_blank",rel:"noopener"}},[e._v("GitHub Issues"),o("OutboundLink")],1),e._v(" to submit the report; otherwise, start a discussion in the "),o("a",{attrs:{href:"https://groups.google.com/d/forum/ontop4obda",target:"_blank",rel:"noopener"}},[e._v("mailing list"),o("OutboundLink")],1),e._v(".")]),e._v(" "),o("p",[e._v("When reporting a bug, please make sure that you are using "),o("a",{attrs:{href:"/guide/getting-started"}},[e._v("the latest version of Ontop")]),e._v(" and provide a minimal reproducible example.")]),e._v(" "),o("h2",{attrs:{id:"reporting-a-possible-bug"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#reporting-a-possible-bug"}},[e._v("#")]),e._v(" Reporting a possible bug")]),e._v(" "),o("ul",[o("li",[e._v("Perform a search between current and past issues. If it is an open issue, add a comment to the existing issue instead of opening a new one.")]),e._v(" "),o("li",[e._v("Let us know which version and which setting of Ontop you are using (Protégé, SPARQL endpoint, CLI, Java API)")]),e._v(" "),o("li",[e._v("State what happened and also state what you expected to see.")]),e._v(" "),o("li",[e._v("If you have precise steps to reproduce the bug, explain each step and send us a set of ontology/mappings/query (as small as possible) so we can reproduce the problem. Otherwise send us the complete ontology, mapping and query files.")]),e._v(" "),o("li",[e._v("If you cannot reliably reproduce the test provide details about how often the problem happens and under which conditions it normally happens.")]),e._v(" "),o("li",[e._v("If the program generated an error, report what the error message was and how it occurred.")]),e._v(" "),o("li",[e._v("Add the log file in debug mode to help us to track the issue (more information follows).")])]),e._v(" "),o("h3",{attrs:{id:"how-to-generate-the-log-file"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#how-to-generate-the-log-file"}},[e._v("#")]),e._v(" How to generate the log file")]),e._v(" "),o("h4",{attrs:{id:"enable-protege-log"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#enable-protege-log"}},[e._v("#")]),e._v(" Enable Protégé log")]),e._v(" "),o("p",[e._v("You should go to the folder "),o("em",[e._v("conf")]),e._v(" of Protégé and modify the line of the "),o("em",[e._v("logback.xml")]),e._v(" file from "),o("code",[e._v('')]),e._v(" to "),o("code",[e._v('')]),e._v(".\nWhen you restart Protégé you will have more information in the command line, that can be useful to understand the problem.\nYou can send us the generated log file from Protégé starting from "),o("em",[e._v("Window -> Show log... -> Show log file -> protege.log")])]),e._v(" "),o("h4",{attrs:{id:"enable-command-line-interface-log"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#enable-command-line-interface-log"}},[e._v("#")]),e._v(" Enable Command Line Interface log")]),e._v(" "),o("p",[e._v("Go to the folder "),o("em",[e._v("log")]),e._v(" and modify the line of the "),o("em",[e._v("logback.xml")]),e._v(" file from "),o("code",[e._v('')]),e._v(" to "),o("code",[e._v('')]),e._v(".")]),e._v(" "),o("h4",{attrs:{id:"enable-logging-in-the-docker-image"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#enable-logging-in-the-docker-image"}},[e._v("#")]),e._v(" Enable logging in the Docker image")]),e._v(" "),o("p",[e._v("Define the environment variable "),o("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[o("code",[e._v("ONTOP_DEBUG")]),o("OutboundLink")],1),e._v(" ("),o("code",[e._v('ONTOP_DEBUG = "true"')]),e._v(").")]),e._v(" "),o("h2",{attrs:{id:"asking-for-help-or-information"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#asking-for-help-or-information"}},[e._v("#")]),e._v(" Asking for help or information")]),e._v(" "),o("p",[e._v("See "),o("a",{attrs:{href:"/community/support"}},[e._v("the support page")]),e._v(".")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/13.9330117e.js b/assets/js/13.82c8b4b6.js similarity index 97% rename from assets/js/13.9330117e.js rename to assets/js/13.82c8b4b6.js index d88f221ae..38a351231 100644 --- a/assets/js/13.9330117e.js +++ b/assets/js/13.82c8b4b6.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{390:function(t,e,n){"use strict";n.r(e);var s=n(51),a=Object(s.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"documentation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#documentation"}},[t._v("#")]),t._v(" Documentation")]),t._v(" "),n("p",[t._v("The source code of the documentation is on "),n("a",{attrs:{href:"https://github.com/ontop/ontop-website",target:"_blank",rel:"noopener"}},[t._v("Github"),n("OutboundLink")],1),t._v(" and is powered by "),n("a",{attrs:{href:"https://v1.vuepress.vuejs.org/",target:"_blank",rel:"noopener"}},[t._v("VuePress"),n("OutboundLink")],1),t._v(".")]),t._v(" "),n("p",[t._v("Once a commit is pushed to the Github repository, this public documentation is automatically rebuilt by Travis CI.")]),t._v(" "),n("h2",{attrs:{id:"small-improvements"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#small-improvements"}},[t._v("#")]),t._v(" Small improvements")]),t._v(" "),n("p",[t._v("Have you found a typo, a broken URL or another small problem? Please propose a fix immediately (before forgetting it), by clicking on the link "),n("code",[t._v("Edit this page")]),t._v(" at the bottom of the page.")]),t._v(" "),n("h2",{attrs:{id:"testing-the-documentation-locally"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#testing-the-documentation-locally"}},[t._v("#")]),t._v(" Testing the documentation locally")]),t._v(" "),n("p",[t._v("For a more involved work on the documentation, we recommend you to test your changes on your local machine before pushing them to Github.")]),t._v(" "),n("div",{staticClass:"language-bash extra-class"},[n("pre",{pre:!0,attrs:{class:"language-bash"}},[n("code",[n("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone git@github.com:ontop/ontop-website.git\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ontop-website\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Install the dependencies (e.g. vuepress)")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("yarn")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# start the local server")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("yarn")]),t._v(" docs:dev\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# commit your changes and push them back to Github")]),t._v("\n")])])]),n("p",[n("a",{attrs:{href:"https://v1.vuepress.vuejs.org/",target:"_blank",rel:"noopener"}},[t._v("VuePress"),n("OutboundLink")],1),t._v(" requires Node.js >= 8.6.")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{389:function(t,e,n){"use strict";n.r(e);var s=n(51),a=Object(s.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"documentation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#documentation"}},[t._v("#")]),t._v(" Documentation")]),t._v(" "),n("p",[t._v("The source code of the documentation is on "),n("a",{attrs:{href:"https://github.com/ontop/ontop-website",target:"_blank",rel:"noopener"}},[t._v("Github"),n("OutboundLink")],1),t._v(" and is powered by "),n("a",{attrs:{href:"https://v1.vuepress.vuejs.org/",target:"_blank",rel:"noopener"}},[t._v("VuePress"),n("OutboundLink")],1),t._v(".")]),t._v(" "),n("p",[t._v("Once a commit is pushed to the Github repository, this public documentation is automatically rebuilt by Travis CI.")]),t._v(" "),n("h2",{attrs:{id:"small-improvements"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#small-improvements"}},[t._v("#")]),t._v(" Small improvements")]),t._v(" "),n("p",[t._v("Have you found a typo, a broken URL or another small problem? Please propose a fix immediately (before forgetting it), by clicking on the link "),n("code",[t._v("Edit this page")]),t._v(" at the bottom of the page.")]),t._v(" "),n("h2",{attrs:{id:"testing-the-documentation-locally"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#testing-the-documentation-locally"}},[t._v("#")]),t._v(" Testing the documentation locally")]),t._v(" "),n("p",[t._v("For a more involved work on the documentation, we recommend you to test your changes on your local machine before pushing them to Github.")]),t._v(" "),n("div",{staticClass:"language-bash extra-class"},[n("pre",{pre:!0,attrs:{class:"language-bash"}},[n("code",[n("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone git@github.com:ontop/ontop-website.git\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ontop-website\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Install the dependencies (e.g. vuepress)")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("yarn")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# start the local server")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("yarn")]),t._v(" docs:dev\n\n"),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# commit your changes and push them back to Github")]),t._v("\n")])])]),n("p",[n("a",{attrs:{href:"https://v1.vuepress.vuejs.org/",target:"_blank",rel:"noopener"}},[t._v("VuePress"),n("OutboundLink")],1),t._v(" requires Node.js >= 8.6.")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/19.c55473af.js b/assets/js/19.864fd591.js similarity index 99% rename from assets/js/19.c55473af.js rename to assets/js/19.864fd591.js index f57033d97..9084e8099 100644 --- a/assets/js/19.c55473af.js +++ b/assets/js/19.864fd591.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{396:function(t,a,s){"use strict";s.r(a);var e=s(51),n=Object(e.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"support-a-new-database-system"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#support-a-new-database-system"}},[t._v("#")]),t._v(" Support a new database system")]),t._v(" "),s("p",[t._v("This page describes how Ontop can be extended to support a novel relational database system (RDBMS).")]),t._v(" "),s("p",[t._v("The following RDBMSs are currently supported:")]),t._v(" "),s("ul",[s("li",[t._v("DB2")]),t._v(" "),s("li",[t._v("MySQL / MariaDB")]),t._v(" "),s("li",[t._v("Oracle")]),t._v(" "),s("li",[t._v("PostgreSQL")]),t._v(" "),s("li",[t._v("SQL server")]),t._v(" "),s("li",[t._v("H2")]),t._v(" "),s("li",[t._v("Denodo")]),t._v(" "),s("li",[t._v("Dremio")]),t._v(" "),s("li",[t._v("Apache Spark SQL & Databricks")]),t._v(" "),s("li",[t._v("Teiid")]),t._v(" "),s("li",[t._v("Snowflake")]),t._v(" "),s("li",[t._v("Trino")]),t._v(" "),s("li",[t._v("Presto")]),t._v(" "),s("li",[t._v("Athena")]),t._v(" "),s("li",[t._v("Redshift")]),t._v(" "),s("li",[t._v("DuckDB")])]),t._v(" "),s("p",[t._v("It is relatively easy though to extend Ontop's source code in order to support an additional RDBMS, thanks to dependency injection.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("New: Guided Implementation")]),t._v(" "),s("p",[t._v("Ontop also provides a "),s("a",{attrs:{href:"https://github.com/ontop/dialect-factory-scaffolding",target:"_blank",rel:"noopener"}},[t._v("python tool"),s("OutboundLink")],1),t._v(" that automatically generates a large part of the required code end simplifies the process of developing support for new SQL dialects.")]),t._v(" "),s("p",[t._v("Using it minimizes the overhead for the implementation of new dialect support and allows you to test your code easily right away.")])]),t._v(" "),s("p",[s("em",[t._v("This page provides a detailed explanation of the key concepts that need to be implemented, and was updated with Ontop 5.0.2. For newer versions of Ontop, it may no longer be up-to-date.")])]),t._v(" "),s("h2",{attrs:{id:"required-implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#required-implementations"}},[t._v("#")]),t._v(" Required implementations")]),t._v(" "),s("p",[t._v("Two implementations must be provided, each for a different interface that already has a default (abstract) implementation.")]),t._v(" "),s("p",[t._v("These implementations dictate what the datatypes of the RDBMS are and how certain function symbols can be translated into the SQL dialect supported by the RDBMS.")]),t._v(" "),s("p",[t._v("The default implementation of each of these interfaces is often sufficient to handle many query operators and functions. As a result, only a few methods generally need to be overwritten,\nto account for specificities of the new SQL dialect.")]),t._v(" "),s("p",[t._v("The 2 required implementations are the DB function symbol factory and the DB datatype factory.")]),t._v(" "),s("h3",{attrs:{id:"db-function-symbol-factory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#db-function-symbol-factory"}},[t._v("#")]),t._v(" DB function symbol factory")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("DB function symbol factory")]),t._v(" provides function symbols\nwhich can be directly serialized into the target SQL dialect (e.g. "),s("code",[t._v("LENGTH")]),t._v(" or "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v("). This factory has methods for common operations with precise semantics (e.g. concatenating 3 string arguments in a null-rejecting manner).")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("DBFunctionSymbolFactory")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("AbstractSQLDBFunctionSymbolFactory")]),t._v(".")]),t._v(" "),s("p",[t._v("For instance, the DB function symbol factory for PostgreSQL within Ontop is the class "),s("code",[t._v("PostgreSQLDBFunctionSymbolFactory")]),t._v(".")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("This interface should not be confused with the "),s("code",[t._v("FunctionSymbolFactory")]),t._v(", which is in charge of constructing\nSPARQL function symbols and other function symbols that cannot be directly serialized into SQL.")])]),t._v(" "),s("p",[t._v("A basic template for this implementation is provided here:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectDBFunctionSymbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AbstractSQLDBFunctionSymbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Inject")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DuckDBDBFunctionSymbolFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectRegularFunctionTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTable")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Integer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectRegularFunctionTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTypeFactory")]),t._v(" dbTypeFactory "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getDBTypeFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),t._v(" abstractRootDBType "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" dbTypeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getAbstractRootDBType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Table")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Integer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" table "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("HashBasedTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("create")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDefaultRegularFunctionTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Changed Function Symbols -\n ------------------------------------------\n */")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("copyOf")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("table"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Implementations -\n ------------------------------------------\n */")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("In the template above, two code blocks are commented out. We will now look at each of them individually.")]),t._v(" "),s("h4",{attrs:{id:"changed-function-symbols"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#changed-function-symbols"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Changed Function Symbols")])]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("regular function table")]),t._v(" is a dictionary, that maps from function names to the function symbol instance it corresponds to. The abstract base classes we inherit from already define a default function symbol table that includes all commonly used SQL functions. In some cases, however, some of these default function symbols need to be changed. For these cases, new entries can be created in this block, to override existing, bad entries.")]),t._v(" "),s("p",[t._v("A popular example is the "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v(" function symbol. By default, it is created as a simple function with arity 0 of the form "),s("code",[t._v("CURRENT_TIMESTAMP()")]),t._v(". In some dialects, however, the current time is called without parentheses, simply in the form "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v(". In this case, we need to override the function symbol created by the default implementation, to not include parentheses:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBFunctionSymbol")]),t._v(" nowFunctionSymbol "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("WithoutParenthesesSimpleTypedDBFunctionSymbolImpl")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n CURRENT_TIMESTAMP_STR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbTypeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getDBDateTimestampType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ntable"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("put")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("CURRENT_TIMESTAMP_STR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" nowFunctionSymbol"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("The "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v(" function is now a "),s("code",[t._v("WithoutParenthesesSimpleTypedDBFunctionSymbol")]),t._v(", so when generating SQL queries, ontop will not include the parentheses. By putting this new function symbol into the table at the key "),s("code",[t._v("CURRENT_TIMESTAMP_STR")]),t._v(", we override the default behaviour that was put into the table by the default method.")]),t._v(" "),s("h4",{attrs:{id:"implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#implementations"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Implementations")])]),t._v(" "),s("p",[t._v("A set of serialization methods have been left abstract by the base classes. These "),s("em",[t._v("always")]),t._v(" have to be implemented for each new dialect.")]),t._v(" "),s("p",[t._v("All such methods share the same structure:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" serialize"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("FUNCTION_NAME"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Here, "),s("code",[t._v("terms")]),t._v(" is the list of arguments that were passed to the function, "),s("code",[t._v("termConverter")]),t._v(" ist a function that can be used to transform any given term into its SQL equivalent, and termFactory can be used to generate new terms that may be required for some functions.")]),t._v(" "),s("p",[t._v("We will now go through each of them and provide example implementations.")]),t._v(" "),s("p",[s("em",[s("strong",[t._v("Contains")])]),t._v(":")]),t._v(" "),s("p",[t._v("This function returns a boolean value, indicating whether a given string (argument 2) is included in a different string (argument 1). While some dialects have their own "),s("code",[t._v("CONTAINS")]),t._v(" functions, for others it may have to be implemented through a string search, like in this example:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeContains")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"(POSITION(%s IN %s) > 0)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("StrBefore")])]),t._v(":")]),t._v(" "),s("p",[t._v("This function returns the section of a given string (argument 1) before the first appearance of a given search string (argument 2). If the searched string is not contained in the base string, an empty string is returned instead. In many languages, this can be implemented using string search and substring methods.")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeStrBefore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" str "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" before "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SUBSTRING(%s,1,POSITION(%s IN %s)-1)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" before"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("StrAfter")])]),t._v(":")]),t._v(" "),s("p",[t._v("The opposite of "),s("code",[t._v("STRBEFORE")]),t._v(", this function returns the section of a given string (argument 1) "),s("em",[t._v("after")]),t._v(" the first appearance of a search string (argument 2). This function can be implemented similarly:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeStrBefore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" str "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" before "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SUBSTRING(%s, IF(POSITION(%s IN %s) != 0, POSITION(%s IN %s) + LENGTH(%s), 0))"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" after"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" after"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" after"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("Tz")])]),t._v(":\nThis function extracts the timezone part of a given timestamp. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeTz")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" str "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"(LPAD(EXTRACT(TIMEZONE_HOUR FROM %s)::text,2,'0') || ':' || LPAD(EXTRACT(TIMEZONE_MINUTE FROM %s)::text,2,'0'))\"")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("DateTimeNorm")])]),t._v(":\nThis function converts a given timestamp to the standardized "),s("code",[t._v("ISO 8601")]),t._v(" format. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeDateTimeNorm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TO_ISO8601(%s)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("Hashing Functions")])]),t._v(":")]),t._v(" "),s("p",[t._v("Ontop supports a set of hasing functions:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("MD5")])]),t._v(" "),s("li",[s("code",[t._v("SHA1")])]),t._v(" "),s("li",[s("code",[t._v("SHA256")])]),t._v(" "),s("li",[s("code",[t._v("SHA384")])]),t._v(" "),s("li",[s("code",[t._v("SHA512")])])]),t._v(" "),s("p",[t._v("For each of them, the implementation of a serialization method is required. An example implementation of the "),s("code",[t._v("MD5")]),t._v(" function may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeMD5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"MD5(%s)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p"),t._v(" "),s("p",[t._v("Other than the serialization methods, four additional methods must be implemented by the subclass:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getUUIDNameInDialect")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"[UUID_FUNCTION_NAME]"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("returns the string that represents the name of the UUID in the SQL dialect.")]),t._v(" "),s("p",[t._v("The methods "),s("code",[t._v("createNullRejectingDBConcat(int arity)")]),t._v(", "),s("code",[t._v("createDBConcatOperator(int arity)")]),t._v(", and "),s("code",[t._v("createRegularDBConcat(int arity)")]),t._v(" need to be implemented to define the concat function symbols. The "),s("code",[t._v("DBConcat")]),t._v(" methods define function symbols that represent "),s("code",[t._v("CONCAT")]),t._v(" function calls of a given arity. Sample implementations for them may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBConcatFunctionSymbol")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createRegularDBConcat")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NullToleratingDBConcatFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"CONCAT"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbStringType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBConcatFunctionSymbol")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNullRejectingDBConcat")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NullRejectingDBConcatFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"CONCAT_NO_NULL"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbStringType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("The "),s("code",[t._v("createDBConcatOperator(int arity)")]),t._v(" method represents a concat operation executed through a concat operator (often "),s("code",[t._v("+")]),t._v(" or "),s("code",[t._v("||")]),t._v("). It may be implemented like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBConcatFunctionSymbol")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDBConcatOperator")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NullRejectingDBConcatFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"||"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbStringType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Serializers")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getOperatorSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"||"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"db-datatype-factory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#db-datatype-factory"}},[t._v("#")]),t._v(" DB Datatype factory")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("DB datatype factory")]),t._v(" declares the hierarchy of DB datatypes used by the DBMS, and specifies their correspondence with datatypes used in the RDF graphs (such as xsd datatypes).")]),t._v(" "),s("p",[t._v("The interface to implement (for SQL dialects) is "),s("code",[t._v("SQLDBTypeFactory")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("DefaultSQLDBTypeFactory")]),t._v(" .")]),t._v(" "),s("p",[t._v("For instance, the datatype factory for PostgreSQL within Ontop is the class "),s("code",[t._v("PostgreSQLDBTypeFactory")]),t._v(".")]),t._v(" "),s("p",[t._v("A basic template for this implementation is provided here:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectDBTypeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultSQLDBTypeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Type Definitions -\n ------------------------------------------\n */")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@AssistedInject")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectDBTypeFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Assisted")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermType")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Assisted")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermType")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Type Map -\n ------------------------------------------\n */")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableMap")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Code Map -\n ------------------------------------------\n */")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Support Flags -\n ------------------------------------------\n */")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("In the template above, four code blocks are commented out. We will now look at each of them individually.")]),t._v(" "),s("h4",{attrs:{id:"type-definitions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#type-definitions"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Type Definitions")])]),t._v(" "),s("p",[t._v("In this section, we define a set of "),s("code",[t._v("String")]),t._v(" constants that represent the names of datatypes in our SQL dialect. These constants are then used in other code blocks. An excerpt of the "),s("em",[t._v("type definitions")]),t._v(" part in an implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" BIT_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BIT"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" INT2_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INT2"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" INT4_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INT4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" INT8_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INT8"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" FLOAT4_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"FLOAT4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" FLOAT8_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"FLOAT8"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h4",{attrs:{id:"type-map"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#type-map"}},[t._v("#")]),t._v(" "),s("strong",[t._v("TYPE MAP")])]),t._v(" "),s("p",[t._v("In this method, we define the contents of the type map for our dialect. We create "),s("code",[t._v("DBTermType")]),t._v(" instances for each supported type and store them in a "),s("code",[t._v("Map")]),t._v(" object, that matches their identifiers to the "),s("code",[t._v("DBTermType")]),t._v(". The base class we extend from already generates an extensive type map for many popular types, such as "),s("code",[t._v("VARCHAR")]),t._v(", "),s("code",[t._v("INTEGER")]),t._v(", "),s("code",[t._v("REAL")]),t._v(", "),s("code",[t._v("DOUBLE")]),t._v(", and more in the method "),s("code",[t._v("createDefaultSQLTypeMap(...)")]),t._v(". New types can be added to the map in the subclass, and, alternatively, we can override existing entries in the map here. An example implementation of this method may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermType")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermTypeAncestry")]),t._v(" rootAncestry "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getAncestry")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" map "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDefaultSQLTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h4",{attrs:{id:"code-map"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#code-map"}},[t._v("#")]),t._v(" "),s("strong",[t._v("CODE MAP")])]),t._v(" "),s("p",[t._v('The code map is a dictionary, that maps different type codes to their "default type" for the SQL dialect. This includes the following type codes:')]),t._v(" "),s("ul",[s("li",[s("code",[t._v("STRING")])]),t._v(" "),s("li",[s("code",[t._v("HEXBINARY")])]),t._v(" "),s("li",[s("code",[t._v("LARGE_INTEGER")])]),t._v(" "),s("li",[s("code",[t._v("DECIMAL")])]),t._v(" "),s("li",[s("code",[t._v("DOUBLE")])]),t._v(" "),s("li",[s("code",[t._v("BOOLEAN")])]),t._v(" "),s("li",[s("code",[t._v("DATE")])]),t._v(" "),s("li",[s("code",[t._v("TIME")])]),t._v(" "),s("li",[s("code",[t._v("DATETIMESTAMP")])]),t._v(" "),s("li",[s("code",[t._v("GEOMETRY")])]),t._v(" "),s("li",[s("code",[t._v("GEOGRAPHY")])]),t._v(" "),s("li",[s("code",[t._v("ARRAY")])]),t._v(" "),s("li",[s("code",[t._v("JSON")])])]),t._v(" "),s("p",[t._v("The default implementation already maps many of these to the name of the corresponding data type. To support additional ones, or to override existing mappings, this method can be implemented. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableMap")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" map "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDefaultSQLCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("put")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("JSON"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" JSONB_STR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("copyOf")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h4",{attrs:{id:"support-flags"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#support-flags"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Support Flags")])]),t._v(" "),s("p",[t._v("An instance of "),s("code",[t._v("DBTypeFactory")]),t._v(" supports a set of methods that, when called, return a flag indicating if a certain SQL feature is supported by the dialect. These methods are")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("supportsDBGeometryType()")])]),t._v(" "),s("li",[s("code",[t._v("supportsDBGeographyType()")])]),t._v(" "),s("li",[s("code",[t._v("supportsDBDistanceSphere()")])]),t._v(" "),s("li",[s("code",[t._v("supportsJson()")])]),t._v(" "),s("li",[s("code",[t._v("supportsArrayType()")])])]),t._v(" "),s("p",[t._v("Any of these functions can be overridden by the "),s("code",[t._v("DBTypeFactory")]),t._v(" sub-class to return a boolean constant indicating if the type is supported.")]),t._v(" "),s("h4",{attrs:{id:"other-implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-implementations"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Other Implementations")])]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("DBTypeFactory")]),t._v(" base-class supports further methods that can be included in sub-classes for fine-tuning. One popular set of such methods are the "),s("code",[t._v("LexicalValue")]),t._v(" methods. These return a "),s("code",[t._v("String")]),t._v(" constant that represents the lexical value the corresponding literal may assume. For instance, by default, the method "),s("code",[t._v("getDBFalseLexicalValue()")]),t._v(" returns the string "),s("code",[t._v('"FALSE"')]),t._v(", as this is a common representation of the boolean "),s("code",[t._v("false")]),t._v(" value in many SQL dialects. To implement the "),s("code",[t._v("DBTypeFactory")]),t._v(" for a dialect that instead uses the digit "),s("code",[t._v("0")]),t._v(" for "),s("code",[t._v("false")]),t._v(" literals, we could override the method like so:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getDBFalseLexicalValue")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"optional-implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#optional-implementations"}},[t._v("#")]),t._v(" Optional implementations")]),t._v(" "),s("p",[t._v("Additional implementations can be optionally provided in replacement of the default implementation.")]),t._v(" "),s("h3",{attrs:{id:"serializer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#serializer"}},[t._v("#")]),t._v(" Serializer")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("serializer")]),t._v(" dictates the general shape (SELECT-FROM-WHERE) of the SQL query.")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("SelectFromWhereSerializer")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("DefaultSelectFromWhereSerializer")]),t._v(".")]),t._v(" "),s("p",[t._v("For instance, the serializer for PostgreSQL within Ontop is the class "),s("code",[t._v("PostgresSelectFromWhereSerializer")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"normalizer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normalizer"}},[t._v("#")]),t._v(" Normalizer")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("normalizer")]),t._v(" addresses limitations of certain DBMSs (such as a non-canonical evaluation of the ORDER BY clause).")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("DialectExtraNormalizer")]),t._v("."),s("br"),t._v("\nAnd several implementations are already available, some of which are used by several DBMS.")]),t._v(" "),s("p",[t._v("For instance, the normalizer associated to PostgreSQL within Ontop is "),s("code",[t._v("OnlyInPresenceOfDistinctProjectOrderByTermsNormalizer")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"metadata-provider"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#metadata-provider"}},[t._v("#")]),t._v(" Metadata provider")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("metadata provider")]),t._v(" specifies how schema and integrity constraints (for instance primary keys) are retrieved from the DBMS.")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("MetadataProvider")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("DefaultDBMetadataProvider")]),t._v(".")]),t._v(" "),s("p",[t._v("For instance, the metadata provider for PostgreSQL within Ontop is "),s("code",[t._v("PostgreSQLDBMetadataProvider")]),t._v(".")]),t._v(" "),s("h2",{attrs:{id:"declaring-an-implementation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#declaring-an-implementation"}},[t._v("#")]),t._v(" Declaring an implementation")]),t._v(" "),s("p",[t._v("All the implementations mentioned above can be declared in the property file "),s("code",[t._v("sql-default.properties")]),t._v(" (which can be found in the directory "),s("code",[t._v("it/unibz/inf/ontop/injection/")]),t._v(" of the "),s("code",[t._v("ontop-rdb")]),t._v(" module).")]),t._v(" "),s("p",[t._v("A key-value pair must be added for each of these implementations, where the key indicates the type of the implementation (serializer, function symbol factory, etc.), and the value is the implementation.")]),t._v(" "),s("p",[t._v("The naming scheme for the keys is the following."),s("br"),t._v("\nLet "),s("code",[t._v("")]),t._v(" be the name of the JDBC driver for the RDBMS (for instance, the JDBC driver for PostgreSQL is "),s("code",[t._v("org.postgresql.Driver")]),t._v("."),s("br"),t._v("\nThen the keys are:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("-serializer")]),t._v(" for a serializer")]),t._v(" "),s("li",[s("code",[t._v("-symbolFactory")]),t._v(" for a DB function symbol factory")]),t._v(" "),s("li",[s("code",[t._v("-typeFactory")]),t._v(" for a DB datatype factory")]),t._v(" "),s("li",[s("code",[t._v("-normalizer")]),t._v(" for a normalizer")]),t._v(" "),s("li",[s("code",[t._v("-metadataProvider")]),t._v(" for a metadata provider")])]),t._v(" "),s("p",[t._v("For instance, the key-value pairs declared for PostgreSQL are:")]),t._v(" "),s("div",{staticClass:"language-properties extra-class"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-serializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.serializer.impl.PostgresSelectFromWhereSerializer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-symbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.term.functionsymbol.db.impl.PostgreSQLDBFunctionSymbolFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-typeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.type.impl.PostgreSQLDBTypeFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-normalizer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.normalization.impl.OnlyInPresenceOfDistinctProjectOrderByTermsNormalizer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-metadataProvider")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.dbschema.impl.PostgreSQLDBMetadataProvider")]),t._v("\n")])])]),s("p",[t._v("A basic set of key-value pairs may be:")]),t._v(" "),s("div",{staticClass:"language-properties extra-class"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-serializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.serializer.impl.DefaultSelectFromWhereSerializer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-symbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.term.functionsymbol.db.impl.NewDialectDBFunctionSymbolFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-typeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.type.impl.NewDialectDBTypeFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-normalizer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.normalization.impl.OnlyInPresenceOfDistinctProjectOrderByTermsNormalizer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-metadataProvider")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.dbschema.impl.DefaultSchemaCatalogDBMetadataProvider")]),t._v("\n")])])]),s("h2",{attrs:{id:"preparing-and-running-the-testcases"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#preparing-and-running-the-testcases"}},[t._v("#")]),t._v(" Preparing and Running the Testcases")]),t._v(" "),s("p",[t._v("Ontop currently uses a set of tests called "),s("code",[t._v("lightweight-tests")]),t._v(" to test all main ontop language support features on minimal databases. A simple way of testing the correctness of newly implemented dialect support is to run the same tests a database that uses the corresponding dialect.")]),t._v(" "),s("p",[t._v("This consists of the following steps:")]),t._v(" "),s("ol",[s("li",[t._v("Set up a database with the required testing conditions")]),t._v(" "),s("li",[t._v("Prepare files that assist the connection to the database")]),t._v(" "),s("li",[t._v("Implement sub-classes of the abstract lightweight test classes and run them")])]),t._v(" "),s("p",[t._v("In the following sections, we will discuss each of these steps.")]),t._v(" "),s("h3",{attrs:{id:"setting-up-the-database"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-the-database"}},[t._v("#")]),t._v(" Setting up the Database")]),t._v(" "),s("p",[t._v("The exact procedure of the database preparation depends on the database system. In ontop, we generally use docker images that reproduce the exact same database state for each test run so we can test the different dialects automatically.")]),t._v(" "),s("p",[t._v("Each directory inside "),s("code",[t._v("test/lightweight-tests/lightweight-db-test-images/")]),t._v(" corresponds to one docker image, and many of them contain table definitions in "),s("code",[t._v(".sql")]),t._v(" file. For instance, the "),s("code",[t._v("mysql")]),t._v(" directory contains the exact definitions of the three databases that are used for testing, "),s("code",[t._v("books")]),t._v(", "),s("code",[t._v("dbconstraints")]),t._v(", and "),s("code",[t._v("university")]),t._v(".")]),t._v(" "),s("p",[t._v("To prepare the required testing conditions, you can take these "),s("code",[t._v(".sql")]),t._v(" files and run their queries on your database. Should any of the features not be supported, you will be required to either use alternative equivalent features to reach the same final database state, or disable the corresponding test cases.")]),t._v(" "),s("h3",{attrs:{id:"preparing-connection-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#preparing-connection-files"}},[t._v("#")]),t._v(" Preparing Connection Files")]),t._v(" "),s("p",[t._v("The directory "),s("code",[t._v("test/lightweight-tests/src/test/resources/")]),t._v(" contains files that are used for setting up an ontop connection with different databases, including "),s("code",[t._v(".obda")]),t._v(" files for the VKG creation and "),s("code",[t._v(".property")]),t._v(" files for JDBC connections. While the "),s("code",[t._v(".obda")]),t._v(" files can usually be reused for different systems, the "),s("code",[t._v(".property")]),t._v(" files must be included for each database system. The directories "),s("code",[t._v("books")]),t._v(" and "),s("code",[t._v("prof")]),t._v(" inside the test resources contain one sub directory for each dialect, where each sub directory in turn includes one "),s("code",[t._v(".properties")]),t._v(" file for the JDBC connection. The "),s("code",[t._v("dbconstraints")]),t._v(" and "),s("code",[t._v("university")]),t._v(" directories, on the other hand, directly contain "),s("code",[t._v(".property")]),t._v(" files for each dialect.")]),t._v(" "),s("p",[t._v("To run all lightweight tests for a new dialect, the corresponding files and directories have to be creates for its JDBC connection. In particular, the connection files should be created in such a way, that the corresponding database/schema of the test is selected as the default database/schema, as the "),s("code",[t._v(".obda")]),t._v(" files access the tables through relative paths.")]),t._v(" "),s("h3",{attrs:{id:"implementing-the-lightweight-test-classes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#implementing-the-lightweight-test-classes"}},[t._v("#")]),t._v(" Implementing the Lightweight Test Classes")]),t._v(" "),s("p",[t._v("The directory "),s("code",[t._v("test/lightweight-tests/src/test/java/")]),t._v(" contains the test cases that have to run successfully for each new dialect. They are defined in the four abstract classes "),s("code",[t._v("AbstractBindTestWithFunctions")]),t._v(", "),s("code",[t._v("AbstractConstraintTest")]),t._v(", "),s("code",[t._v("AbstractDistinctInAggregateTest")]),t._v(", and "),s("code",[t._v("AbstractLeftJoinProfTest")]),t._v(".")]),t._v(" "),s("p",[t._v("For each new dialect, a new package has to be created at this location, containing the implementations of sub-classes for each of these abstract base classes.")]),t._v(" "),s("h4",{attrs:{id:"bindtestwithfunctions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#bindtestwithfunctions"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("BindTestWithFunctions")])])]),t._v(" "),s("p",[t._v("This test class tests all main SQL functions that are supported by ontop. It uses the "),s("code",[t._v("books")]),t._v(" database, as well as directly generated data through the SPARQL "),s("code",[t._v("BIND")]),t._v(" function. An example implementation of this class may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@NewDialectLightweightTest")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("BindWithFunctionsNewDialectTest")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AbstractBindTestWithFunctions")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" PROPERTIES_FILE "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/books/new-dialect/books-new-dialect.properties"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@BeforeAll")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("before")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("throws")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("IOException")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SQLException")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("initOBDA")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("OBDA_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" OWL_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" PROPERTIES_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@AfterAll")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("after")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("throws")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SQLException")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("release")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Result Definitions -\n ------------------------------------------\n */")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("Using the "),s("code",[t._v("@NewDialectLightweightTest")]),t._v(" annotation requires the definition of the annotation in the same package, similarly to how it was defined for other dialects.")])]),t._v(" "),s("p",[t._v('The code block "Result Definitions" is commented out in the above example. This code block may contain redefinitions of expected results that are tested in the base class. To do this, override the '),s("code",[t._v("get[TEST-NAME]ExpectedValues()")]),t._v(" method here. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getConstantIntegerDivideExpectedResults")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("of")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\"0.500\\"^^xsd:decimal"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Should any of the functionalities not be supported by the SQL dialect, then the corresponding test case may simply be disabled with an exaplanation as to why it is not supported. An example for that may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Disabled")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"New Dialect does not support SHA384"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Test")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("testHashSHA384")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("testHashSHA384")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Some test cases are disabled by default.")]),t._v(" "),s("h4",{attrs:{id:"constraint"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#constraint"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("Constraint")])])]),t._v(" "),s("p",[t._v("This set of test cases tests for the correct interpretation of integrity constraints in the data. It uses the "),s("code",[t._v("dbconstraints")]),t._v(" database. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@NewDialectLightweightTest")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ConstraintNewDialectTest")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AbstractConstraintTest")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" PROPERTIES_FILE "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/dbconstraints/dbconstraints-new-dialect.properties"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ConstraintNewDialectTest")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" method"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("method"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" PROPERTIES_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Once again, specific tests may be disabled if they are not supported. For database systems that do not support integrity constraints, this class can be ignored.")]),t._v(" "),s("h4",{attrs:{id:"distinctinaggregate"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#distinctinaggregate"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("DistinctInAggregate")])])]),t._v(" "),s("p",[t._v("This set of test cases runs queries containing aggregate functions that include the "),s("code",[t._v("DISTINCT")]),t._v(" keyword. It can be implemented analogously to the "),s("code",[t._v("BindWithFunctions")]),t._v(" test class.")]),t._v(" "),s("h4",{attrs:{id:"leftjoinprof"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#leftjoinprof"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("LeftJoinProf")])])]),t._v(" "),s("p",[t._v("This set of test cases runs on the "),s("code",[t._v("university")]),t._v(" database. It accesses items that have to be taken from the database through "),s("code",[t._v("JOIN")]),t._v("s. Furthermore, it tests the optimization procedures employed by ontop to minimize the required number of joins. Once again, it can be implemented analogously to the "),s("code",[t._v("BindWithFunctions")]),t._v(" test class.")]),t._v(" "),s("p",[t._v("If the database management system does not support integrity constraints, many of these test cases will fail because the optimizations will not be performed.")]),t._v(" "),s("h2",{attrs:{id:"further-implementations-and-troubleshooting"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#further-implementations-and-troubleshooting"}},[t._v("#")]),t._v(" Further Implementations and Troubleshooting")]),t._v(" "),s("p",[t._v("Once the basic features and lightweight test cases have been implemented for a dialect, the tests can be run to determine which features still do not work correctly.")]),t._v(" "),s("p",[t._v("If a test case fails, its corresponding feature is likely not yet supported by the current implementation. In these cases, changes need to be applied to the implemented "),s("code",[t._v("DBTypeFactory")]),t._v(" or "),s("code",[t._v("DBFunctionSymbolFactory")]),t._v(" to solve the issue.")]),t._v(" "),s("p",[t._v("In some situations, however, issues may be caused by problems not related to database types or functions. In these cases, one of the following default implementations may also be extended for the new dialect.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("New implementations of these classes have to be linked to the driver through the "),s("code",[t._v("sql-default.properties")]),t._v(" file.")])]),t._v(" "),s("h3",{attrs:{id:"defaultschemacatalogdbmetadataprovider-defaultschemadbmetadataprovider-or-defaultdbmetadataprovider"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#defaultschemacatalogdbmetadataprovider-defaultschemadbmetadataprovider-or-defaultdbmetadataprovider"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("DefaultSchemaCatalogDBMetadataProvider")])]),t._v(", "),s("strong",[s("code",[t._v("DefaultSchemaDBMetadataProvider")])]),t._v(", or "),s("strong",[s("code",[t._v("DefaultDBMetadataProvider")])])]),t._v(" "),s("p",[t._v("If the "),s("code",[t._v("DBMetadataProvider")]),t._v(" assigned to the dialect is not able to perform its expected actions through its default implementation, it may have to be extended with a new sub-class that is particularly tailored for this dialect.")]),t._v(" "),s("p",[t._v("In that case, its methods may be overridden to change the default behavious. Commong targets include:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("insertIntegrityConstraints(...)")]),t._v(" if the dialect does not support integrity constraints.")]),t._v(" "),s("li",[s("code",[t._v("getRelationId(...)")]),t._v(" to return the ID of a given relation.")])]),t._v(" "),s("p",[t._v("Additionally, the constructor may be implemented to determine the default schema or default catalog names if they cannot be accessed directly throug the JDBC, or a different "),s("code",[t._v("QuotedIDFactory")]),t._v(" instance can be passed to the super-class to force ontop to generate quoted identifiers in a specific way.")]),t._v(" "),s("h3",{attrs:{id:"selectfromwhereserializer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#selectfromwhereserializer"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("SelectFromWhereSerializer")])])]),t._v(" "),s("p",[t._v("This class is responsible for the serialization of the SQL query frame. Different SQL dialects have different rules as to how the general shape of an SQL query have to be defined. For instance, some dialects allow users to combine "),s("code",[t._v("LIMIT")]),t._v(" and "),s("code",[t._v("OFFSET")]),t._v(" clauses as "),s("code",[t._v("LIMIT ,")]),t._v(", while others require the form "),s("code",[t._v("OFFSET LIMIT ")]),t._v(". The following shows a default implementation of a "),s("code",[t._v("SelectFromWhereSerializer")]),t._v(" to achieve the latter behaviour:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Singleton")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectSelectFromWhereSerializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultSelectFromWhereSerializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("implements")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SelectFromWhereSerializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Inject")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectSelectFromWhereSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultSQLTermSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("QuerySerialization")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serialize")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SelectFromWhereWithModifiers")]),t._v(" selectFromWhere"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBParameters")]),t._v(" dbParameters"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" selectFromWhere"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("acceptVisitor")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultRelationVisitingSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dbParameters"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getQuotedIDFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeLimitOffset")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("long")]),t._v(" limit"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("long")]),t._v(" offset"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("boolean")]),t._v(" noSortCondition"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"OFFSET %d LIMIT %d"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" offset"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limit"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{397:function(t,a,s){"use strict";s.r(a);var e=s(51),n=Object(e.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"support-a-new-database-system"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#support-a-new-database-system"}},[t._v("#")]),t._v(" Support a new database system")]),t._v(" "),s("p",[t._v("This page describes how Ontop can be extended to support a novel relational database system (RDBMS).")]),t._v(" "),s("p",[t._v("The following RDBMSs are currently supported:")]),t._v(" "),s("ul",[s("li",[t._v("DB2")]),t._v(" "),s("li",[t._v("MySQL / MariaDB")]),t._v(" "),s("li",[t._v("Oracle")]),t._v(" "),s("li",[t._v("PostgreSQL")]),t._v(" "),s("li",[t._v("SQL server")]),t._v(" "),s("li",[t._v("H2")]),t._v(" "),s("li",[t._v("Denodo")]),t._v(" "),s("li",[t._v("Dremio")]),t._v(" "),s("li",[t._v("Apache Spark SQL & Databricks")]),t._v(" "),s("li",[t._v("Teiid")]),t._v(" "),s("li",[t._v("Snowflake")]),t._v(" "),s("li",[t._v("Trino")]),t._v(" "),s("li",[t._v("Presto")]),t._v(" "),s("li",[t._v("Athena")]),t._v(" "),s("li",[t._v("Redshift")]),t._v(" "),s("li",[t._v("DuckDB")])]),t._v(" "),s("p",[t._v("It is relatively easy though to extend Ontop's source code in order to support an additional RDBMS, thanks to dependency injection.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("New: Guided Implementation")]),t._v(" "),s("p",[t._v("Ontop also provides a "),s("a",{attrs:{href:"https://github.com/ontop/dialect-factory-scaffolding",target:"_blank",rel:"noopener"}},[t._v("python tool"),s("OutboundLink")],1),t._v(" that automatically generates a large part of the required code end simplifies the process of developing support for new SQL dialects.")]),t._v(" "),s("p",[t._v("Using it minimizes the overhead for the implementation of new dialect support and allows you to test your code easily right away.")])]),t._v(" "),s("p",[s("em",[t._v("This page provides a detailed explanation of the key concepts that need to be implemented, and was updated with Ontop 5.0.2. For newer versions of Ontop, it may no longer be up-to-date.")])]),t._v(" "),s("h2",{attrs:{id:"required-implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#required-implementations"}},[t._v("#")]),t._v(" Required implementations")]),t._v(" "),s("p",[t._v("Two implementations must be provided, each for a different interface that already has a default (abstract) implementation.")]),t._v(" "),s("p",[t._v("These implementations dictate what the datatypes of the RDBMS are and how certain function symbols can be translated into the SQL dialect supported by the RDBMS.")]),t._v(" "),s("p",[t._v("The default implementation of each of these interfaces is often sufficient to handle many query operators and functions. As a result, only a few methods generally need to be overwritten,\nto account for specificities of the new SQL dialect.")]),t._v(" "),s("p",[t._v("The 2 required implementations are the DB function symbol factory and the DB datatype factory.")]),t._v(" "),s("h3",{attrs:{id:"db-function-symbol-factory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#db-function-symbol-factory"}},[t._v("#")]),t._v(" DB function symbol factory")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("DB function symbol factory")]),t._v(" provides function symbols\nwhich can be directly serialized into the target SQL dialect (e.g. "),s("code",[t._v("LENGTH")]),t._v(" or "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v("). This factory has methods for common operations with precise semantics (e.g. concatenating 3 string arguments in a null-rejecting manner).")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("DBFunctionSymbolFactory")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("AbstractSQLDBFunctionSymbolFactory")]),t._v(".")]),t._v(" "),s("p",[t._v("For instance, the DB function symbol factory for PostgreSQL within Ontop is the class "),s("code",[t._v("PostgreSQLDBFunctionSymbolFactory")]),t._v(".")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("This interface should not be confused with the "),s("code",[t._v("FunctionSymbolFactory")]),t._v(", which is in charge of constructing\nSPARQL function symbols and other function symbols that cannot be directly serialized into SQL.")])]),t._v(" "),s("p",[t._v("A basic template for this implementation is provided here:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectDBFunctionSymbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AbstractSQLDBFunctionSymbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Inject")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DuckDBDBFunctionSymbolFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectRegularFunctionTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTable")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Integer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectRegularFunctionTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTypeFactory")]),t._v(" dbTypeFactory "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getDBTypeFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),t._v(" abstractRootDBType "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" dbTypeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getAbstractRootDBType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Table")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Integer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" table "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("HashBasedTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("create")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDefaultRegularFunctionTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Changed Function Symbols -\n ------------------------------------------\n */")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTable")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("copyOf")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("table"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Implementations -\n ------------------------------------------\n */")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("In the template above, two code blocks are commented out. We will now look at each of them individually.")]),t._v(" "),s("h4",{attrs:{id:"changed-function-symbols"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#changed-function-symbols"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Changed Function Symbols")])]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("regular function table")]),t._v(" is a dictionary, that maps from function names to the function symbol instance it corresponds to. The abstract base classes we inherit from already define a default function symbol table that includes all commonly used SQL functions. In some cases, however, some of these default function symbols need to be changed. For these cases, new entries can be created in this block, to override existing, bad entries.")]),t._v(" "),s("p",[t._v("A popular example is the "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v(" function symbol. By default, it is created as a simple function with arity 0 of the form "),s("code",[t._v("CURRENT_TIMESTAMP()")]),t._v(". In some dialects, however, the current time is called without parentheses, simply in the form "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v(". In this case, we need to override the function symbol created by the default implementation, to not include parentheses:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBFunctionSymbol")]),t._v(" nowFunctionSymbol "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("WithoutParenthesesSimpleTypedDBFunctionSymbolImpl")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n CURRENT_TIMESTAMP_STR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbTypeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getDBDateTimestampType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ntable"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("put")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("CURRENT_TIMESTAMP_STR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" nowFunctionSymbol"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("The "),s("code",[t._v("CURRENT_TIMESTAMP")]),t._v(" function is now a "),s("code",[t._v("WithoutParenthesesSimpleTypedDBFunctionSymbol")]),t._v(", so when generating SQL queries, ontop will not include the parentheses. By putting this new function symbol into the table at the key "),s("code",[t._v("CURRENT_TIMESTAMP_STR")]),t._v(", we override the default behaviour that was put into the table by the default method.")]),t._v(" "),s("h4",{attrs:{id:"implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#implementations"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Implementations")])]),t._v(" "),s("p",[t._v("A set of serialization methods have been left abstract by the base classes. These "),s("em",[t._v("always")]),t._v(" have to be implemented for each new dialect.")]),t._v(" "),s("p",[t._v("All such methods share the same structure:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" serialize"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("FUNCTION_NAME"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Here, "),s("code",[t._v("terms")]),t._v(" is the list of arguments that were passed to the function, "),s("code",[t._v("termConverter")]),t._v(" ist a function that can be used to transform any given term into its SQL equivalent, and termFactory can be used to generate new terms that may be required for some functions.")]),t._v(" "),s("p",[t._v("We will now go through each of them and provide example implementations.")]),t._v(" "),s("p",[s("em",[s("strong",[t._v("Contains")])]),t._v(":")]),t._v(" "),s("p",[t._v("This function returns a boolean value, indicating whether a given string (argument 2) is included in a different string (argument 1). While some dialects have their own "),s("code",[t._v("CONTAINS")]),t._v(" functions, for others it may have to be implemented through a string search, like in this example:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeContains")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"(POSITION(%s IN %s) > 0)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("StrBefore")])]),t._v(":")]),t._v(" "),s("p",[t._v("This function returns the section of a given string (argument 1) before the first appearance of a given search string (argument 2). If the searched string is not contained in the base string, an empty string is returned instead. In many languages, this can be implemented using string search and substring methods.")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeStrBefore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" str "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" before "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SUBSTRING(%s,1,POSITION(%s IN %s)-1)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" before"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("StrAfter")])]),t._v(":")]),t._v(" "),s("p",[t._v("The opposite of "),s("code",[t._v("STRBEFORE")]),t._v(", this function returns the section of a given string (argument 1) "),s("em",[t._v("after")]),t._v(" the first appearance of a search string (argument 2). This function can be implemented similarly:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeStrBefore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" str "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" before "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SUBSTRING(%s, IF(POSITION(%s IN %s) != 0, POSITION(%s IN %s) + LENGTH(%s), 0))"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" after"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" after"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" after"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("Tz")])]),t._v(":\nThis function extracts the timezone part of a given timestamp. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeTz")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" str "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"(LPAD(EXTRACT(TIMEZONE_HOUR FROM %s)::text,2,'0') || ':' || LPAD(EXTRACT(TIMEZONE_MINUTE FROM %s)::text,2,'0'))\"")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("DateTimeNorm")])]),t._v(":\nThis function converts a given timestamp to the standardized "),s("code",[t._v("ISO 8601")]),t._v(" format. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeDateTimeNorm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TO_ISO8601(%s)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[s("em",[s("strong",[t._v("Hashing Functions")])]),t._v(":")]),t._v(" "),s("p",[t._v("Ontop supports a set of hasing functions:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("MD5")])]),t._v(" "),s("li",[s("code",[t._v("SHA1")])]),t._v(" "),s("li",[s("code",[t._v("SHA256")])]),t._v(" "),s("li",[s("code",[t._v("SHA384")])]),t._v(" "),s("li",[s("code",[t._v("SHA512")])])]),t._v(" "),s("p",[t._v("For each of them, the implementation of a serialization method is required. An example implementation of the "),s("code",[t._v("MD5")]),t._v(" function may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeMD5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Function")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableTerm")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"MD5(%s)"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" termConverter"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("terms"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p"),t._v(" "),s("p",[t._v("Other than the serialization methods, four additional methods must be implemented by the subclass:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getUUIDNameInDialect")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"[UUID_FUNCTION_NAME]"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("returns the string that represents the name of the UUID in the SQL dialect.")]),t._v(" "),s("p",[t._v("The methods "),s("code",[t._v("createNullRejectingDBConcat(int arity)")]),t._v(", "),s("code",[t._v("createDBConcatOperator(int arity)")]),t._v(", and "),s("code",[t._v("createRegularDBConcat(int arity)")]),t._v(" need to be implemented to define the concat function symbols. The "),s("code",[t._v("DBConcat")]),t._v(" methods define function symbols that represent "),s("code",[t._v("CONCAT")]),t._v(" function calls of a given arity. Sample implementations for them may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBConcatFunctionSymbol")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createRegularDBConcat")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NullToleratingDBConcatFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"CONCAT"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbStringType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBConcatFunctionSymbol")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNullRejectingDBConcat")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NullRejectingDBConcatFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"CONCAT_NO_NULL"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbStringType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("The "),s("code",[t._v("createDBConcatOperator(int arity)")]),t._v(" method represents a concat operation executed through a concat operator (often "),s("code",[t._v("+")]),t._v(" or "),s("code",[t._v("||")]),t._v("). It may be implemented like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBConcatFunctionSymbol")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDBConcatOperator")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("int")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NullRejectingDBConcatFunctionSymbol")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"||"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arity"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dbStringType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" abstractRootDBType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Serializers")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getOperatorSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"||"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"db-datatype-factory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#db-datatype-factory"}},[t._v("#")]),t._v(" DB Datatype factory")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("DB datatype factory")]),t._v(" declares the hierarchy of DB datatypes used by the DBMS, and specifies their correspondence with datatypes used in the RDF graphs (such as xsd datatypes).")]),t._v(" "),s("p",[t._v("The interface to implement (for SQL dialects) is "),s("code",[t._v("SQLDBTypeFactory")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("DefaultSQLDBTypeFactory")]),t._v(" .")]),t._v(" "),s("p",[t._v("For instance, the datatype factory for PostgreSQL within Ontop is the class "),s("code",[t._v("PostgreSQLDBTypeFactory")]),t._v(".")]),t._v(" "),s("p",[t._v("A basic template for this implementation is provided here:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectDBTypeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultSQLDBTypeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Type Definitions -\n ------------------------------------------\n */")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@AssistedInject")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectDBTypeFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Assisted")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermType")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Assisted")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermType")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Type Map -\n ------------------------------------------\n */")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableMap")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Code Map -\n ------------------------------------------\n */")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Support Flags -\n ------------------------------------------\n */")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("In the template above, four code blocks are commented out. We will now look at each of them individually.")]),t._v(" "),s("h4",{attrs:{id:"type-definitions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#type-definitions"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Type Definitions")])]),t._v(" "),s("p",[t._v("In this section, we define a set of "),s("code",[t._v("String")]),t._v(" constants that represent the names of datatypes in our SQL dialect. These constants are then used in other code blocks. An excerpt of the "),s("em",[t._v("type definitions")]),t._v(" part in an implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" BIT_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BIT"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" INT2_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INT2"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" INT4_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INT4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" INT8_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"INT8"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" FLOAT4_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"FLOAT4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" FLOAT8_STR "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"FLOAT8"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h4",{attrs:{id:"type-map"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#type-map"}},[t._v("#")]),t._v(" "),s("strong",[t._v("TYPE MAP")])]),t._v(" "),s("p",[t._v("In this method, we define the contents of the type map for our dialect. We create "),s("code",[t._v("DBTermType")]),t._v(" instances for each supported type and store them in a "),s("code",[t._v("Map")]),t._v(" object, that matches their identifiers to the "),s("code",[t._v("DBTermType")]),t._v(". The base class we extend from already generates an extensive type map for many popular types, such as "),s("code",[t._v("VARCHAR")]),t._v(", "),s("code",[t._v("INTEGER")]),t._v(", "),s("code",[t._v("REAL")]),t._v(", "),s("code",[t._v("DOUBLE")]),t._v(", and more in the method "),s("code",[t._v("createDefaultSQLTypeMap(...)")]),t._v(". New types can be added to the map in the subclass, and, alternatively, we can override existing entries in the map here. An example implementation of this method may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermType")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TypeFactory")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermTypeAncestry")]),t._v(" rootAncestry "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getAncestry")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBTermType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" map "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDefaultSQLTypeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rootTermType"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" typeFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h4",{attrs:{id:"code-map"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#code-map"}},[t._v("#")]),t._v(" "),s("strong",[t._v("CODE MAP")])]),t._v(" "),s("p",[t._v('The code map is a dictionary, that maps different type codes to their "default type" for the SQL dialect. This includes the following type codes:')]),t._v(" "),s("ul",[s("li",[s("code",[t._v("STRING")])]),t._v(" "),s("li",[s("code",[t._v("HEXBINARY")])]),t._v(" "),s("li",[s("code",[t._v("LARGE_INTEGER")])]),t._v(" "),s("li",[s("code",[t._v("DECIMAL")])]),t._v(" "),s("li",[s("code",[t._v("DOUBLE")])]),t._v(" "),s("li",[s("code",[t._v("BOOLEAN")])]),t._v(" "),s("li",[s("code",[t._v("DATE")])]),t._v(" "),s("li",[s("code",[t._v("TIME")])]),t._v(" "),s("li",[s("code",[t._v("DATETIMESTAMP")])]),t._v(" "),s("li",[s("code",[t._v("GEOMETRY")])]),t._v(" "),s("li",[s("code",[t._v("GEOGRAPHY")])]),t._v(" "),s("li",[s("code",[t._v("ARRAY")])]),t._v(" "),s("li",[s("code",[t._v("JSON")])])]),t._v(" "),s("p",[t._v("The default implementation already maps many of these to the name of the corresponding data type. To support additional ones, or to override existing mappings, this method can be implemented. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableMap")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createNewDialectCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Map")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" map "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createDefaultSQLCodeMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n \n map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("put")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultTypeCode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("JSON"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" JSONB_STR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableMap")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("copyOf")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("map"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h4",{attrs:{id:"support-flags"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#support-flags"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Support Flags")])]),t._v(" "),s("p",[t._v("An instance of "),s("code",[t._v("DBTypeFactory")]),t._v(" supports a set of methods that, when called, return a flag indicating if a certain SQL feature is supported by the dialect. These methods are")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("supportsDBGeometryType()")])]),t._v(" "),s("li",[s("code",[t._v("supportsDBGeographyType()")])]),t._v(" "),s("li",[s("code",[t._v("supportsDBDistanceSphere()")])]),t._v(" "),s("li",[s("code",[t._v("supportsJson()")])]),t._v(" "),s("li",[s("code",[t._v("supportsArrayType()")])])]),t._v(" "),s("p",[t._v("Any of these functions can be overridden by the "),s("code",[t._v("DBTypeFactory")]),t._v(" sub-class to return a boolean constant indicating if the type is supported.")]),t._v(" "),s("h4",{attrs:{id:"other-implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-implementations"}},[t._v("#")]),t._v(" "),s("strong",[t._v("Other Implementations")])]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("DBTypeFactory")]),t._v(" base-class supports further methods that can be included in sub-classes for fine-tuning. One popular set of such methods are the "),s("code",[t._v("LexicalValue")]),t._v(" methods. These return a "),s("code",[t._v("String")]),t._v(" constant that represents the lexical value the corresponding literal may assume. For instance, by default, the method "),s("code",[t._v("getDBFalseLexicalValue()")]),t._v(" returns the string "),s("code",[t._v('"FALSE"')]),t._v(", as this is a common representation of the boolean "),s("code",[t._v("false")]),t._v(" value in many SQL dialects. To implement the "),s("code",[t._v("DBTypeFactory")]),t._v(" for a dialect that instead uses the digit "),s("code",[t._v("0")]),t._v(" for "),s("code",[t._v("false")]),t._v(" literals, we could override the method like so:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getDBFalseLexicalValue")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"optional-implementations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#optional-implementations"}},[t._v("#")]),t._v(" Optional implementations")]),t._v(" "),s("p",[t._v("Additional implementations can be optionally provided in replacement of the default implementation.")]),t._v(" "),s("h3",{attrs:{id:"serializer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#serializer"}},[t._v("#")]),t._v(" Serializer")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("serializer")]),t._v(" dictates the general shape (SELECT-FROM-WHERE) of the SQL query.")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("SelectFromWhereSerializer")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("DefaultSelectFromWhereSerializer")]),t._v(".")]),t._v(" "),s("p",[t._v("For instance, the serializer for PostgreSQL within Ontop is the class "),s("code",[t._v("PostgresSelectFromWhereSerializer")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"normalizer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normalizer"}},[t._v("#")]),t._v(" Normalizer")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("normalizer")]),t._v(" addresses limitations of certain DBMSs (such as a non-canonical evaluation of the ORDER BY clause).")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("DialectExtraNormalizer")]),t._v("."),s("br"),t._v("\nAnd several implementations are already available, some of which are used by several DBMS.")]),t._v(" "),s("p",[t._v("For instance, the normalizer associated to PostgreSQL within Ontop is "),s("code",[t._v("OnlyInPresenceOfDistinctProjectOrderByTermsNormalizer")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"metadata-provider"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#metadata-provider"}},[t._v("#")]),t._v(" Metadata provider")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("metadata provider")]),t._v(" specifies how schema and integrity constraints (for instance primary keys) are retrieved from the DBMS.")]),t._v(" "),s("p",[t._v("The interface to implement is "),s("code",[t._v("MetadataProvider")]),t._v("."),s("br"),t._v("\nAnd the default implementation is "),s("code",[t._v("DefaultDBMetadataProvider")]),t._v(".")]),t._v(" "),s("p",[t._v("For instance, the metadata provider for PostgreSQL within Ontop is "),s("code",[t._v("PostgreSQLDBMetadataProvider")]),t._v(".")]),t._v(" "),s("h2",{attrs:{id:"declaring-an-implementation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#declaring-an-implementation"}},[t._v("#")]),t._v(" Declaring an implementation")]),t._v(" "),s("p",[t._v("All the implementations mentioned above can be declared in the property file "),s("code",[t._v("sql-default.properties")]),t._v(" (which can be found in the directory "),s("code",[t._v("it/unibz/inf/ontop/injection/")]),t._v(" of the "),s("code",[t._v("ontop-rdb")]),t._v(" module).")]),t._v(" "),s("p",[t._v("A key-value pair must be added for each of these implementations, where the key indicates the type of the implementation (serializer, function symbol factory, etc.), and the value is the implementation.")]),t._v(" "),s("p",[t._v("The naming scheme for the keys is the following."),s("br"),t._v("\nLet "),s("code",[t._v("")]),t._v(" be the name of the JDBC driver for the RDBMS (for instance, the JDBC driver for PostgreSQL is "),s("code",[t._v("org.postgresql.Driver")]),t._v("."),s("br"),t._v("\nThen the keys are:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("-serializer")]),t._v(" for a serializer")]),t._v(" "),s("li",[s("code",[t._v("-symbolFactory")]),t._v(" for a DB function symbol factory")]),t._v(" "),s("li",[s("code",[t._v("-typeFactory")]),t._v(" for a DB datatype factory")]),t._v(" "),s("li",[s("code",[t._v("-normalizer")]),t._v(" for a normalizer")]),t._v(" "),s("li",[s("code",[t._v("-metadataProvider")]),t._v(" for a metadata provider")])]),t._v(" "),s("p",[t._v("For instance, the key-value pairs declared for PostgreSQL are:")]),t._v(" "),s("div",{staticClass:"language-properties extra-class"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-serializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.serializer.impl.PostgresSelectFromWhereSerializer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-symbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.term.functionsymbol.db.impl.PostgreSQLDBFunctionSymbolFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-typeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.type.impl.PostgreSQLDBTypeFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-normalizer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.normalization.impl.OnlyInPresenceOfDistinctProjectOrderByTermsNormalizer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("org.postgresql.Driver-metadataProvider")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.dbschema.impl.PostgreSQLDBMetadataProvider")]),t._v("\n")])])]),s("p",[t._v("A basic set of key-value pairs may be:")]),t._v(" "),s("div",{staticClass:"language-properties extra-class"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-serializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.serializer.impl.DefaultSelectFromWhereSerializer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-symbolFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.term.functionsymbol.db.impl.NewDialectDBFunctionSymbolFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-typeFactory")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.model.type.impl.NewDialectDBTypeFactory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-normalizer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.generation.normalization.impl.OnlyInPresenceOfDistinctProjectOrderByTermsNormalizer")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("name.of.jdbc.Driver-metadataProvider")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("it.unibz.inf.ontop.dbschema.impl.DefaultSchemaCatalogDBMetadataProvider")]),t._v("\n")])])]),s("h2",{attrs:{id:"preparing-and-running-the-testcases"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#preparing-and-running-the-testcases"}},[t._v("#")]),t._v(" Preparing and Running the Testcases")]),t._v(" "),s("p",[t._v("Ontop currently uses a set of tests called "),s("code",[t._v("lightweight-tests")]),t._v(" to test all main ontop language support features on minimal databases. A simple way of testing the correctness of newly implemented dialect support is to run the same tests a database that uses the corresponding dialect.")]),t._v(" "),s("p",[t._v("This consists of the following steps:")]),t._v(" "),s("ol",[s("li",[t._v("Set up a database with the required testing conditions")]),t._v(" "),s("li",[t._v("Prepare files that assist the connection to the database")]),t._v(" "),s("li",[t._v("Implement sub-classes of the abstract lightweight test classes and run them")])]),t._v(" "),s("p",[t._v("In the following sections, we will discuss each of these steps.")]),t._v(" "),s("h3",{attrs:{id:"setting-up-the-database"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-the-database"}},[t._v("#")]),t._v(" Setting up the Database")]),t._v(" "),s("p",[t._v("The exact procedure of the database preparation depends on the database system. In ontop, we generally use docker images that reproduce the exact same database state for each test run so we can test the different dialects automatically.")]),t._v(" "),s("p",[t._v("Each directory inside "),s("code",[t._v("test/lightweight-tests/lightweight-db-test-images/")]),t._v(" corresponds to one docker image, and many of them contain table definitions in "),s("code",[t._v(".sql")]),t._v(" file. For instance, the "),s("code",[t._v("mysql")]),t._v(" directory contains the exact definitions of the three databases that are used for testing, "),s("code",[t._v("books")]),t._v(", "),s("code",[t._v("dbconstraints")]),t._v(", and "),s("code",[t._v("university")]),t._v(".")]),t._v(" "),s("p",[t._v("To prepare the required testing conditions, you can take these "),s("code",[t._v(".sql")]),t._v(" files and run their queries on your database. Should any of the features not be supported, you will be required to either use alternative equivalent features to reach the same final database state, or disable the corresponding test cases.")]),t._v(" "),s("h3",{attrs:{id:"preparing-connection-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#preparing-connection-files"}},[t._v("#")]),t._v(" Preparing Connection Files")]),t._v(" "),s("p",[t._v("The directory "),s("code",[t._v("test/lightweight-tests/src/test/resources/")]),t._v(" contains files that are used for setting up an ontop connection with different databases, including "),s("code",[t._v(".obda")]),t._v(" files for the VKG creation and "),s("code",[t._v(".property")]),t._v(" files for JDBC connections. While the "),s("code",[t._v(".obda")]),t._v(" files can usually be reused for different systems, the "),s("code",[t._v(".property")]),t._v(" files must be included for each database system. The directories "),s("code",[t._v("books")]),t._v(" and "),s("code",[t._v("prof")]),t._v(" inside the test resources contain one sub directory for each dialect, where each sub directory in turn includes one "),s("code",[t._v(".properties")]),t._v(" file for the JDBC connection. The "),s("code",[t._v("dbconstraints")]),t._v(" and "),s("code",[t._v("university")]),t._v(" directories, on the other hand, directly contain "),s("code",[t._v(".property")]),t._v(" files for each dialect.")]),t._v(" "),s("p",[t._v("To run all lightweight tests for a new dialect, the corresponding files and directories have to be creates for its JDBC connection. In particular, the connection files should be created in such a way, that the corresponding database/schema of the test is selected as the default database/schema, as the "),s("code",[t._v(".obda")]),t._v(" files access the tables through relative paths.")]),t._v(" "),s("h3",{attrs:{id:"implementing-the-lightweight-test-classes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#implementing-the-lightweight-test-classes"}},[t._v("#")]),t._v(" Implementing the Lightweight Test Classes")]),t._v(" "),s("p",[t._v("The directory "),s("code",[t._v("test/lightweight-tests/src/test/java/")]),t._v(" contains the test cases that have to run successfully for each new dialect. They are defined in the four abstract classes "),s("code",[t._v("AbstractBindTestWithFunctions")]),t._v(", "),s("code",[t._v("AbstractConstraintTest")]),t._v(", "),s("code",[t._v("AbstractDistinctInAggregateTest")]),t._v(", and "),s("code",[t._v("AbstractLeftJoinProfTest")]),t._v(".")]),t._v(" "),s("p",[t._v("For each new dialect, a new package has to be created at this location, containing the implementations of sub-classes for each of these abstract base classes.")]),t._v(" "),s("h4",{attrs:{id:"bindtestwithfunctions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#bindtestwithfunctions"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("BindTestWithFunctions")])])]),t._v(" "),s("p",[t._v("This test class tests all main SQL functions that are supported by ontop. It uses the "),s("code",[t._v("books")]),t._v(" database, as well as directly generated data through the SPARQL "),s("code",[t._v("BIND")]),t._v(" function. An example implementation of this class may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@NewDialectLightweightTest")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("BindWithFunctionsNewDialectTest")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AbstractBindTestWithFunctions")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" PROPERTIES_FILE "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/books/new-dialect/books-new-dialect.properties"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@BeforeAll")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("before")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("throws")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("IOException")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SQLException")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("initOBDA")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("OBDA_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" OWL_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" PROPERTIES_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@AfterAll")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("after")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("throws")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SQLException")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("release")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/*\n ------------------------------------------\n - Result Definitions -\n ------------------------------------------\n */")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("Using the "),s("code",[t._v("@NewDialectLightweightTest")]),t._v(" annotation requires the definition of the annotation in the same package, similarly to how it was defined for other dialects.")])]),t._v(" "),s("p",[t._v('The code block "Result Definitions" is commented out in the above example. This code block may contain redefinitions of expected results that are tested in the base class. To do this, override the '),s("code",[t._v("get[TEST-NAME]ExpectedValues()")]),t._v(" method here. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token generics"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getConstantIntegerDivideExpectedResults")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ImmutableList")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("of")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\"0.500\\"^^xsd:decimal"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Should any of the functionalities not be supported by the SQL dialect, then the corresponding test case may simply be disabled with an exaplanation as to why it is not supported. An example for that may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Disabled")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"New Dialect does not support SHA384"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Test")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("testHashSHA384")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("testHashSHA384")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Some test cases are disabled by default.")]),t._v(" "),s("h4",{attrs:{id:"constraint"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#constraint"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("Constraint")])])]),t._v(" "),s("p",[t._v("This set of test cases tests for the correct interpretation of integrity constraints in the data. It uses the "),s("code",[t._v("dbconstraints")]),t._v(" database. An example implementation may look like this:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@NewDialectLightweightTest")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ConstraintNewDialectTest")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("AbstractConstraintTest")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("static")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("final")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" PROPERTIES_FILE "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/dbconstraints/dbconstraints-new-dialect.properties"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ConstraintNewDialectTest")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" method"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("method"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" PROPERTIES_FILE"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Once again, specific tests may be disabled if they are not supported. For database systems that do not support integrity constraints, this class can be ignored.")]),t._v(" "),s("h4",{attrs:{id:"distinctinaggregate"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#distinctinaggregate"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("DistinctInAggregate")])])]),t._v(" "),s("p",[t._v("This set of test cases runs queries containing aggregate functions that include the "),s("code",[t._v("DISTINCT")]),t._v(" keyword. It can be implemented analogously to the "),s("code",[t._v("BindWithFunctions")]),t._v(" test class.")]),t._v(" "),s("h4",{attrs:{id:"leftjoinprof"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#leftjoinprof"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("LeftJoinProf")])])]),t._v(" "),s("p",[t._v("This set of test cases runs on the "),s("code",[t._v("university")]),t._v(" database. It accesses items that have to be taken from the database through "),s("code",[t._v("JOIN")]),t._v("s. Furthermore, it tests the optimization procedures employed by ontop to minimize the required number of joins. Once again, it can be implemented analogously to the "),s("code",[t._v("BindWithFunctions")]),t._v(" test class.")]),t._v(" "),s("p",[t._v("If the database management system does not support integrity constraints, many of these test cases will fail because the optimizations will not be performed.")]),t._v(" "),s("h2",{attrs:{id:"further-implementations-and-troubleshooting"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#further-implementations-and-troubleshooting"}},[t._v("#")]),t._v(" Further Implementations and Troubleshooting")]),t._v(" "),s("p",[t._v("Once the basic features and lightweight test cases have been implemented for a dialect, the tests can be run to determine which features still do not work correctly.")]),t._v(" "),s("p",[t._v("If a test case fails, its corresponding feature is likely not yet supported by the current implementation. In these cases, changes need to be applied to the implemented "),s("code",[t._v("DBTypeFactory")]),t._v(" or "),s("code",[t._v("DBFunctionSymbolFactory")]),t._v(" to solve the issue.")]),t._v(" "),s("p",[t._v("In some situations, however, issues may be caused by problems not related to database types or functions. In these cases, one of the following default implementations may also be extended for the new dialect.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("New implementations of these classes have to be linked to the driver through the "),s("code",[t._v("sql-default.properties")]),t._v(" file.")])]),t._v(" "),s("h3",{attrs:{id:"defaultschemacatalogdbmetadataprovider-defaultschemadbmetadataprovider-or-defaultdbmetadataprovider"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#defaultschemacatalogdbmetadataprovider-defaultschemadbmetadataprovider-or-defaultdbmetadataprovider"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("DefaultSchemaCatalogDBMetadataProvider")])]),t._v(", "),s("strong",[s("code",[t._v("DefaultSchemaDBMetadataProvider")])]),t._v(", or "),s("strong",[s("code",[t._v("DefaultDBMetadataProvider")])])]),t._v(" "),s("p",[t._v("If the "),s("code",[t._v("DBMetadataProvider")]),t._v(" assigned to the dialect is not able to perform its expected actions through its default implementation, it may have to be extended with a new sub-class that is particularly tailored for this dialect.")]),t._v(" "),s("p",[t._v("In that case, its methods may be overridden to change the default behavious. Commong targets include:")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("insertIntegrityConstraints(...)")]),t._v(" if the dialect does not support integrity constraints.")]),t._v(" "),s("li",[s("code",[t._v("getRelationId(...)")]),t._v(" to return the ID of a given relation.")])]),t._v(" "),s("p",[t._v("Additionally, the constructor may be implemented to determine the default schema or default catalog names if they cannot be accessed directly throug the JDBC, or a different "),s("code",[t._v("QuotedIDFactory")]),t._v(" instance can be passed to the super-class to force ontop to generate quoted identifiers in a specific way.")]),t._v(" "),s("h3",{attrs:{id:"selectfromwhereserializer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#selectfromwhereserializer"}},[t._v("#")]),t._v(" "),s("strong",[s("code",[t._v("SelectFromWhereSerializer")])])]),t._v(" "),s("p",[t._v("This class is responsible for the serialization of the SQL query frame. Different SQL dialects have different rules as to how the general shape of an SQL query have to be defined. For instance, some dialects allow users to combine "),s("code",[t._v("LIMIT")]),t._v(" and "),s("code",[t._v("OFFSET")]),t._v(" clauses as "),s("code",[t._v("LIMIT ,")]),t._v(", while others require the form "),s("code",[t._v("OFFSET LIMIT ")]),t._v(". The following shows a default implementation of a "),s("code",[t._v("SelectFromWhereSerializer")]),t._v(" to achieve the latter behaviour:")]),t._v(" "),s("div",{staticClass:"language-java extra-class"},[s("pre",{pre:!0,attrs:{class:"language-java"}},[s("code",[s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Singleton")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("class")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectSelectFromWhereSerializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("extends")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultSelectFromWhereSerializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("implements")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SelectFromWhereSerializer")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Inject")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("private")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("NewDialectSelectFromWhereSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("TermFactory")]),t._v(" termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("super")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultSQLTermSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("termFactory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("public")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("QuerySerialization")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serialize")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SelectFromWhereWithModifiers")]),t._v(" selectFromWhere"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DBParameters")]),t._v(" dbParameters"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" selectFromWhere"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("acceptVisitor")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DefaultRelationVisitingSerializer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dbParameters"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getQuotedIDFactory")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token annotation punctuation"}},[t._v("@Override")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("protected")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("serializeLimitOffset")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("long")]),t._v(" limit"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("long")]),t._v(" offset"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("boolean")]),t._v(" noSortCondition"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("String")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"OFFSET %d LIMIT %d"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" offset"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limit"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/20.8c67cb7d.js b/assets/js/20.e0fa11bb.js similarity index 97% rename from assets/js/20.8c67cb7d.js rename to assets/js/20.e0fa11bb.js index 2d042127c..334039905 100644 --- a/assets/js/20.8c67cb7d.js +++ b/assets/js/20.e0fa11bb.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{397:function(e,t,n){"use strict";n.r(t);var i=n(51),r=Object(i.a)({},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[n("h1",{attrs:{id:"debug-jetty"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#debug-jetty"}},[e._v("#")]),e._v(" Debug Jetty")]),e._v(" "),n("p",[e._v("This page describe debug Jetty with RDF4J workbench plugin in IntelliJ Idea")]),e._v(" "),n("h2",{attrs:{id:"start-the-jetty-in-debug-mode"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#start-the-jetty-in-debug-mode"}},[e._v("#")]),e._v(" Start the Jetty in Debug mode")]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[e._v("$ java -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n -jar start.jar\n")])])]),n("h2",{attrs:{id:"linking-with-intellij"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#linking-with-intellij"}},[e._v("#")]),e._v(" Linking with IntelliJ")]),e._v(" "),n("p",[e._v("Next we need to link the IntelliJ project with the deployed webapp.")]),e._v(" "),n("ol",[n("li",[n("p",[e._v('Within IntelliJ, open the project containing the webapp deployed into jetty that you want to debug. SelectRun -> Edit Configurations. Add a new configuration by clicking the "+" icon. Choose Remote. Make sure the port you choose is the same as the one you added in Enable remote debugging.')])]),e._v(" "),n("li",[n("p",[e._v("Next in your webapp you can set a breakpoint within a servlet which when it is tripped will halt the remote jvm's processing thread to await for debugging commands from your IntelliJ instance. To set a breakpoint, simply open the servlet or any other class you want to debug and click left to the line you want to set the breakpoint at (where the red dot is on the next screenshot). The red dot and red background on the line mark the breakpoint.")])]),e._v(" "),n("li",[n("p",[e._v("Accessing that servlet within your browser, pointed at your remote debug configurated jetty-distribution, should transition your IntelliJ instance to the standard debugger view.")])])]),e._v(" "),n("h2",{attrs:{id:"references"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#references"}},[e._v("#")]),e._v(" References")]),e._v(" "),n("ol",[n("li",[n("a",{attrs:{href:"http://www.eclipse.org/jetty/documentation/current/enable-remote-debugging.html",target:"_blank",rel:"noopener"}},[e._v("http://www.eclipse.org/jetty/documentation/current/enable-remote-debugging.html"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html",target:"_blank",rel:"noopener"}},[e._v("http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html"),n("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{396:function(e,t,n){"use strict";n.r(t);var i=n(51),r=Object(i.a)({},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[n("h1",{attrs:{id:"debug-jetty"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#debug-jetty"}},[e._v("#")]),e._v(" Debug Jetty")]),e._v(" "),n("p",[e._v("This page describe debug Jetty with RDF4J workbench plugin in IntelliJ Idea")]),e._v(" "),n("h2",{attrs:{id:"start-the-jetty-in-debug-mode"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#start-the-jetty-in-debug-mode"}},[e._v("#")]),e._v(" Start the Jetty in Debug mode")]),e._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[e._v("$ java -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n -jar start.jar\n")])])]),n("h2",{attrs:{id:"linking-with-intellij"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#linking-with-intellij"}},[e._v("#")]),e._v(" Linking with IntelliJ")]),e._v(" "),n("p",[e._v("Next we need to link the IntelliJ project with the deployed webapp.")]),e._v(" "),n("ol",[n("li",[n("p",[e._v('Within IntelliJ, open the project containing the webapp deployed into jetty that you want to debug. SelectRun -> Edit Configurations. Add a new configuration by clicking the "+" icon. Choose Remote. Make sure the port you choose is the same as the one you added in Enable remote debugging.')])]),e._v(" "),n("li",[n("p",[e._v("Next in your webapp you can set a breakpoint within a servlet which when it is tripped will halt the remote jvm's processing thread to await for debugging commands from your IntelliJ instance. To set a breakpoint, simply open the servlet or any other class you want to debug and click left to the line you want to set the breakpoint at (where the red dot is on the next screenshot). The red dot and red background on the line mark the breakpoint.")])]),e._v(" "),n("li",[n("p",[e._v("Accessing that servlet within your browser, pointed at your remote debug configurated jetty-distribution, should transition your IntelliJ instance to the standard debugger view.")])])]),e._v(" "),n("h2",{attrs:{id:"references"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#references"}},[e._v("#")]),e._v(" References")]),e._v(" "),n("ol",[n("li",[n("a",{attrs:{href:"http://www.eclipse.org/jetty/documentation/current/enable-remote-debugging.html",target:"_blank",rel:"noopener"}},[e._v("http://www.eclipse.org/jetty/documentation/current/enable-remote-debugging.html"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html",target:"_blank",rel:"noopener"}},[e._v("http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html"),n("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/26.d98cd04f.js b/assets/js/26.0de7f634.js similarity index 99% rename from assets/js/26.d98cd04f.js rename to assets/js/26.0de7f634.js index 76d644aa1..dfb5b5d62 100644 --- a/assets/js/26.d98cd04f.js +++ b/assets/js/26.0de7f634.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{403:function(e,t,s){"use strict";s.r(t);var a=s(51),n=Object(a.a)({},(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[s("h1",{attrs:{id:"known-issues"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#known-issues"}},[e._v("#")]),e._v(" Known issues")]),e._v(" "),s("div",{staticClass:"custom-block danger"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("THIS PAGE IS OUTDATED.")]),e._v(" "),s("p",[e._v("TODO: check these points and move them somewhere else if still relevant.")])]),e._v(" "),s("h2",{attrs:{id:"rdf"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#rdf"}},[e._v("#")]),e._v(" RDF")]),e._v(" "),s("ul",[s("li",[s("code",[e._v("GRAPH")]),e._v(" is not supported yet")])]),e._v(" "),s("h2",{attrs:{id:"sparql"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[e._v("#")]),e._v(" SPARQL")]),e._v(" "),s("ul",[s("li",[s("code",[e._v("ORDER BY")]),e._v(" doesn't support functions as parameters, accepts variables only. Example:")])]),e._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("SELECT")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("ORDER")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("BY")]),e._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("?o"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("SELECT")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("ORDER")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("BY")]),e._v(" xsd:"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("integer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("?o"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("SELECT")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("ORDER")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("BY")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("?o1 "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("+")]),e._v(" ?o2"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),s("ul",[s("li",[s("p",[s("code",[e._v("REGEX")]),e._v(" is not supported by MsSQL and DB2, while the other databases handle it differently: see [[Regex SPARQL filter]]")])]),e._v(" "),s("li",[s("p",[s("code",[e._v("URI")]),e._v(" with a hierarchical directory path of the form directory/directory/.../name are supported if we use them without prefix or with complete prefix. Example we can query "),s("code",[e._v("")]),e._v(" using it as it is or with a complete prefix as:")])])]),e._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[e._v("PREFIX bmwSection: http:"),s("span",{pre:!0,attrs:{class:"token comment"}},[e._v("//en.wikipedia.org/wiki/BMW_7_Series#section/")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("SELECT")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("*")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("WHERE")]),e._v(" {?x ?y bmwSection:help}\n")])])]),s("p",[e._v("It is not supported the form:")]),e._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[e._v("PREFIX bmw: http:"),s("span",{pre:!0,attrs:{class:"token comment"}},[e._v("//en.wikipedia.org/wiki/BMW_7_Series#")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("SELECT")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("*")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("WHERE")]),e._v(" {?x ?y bmw:section"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("/")]),e._v("help}\n")])])]),s("ul",[s("li",[e._v("No support for cast functions (e.g. xsd:string(...), xsd:integer(...) ).")]),e._v(" "),s("li",[s("code",[e._v("REPLACE")]),e._v(" function is supported with some limitations based on the database used. See [[Replace SPARQL filter]].")]),e._v(" "),s("li",[e._v("Do not use "),s("code",[e._v("SELECT Expressions")]),e._v(" with more variable declarations, use the correspondant version with BIND. Example:\nInstead of:")])]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("SELECT ?title (?p AS ?fullPrice) (?fullPrice*?discount) AS ?customerPrice)\n{ ?x ns:price ?p .\n ?x dc:title ?title . \n ?x ns:discount ?discount .\n}\n")])])]),s("p",[e._v("Use:")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("SELECT ?title (?fullPrice*?discount) AS ?customerPrice)\n{ \n ?x dc:title ?title . \n ?x ns:discount ?discount .\n BIND (?p AS ?fullPrice)\n ?x ns:price ?fullPrice .\n}\n")])])]),s("ul",[s("li",[e._v("Hash functions in oracle are supported only if DBMS_CRYPTO is enabled by the DBA.")]),e._v(" "),s("li",[s("code",[e._v("Hash")]),e._v(", "),s("code",[e._v("timezone")]),e._v(" and "),s("code",[e._v("uiid")]),e._v(" functions are supported based on the database see [[OntopSPARQLFunctions |Supported Sparql Functions]] for more information.")]),e._v(" "),s("li",[e._v("Using Oracle "),s("code",[e._v("strBefore")]),e._v(" and "),s("code",[e._v("strAfter")]),e._v(" SPARQL functions return null instead of an empty string when no result has been found.")]),e._v(" "),s("li",[s("code",[e._v("IF")]),e._v(", "),s("code",[e._v("COALESCE")]),e._v(", "),s("code",[e._v("EXISTS")]),e._v(", "),s("code",[e._v("NOT EXISTS")]),e._v(", "),s("code",[e._v("IN")]),e._v(", "),s("code",[e._v("NOT IN")]),e._v(", "),s("code",[e._v("STRDT")]),e._v(", "),s("code",[e._v("timezone")]),e._v(" and "),s("code",[e._v("SHA384")]),e._v(" functions are not supported .")])]),e._v(" "),s("h2",{attrs:{id:"mapping"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[e._v("#")]),e._v(" Mapping")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Are Bnodes supported in the mapping?")])]),e._v(" "),s("h2",{attrs:{id:"owl-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#owl-api"}},[e._v("#")]),e._v(" OWL API")]),e._v(" "),s("ul",[s("li",[s("p",[s("code",[e._v("Implementation")]),e._v(" of most OWLReasoner methods is missing.")])]),e._v(" "),s("li",[s("p",[s("code",[e._v("Symbol @")]),e._v(' When we pass a literal to the OWL API, if it finds an "@" it will interpret it as a language tag. The OWL API says:')])])]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("\"If the datatype is rdf:PlainLiteral, and the lexical value contains\na language tag then the language tag will be parsed out of the lexical value. For example, \"abc@en\"^^rdf:PlainLiteral would be parsed into a lexical value of 'abc' and a language tag of 'en'. \"\n")])])]),s("p",[e._v("Thus, if one expects such symbols in an object property the best solutions are:")]),e._v(" "),s("ol",[s("li",[e._v("cast the object to string in the mapping")]),e._v(" "),s("li",[e._v("replace the @ in the query with @.")])]),e._v(" "),s("h2",{attrs:{id:"databases-and-sql"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#databases-and-sql"}},[e._v("#")]),e._v(" Databases and SQL")]),e._v(" "),s("ul",[s("li",[s("code",[e._v("Registered Keywords")]),e._v(" - when you have a column name that is also a registered DBMS keyword, you should enclose that column name in quotes. Supported common keywords are: cast, do, extract, first, following, last, materialized, nulls, partition, range, row, rows, siblings, value, xml.")]),e._v(" "),s("li",[s("code",[e._v("ORDER BY")]),e._v(" in H2: in presence of an Union, the last version of H2 (1.4.), it orders both subqueries independently of each other giving wrong results. See SPARQL-compliance test offset-1")]),e._v(" "),s("li",[s("code",[e._v("UNOPTIMIZED SQL OPERATORS/FUNCTIONS")]),e._v(": MIN/MAX, CASE, WHEN clause, DATE FUNCTIONS, NESTED SELECTS, MATCHES, RIGHT/FULL/SELF/CARTESIAN JOIN, SUBJOIN, ALL, ANY, UNION, INTERSECT, MINUM and EXCEPT: Unoptimized sql operators will be transformed in view and generate a result.")]),e._v(" "),s("li",[s("code",[e._v("UNSUPPORTED SQL OPERATORS")]),e._v(": EXISTS, UNIQUE, TOP")]),e._v(" "),s("li",[s("code",[e._v("REGEX OPERATOR")]),e._v(" is not supported by MsSQL and DB2, while the other databases handle it differently")])]),e._v(" "),s("h2",{attrs:{id:"r2rml-mappings"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#r2rml-mappings"}},[e._v("#")]),e._v(" R2RML mappings")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Are Bnodes supported in the mapping?")])]),e._v(" "),s("ul",[s("li",[e._v("no support for "),s("code",[e._v("inverseExpression")])]),e._v(" "),s("li",[e._v("predicate cannot be uritemplate (column reference or template declaration)")]),e._v(" "),s("li",[e._v("object cannot be uritemplate (column reference or template declaration) when predicate is rdf:type")]),e._v(" "),s("li",[e._v("no support for "),s("code",[e._v("bnode")]),e._v(" in Ontop")]),e._v(" "),s("li",[e._v("no support for "),s("code",[e._v("sqlversion")])]),e._v(" "),s("li",[e._v("no support for "),s("code",[e._v("graphMaps")]),e._v(" (hence context graphs)")]),e._v(" "),s("li",[e._v("bnode naming is arbitrary")]),e._v(" "),s("li",[e._v('constant type objects are returned as simple literal. Constant-valued term maps are not considered as having a term type, and specifying rr:termType on these term maps has no effect.\nFor example we return "2011-01-04T00:00:00.0"\ninstead of "2011-01-04T00:00:00.0"^^xsd:dateTime')])]),e._v(" "),s("p",[e._v("The current state of the W3C R2RML compliance tests could be seen [[W3C-R2RML-Compliance| here]]")]),e._v(" "),s("h2",{attrs:{id:"ontop-bootstrapper"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ontop-bootstrapper"}},[e._v("#")]),e._v(" Ontop Bootstrapper")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Are Bnodes supported in the mapping?")])]),e._v(" "),s("ul",[s("li",[e._v("The BNode syntax generated by Ontop bootstrapper cannot be processed by Ontop")]),e._v(" "),s("li",[e._v("Foreign keys on multiple columns are not supported")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{406:function(e,t,s){"use strict";s.r(t);var a=s(51),n=Object(a.a)({},(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[s("h1",{attrs:{id:"known-issues"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#known-issues"}},[e._v("#")]),e._v(" Known issues")]),e._v(" "),s("div",{staticClass:"custom-block danger"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("THIS PAGE IS OUTDATED.")]),e._v(" "),s("p",[e._v("TODO: check these points and move them somewhere else if still relevant.")])]),e._v(" "),s("h2",{attrs:{id:"rdf"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#rdf"}},[e._v("#")]),e._v(" RDF")]),e._v(" "),s("ul",[s("li",[s("code",[e._v("GRAPH")]),e._v(" is not supported yet")])]),e._v(" "),s("h2",{attrs:{id:"sparql"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[e._v("#")]),e._v(" SPARQL")]),e._v(" "),s("ul",[s("li",[s("code",[e._v("ORDER BY")]),e._v(" doesn't support functions as parameters, accepts variables only. Example:")])]),e._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("SELECT")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("ORDER")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("BY")]),e._v(" str"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("?o"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("SELECT")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("ORDER")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("BY")]),e._v(" xsd:"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("integer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("?o"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("SELECT")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("ORDER")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("BY")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("?o1 "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("+")]),e._v(" ?o2"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),s("ul",[s("li",[s("p",[s("code",[e._v("REGEX")]),e._v(" is not supported by MsSQL and DB2, while the other databases handle it differently: see [[Regex SPARQL filter]]")])]),e._v(" "),s("li",[s("p",[s("code",[e._v("URI")]),e._v(" with a hierarchical directory path of the form directory/directory/.../name are supported if we use them without prefix or with complete prefix. Example we can query "),s("code",[e._v("")]),e._v(" using it as it is or with a complete prefix as:")])])]),e._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[e._v("PREFIX bmwSection: http:"),s("span",{pre:!0,attrs:{class:"token comment"}},[e._v("//en.wikipedia.org/wiki/BMW_7_Series#section/")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("SELECT")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("*")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("WHERE")]),e._v(" {?x ?y bmwSection:help}\n")])])]),s("p",[e._v("It is not supported the form:")]),e._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[e._v("PREFIX bmw: http:"),s("span",{pre:!0,attrs:{class:"token comment"}},[e._v("//en.wikipedia.org/wiki/BMW_7_Series#")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("SELECT")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("*")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("WHERE")]),e._v(" {?x ?y bmw:section"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("/")]),e._v("help}\n")])])]),s("ul",[s("li",[e._v("No support for cast functions (e.g. xsd:string(...), xsd:integer(...) ).")]),e._v(" "),s("li",[s("code",[e._v("REPLACE")]),e._v(" function is supported with some limitations based on the database used. See [[Replace SPARQL filter]].")]),e._v(" "),s("li",[e._v("Do not use "),s("code",[e._v("SELECT Expressions")]),e._v(" with more variable declarations, use the correspondant version with BIND. Example:\nInstead of:")])]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("SELECT ?title (?p AS ?fullPrice) (?fullPrice*?discount) AS ?customerPrice)\n{ ?x ns:price ?p .\n ?x dc:title ?title . \n ?x ns:discount ?discount .\n}\n")])])]),s("p",[e._v("Use:")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("SELECT ?title (?fullPrice*?discount) AS ?customerPrice)\n{ \n ?x dc:title ?title . \n ?x ns:discount ?discount .\n BIND (?p AS ?fullPrice)\n ?x ns:price ?fullPrice .\n}\n")])])]),s("ul",[s("li",[e._v("Hash functions in oracle are supported only if DBMS_CRYPTO is enabled by the DBA.")]),e._v(" "),s("li",[s("code",[e._v("Hash")]),e._v(", "),s("code",[e._v("timezone")]),e._v(" and "),s("code",[e._v("uiid")]),e._v(" functions are supported based on the database see [[OntopSPARQLFunctions |Supported Sparql Functions]] for more information.")]),e._v(" "),s("li",[e._v("Using Oracle "),s("code",[e._v("strBefore")]),e._v(" and "),s("code",[e._v("strAfter")]),e._v(" SPARQL functions return null instead of an empty string when no result has been found.")]),e._v(" "),s("li",[s("code",[e._v("IF")]),e._v(", "),s("code",[e._v("COALESCE")]),e._v(", "),s("code",[e._v("EXISTS")]),e._v(", "),s("code",[e._v("NOT EXISTS")]),e._v(", "),s("code",[e._v("IN")]),e._v(", "),s("code",[e._v("NOT IN")]),e._v(", "),s("code",[e._v("STRDT")]),e._v(", "),s("code",[e._v("timezone")]),e._v(" and "),s("code",[e._v("SHA384")]),e._v(" functions are not supported .")])]),e._v(" "),s("h2",{attrs:{id:"mapping"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[e._v("#")]),e._v(" Mapping")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Are Bnodes supported in the mapping?")])]),e._v(" "),s("h2",{attrs:{id:"owl-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#owl-api"}},[e._v("#")]),e._v(" OWL API")]),e._v(" "),s("ul",[s("li",[s("p",[s("code",[e._v("Implementation")]),e._v(" of most OWLReasoner methods is missing.")])]),e._v(" "),s("li",[s("p",[s("code",[e._v("Symbol @")]),e._v(' When we pass a literal to the OWL API, if it finds an "@" it will interpret it as a language tag. The OWL API says:')])])]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("\"If the datatype is rdf:PlainLiteral, and the lexical value contains\na language tag then the language tag will be parsed out of the lexical value. For example, \"abc@en\"^^rdf:PlainLiteral would be parsed into a lexical value of 'abc' and a language tag of 'en'. \"\n")])])]),s("p",[e._v("Thus, if one expects such symbols in an object property the best solutions are:")]),e._v(" "),s("ol",[s("li",[e._v("cast the object to string in the mapping")]),e._v(" "),s("li",[e._v("replace the @ in the query with @.")])]),e._v(" "),s("h2",{attrs:{id:"databases-and-sql"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#databases-and-sql"}},[e._v("#")]),e._v(" Databases and SQL")]),e._v(" "),s("ul",[s("li",[s("code",[e._v("Registered Keywords")]),e._v(" - when you have a column name that is also a registered DBMS keyword, you should enclose that column name in quotes. Supported common keywords are: cast, do, extract, first, following, last, materialized, nulls, partition, range, row, rows, siblings, value, xml.")]),e._v(" "),s("li",[s("code",[e._v("ORDER BY")]),e._v(" in H2: in presence of an Union, the last version of H2 (1.4.), it orders both subqueries independently of each other giving wrong results. See SPARQL-compliance test offset-1")]),e._v(" "),s("li",[s("code",[e._v("UNOPTIMIZED SQL OPERATORS/FUNCTIONS")]),e._v(": MIN/MAX, CASE, WHEN clause, DATE FUNCTIONS, NESTED SELECTS, MATCHES, RIGHT/FULL/SELF/CARTESIAN JOIN, SUBJOIN, ALL, ANY, UNION, INTERSECT, MINUM and EXCEPT: Unoptimized sql operators will be transformed in view and generate a result.")]),e._v(" "),s("li",[s("code",[e._v("UNSUPPORTED SQL OPERATORS")]),e._v(": EXISTS, UNIQUE, TOP")]),e._v(" "),s("li",[s("code",[e._v("REGEX OPERATOR")]),e._v(" is not supported by MsSQL and DB2, while the other databases handle it differently")])]),e._v(" "),s("h2",{attrs:{id:"r2rml-mappings"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#r2rml-mappings"}},[e._v("#")]),e._v(" R2RML mappings")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Are Bnodes supported in the mapping?")])]),e._v(" "),s("ul",[s("li",[e._v("no support for "),s("code",[e._v("inverseExpression")])]),e._v(" "),s("li",[e._v("predicate cannot be uritemplate (column reference or template declaration)")]),e._v(" "),s("li",[e._v("object cannot be uritemplate (column reference or template declaration) when predicate is rdf:type")]),e._v(" "),s("li",[e._v("no support for "),s("code",[e._v("bnode")]),e._v(" in Ontop")]),e._v(" "),s("li",[e._v("no support for "),s("code",[e._v("sqlversion")])]),e._v(" "),s("li",[e._v("no support for "),s("code",[e._v("graphMaps")]),e._v(" (hence context graphs)")]),e._v(" "),s("li",[e._v("bnode naming is arbitrary")]),e._v(" "),s("li",[e._v('constant type objects are returned as simple literal. Constant-valued term maps are not considered as having a term type, and specifying rr:termType on these term maps has no effect.\nFor example we return "2011-01-04T00:00:00.0"\ninstead of "2011-01-04T00:00:00.0"^^xsd:dateTime')])]),e._v(" "),s("p",[e._v("The current state of the W3C R2RML compliance tests could be seen [[W3C-R2RML-Compliance| here]]")]),e._v(" "),s("h2",{attrs:{id:"ontop-bootstrapper"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ontop-bootstrapper"}},[e._v("#")]),e._v(" Ontop Bootstrapper")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Are Bnodes supported in the mapping?")])]),e._v(" "),s("ul",[s("li",[e._v("The BNode syntax generated by Ontop bootstrapper cannot be processed by Ontop")]),e._v(" "),s("li",[e._v("Foreign keys on multiple columns are not supported")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/27.906526eb.js b/assets/js/27.1d29815b.js similarity index 95% rename from assets/js/27.906526eb.js rename to assets/js/27.1d29815b.js index c1a7d7e88..7f8c8ebb0 100644 --- a/assets/js/27.906526eb.js +++ b/assets/js/27.1d29815b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{404:function(t,s,a){"use strict";a.r(s);var e=a(51),r=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"statistics"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#statistics"}},[t._v("#")]),t._v(" Statistics")]),t._v(" "),a("h2",{attrs:{id:"downloads"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#downloads"}},[t._v("#")]),t._v(" Downloads")]),t._v(" "),a("h3",{attrs:{id:"github-releases"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#github-releases"}},[t._v("#")]),t._v(" Github releases")]),t._v(" "),a("p",[t._v("For all the versions 4.x:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" -H "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Accept: application/vnd.github.v3+json"')]),t._v(" https://api.github.com/repos/ontop/ontop/releases "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" jq "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'[.[] | select((.tag_name | startswith(\"ontop-4.\"))) | .assets[] | .download_count ] | add'")]),t._v(" \n")])])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{403:function(t,s,a){"use strict";a.r(s);var e=a(51),r=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"statistics"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#statistics"}},[t._v("#")]),t._v(" Statistics")]),t._v(" "),a("h2",{attrs:{id:"downloads"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#downloads"}},[t._v("#")]),t._v(" Downloads")]),t._v(" "),a("h3",{attrs:{id:"github-releases"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#github-releases"}},[t._v("#")]),t._v(" Github releases")]),t._v(" "),a("p",[t._v("For all the versions 4.x:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" -H "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Accept: application/vnd.github.v3+json"')]),t._v(" https://api.github.com/repos/ontop/ontop/releases "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" jq "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'[.[] | select((.tag_name | startswith(\"ontop-4.\"))) | .assets[] | .download_count ] | add'")]),t._v(" \n")])])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/28.2b7b77b2.js b/assets/js/28.2770c070.js similarity index 99% rename from assets/js/28.2b7b77b2.js rename to assets/js/28.2770c070.js index 5e155784a..cf225554c 100644 --- a/assets/js/28.2b7b77b2.js +++ b/assets/js/28.2770c070.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{405:function(e,a,t){"use strict";t.r(a);var r=t(51),n=Object(r.a)({},(function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"introduction"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[e._v("#")]),e._v(" Introduction")]),e._v(" "),t("p",[e._v("Ontop is a Virtual Knowledge Graph system.\nIt exposes the content of arbitrary relational databases as knowledge graphs. These graphs are virtual, which means that data remains in the data sources instead of being moved to another database.")]),e._v(" "),t("p",[e._v("Ontop translates "),t("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[e._v("SPARQL queries"),t("OutboundLink")],1),e._v(" expressed over the knowledge graphs into SQL queries executed by the relational data sources. It relies on "),t("a",{attrs:{href:"https://www.w3.org/TR/r2rml/",target:"_blank",rel:"noopener"}},[e._v("R2RML mappings"),t("OutboundLink")],1),e._v(" and can take advantage of lightweight ontologies.")]),e._v(" "),t("h2",{attrs:{id:"versions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#versions"}},[e._v("#")]),e._v(" Versions")]),e._v(" "),t("p",[e._v("This documentation is for Ontop 3.0 and more recent versions.")]),e._v(" "),t("p",[e._v("For earlier versions, please refer to "),t("a",{attrs:{href:"https://github.com/ontop/ontop/wiki",target:"_blank",rel:"noopener"}},[e._v("our previous Wiki"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("Most recent version:")]),e._v(" "),t("ul",[t("li",[e._v("Stable: Ontop 5.1.2, released on January 17, 2024.")])]),e._v(" "),t("p",[e._v("See "),t("a",{attrs:{href:"/guide/releases"}},[e._v("release notes")]),e._v(" for more details.")]),e._v(" "),t("h2",{attrs:{id:"main-features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#main-features"}},[e._v("#")]),e._v(" Main features")]),e._v(" "),t("ul",[t("li",[e._v("Uses "),t("a",{attrs:{href:"/guide/compliance#rdf-1-1"}},[e._v("RDF 1.1")]),e._v(" as graph data model")]),e._v(" "),t("li",[e._v("Supports RDFS and OWL 2 QL ontologies")]),e._v(" "),t("li",[e._v("Supports "),t("a",{attrs:{href:"/guide/compliance#r2rml"}},[e._v("R2RML")]),e._v(" and Ontop mappings")]),e._v(" "),t("li",[e._v("Supports "),t("a",{attrs:{href:"/guide/compliance#sparql-1-1"}},[e._v("the majority of SPARQL 1.1 features")]),e._v(", including the main SPARQL aggregation functions (since 4.0.0) and "),t("a",{attrs:{href:"/guide/compliance#geosparql-1-0"}},[e._v("GeoSPARQL functions")]),e._v(" (since 4.1.0)")]),e._v(" "),t("li",[e._v("Can be deployed as "),t("a",{attrs:{href:"/guide/cli#ontop-endpoint"}},[e._v("a SPARQL endpoint")]),e._v(" and as "),t("a",{attrs:{href:"/guide/advanced/predefined"}},[e._v("a predefined query endpoint")]),e._v(" (since 4.1.0)")]),e._v(" "),t("li",[e._v("Produces efficient SQL queries by applying many optimizations")]),e._v(" "),t("li",[e._v("Supports the main database systems: "),t("a",{attrs:{href:"/guide/databases/postgres"}},[e._v("PostgreSQL")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/mysql"}},[e._v("MySQL")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/mariadb"}},[e._v("MariaDB")]),e._v(" (since 5.0.0), "),t("a",{attrs:{href:"/guide/databases/mssql"}},[e._v("SQL Server")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/oracle"}},[e._v("Oracle")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/db2"}},[e._v("DB2")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/snowflake"}},[e._v("Snowflake")]),e._v(" (since 5.0.0), "),t("a",{attrs:{href:"/guide/databases/databricks"}},[e._v("Databricks")]),e._v(" (since 5.0.0), "),t("a",{attrs:{href:"/guide/databases/bigquery"}},[e._v("Google BigQuery")]),e._v(" (since 5.0.2), "),t("a",{attrs:{href:"/guide/databases/redshift"}},[e._v("AWS Redshift")]),e._v(" (since 5.0.2), "),t("a",{attrs:{href:"/guide/databases/duckdb"}},[e._v("DuckDB")]),e._v(" (since 5.0.2), and "),t("a",{attrs:{href:"/guide/databases/dynamodb"}},[e._v("AWS DynamoDB")]),e._v(" (since 5.1.0)")]),e._v(" "),t("li",[e._v("Supports database federators such as "),t("a",{attrs:{href:"/guide/databases/denodo"}},[e._v("Denodo")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/dremio"}},[e._v("Dremio")]),e._v(" (since 4.1.0), Teiid (since 4.1.1), "),t("a",{attrs:{href:"/guide/databases/spark"}},[e._v("Apache Spark")]),e._v(" (since 4.2.0) and "),t("a",{attrs:{href:"/guide/databases/trino"}},[e._v("Trino")]),e._v(" / "),t("a",{attrs:{href:"/guide/databases/presto"}},[e._v("PrestoDB")]),e._v(" / "),t("a",{attrs:{href:"/guide/databases/athena"}},[e._v("AWS Athena")]),e._v(" (since 5.0.2)")]),e._v(" "),t("li",[e._v("Supports "),t("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")]),e._v(' which are "virtual views" specified outside of the data sources (since 4.2.0)')]),e._v(" "),t("li",[e._v("Can "),t("a",{attrs:{href:"/guide/cli#ontop-materialize"}},[e._v("materialize")]),e._v(" virtual graphs into RDF files")]),e._v(" "),t("li",[e._v("Provides a plugin for editing and testing mappings in the "),t("a",{attrs:{href:"https://protege.stanford.edu/",target:"_blank",rel:"noopener"}},[e._v("Protégé ontology editor"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"organizations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#organizations"}},[e._v("#")]),e._v(" Organizations")]),e._v(" "),t("p",[e._v("Ontop is backed by the "),t("a",{attrs:{href:"https://www.inf.unibz.it/krdb/in2data/",target:"_blank",rel:"noopener"}},[e._v("Free University of Bozen-Bolzano"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"https://ontopic.ai",target:"_blank",rel:"noopener"}},[e._v("Ontopic s.r.l."),t("OutboundLink")],1),e._v(". It also receives regular important contributions from "),t("a",{attrs:{href:"https://www.uib.no",target:"_blank",rel:"noopener"}},[e._v("University of Bergen"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"http://www.bbk.ac.uk/",target:"_blank",rel:"noopener"}},[e._v("Birkbeck, University of London"),t("OutboundLink")],1),e._v(". See the "),t("a",{attrs:{href:"/community"}},[e._v("community section")]),e._v(" for more details.")]),e._v(" "),t("h2",{attrs:{id:"licenses"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#licenses"}},[e._v("#")]),e._v(" Licenses")]),e._v(" "),t("p",[e._v("Ontop is available under the "),t("a",{attrs:{href:"https://www.apache.org/licenses/LICENSE-2.0",target:"_blank",rel:"noopener"}},[e._v("Apache 2.0"),t("OutboundLink")],1),e._v(" license.")]),e._v(" "),t("p",[e._v("All the documentation is licensed under the\n"),t("a",{attrs:{href:"http://creativecommons.org/licenses/by/4.0/",target:"_blank",rel:"noopener"}},[e._v("Creative Commons (Attribution)"),t("OutboundLink")],1),e._v("\nlicense.")]),e._v(" "),t("h2",{attrs:{id:"social"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#social"}},[e._v("#")]),e._v(" Social")]),e._v(" "),t("p",[e._v("You can find us on the following social platforms:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://twitter.com/ontop4obda",target:"_blank",rel:"noopener"}},[e._v("Twitter (ontop4obda)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{rel:"me",href:"https://fosstodon.org/@ontop"}},[e._v("Mastodon (@ontop@fosstodon.org)")])]),e._v(" "),t("li",[t("a",{attrs:{href:"https://www.facebook.com/obdaontop/",target:"_blank",rel:"noopener"}},[e._v("Facebook (obdaontop)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://groups.google.com/forum/#!forum/ontop4obda",target:"_blank",rel:"noopener"}},[e._v("Google Group (ontop4obda)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/ontop/ontop/",target:"_blank",rel:"noopener"}},[e._v("GitHub (ontop/ontop)"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"citations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#citations"}},[e._v("#")]),e._v(" Citations")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("If you use Ontop in your work, please cite one of the following articles describing the system.")]),e._v(" "),t("ul",[t("li",[e._v("Guohui Xiao, Davide Lanti, Roman Kontchakov, Sarah Komla-Ebri, Elem Güzel-Kalayci, Linfang Ding, Julien Corman, Benjamin Cogrel, Diego Calvanese, and Elena Botoeva. "),t("a",{attrs:{href:"https://research.bcgl.fr/pdfs/ontop-iswc20.pdf",target:"_blank",rel:"noopener"}},[e._v("The Virtual Knowledge Graph System Ontop"),t("OutboundLink")],1),e._v(". In: International Semantic Web Conference (Resource Track), 2020.")]),e._v(" "),t("li",[e._v("Diego Calvanese, Benjamin Cogrel, Sarah Komla-Ebri, Roman Kontchakov, Davide Lanti, Martin Rezk, Mariano Rodriguez-Muro, and Guohui Xiao. "),t("a",{attrs:{href:"http://www.semantic-web-journal.net/content/ontop-answering-sparql-queries-over-relational-databases-1",target:"_blank",rel:"noopener"}},[e._v("Ontop: Answering SPARQL Queries over Relational Databases"),t("OutboundLink")],1),e._v(". In: Semantic Web Journal 8.3 (2017), pp. 471–487.")])])]),e._v(" "),t("li",[t("p",[e._v("If you want to cite the techniques behind Ontop, check "),t("a",{attrs:{href:"/research/publications"}},[e._v("our publications")]),e._v(".")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{404:function(e,a,t){"use strict";t.r(a);var r=t(51),n=Object(r.a)({},(function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"introduction"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[e._v("#")]),e._v(" Introduction")]),e._v(" "),t("p",[e._v("Ontop is a Virtual Knowledge Graph system.\nIt exposes the content of arbitrary relational databases as knowledge graphs. These graphs are virtual, which means that data remains in the data sources instead of being moved to another database.")]),e._v(" "),t("p",[e._v("Ontop translates "),t("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[e._v("SPARQL queries"),t("OutboundLink")],1),e._v(" expressed over the knowledge graphs into SQL queries executed by the relational data sources. It relies on "),t("a",{attrs:{href:"https://www.w3.org/TR/r2rml/",target:"_blank",rel:"noopener"}},[e._v("R2RML mappings"),t("OutboundLink")],1),e._v(" and can take advantage of lightweight ontologies.")]),e._v(" "),t("h2",{attrs:{id:"versions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#versions"}},[e._v("#")]),e._v(" Versions")]),e._v(" "),t("p",[e._v("This documentation is for Ontop 3.0 and more recent versions.")]),e._v(" "),t("p",[e._v("For earlier versions, please refer to "),t("a",{attrs:{href:"https://github.com/ontop/ontop/wiki",target:"_blank",rel:"noopener"}},[e._v("our previous Wiki"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("Most recent version:")]),e._v(" "),t("ul",[t("li",[e._v("Stable: Ontop 5.1.2, released on January 17, 2024.")])]),e._v(" "),t("p",[e._v("See "),t("a",{attrs:{href:"/guide/releases"}},[e._v("release notes")]),e._v(" for more details.")]),e._v(" "),t("h2",{attrs:{id:"main-features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#main-features"}},[e._v("#")]),e._v(" Main features")]),e._v(" "),t("ul",[t("li",[e._v("Uses "),t("a",{attrs:{href:"/guide/compliance#rdf-1-1"}},[e._v("RDF 1.1")]),e._v(" as graph data model")]),e._v(" "),t("li",[e._v("Supports RDFS and OWL 2 QL ontologies")]),e._v(" "),t("li",[e._v("Supports "),t("a",{attrs:{href:"/guide/compliance#r2rml"}},[e._v("R2RML")]),e._v(" and Ontop mappings")]),e._v(" "),t("li",[e._v("Supports "),t("a",{attrs:{href:"/guide/compliance#sparql-1-1"}},[e._v("the majority of SPARQL 1.1 features")]),e._v(", including the main SPARQL aggregation functions (since 4.0.0) and "),t("a",{attrs:{href:"/guide/compliance#geosparql-1-0"}},[e._v("GeoSPARQL functions")]),e._v(" (since 4.1.0)")]),e._v(" "),t("li",[e._v("Can be deployed as "),t("a",{attrs:{href:"/guide/cli#ontop-endpoint"}},[e._v("a SPARQL endpoint")]),e._v(" and as "),t("a",{attrs:{href:"/guide/advanced/predefined"}},[e._v("a predefined query endpoint")]),e._v(" (since 4.1.0)")]),e._v(" "),t("li",[e._v("Produces efficient SQL queries by applying many optimizations")]),e._v(" "),t("li",[e._v("Supports the main database systems: "),t("a",{attrs:{href:"/guide/databases/postgres"}},[e._v("PostgreSQL")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/mysql"}},[e._v("MySQL")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/mariadb"}},[e._v("MariaDB")]),e._v(" (since 5.0.0), "),t("a",{attrs:{href:"/guide/databases/mssql"}},[e._v("SQL Server")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/oracle"}},[e._v("Oracle")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/db2"}},[e._v("DB2")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/snowflake"}},[e._v("Snowflake")]),e._v(" (since 5.0.0), "),t("a",{attrs:{href:"/guide/databases/databricks"}},[e._v("Databricks")]),e._v(" (since 5.0.0), "),t("a",{attrs:{href:"/guide/databases/bigquery"}},[e._v("Google BigQuery")]),e._v(" (since 5.0.2), "),t("a",{attrs:{href:"/guide/databases/redshift"}},[e._v("AWS Redshift")]),e._v(" (since 5.0.2), "),t("a",{attrs:{href:"/guide/databases/duckdb"}},[e._v("DuckDB")]),e._v(" (since 5.0.2), and "),t("a",{attrs:{href:"/guide/databases/dynamodb"}},[e._v("AWS DynamoDB")]),e._v(" (since 5.1.0)")]),e._v(" "),t("li",[e._v("Supports database federators such as "),t("a",{attrs:{href:"/guide/databases/denodo"}},[e._v("Denodo")]),e._v(", "),t("a",{attrs:{href:"/guide/databases/dremio"}},[e._v("Dremio")]),e._v(" (since 4.1.0), Teiid (since 4.1.1), "),t("a",{attrs:{href:"/guide/databases/spark"}},[e._v("Apache Spark")]),e._v(" (since 4.2.0) and "),t("a",{attrs:{href:"/guide/databases/trino"}},[e._v("Trino")]),e._v(" / "),t("a",{attrs:{href:"/guide/databases/presto"}},[e._v("PrestoDB")]),e._v(" / "),t("a",{attrs:{href:"/guide/databases/athena"}},[e._v("AWS Athena")]),e._v(" (since 5.0.2)")]),e._v(" "),t("li",[e._v("Supports "),t("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")]),e._v(' which are "virtual views" specified outside of the data sources (since 4.2.0)')]),e._v(" "),t("li",[e._v("Can "),t("a",{attrs:{href:"/guide/cli#ontop-materialize"}},[e._v("materialize")]),e._v(" virtual graphs into RDF files")]),e._v(" "),t("li",[e._v("Provides a plugin for editing and testing mappings in the "),t("a",{attrs:{href:"https://protege.stanford.edu/",target:"_blank",rel:"noopener"}},[e._v("Protégé ontology editor"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"organizations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#organizations"}},[e._v("#")]),e._v(" Organizations")]),e._v(" "),t("p",[e._v("Ontop is backed by the "),t("a",{attrs:{href:"https://www.inf.unibz.it/krdb/in2data/",target:"_blank",rel:"noopener"}},[e._v("Free University of Bozen-Bolzano"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"https://ontopic.ai",target:"_blank",rel:"noopener"}},[e._v("Ontopic s.r.l."),t("OutboundLink")],1),e._v(". It also receives regular important contributions from "),t("a",{attrs:{href:"https://www.uib.no",target:"_blank",rel:"noopener"}},[e._v("University of Bergen"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"http://www.bbk.ac.uk/",target:"_blank",rel:"noopener"}},[e._v("Birkbeck, University of London"),t("OutboundLink")],1),e._v(". See the "),t("a",{attrs:{href:"/community"}},[e._v("community section")]),e._v(" for more details.")]),e._v(" "),t("h2",{attrs:{id:"licenses"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#licenses"}},[e._v("#")]),e._v(" Licenses")]),e._v(" "),t("p",[e._v("Ontop is available under the "),t("a",{attrs:{href:"https://www.apache.org/licenses/LICENSE-2.0",target:"_blank",rel:"noopener"}},[e._v("Apache 2.0"),t("OutboundLink")],1),e._v(" license.")]),e._v(" "),t("p",[e._v("All the documentation is licensed under the\n"),t("a",{attrs:{href:"http://creativecommons.org/licenses/by/4.0/",target:"_blank",rel:"noopener"}},[e._v("Creative Commons (Attribution)"),t("OutboundLink")],1),e._v("\nlicense.")]),e._v(" "),t("h2",{attrs:{id:"social"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#social"}},[e._v("#")]),e._v(" Social")]),e._v(" "),t("p",[e._v("You can find us on the following social platforms:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://twitter.com/ontop4obda",target:"_blank",rel:"noopener"}},[e._v("Twitter (ontop4obda)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{rel:"me",href:"https://fosstodon.org/@ontop"}},[e._v("Mastodon (@ontop@fosstodon.org)")])]),e._v(" "),t("li",[t("a",{attrs:{href:"https://www.facebook.com/obdaontop/",target:"_blank",rel:"noopener"}},[e._v("Facebook (obdaontop)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://groups.google.com/forum/#!forum/ontop4obda",target:"_blank",rel:"noopener"}},[e._v("Google Group (ontop4obda)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/ontop/ontop/",target:"_blank",rel:"noopener"}},[e._v("GitHub (ontop/ontop)"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"citations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#citations"}},[e._v("#")]),e._v(" Citations")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("If you use Ontop in your work, please cite one of the following articles describing the system.")]),e._v(" "),t("ul",[t("li",[e._v("Guohui Xiao, Davide Lanti, Roman Kontchakov, Sarah Komla-Ebri, Elem Güzel-Kalayci, Linfang Ding, Julien Corman, Benjamin Cogrel, Diego Calvanese, and Elena Botoeva. "),t("a",{attrs:{href:"https://research.bcgl.fr/pdfs/ontop-iswc20.pdf",target:"_blank",rel:"noopener"}},[e._v("The Virtual Knowledge Graph System Ontop"),t("OutboundLink")],1),e._v(". In: International Semantic Web Conference (Resource Track), 2020.")]),e._v(" "),t("li",[e._v("Diego Calvanese, Benjamin Cogrel, Sarah Komla-Ebri, Roman Kontchakov, Davide Lanti, Martin Rezk, Mariano Rodriguez-Muro, and Guohui Xiao. "),t("a",{attrs:{href:"http://www.semantic-web-journal.net/content/ontop-answering-sparql-queries-over-relational-databases-1",target:"_blank",rel:"noopener"}},[e._v("Ontop: Answering SPARQL Queries over Relational Databases"),t("OutboundLink")],1),e._v(". In: Semantic Web Journal 8.3 (2017), pp. 471–487.")])])]),e._v(" "),t("li",[t("p",[e._v("If you want to cite the techniques behind Ontop, check "),t("a",{attrs:{href:"/research/publications"}},[e._v("our publications")]),e._v(".")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/29.6957445c.js b/assets/js/29.a693cec1.js similarity index 98% rename from assets/js/29.6957445c.js rename to assets/js/29.a693cec1.js index c13565985..fad408486 100644 --- a/assets/js/29.6957445c.js +++ b/assets/js/29.a693cec1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{406:function(e,t,a){"use strict";a.r(t);var s=a(51),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"http-caching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#http-caching"}},[e._v("#")]),e._v(" HTTP caching")]),e._v(" "),a("p",[a("em",[e._v("Since 4.1.0.")])]),e._v(" "),a("p",[e._v("HTTP caching allows to reduce the load on the SPARQL endpoint and to provide faster responses to clients.\nIt is particularly useful when many clients issue the same queries and data is not updated at a high frequency.")]),e._v(" "),a("p",[e._v("To enable HTTP caching, add the property "),a("code",[e._v("ontop.http.cacheControl")]),e._v(" in the properties file.\nThis will cause the insertion of a "),a("a",{attrs:{href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control",target:"_blank",rel:"noopener"}},[a("code",[e._v("Cache-Control")]),a("OutboundLink")],1),e._v(" HTTP header in successful responses, with the specified value.")]),e._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[e._v("Example")]),e._v(" "),a("div",{staticClass:"language-properties extra-class"},[a("pre",{pre:!0,attrs:{class:"language-properties"}},[a("code",[a("span",{pre:!0,attrs:{class:"token attr-name"}},[e._v("ontop.http.cacheControl")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[e._v("max-age=60, stale-while-revalidate=20, stale-if-error=300")]),e._v("\n")])])]),a("p",[e._v("This entry informs the cache that values can be considered as fresh for 60 seconds. After this period, the cache remains allowed to serve cached results for 20 more seconds while revalidating the requests in the background, or for 300 more seconds in case of error with the upstream server.")])]),e._v(" "),a("p",[e._v("Ontop does not embed a HTTP cache. We recommend setting up a HTTP cache like "),a("a",{attrs:{href:"https://varnish-cache.org/",target:"_blank",rel:"noopener"}},[e._v("Varnish"),a("OutboundLink")],1),e._v(" or "),a("a",{attrs:{href:"http://nginx.org",target:"_blank",rel:"noopener"}},[e._v("Nginx"),a("OutboundLink")],1),e._v(" above the Ontop endpoint.")]),e._v(" "),a("h2",{attrs:{id:"remarks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#remarks"}},[e._v("#")]),e._v(" Remarks")]),e._v(" "),a("ul",[a("li",[e._v("Most caches (e.g. Nginx but also Web browsers) do not cache POST requests by default. Since most SPARQL queries are sent with the POST method, it is important to turn this option on. This option is safe as Ontop is a read-only system.")]),e._v(" "),a("li",[e._v("Consider using the GET method for sending SPARQL queries so as to take advantage from Web browser caches.")]),e._v(" "),a("li",[e._v("For an example of configuration for Nginx, see "),a("a",{attrs:{href:"https://github.com/noi-techpark/it.bz.opendatahub.sparql/blob/eda53616c252691a73a8eb87963664cd06ca3e93/infrastructure/docker/nginx/default.conf",target:"_blank",rel:"noopener"}},[e._v("this file"),a("OutboundLink")],1),e._v(".")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{405:function(e,t,a){"use strict";a.r(t);var s=a(51),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"http-caching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#http-caching"}},[e._v("#")]),e._v(" HTTP caching")]),e._v(" "),a("p",[a("em",[e._v("Since 4.1.0.")])]),e._v(" "),a("p",[e._v("HTTP caching allows to reduce the load on the SPARQL endpoint and to provide faster responses to clients.\nIt is particularly useful when many clients issue the same queries and data is not updated at a high frequency.")]),e._v(" "),a("p",[e._v("To enable HTTP caching, add the property "),a("code",[e._v("ontop.http.cacheControl")]),e._v(" in the properties file.\nThis will cause the insertion of a "),a("a",{attrs:{href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control",target:"_blank",rel:"noopener"}},[a("code",[e._v("Cache-Control")]),a("OutboundLink")],1),e._v(" HTTP header in successful responses, with the specified value.")]),e._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[e._v("Example")]),e._v(" "),a("div",{staticClass:"language-properties extra-class"},[a("pre",{pre:!0,attrs:{class:"language-properties"}},[a("code",[a("span",{pre:!0,attrs:{class:"token attr-name"}},[e._v("ontop.http.cacheControl")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[e._v("max-age=60, stale-while-revalidate=20, stale-if-error=300")]),e._v("\n")])])]),a("p",[e._v("This entry informs the cache that values can be considered as fresh for 60 seconds. After this period, the cache remains allowed to serve cached results for 20 more seconds while revalidating the requests in the background, or for 300 more seconds in case of error with the upstream server.")])]),e._v(" "),a("p",[e._v("Ontop does not embed a HTTP cache. We recommend setting up a HTTP cache like "),a("a",{attrs:{href:"https://varnish-cache.org/",target:"_blank",rel:"noopener"}},[e._v("Varnish"),a("OutboundLink")],1),e._v(" or "),a("a",{attrs:{href:"http://nginx.org",target:"_blank",rel:"noopener"}},[e._v("Nginx"),a("OutboundLink")],1),e._v(" above the Ontop endpoint.")]),e._v(" "),a("h2",{attrs:{id:"remarks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#remarks"}},[e._v("#")]),e._v(" Remarks")]),e._v(" "),a("ul",[a("li",[e._v("Most caches (e.g. Nginx but also Web browsers) do not cache POST requests by default. Since most SPARQL queries are sent with the POST method, it is important to turn this option on. This option is safe as Ontop is a read-only system.")]),e._v(" "),a("li",[e._v("Consider using the GET method for sending SPARQL queries so as to take advantage from Web browser caches.")]),e._v(" "),a("li",[e._v("For an example of configuration for Nginx, see "),a("a",{attrs:{href:"https://github.com/noi-techpark/it.bz.opendatahub.sparql/blob/eda53616c252691a73a8eb87963664cd06ca3e93/infrastructure/docker/nginx/default.conf",target:"_blank",rel:"noopener"}},[e._v("this file"),a("OutboundLink")],1),e._v(".")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/31.de926e6b.js b/assets/js/31.5d03035b.js similarity index 99% rename from assets/js/31.de926e6b.js rename to assets/js/31.5d03035b.js index bc379e554..35aa1c918 100644 --- a/assets/js/31.de926e6b.js +++ b/assets/js/31.5d03035b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{408:function(t,e,s){"use strict";s.r(e);var a=s(51),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"query-logging"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#query-logging"}},[t._v("#")]),t._v(" Query logging")]),t._v(" "),s("p",[s("em",[t._v("Since 4.1.0.")])]),t._v(" "),s("p",[t._v("Query logging, disabled by default, prints one-line JSON objects into the standard output.")]),t._v(" "),s("p",[t._v("Its JSON format follows some ElasticSearch conventions and works nicely with the corresponding stack (FileBeat, ES, Kibana).")]),t._v(" "),s("h2",{attrs:{id:"example"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#example"}},[t._v("#")]),t._v(" Example")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@timestamp"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-10-13T14:02:05.973Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"query:all"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"application"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ontop-odh"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"payload"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"queryId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"36ade6c6-f091-4af2-9828-ee6316e191f4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"classesUsedInQuery"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://schema.org/Hotel"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"propertiesUsedInQuery"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://schema.org/name"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tables"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\"v_accommodationsopen\\""')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reformulationDuration"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reformulationCacheHit"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"user"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"joe"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groups"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"admins,users"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"roles"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"my_app_write,my_app_reader"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"httpHeaders"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"referer"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:8080/"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"extractedQueryTemplate"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hash"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"de167012e1ce3cf9dce66a986a3343d883a1f319f800132565b614498d9c73d8"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"parameters"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"v0"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\"Residence Tuberis\\""')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sparqlQuery"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PREFIX schema: \\nSELECT * WHERE {\\n ?h a schema:Hotel ; schema:name ?name .\\n FILTER (langMatches(lang(?name), \'en\'))\\n FILTER(str(?name) = \\"Residence Tuberis\\")\\n} \\nLIMIT 10"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reformulatedQuery"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ans1(h,name)\\nCONSTRUCT [h, name] [name/\\"Residence Tuberis\\"^^@en, h/RDF(http://noi.example.org/data/accommodation/{}(VARCHARToTEXT(Id1m148)),IRI)]\\n NATIVE [Id1m148]\\nSELECT v1.\\"Id\\" AS \\"Id1m148\\"\\nFROM \\"v_accommodationsopen\\" v1\\nWHERE (\'Residence Tuberis\' = v1.\\"AccoDetail-en-Name\\" AND \'HotelPension\' = v1.\\"AccoTypeId\\")\\nLIMIT 10\\n"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"executionBeforeUnblockingDuration"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"executionAndFetchingDuration"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalDuration"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("80")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"resultCount"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"entries"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#entries"}},[t._v("#")]),t._v(" Entries")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Key")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Description")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("@timestamp")])]),t._v(" "),s("td",[t._v("Timestamp")]),t._v(" "),s("td")]),t._v(" "),s("tr",[s("td",[s("code",[t._v("message")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Type of the message. It always start with the prefix "),s("code",[t._v("query:")]),t._v(". Its default value is "),s("code",[t._v("query:all")]),t._v(". In case of an exception, the value starts with "),s("code",[t._v("query:exception-")]),t._v(".")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("application")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Controlled by the property "),s("code",[t._v("ontop.applicationName")]),t._v(".")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("payload")])]),t._v(" "),s("td",[t._v("JSON object")]),t._v(" "),s("td",[t._v("Gathers the entries below.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("queryId")])]),t._v(" "),s("td",[t._v("UUID")]),t._v(" "),s("td",[t._v("Unique to each query.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("classesUsedInQuery")])]),t._v(" "),s("td",[t._v("Array of IRIs")]),t._v(" "),s("td",[t._v("IRIs of the classes appearing in the SPARQL query.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("propertiesUsedInQuery")])]),t._v(" "),s("td",[t._v("Array of IRIs")]),t._v(" "),s("td",[t._v("IRIs of the properties appearing in the SPARQL query.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("tables")])]),t._v(" "),s("td",[t._v("Array of Strings")]),t._v(" "),s("td",[t._v("Names of the relations appearing in the SQL query.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("reformulationDuration")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("Query reformulation duration (in ms).")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("reformulationCacheHit")])]),t._v(" "),s("td",[t._v("Boolean")]),t._v(" "),s("td",[t._v("True if the reformulated query cache has been used")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("user")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Since 5.2.0. User ID. Disabled by default")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("groups")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Since 5.2.0. User groups separated by commas. Disabled by default")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("roles")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Since 5.2.0. User roles separated by commas. Disabled by default")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("httpHeaders")])]),t._v(" "),s("td",[t._v("JSON object")]),t._v(" "),s("td",[t._v("Values of a specific list of HTTP headers. By default, this list is empty. To track for instance the referer, set the property "),s("code",[t._v("ontop.queryLogging.includeHttpHeader.referer")]),t._v(" to true.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("extractedQueryTemplate.")]),t._v(" "),s("code",[t._v("hash")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Hash of the query template extracted, after removing extracted constants. Can be shared by similar queries.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("extractedQueryTemplate.")]),t._v(" "),s("code",[t._v("parameters")])]),t._v(" "),s("td",[t._v("JSON object")]),t._v(" "),s("td",[t._v("Constants extracted and replaced by variables.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("sparqlQuery")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("SPARQL query.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("reformulatedQuery")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Includes the SQL query and the post-processing.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("executionBefore")]),t._v(" "),s("code",[t._v("UnblockingDuration")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("Duration between the moments where the SQL query is sent and the result set is unblocked (in ms).")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("executionAndFetching")]),t._v(" "),s("code",[t._v("Duration")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("Duration between the moments where the SQL query is sent and the last result is fetched (in ms).")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("totalDuration")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("Total duration (in ms).")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("resultCount")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("Number of results returned.")])])])]),t._v(" "),s("h2",{attrs:{id:"default-settings"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#default-settings"}},[t._v("#")]),t._v(" Default settings")]),t._v(" "),s("div",{staticClass:"language-properties extra-class"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Query logging is disabled by default")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("false")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Application name (needed for logging)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.applicationName")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("Ontop")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Includes the SPARQL query string into the query log")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.includeSparqlQuery")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("true")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Includes the reformulated query into the query log")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.includeReformulatedQuery")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("false")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Includes classes and properties into the query log")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.includeClassesAndProperties")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("true")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Includes DB tables/views into the query log")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.includeTables")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("true")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Includes the user ID, his/her groups and roles")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.includeUserInfo")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("false")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Provides separated message at different phases (after reformulation, result set unblocked, last result fetched)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.decomposition")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("false")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Sets that merged messages are only inserted when decomposition is disabled")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.decompositionAndMergingMutuallyExclusive")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("true")]),t._v("\n")])])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{409:function(t,e,s){"use strict";s.r(e);var a=s(51),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"query-logging"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#query-logging"}},[t._v("#")]),t._v(" Query logging")]),t._v(" "),s("p",[s("em",[t._v("Since 4.1.0.")])]),t._v(" "),s("p",[t._v("Query logging, disabled by default, prints one-line JSON objects into the standard output.")]),t._v(" "),s("p",[t._v("Its JSON format follows some ElasticSearch conventions and works nicely with the corresponding stack (FileBeat, ES, Kibana).")]),t._v(" "),s("h2",{attrs:{id:"example"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#example"}},[t._v("#")]),t._v(" Example")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@timestamp"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-10-13T14:02:05.973Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"message"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"query:all"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"application"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ontop-odh"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"payload"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"queryId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"36ade6c6-f091-4af2-9828-ee6316e191f4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"classesUsedInQuery"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://schema.org/Hotel"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"propertiesUsedInQuery"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://schema.org/name"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tables"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\"v_accommodationsopen\\""')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reformulationDuration"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reformulationCacheHit"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"user"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"joe"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"groups"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"admins,users"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"roles"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"my_app_write,my_app_reader"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"httpHeaders"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"referer"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:8080/"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"extractedQueryTemplate"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hash"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"de167012e1ce3cf9dce66a986a3343d883a1f319f800132565b614498d9c73d8"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"parameters"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"v0"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\"Residence Tuberis\\""')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sparqlQuery"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PREFIX schema: \\nSELECT * WHERE {\\n ?h a schema:Hotel ; schema:name ?name .\\n FILTER (langMatches(lang(?name), \'en\'))\\n FILTER(str(?name) = \\"Residence Tuberis\\")\\n} \\nLIMIT 10"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reformulatedQuery"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ans1(h,name)\\nCONSTRUCT [h, name] [name/\\"Residence Tuberis\\"^^@en, h/RDF(http://noi.example.org/data/accommodation/{}(VARCHARToTEXT(Id1m148)),IRI)]\\n NATIVE [Id1m148]\\nSELECT v1.\\"Id\\" AS \\"Id1m148\\"\\nFROM \\"v_accommodationsopen\\" v1\\nWHERE (\'Residence Tuberis\' = v1.\\"AccoDetail-en-Name\\" AND \'HotelPension\' = v1.\\"AccoTypeId\\")\\nLIMIT 10\\n"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"executionBeforeUnblockingDuration"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"executionAndFetchingDuration"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"totalDuration"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("80")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"resultCount"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"entries"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#entries"}},[t._v("#")]),t._v(" Entries")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Key")]),t._v(" "),s("th",[t._v("Type")]),t._v(" "),s("th",[t._v("Description")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("@timestamp")])]),t._v(" "),s("td",[t._v("Timestamp")]),t._v(" "),s("td")]),t._v(" "),s("tr",[s("td",[s("code",[t._v("message")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Type of the message. It always start with the prefix "),s("code",[t._v("query:")]),t._v(". Its default value is "),s("code",[t._v("query:all")]),t._v(". In case of an exception, the value starts with "),s("code",[t._v("query:exception-")]),t._v(".")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("application")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Controlled by the property "),s("code",[t._v("ontop.applicationName")]),t._v(".")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("payload")])]),t._v(" "),s("td",[t._v("JSON object")]),t._v(" "),s("td",[t._v("Gathers the entries below.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("queryId")])]),t._v(" "),s("td",[t._v("UUID")]),t._v(" "),s("td",[t._v("Unique to each query.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("classesUsedInQuery")])]),t._v(" "),s("td",[t._v("Array of IRIs")]),t._v(" "),s("td",[t._v("IRIs of the classes appearing in the SPARQL query.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("propertiesUsedInQuery")])]),t._v(" "),s("td",[t._v("Array of IRIs")]),t._v(" "),s("td",[t._v("IRIs of the properties appearing in the SPARQL query.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("tables")])]),t._v(" "),s("td",[t._v("Array of Strings")]),t._v(" "),s("td",[t._v("Names of the relations appearing in the SQL query.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("reformulationDuration")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("Query reformulation duration (in ms).")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("reformulationCacheHit")])]),t._v(" "),s("td",[t._v("Boolean")]),t._v(" "),s("td",[t._v("True if the reformulated query cache has been used")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("user")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Since 5.2.0. User ID. Disabled by default")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("groups")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Since 5.2.0. User groups separated by commas. Disabled by default")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("roles")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Since 5.2.0. User roles separated by commas. Disabled by default")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("httpHeaders")])]),t._v(" "),s("td",[t._v("JSON object")]),t._v(" "),s("td",[t._v("Values of a specific list of HTTP headers. By default, this list is empty. To track for instance the referer, set the property "),s("code",[t._v("ontop.queryLogging.includeHttpHeader.referer")]),t._v(" to true.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("extractedQueryTemplate.")]),t._v(" "),s("code",[t._v("hash")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Hash of the query template extracted, after removing extracted constants. Can be shared by similar queries.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("extractedQueryTemplate.")]),t._v(" "),s("code",[t._v("parameters")])]),t._v(" "),s("td",[t._v("JSON object")]),t._v(" "),s("td",[t._v("Constants extracted and replaced by variables.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("sparqlQuery")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("SPARQL query.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("reformulatedQuery")])]),t._v(" "),s("td",[t._v("String")]),t._v(" "),s("td",[t._v("Includes the SQL query and the post-processing.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("executionBefore")]),t._v(" "),s("code",[t._v("UnblockingDuration")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("Duration between the moments where the SQL query is sent and the result set is unblocked (in ms).")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("executionAndFetching")]),t._v(" "),s("code",[t._v("Duration")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("Duration between the moments where the SQL query is sent and the last result is fetched (in ms).")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("totalDuration")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("Total duration (in ms).")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("resultCount")])]),t._v(" "),s("td",[t._v("Integer")]),t._v(" "),s("td",[t._v("Number of results returned.")])])])]),t._v(" "),s("h2",{attrs:{id:"default-settings"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#default-settings"}},[t._v("#")]),t._v(" Default settings")]),t._v(" "),s("div",{staticClass:"language-properties extra-class"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Query logging is disabled by default")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("false")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Application name (needed for logging)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.applicationName")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("Ontop")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Includes the SPARQL query string into the query log")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.includeSparqlQuery")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("true")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Includes the reformulated query into the query log")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.includeReformulatedQuery")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("false")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Includes classes and properties into the query log")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.includeClassesAndProperties")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("true")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Includes DB tables/views into the query log")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.includeTables")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("true")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Includes the user ID, his/her groups and roles")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.includeUserInfo")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("false")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Provides separated message at different phases (after reformulation, result set unblocked, last result fetched)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.decomposition")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("false")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Sets that merged messages are only inserted when decomposition is disabled")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("ontop.queryLogging.decompositionAndMergingMutuallyExclusive")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[t._v("true")]),t._v("\n")])])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/32.bbc94ac1.js b/assets/js/32.a9697747.js similarity index 99% rename from assets/js/32.bbc94ac1.js rename to assets/js/32.a9697747.js index 6924ddcd3..c9ec4e8dd 100644 --- a/assets/js/32.bbc94ac1.js +++ b/assets/js/32.a9697747.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{409:function(t,e,a){"use strict";a.r(e);var s=a(51),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"predefined-query-endpoint-beta"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#predefined-query-endpoint-beta"}},[t._v("#")]),t._v(" Predefined query endpoint "),a("em",[t._v("(beta)")])]),t._v(" "),a("p",[a("em",[t._v("Since 4.1.0.")])]),t._v(" "),a("p",[t._v("The predefined query endpoint enables the specification of custom low-latency Web APIs in a declarative manner.\nIt relies on two main components:")]),t._v(" "),a("ol",[a("li",[t._v("A JSON-based configuration file, describing the API interface, its parameters and optionally "),a("a",{attrs:{href:"https://w3c.github.io/json-ld-framing/",target:"_blank",rel:"noopener"}},[t._v("a JSON-LD frame"),a("OutboundLink")],1),t._v(" for shaping the returned data.")]),t._v(" "),a("li",[t._v("A SPARQL query in charge of retrieving and perhaps transforming the data. The values of the API parameters are plugged as constants into the SPARQL query.")])]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("At the moment only CONSTRUCT queries are supported.")])]),t._v(" "),a("p",[t._v('This endpoint brings one important benefit in terms of performance with respect to the SPARQL endpoint: it is able to reuse reformulations from similar queries. This is particularly valuable for "lookup" requests involving many optional triples, and for which latency is critical.')]),t._v(" "),a("p",[t._v("This endpoint can be deployed using the command "),a("a",{attrs:{href:"localhost:8080/guide/cli#ontop-endpoint"}},[t._v("ontop endpoint")]),t._v(" or the Docker image "),a("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("ontop/ontop"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"http-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#http-api"}},[t._v("#")]),t._v(" HTTP API")]),t._v(" "),a("div",{staticClass:"language-http extra-class"},[a("pre",{pre:!0,attrs:{class:"language-http"}},[a("code",[t._v("GET /predefined/{queryId}?{param1}={value1}&{param2}={value2}&{param3}={value3}\n")])])]),a("h2",{attrs:{id:"example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example"}},[t._v("#")]),t._v(" Example")]),t._v(" "),a("h3",{attrs:{id:"configuration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configuration"}},[t._v("#")]),t._v(" Configuration")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"queries"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lodging"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"queryType"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"graph"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Lodging businesses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JSON-LD snippets for lodging businesses, based on schema.org."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"return404IfEmpty"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"resultStreaming"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"parameters"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Internal identifier of the lodging business"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xsd:string"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"safeForRandomGeneration"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"required"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"language"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Language (e.g. it, de, en, ru). Default: en"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xsd:string"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"safeForRandomGeneration"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"required"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"frame"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@context"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://schema.org"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"LodgingBusiness"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"predefined-queries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#predefined-queries"}},[t._v("#")]),t._v(" Predefined queries")]),t._v(" "),a("div",{staticClass:"language-toml extra-class"},[a("pre",{pre:!0,attrs:{class:"language-toml"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token table class-name"}},[t._v("lodging")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("query")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"""\nBASE \nPREFIX schema: \nPREFIX : \n CONSTRUCT {\n ?h a schema:LodgingBusiness ; schema:name ?nameStr ; schema:priceRange ?priceRange .\n }\n WHERE {\n # Convert incoming parameters\n BIND (IRI(?id) AS ?h)\n BIND (COALESCE(?language, "en") AS ?l)\n\n ?h a schema:LodgingBusiness .\n\n OPTIONAL { \n ?h schema:name ?name .\n BIND(str(?name) AS ?nameStr)\n FILTER(lang(?name) = ?l)\n }\n OPTIONAL {\n ?h schema:priceRange ?priceRange .\n }\n}\n"""')]),t._v("\n")])])]),a("h3",{attrs:{id:"cache-for-the-json-ld-contexts"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cache-for-the-json-ld-contexts"}},[t._v("#")]),t._v(" Cache for the JSON-LD contexts")]),t._v(" "),a("p",[t._v("Optionally, JSON-LD context documents can be stored in a cache and adapted if needed.\nWhen they are not cached, these documents are directly fetched from the Web.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"https://schema.org"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@context"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@vocab"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://schema.org/"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"request"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#request"}},[t._v("#")]),t._v(" Request")]),t._v(" "),a("div",{staticClass:"language-sh extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sh"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" http://localhost:8080/predefined/lodging?id"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("32E7BE648E7B11D181AB006097B896BA"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("language")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("de\n")])])]),a("p",[t._v("Results:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@context"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://schema.org"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://noi.example.org/data/accommodation/32E7BE648E7B11D181AB006097B896BA"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"LodgingBusiness"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Alpenblick - Gasthaus"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"entries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#entries"}},[t._v("#")]),t._v(" Entries")]),t._v(" "),a("h3",{attrs:{id:"top-level-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#top-level-key"}},[t._v("#")]),t._v(" Top-level key")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Key")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("code",[t._v("queries")])]),t._v(" "),a("td",[t._v("Map of predefined queries")]),t._v(" "),a("td",[t._v("Groups predefined queries by id.")])])])]),t._v(" "),a("h3",{attrs:{id:"query-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#query-keys"}},[t._v("#")]),t._v(" Query keys")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Key")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("code",[t._v("queryType")])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("At the moment, only "),a("code",[t._v("graph")]),t._v(" is supported. Corresponds to CONSTRUCT queries.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("name")])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("Name of the predefined query.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("description")])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("Description of the predefined query.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("return404IfEmpty")])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("If true, returns a 404 status code when the result set is empty.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("resultStreaming")])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("If true, uses the chunked transfer encoding.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("parameters")])]),t._v(" "),a("td",[t._v("Map of parameters")]),t._v(" "),a("td",[t._v("Groups parameters by id.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("frame")])]),t._v(" "),a("td",[t._v("JSON object")]),t._v(" "),a("td",[a("a",{attrs:{href:"https://w3c.github.io/json-ld-framing/",target:"_blank",rel:"noopener"}},[t._v("JSON-LD frame"),a("OutboundLink")],1),t._v(") for shaping the result set when the JSON-LD format is selected.")])])])]),t._v(" "),a("h3",{attrs:{id:"parameter-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameter-keys"}},[t._v("#")]),t._v(" Parameter keys")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Key")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("code",[t._v("description")])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("Description of the parameter.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("type")])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("Type of the parameter. Can be "),a("code",[t._v("iri")]),t._v(" for an IRI, any XSD datatype like "),a("code",[t._v("xsd:string")]),t._v(" with the prefix "),a("code",[t._v("xsd:")]),t._v(" or the IRI string of an RDF datatype.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("safeForRandomGeneration")])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v('If true, replacing the parameter value by a random value for generating a "reference" reformulated query can be considered as safe. Replacing afterwards the random value but the real parameter value in the reference reformulated query should produce the expected result. Usually, identifiers are safe while languages are not because the columns to consider differ from a language to another.')])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("required")])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("If true, a value must be given for this parameter in the HTTP request.")])])])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{408:function(t,e,a){"use strict";a.r(e);var s=a(51),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"predefined-query-endpoint-beta"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#predefined-query-endpoint-beta"}},[t._v("#")]),t._v(" Predefined query endpoint "),a("em",[t._v("(beta)")])]),t._v(" "),a("p",[a("em",[t._v("Since 4.1.0.")])]),t._v(" "),a("p",[t._v("The predefined query endpoint enables the specification of custom low-latency Web APIs in a declarative manner.\nIt relies on two main components:")]),t._v(" "),a("ol",[a("li",[t._v("A JSON-based configuration file, describing the API interface, its parameters and optionally "),a("a",{attrs:{href:"https://w3c.github.io/json-ld-framing/",target:"_blank",rel:"noopener"}},[t._v("a JSON-LD frame"),a("OutboundLink")],1),t._v(" for shaping the returned data.")]),t._v(" "),a("li",[t._v("A SPARQL query in charge of retrieving and perhaps transforming the data. The values of the API parameters are plugged as constants into the SPARQL query.")])]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("At the moment only CONSTRUCT queries are supported.")])]),t._v(" "),a("p",[t._v('This endpoint brings one important benefit in terms of performance with respect to the SPARQL endpoint: it is able to reuse reformulations from similar queries. This is particularly valuable for "lookup" requests involving many optional triples, and for which latency is critical.')]),t._v(" "),a("p",[t._v("This endpoint can be deployed using the command "),a("a",{attrs:{href:"localhost:8080/guide/cli#ontop-endpoint"}},[t._v("ontop endpoint")]),t._v(" or the Docker image "),a("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("ontop/ontop"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"http-api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#http-api"}},[t._v("#")]),t._v(" HTTP API")]),t._v(" "),a("div",{staticClass:"language-http extra-class"},[a("pre",{pre:!0,attrs:{class:"language-http"}},[a("code",[t._v("GET /predefined/{queryId}?{param1}={value1}&{param2}={value2}&{param3}={value3}\n")])])]),a("h2",{attrs:{id:"example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example"}},[t._v("#")]),t._v(" Example")]),t._v(" "),a("h3",{attrs:{id:"configuration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configuration"}},[t._v("#")]),t._v(" Configuration")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"queries"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lodging"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"queryType"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"graph"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Lodging businesses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"JSON-LD snippets for lodging businesses, based on schema.org."')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"return404IfEmpty"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"resultStreaming"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"parameters"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Internal identifier of the lodging business"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xsd:string"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"safeForRandomGeneration"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"required"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"language"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Language (e.g. it, de, en, ru). Default: en"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"xsd:string"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"safeForRandomGeneration"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"required"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"frame"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@context"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://schema.org"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"LodgingBusiness"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"predefined-queries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#predefined-queries"}},[t._v("#")]),t._v(" Predefined queries")]),t._v(" "),a("div",{staticClass:"language-toml extra-class"},[a("pre",{pre:!0,attrs:{class:"language-toml"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token table class-name"}},[t._v("lodging")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token key property"}},[t._v("query")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"""\nBASE \nPREFIX schema: \nPREFIX : \n CONSTRUCT {\n ?h a schema:LodgingBusiness ; schema:name ?nameStr ; schema:priceRange ?priceRange .\n }\n WHERE {\n # Convert incoming parameters\n BIND (IRI(?id) AS ?h)\n BIND (COALESCE(?language, "en") AS ?l)\n\n ?h a schema:LodgingBusiness .\n\n OPTIONAL { \n ?h schema:name ?name .\n BIND(str(?name) AS ?nameStr)\n FILTER(lang(?name) = ?l)\n }\n OPTIONAL {\n ?h schema:priceRange ?priceRange .\n }\n}\n"""')]),t._v("\n")])])]),a("h3",{attrs:{id:"cache-for-the-json-ld-contexts"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cache-for-the-json-ld-contexts"}},[t._v("#")]),t._v(" Cache for the JSON-LD contexts")]),t._v(" "),a("p",[t._v("Optionally, JSON-LD context documents can be stored in a cache and adapted if needed.\nWhen they are not cached, these documents are directly fetched from the Web.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"https://schema.org"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@context"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@vocab"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://schema.org/"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"request"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#request"}},[t._v("#")]),t._v(" Request")]),t._v(" "),a("div",{staticClass:"language-sh extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sh"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("curl")]),t._v(" http://localhost:8080/predefined/lodging?id"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("32E7BE648E7B11D181AB006097B896BA"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("language")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("de\n")])])]),a("p",[t._v("Results:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@context"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://schema.org"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://noi.example.org/data/accommodation/32E7BE648E7B11D181AB006097B896BA"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"@type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"LodgingBusiness"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Alpenblick - Gasthaus"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"entries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#entries"}},[t._v("#")]),t._v(" Entries")]),t._v(" "),a("h3",{attrs:{id:"top-level-key"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#top-level-key"}},[t._v("#")]),t._v(" Top-level key")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Key")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("code",[t._v("queries")])]),t._v(" "),a("td",[t._v("Map of predefined queries")]),t._v(" "),a("td",[t._v("Groups predefined queries by id.")])])])]),t._v(" "),a("h3",{attrs:{id:"query-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#query-keys"}},[t._v("#")]),t._v(" Query keys")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Key")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("code",[t._v("queryType")])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("At the moment, only "),a("code",[t._v("graph")]),t._v(" is supported. Corresponds to CONSTRUCT queries.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("name")])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("Name of the predefined query.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("description")])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("Description of the predefined query.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("return404IfEmpty")])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("If true, returns a 404 status code when the result set is empty.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("resultStreaming")])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("If true, uses the chunked transfer encoding.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("parameters")])]),t._v(" "),a("td",[t._v("Map of parameters")]),t._v(" "),a("td",[t._v("Groups parameters by id.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("frame")])]),t._v(" "),a("td",[t._v("JSON object")]),t._v(" "),a("td",[a("a",{attrs:{href:"https://w3c.github.io/json-ld-framing/",target:"_blank",rel:"noopener"}},[t._v("JSON-LD frame"),a("OutboundLink")],1),t._v(") for shaping the result set when the JSON-LD format is selected.")])])])]),t._v(" "),a("h3",{attrs:{id:"parameter-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameter-keys"}},[t._v("#")]),t._v(" Parameter keys")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Key")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("code",[t._v("description")])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("Description of the parameter.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("type")])]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("Type of the parameter. Can be "),a("code",[t._v("iri")]),t._v(" for an IRI, any XSD datatype like "),a("code",[t._v("xsd:string")]),t._v(" with the prefix "),a("code",[t._v("xsd:")]),t._v(" or the IRI string of an RDF datatype.")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("safeForRandomGeneration")])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v('If true, replacing the parameter value by a random value for generating a "reference" reformulated query can be considered as safe. Replacing afterwards the random value but the real parameter value in the reference reformulated query should produce the expected result. Usually, identifiers are safe while languages are not because the columns to consider differ from a language to another.')])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("required")])]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("If true, a value must be given for this parameter in the HTTP request.")])])])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/35.c0d60fb0.js b/assets/js/35.0691db52.js similarity index 99% rename from assets/js/35.c0d60fb0.js rename to assets/js/35.0691db52.js index d0a27d564..085b7a606 100644 --- a/assets/js/35.c0d60fb0.js +++ b/assets/js/35.0691db52.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{412:function(e,t,o){"use strict";o.r(t);var v=o(51),_=Object(v.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"standards-compliance"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#standards-compliance"}},[e._v("#")]),e._v(" Standards compliance")]),e._v(" "),o("h2",{attrs:{id:"sparql-1-1"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#sparql-1-1"}},[e._v("#")]),e._v(" SPARQL 1.1")]),e._v(" "),o("p",[o("em",[e._v("Updated for 5.1.0")]),e._v(".")]),e._v(" "),o("p",[e._v("In the following table we present a summary of the compliance of the latest version of Ontop with "),o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[e._v("SPARQL 1.1"),o("OutboundLink")],1),e._v(", where rows correspond to sections of the W3C recommendation and unsupported features are "),o("s",[e._v("crossed out")]),e._v(". Most of the features are supported, but some are unsupported or only partially supported.")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[o("div",{staticStyle:{width:"140px"}},[e._v("Section in "),o("br"),e._v("SPARQL 1.1")])]),e._v(" "),o("th",[e._v("Features")]),e._v(" "),o("th",[e._v("Coverage")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#GroupPatterns",target:"_blank",rel:"noopener"}},[e._v("5. Graph Patterns"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("BGP")]),e._v(", "),o("code",[e._v("FILTER")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#optionals",target:"_blank",rel:"noopener"}},[e._v("6. Including Optional Values"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("OPTIONAL")])]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#alternatives",target:"_blank",rel:"noopener"}},[e._v("7. Matching Alternatives"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("UNION")])]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#negation",target:"_blank",rel:"noopener"}},[e._v("8. Negation"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("MINUS")]),e._v(", "),o("code",[o("s",[e._v("FILTER [NOT] EXISTS")])])]),e._v(" "),o("td",[e._v("1/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#propertypaths",target:"_blank",rel:"noopener"}},[e._v("9. Property Paths"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("s",[e._v("PredicatePath")]),e._v(", "),o("s",[e._v("InversePath")]),e._v(", "),o("s",[e._v("ZeroOrMorePath")]),e._v(", ...")]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#assignment",target:"_blank",rel:"noopener"}},[e._v("10. Assignment"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("BIND")]),e._v(", "),o("code",[e._v("VALUES")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#aggregates",target:"_blank",rel:"noopener"}},[e._v("11. Aggregates"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("COUNT")]),e._v(", "),o("code",[e._v("SUM")]),e._v(", "),o("code",[e._v("MIN")]),e._v(", "),o("code",[e._v("MAX")]),e._v(", "),o("code",[e._v("AVG")]),e._v(", "),o("code",[e._v("GROUP_CONCAT")]),e._v(", "),o("code",[e._v("SAMPLE")])]),e._v(" "),o("td",[e._v("6/6")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#subqueries",target:"_blank",rel:"noopener"}},[e._v("12. Subqueries"),o("OutboundLink")],1)]),e._v(" "),o("td",[e._v("Subqueries")]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#rdfDataset",target:"_blank",rel:"noopener"}},[e._v("13. RDF Dataset"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("GRAPH")]),e._v(", "),o("code",[e._v("FROM [NAMED]")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-federated-query/",target:"_blank",rel:"noopener"}},[e._v("14. Basic Federated Query"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[o("s",[e._v("SERVICE")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#solutionModifiers",target:"_blank",rel:"noopener"}},[e._v("15. Solution Seqs. & Mods."),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("ORDER BY")]),e._v(", "),o("code",[e._v("SELECT")]),e._v(", "),o("code",[e._v("DISTINCT")]),e._v(", "),o("code",[e._v("REDUCED")]),e._v(", "),o("code",[e._v("OFFSET")]),e._v(", "),o("code",[e._v("LIMIT")])]),e._v(" "),o("td",[e._v("6/6")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#QueryForms",target:"_blank",rel:"noopener"}},[e._v("16. Query Forms"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("SELECT")]),e._v(", "),o("code",[e._v("CONSTRUCT")]),e._v(", "),o("code",[e._v("ASK")]),e._v(", "),o("code",[e._v("DESCRIBE")])]),e._v(" "),o("td",[e._v("4/4")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-forms",target:"_blank",rel:"noopener"}},[e._v("17.4.1. Functional Forms"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("BOUND")]),e._v(", "),o("code",[e._v("IF")]),e._v(", "),o("code",[e._v("COALESCE")]),e._v(", "),o("code",[o("s",[e._v("EXISTS")])]),e._v(", "),o("code",[o("s",[e._v("NOT EXISTS")])]),e._v(", "),o("code",[e._v("||")]),e._v(" , "),o("code",[e._v("&&")]),e._v(", "),o("code",[e._v("=")]),e._v(", "),o("code",[e._v("sameTerm")]),e._v(", "),o("code",[e._v("IN")]),e._v(", "),o("code",[e._v("NOT IN")])]),e._v(" "),o("td",[e._v("9/11")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-rdfTerms",target:"_blank",rel:"noopener"}},[e._v("17.4.2. Functions on RDF Terms"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("isIRI")]),e._v(", "),o("code",[e._v("isBlank")]),e._v(", "),o("code",[e._v("isLiteral")]),e._v(", "),o("code",[e._v("isNumeric")]),e._v(", "),o("code",[e._v("str")]),e._v(", "),o("code",[e._v("lang")]),e._v(", "),o("code",[e._v("datatype")]),e._v(", "),o("code",[e._v("IRI")]),e._v(", "),o("code",[e._v("BNODE")]),e._v(", "),o("code",[o("s",[e._v("STRDT")])]),e._v(", "),o("code",[o("s",[e._v("STRLANG")])]),e._v(", "),o("code",[e._v("UUID")]),e._v(", "),o("code",[e._v("STRUUID")])]),e._v(" "),o("td",[e._v("11/13")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-strings",target:"_blank",rel:"noopener"}},[e._v("17.4.3. Functions on Strings"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("STRLEN")]),e._v(", "),o("code",[e._v("SUBSTR")]),e._v(", "),o("code",[e._v("UCASE")]),e._v(", "),o("code",[e._v("LCASE")]),e._v(", "),o("code",[e._v("STRSTARTS")]),e._v(", "),o("code",[e._v("STRENDS")]),e._v(", "),o("code",[e._v("CONTAINS")]),e._v(", "),o("code",[e._v("STRBEFORE")]),e._v(", "),o("code",[e._v("STRAFTER")]),e._v(", "),o("code",[e._v("ENCODE_FOR_URI")]),e._v(", "),o("code",[e._v("CONCAT")]),e._v(", "),o("code",[e._v("langMatches")]),e._v(", "),o("code",[e._v("REGEX")]),e._v(", "),o("code",[e._v("REPLACE")])]),e._v(" "),o("td",[e._v("14/14")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-numerics",target:"_blank",rel:"noopener"}},[e._v("17.4.4. Functions on Numerics"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("abs")]),e._v(", "),o("code",[e._v("round")]),e._v(", "),o("code",[e._v("ceil")]),e._v(", "),o("code",[e._v("floor")]),e._v(", "),o("code",[e._v("RAND")])]),e._v(" "),o("td",[e._v("5/5")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-date-time",target:"_blank",rel:"noopener"}},[e._v("17.4.5. Functions on Dates&Times"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("now")]),e._v(", "),o("code",[e._v("year")]),e._v(", "),o("code",[e._v("month")]),e._v(", "),o("code",[e._v("day")]),e._v(", "),o("code",[e._v("hours")]),e._v(", "),o("code",[e._v("minutes")]),e._v(", "),o("code",[e._v("seconds")]),e._v(", "),o("code",[o("s",[e._v("timezone")])]),e._v(", "),o("code",[e._v("tz")])]),e._v(" "),o("td",[e._v("8/9")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-hash",target:"_blank",rel:"noopener"}},[e._v("17.4.6. Hash Functions"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("MD5")]),e._v(", "),o("code",[e._v("SHA1")]),e._v(", "),o("code",[e._v("SHA256")]),e._v(", "),o("code",[e._v("SHA384")]),e._v(", "),o("code",[e._v("SHA512")])]),e._v(" "),o("td",[e._v("5/5")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#FunctionMapping",target:"_blank",rel:"noopener"}},[e._v("17.5 XPath Constructor Functions"),o("OutboundLink")],1)]),e._v(" "),o("td",[e._v("Casting")]),e._v(" "),o("td",[e._v("-")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#extensionFunctions",target:"_blank",rel:"noopener"}},[e._v("17.6 Extensible Value Testing"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("s",[e._v("user defined functions")])]),e._v(" "),o("td",[e._v("0")])])])]),e._v(" "),o("h3",{attrs:{id:"limitations"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#limitations"}},[e._v("#")]),e._v(" Limitations")]),e._v(" "),o("ul",[o("li",[e._v("The 5 hash functions and functions "),o("code",[e._v("REPLACE")]),e._v(" and "),o("code",[e._v("REGEX")]),e._v(" for regular expressions have limited support because they heavily depend on the DBMS: not all DBMSs provide all hash functions, and many DBMSs have their own regex dialects. Currently, the SPARQL regular expressions of "),o("code",[e._v("REPLACE")]),e._v(" and "),o("code",[e._v("REGEX")]),e._v(" are simply sent to the DBMS by default.")]),e._v(" "),o("li",[e._v("In the implementation of function "),o("code",[e._v("langMatches")]),e._v(", the second argument has to a be a constant: allowing variables will have a negative impact on the performance in our framework.")])]),e._v(" "),o("h2",{attrs:{id:"geosparql-1-0"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#geosparql-1-0"}},[e._v("#")]),e._v(" GeoSPARQL 1.0")]),e._v(" "),o("p",[o("em",[e._v("Starting from 4.1.0.")])]),e._v(" "),o("p",[e._v("The following table provides a summary of the compliance of the latest version of Ontop with "),o("a",{attrs:{href:"https://www.ogc.org/standards/geosparql",target:"_blank",rel:"noopener"}},[e._v("OGC GeoSPARQL 1.0"),o("OutboundLink")],1),e._v(", the standard for representing and querying geospatial linked data. The summary focuses only on the main geospatial functions and properties and unsupported features are "),o("s",[e._v("crossed out")]),e._v(".")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[o("div",{staticStyle:{width:"140px"}},[e._v("Section in OGC GeoSPARQL 1.0")])]),e._v(" "),o("th",[e._v("Features")]),e._v(" "),o("th",[e._v("Coverage")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[e._v("7. Topology Vocabulary Extensions - Properties")]),e._v(" "),o("td",[o("code",[o("s",[e._v("geo:sfEquals")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfDisjoint")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfIntersects")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfTouches")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfCrosses")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfWithin")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfContains")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfOverlaps")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehEquals")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehDisjoint")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehMeet")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehOverlap")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehCovers")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehCoveredBy")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehInside")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehContains")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8eq")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8dc")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8ec")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8po")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8tppi")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8tpp")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8ntpp")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8ntppi")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[e._v("8.4. Standard Properties for Geo:Geometry")]),e._v(" "),o("td",[o("code",[o("s",[e._v("geo:dimension")])]),e._v(", "),o("code",[o("s",[e._v("geo:coordinateDimension")])]),e._v(", "),o("code",[o("s",[e._v("geo:spatialDimension")])]),e._v(", "),o("code",[o("s",[e._v("geo:isEmpty")])]),e._v(", "),o("code",[o("s",[e._v("geo:isSimple")])]),e._v(", "),o("code",[o("s",[e._v("geo:hasSerialization")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[e._v("8.5. WKT Serialization")]),e._v(" "),o("td",[o("code",[e._v("geo:wktLiteral")]),e._v(", "),o("code",[e._v("geo:asWKT")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[e._v("8.6. GML Serialization")]),e._v(" "),o("td",[o("code",[o("s",[e._v("geo:gmlLiteral")])]),e._v(", "),o("code",[o("s",[e._v("geo:asGML")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[e._v("8.7. Non-Topological Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:distance")]),e._v(", "),o("code",[e._v("geof:buffer")]),e._v(", "),o("code",[e._v("geof:convexHull")]),e._v(" , "),o("code",[e._v("geof:intersection")]),e._v(", "),o("code",[e._v("geof:union")]),e._v(", "),o("code",[e._v("geof:difference")]),e._v(" "),o("code",[e._v("geof:symDifference")]),e._v(", "),o("code",[e._v("geof:envelope")]),e._v(", "),o("code",[e._v("geof:boundary")]),e._v(", "),o("code",[e._v("geof:getSRID")]),e._v(",")]),e._v(" "),o("td",[e._v("10/10")])]),e._v(" "),o("tr",[o("td",[e._v("9.2. Common Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:relate")])]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[e._v("9.3. Topological Simple Features Relation Family Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:sfEquals")]),e._v(", "),o("code",[e._v("geof:sfDisjoint")]),e._v(", "),o("code",[e._v("geof:sfIntersects")]),e._v(", "),o("code",[e._v("geof:sfTouches")]),e._v(", "),o("code",[e._v("geof:sfCrosses")]),e._v(", "),o("code",[e._v("geof:sfWithin")]),e._v(", "),o("code",[e._v("geof:sfContains")]),e._v(", "),o("code",[e._v("geof:sfOverlaps")])]),e._v(" "),o("td",[e._v("8/8")])]),e._v(" "),o("tr",[o("td",[e._v("9.4. Topological Egenhofer Relation Family Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:ehEquals")]),e._v(", "),o("code",[e._v("geof:ehDisjoint")]),e._v(", "),o("code",[e._v("geof:ehMeet")]),e._v(", "),o("code",[e._v("geof:ehOverlap")]),e._v(", "),o("code",[e._v("geof:ehCovers")]),e._v(", "),o("code",[e._v("geof:ehCoveredBy")]),e._v(", "),o("code",[e._v("geof:ehInside")]),e._v(", "),o("code",[e._v("geof:ehContains")])]),e._v(" "),o("td",[e._v("8/8")])]),e._v(" "),o("tr",[o("td",[e._v("9.5. Topological RCC8 Relation Family Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:rcc8eq")]),e._v(", "),o("code",[e._v("geof:rcc8dc")]),e._v(", "),o("code",[e._v("geof:rcc8ec")]),e._v(", "),o("code",[e._v("geof:rcc8po")]),e._v(", "),o("code",[e._v("geof:rcc8tppi")]),e._v(", "),o("code",[e._v("geof:rcc8tpp")]),e._v(", "),o("code",[e._v("geof:rcc8ntpp")]),e._v(", "),o("code",[e._v("geof:rcc8ntppi")])]),e._v(" "),o("td",[e._v("8/8")])])])]),e._v(" "),o("p",[e._v("Several non-topological query functions use a unit of measure URI which OGC defines under a specific namespace e.g. "),o("code",[e._v("")]),e._v(". The latest version of Ontop currently supports the units metre, radian and degree.")]),e._v(" "),o("h2",{attrs:{id:"r2rml"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#r2rml"}},[e._v("#")]),e._v(" R2RML")]),e._v(" "),o("p",[o("em",[e._v("Updated for 4.2.0")])]),e._v(" "),o("p",[e._v("The latest version of Ontop is almost fully compliant with the "),o("a",{attrs:{href:"https://www.w3.org/TR/r2rml",target:"_blank",rel:"noopener"}},[e._v("R2RML"),o("OutboundLink")],1),e._v(" standard.")]),e._v(" "),o("p",[e._v("At the moment, it does NOT support:")]),e._v(" "),o("ul",[o("li",[e._v("Base IRIs")]),e._v(" "),o("li",[o("a",{attrs:{href:"https://www.w3.org/TR/r2rml/#default-mappings",target:"_blank",rel:"noopener"}},[e._v("R2RML default mapping"),o("OutboundLink")],1),e._v(" generation")]),e._v(" "),o("li",[e._v("Normalization of binary SQL datatypes")])]),e._v(" "),o("p",[e._v("For complex SQL queries (e.g. with a "),o("code",[e._v("GROUP BY")]),e._v(") in the mapping, Ontop may not be able to infer the datatype of each column if the option "),o("a",{attrs:{href:"/guide/advanced/configuration"}},[o("code",[e._v("ontop.allowRetrievingBlackBoxViewMetadataFromDB")])]),e._v(" is not enabled (disabled by default). In such a situation, it may not be able to derive the "),o("a",{attrs:{href:"https://www.w3.org/TR/r2rml/#natural-mapping",target:"_blank",rel:"noopener"}},[e._v("natural RDF datatype"),o("OutboundLink")],1),e._v(" of a literal built over a column and may not apply the expected normalization. This can be partially mitigated by expliciting the RDF datatype in the mapping, but normalization would remain unapplied.")]),e._v(" "),o("h2",{attrs:{id:"rdf-1-1"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#rdf-1-1"}},[e._v("#")]),e._v(" RDF 1.1")]),e._v(" "),o("p",[e._v("Ontop complies with "),o("a",{attrs:{href:"https://www.w3.org/TR/rdf11-new/",target:"_blank",rel:"noopener"}},[e._v("RDF 1.1"),o("OutboundLink")],1),e._v(". It types simple literals (from RDF 1.0) as "),o("code",[e._v("xsd:string")]),e._v(" and literals with a language tag as "),o("code",[e._v("rdf:langString")]),e._v(".")]),e._v(" "),o("h2",{attrs:{id:"owl-2-ql"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#owl-2-ql"}},[e._v("#")]),e._v(" OWL 2 QL")]),e._v(" "),o("h2",{attrs:{id:"rdfs"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#rdfs"}},[e._v("#")]),e._v(" RDFS")]),e._v(" "),o("h2",{attrs:{id:"time-functions"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#time-functions"}},[e._v("#")]),e._v(" Time functions")]),e._v(" "),o("p",[o("em",[e._v("Updated for 5.1.0")]),e._v(".")]),e._v(" "),o("p",[e._v("The functions using the prefix "),o("code",[e._v("ofn")]),e._v(" ("),o("code",[e._v("http://www.ontotext.com/sparql/functions/")]),e._v(") and their documentation can be found "),o("a",{attrs:{href:"https://graphdb.ontotext.com/documentation/10.0/devhub/time-functions.html#durations-expressed-in-certain-units",target:"_blank",rel:"noopener"}},[e._v("here"),o("OutboundLink")],1),e._v(". They accept both "),o("code",[e._v("xsd:date")]),e._v(" and "),o("code",[e._v("xsd:dateTime")]),e._v(" as arguments. ("),o("em",[e._v("supported since 4.2.0")]),e._v(").")]),e._v(" "),o("p",[e._v("The functions using the prefix "),o("code",[e._v("obdaf")]),e._v(" ("),o("code",[e._v("https://w3id.org/obda/functions#")]),e._v(") have been introduced in 5.1.0 (see "),o("a",{attrs:{href:"https://github.com/ontop/ontop/pull/705",target:"_blank",rel:"noopener"}},[e._v("#705"),o("OutboundLink")],1),e._v(").")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[o("div",{staticStyle:{width:"140px"}},[e._v("Function")])]),e._v(" "),o("th",[e._v("Argument 1")]),e._v(" "),o("th",[e._v("Argument 2")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:hoursBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:minutesBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:secondsBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:millisBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:dateTrunc")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:string")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:milliseconds-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:microseconds-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:week-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:quarter-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:decade-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:century-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:millenium-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")])])]),e._v(" "),o("p",[e._v("Combinations of argument datatypes marked with the symbol * are not supported for queries over the following data sources: Oracle and Microsoft SQL Server.")]),e._v(" "),o("p",[e._v("The "),o("code",[e._v("obdaf:[datePart]-from-dateTime")]),e._v(" functions are supported for all dialects. They can be used to extract a specific part of the provided "),o("code",[e._v("dateTime")]),e._v(" value in a numeric format ("),o("code",[e._v("xsd:decimal")]),e._v(" for "),o("code",[e._v("milliseconds")]),e._v(" and "),o("code",[e._v("microseconds")]),e._v(", "),o("code",[e._v("xsd:integer")]),e._v(" for the remaining functions).")]),e._v(" "),o("div",{staticClass:"custom-block tip"},[o("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),o("p",[e._v("The function "),o("code",[e._v("obdaf:week-from-dateTime")]),e._v(" returns the ISO week index of the given date, where week 1 is considered the first week with a majority of its days in January.")])]),e._v(" "),o("p",[e._v("The "),o("code",[e._v("obdaf:dateTrunc")]),e._v(" function can be used to truncate a given "),o("code",[e._v("xsd:dateTime")]),e._v(" to a new value with specified granularity. The granularity must be provided as an "),o("code",[e._v("xsd:string")]),e._v(" "),o("strong",[e._v("literal")]),e._v(". The following granularity values are supported:")]),e._v(" "),o("ul",[o("li",[o("code",[e._v("microsecond")])]),e._v(" "),o("li",[o("code",[e._v("millisecond")])]),e._v(" "),o("li",[o("code",[e._v("second")])]),e._v(" "),o("li",[o("code",[e._v("minute")])]),e._v(" "),o("li",[o("code",[e._v("hour")])]),e._v(" "),o("li",[o("code",[e._v("day")])]),e._v(" "),o("li",[o("code",[e._v("week")])]),e._v(" "),o("li",[o("code",[e._v("month")])]),e._v(" "),o("li",[o("code",[e._v("quarter")])]),e._v(" "),o("li",[o("code",[e._v("year")])]),e._v(" "),o("li",[o("code",[e._v("decade")])]),e._v(" "),o("li",[o("code",[e._v("century")])]),e._v(" "),o("li",[o("code",[e._v("millennium")])])]),e._v(" "),o("div",{staticClass:"custom-block warning"},[o("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),o("p",[e._v("Not all database systems support all granularities equally.")]),e._v(" "),o("p",[o("code",[e._v("decade")]),e._v(", "),o("code",[e._v("century")]),e._v(", and "),o("code",[e._v("millennium")]),e._v(" are not supported by:")]),e._v(" "),o("ul",[o("li",[e._v("AWS Athena")]),e._v(" "),o("li",[e._v("Denodo ("),o("code",[e._v("century")]),e._v(" is supported)")]),e._v(" "),o("li",[e._v("MySQL ("),o("code",[e._v("century")]),e._v(" is supported)")]),e._v(" "),o("li",[e._v("MariaDB ("),o("code",[e._v("century")]),e._v(" is supported)")]),e._v(" "),o("li",[e._v("Oracle")]),e._v(" "),o("li",[e._v("Presto")]),e._v(" "),o("li",[e._v("SQLServer")]),e._v(" "),o("li",[e._v("Snowflake")]),e._v(" "),o("li",[e._v("Spark")]),e._v(" "),o("li",[e._v("Trino")])]),e._v(" "),o("p",[o("code",[e._v("second")]),e._v(" is not supported by:")]),e._v(" "),o("ul",[o("li",[e._v("Denodo")])]),e._v(" "),o("p",[o("code",[e._v("millisecond")]),e._v(" and "),o("code",[e._v("microsecond")]),e._v(" are not supported by:")]),e._v(" "),o("ul",[o("li",[e._v("AWS Athena")]),e._v(" "),o("li",[e._v("Denodo")]),e._v(" "),o("li",[e._v("MySQL")]),e._v(" "),o("li",[e._v("MariaDB")]),e._v(" "),o("li",[e._v("Oracle")]),e._v(" "),o("li",[e._v("Presto")]),e._v(" "),o("li",[e._v("Trino")])]),e._v(" "),o("p",[e._v("PostgreSQL requires these granularities to be named "),o("code",[e._v("milliseconds")]),e._v(" and "),o("code",[e._v("microseconds")]),e._v(" instead.")])]),e._v(" "),o("h3",{attrs:{id:"examples"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[e._v("#")]),e._v(" Examples")]),e._v(" "),o("p",[o("code",[e._v('obdaf:year("2023-08-16T09:00:00"^^xsd:dateTime)')]),e._v(" "),o("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[o("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[o("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[o("g",{attrs:{"data-mml-node":"math"}},[o("g",{attrs:{"data-mml-node":"mo"}},[o("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),e._v(" "),o("code",[e._v('"2023"^^xsd:integer')])],1),e._v(" "),o("p",[o("code",[e._v('obdaf:hour("2023-08-16T09:00:00"^^xsd:dateTime)')]),e._v(" "),o("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[o("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[o("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[o("g",{attrs:{"data-mml-node":"math"}},[o("g",{attrs:{"data-mml-node":"mo"}},[o("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),e._v(" "),o("code",[e._v('"9"^^xsd:integer')])],1),e._v(" "),o("p",[o("code",[e._v('obdaf:dateTrunc("2023-08-16T09:00:00"^^xsd:dateTime, "month"^^xsd:string)')]),e._v(" "),o("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[o("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[o("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[o("g",{attrs:{"data-mml-node":"math"}},[o("g",{attrs:{"data-mml-node":"mo"}},[o("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),e._v(" "),o("code",[e._v('"2023-08-01T00:00:00"^^xsd:dateTime')])],1)])}),[],!1,null,null,null);t.default=_.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{413:function(e,t,o){"use strict";o.r(t);var v=o(51),_=Object(v.a)({},(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[o("h1",{attrs:{id:"standards-compliance"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#standards-compliance"}},[e._v("#")]),e._v(" Standards compliance")]),e._v(" "),o("h2",{attrs:{id:"sparql-1-1"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#sparql-1-1"}},[e._v("#")]),e._v(" SPARQL 1.1")]),e._v(" "),o("p",[o("em",[e._v("Updated for 5.1.0")]),e._v(".")]),e._v(" "),o("p",[e._v("In the following table we present a summary of the compliance of the latest version of Ontop with "),o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[e._v("SPARQL 1.1"),o("OutboundLink")],1),e._v(", where rows correspond to sections of the W3C recommendation and unsupported features are "),o("s",[e._v("crossed out")]),e._v(". Most of the features are supported, but some are unsupported or only partially supported.")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[o("div",{staticStyle:{width:"140px"}},[e._v("Section in "),o("br"),e._v("SPARQL 1.1")])]),e._v(" "),o("th",[e._v("Features")]),e._v(" "),o("th",[e._v("Coverage")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#GroupPatterns",target:"_blank",rel:"noopener"}},[e._v("5. Graph Patterns"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("BGP")]),e._v(", "),o("code",[e._v("FILTER")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#optionals",target:"_blank",rel:"noopener"}},[e._v("6. Including Optional Values"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("OPTIONAL")])]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#alternatives",target:"_blank",rel:"noopener"}},[e._v("7. Matching Alternatives"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("UNION")])]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#negation",target:"_blank",rel:"noopener"}},[e._v("8. Negation"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("MINUS")]),e._v(", "),o("code",[o("s",[e._v("FILTER [NOT] EXISTS")])])]),e._v(" "),o("td",[e._v("1/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#propertypaths",target:"_blank",rel:"noopener"}},[e._v("9. Property Paths"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("s",[e._v("PredicatePath")]),e._v(", "),o("s",[e._v("InversePath")]),e._v(", "),o("s",[e._v("ZeroOrMorePath")]),e._v(", ...")]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#assignment",target:"_blank",rel:"noopener"}},[e._v("10. Assignment"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("BIND")]),e._v(", "),o("code",[e._v("VALUES")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#aggregates",target:"_blank",rel:"noopener"}},[e._v("11. Aggregates"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("COUNT")]),e._v(", "),o("code",[e._v("SUM")]),e._v(", "),o("code",[e._v("MIN")]),e._v(", "),o("code",[e._v("MAX")]),e._v(", "),o("code",[e._v("AVG")]),e._v(", "),o("code",[e._v("GROUP_CONCAT")]),e._v(", "),o("code",[e._v("SAMPLE")])]),e._v(" "),o("td",[e._v("6/6")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#subqueries",target:"_blank",rel:"noopener"}},[e._v("12. Subqueries"),o("OutboundLink")],1)]),e._v(" "),o("td",[e._v("Subqueries")]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#rdfDataset",target:"_blank",rel:"noopener"}},[e._v("13. RDF Dataset"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("GRAPH")]),e._v(", "),o("code",[e._v("FROM [NAMED]")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-federated-query/",target:"_blank",rel:"noopener"}},[e._v("14. Basic Federated Query"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[o("s",[e._v("SERVICE")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#solutionModifiers",target:"_blank",rel:"noopener"}},[e._v("15. Solution Seqs. & Mods."),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("ORDER BY")]),e._v(", "),o("code",[e._v("SELECT")]),e._v(", "),o("code",[e._v("DISTINCT")]),e._v(", "),o("code",[e._v("REDUCED")]),e._v(", "),o("code",[e._v("OFFSET")]),e._v(", "),o("code",[e._v("LIMIT")])]),e._v(" "),o("td",[e._v("6/6")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#QueryForms",target:"_blank",rel:"noopener"}},[e._v("16. Query Forms"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("SELECT")]),e._v(", "),o("code",[e._v("CONSTRUCT")]),e._v(", "),o("code",[e._v("ASK")]),e._v(", "),o("code",[e._v("DESCRIBE")])]),e._v(" "),o("td",[e._v("4/4")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-forms",target:"_blank",rel:"noopener"}},[e._v("17.4.1. Functional Forms"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("BOUND")]),e._v(", "),o("code",[e._v("IF")]),e._v(", "),o("code",[e._v("COALESCE")]),e._v(", "),o("code",[o("s",[e._v("EXISTS")])]),e._v(", "),o("code",[o("s",[e._v("NOT EXISTS")])]),e._v(", "),o("code",[e._v("||")]),e._v(" , "),o("code",[e._v("&&")]),e._v(", "),o("code",[e._v("=")]),e._v(", "),o("code",[e._v("sameTerm")]),e._v(", "),o("code",[e._v("IN")]),e._v(", "),o("code",[e._v("NOT IN")])]),e._v(" "),o("td",[e._v("9/11")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-rdfTerms",target:"_blank",rel:"noopener"}},[e._v("17.4.2. Functions on RDF Terms"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("isIRI")]),e._v(", "),o("code",[e._v("isBlank")]),e._v(", "),o("code",[e._v("isLiteral")]),e._v(", "),o("code",[e._v("isNumeric")]),e._v(", "),o("code",[e._v("str")]),e._v(", "),o("code",[e._v("lang")]),e._v(", "),o("code",[e._v("datatype")]),e._v(", "),o("code",[e._v("IRI")]),e._v(", "),o("code",[e._v("BNODE")]),e._v(", "),o("code",[o("s",[e._v("STRDT")])]),e._v(", "),o("code",[o("s",[e._v("STRLANG")])]),e._v(", "),o("code",[e._v("UUID")]),e._v(", "),o("code",[e._v("STRUUID")])]),e._v(" "),o("td",[e._v("11/13")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-strings",target:"_blank",rel:"noopener"}},[e._v("17.4.3. Functions on Strings"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("STRLEN")]),e._v(", "),o("code",[e._v("SUBSTR")]),e._v(", "),o("code",[e._v("UCASE")]),e._v(", "),o("code",[e._v("LCASE")]),e._v(", "),o("code",[e._v("STRSTARTS")]),e._v(", "),o("code",[e._v("STRENDS")]),e._v(", "),o("code",[e._v("CONTAINS")]),e._v(", "),o("code",[e._v("STRBEFORE")]),e._v(", "),o("code",[e._v("STRAFTER")]),e._v(", "),o("code",[e._v("ENCODE_FOR_URI")]),e._v(", "),o("code",[e._v("CONCAT")]),e._v(", "),o("code",[e._v("langMatches")]),e._v(", "),o("code",[e._v("REGEX")]),e._v(", "),o("code",[e._v("REPLACE")])]),e._v(" "),o("td",[e._v("14/14")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-numerics",target:"_blank",rel:"noopener"}},[e._v("17.4.4. Functions on Numerics"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("abs")]),e._v(", "),o("code",[e._v("round")]),e._v(", "),o("code",[e._v("ceil")]),e._v(", "),o("code",[e._v("floor")]),e._v(", "),o("code",[e._v("RAND")])]),e._v(" "),o("td",[e._v("5/5")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-date-time",target:"_blank",rel:"noopener"}},[e._v("17.4.5. Functions on Dates&Times"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("now")]),e._v(", "),o("code",[e._v("year")]),e._v(", "),o("code",[e._v("month")]),e._v(", "),o("code",[e._v("day")]),e._v(", "),o("code",[e._v("hours")]),e._v(", "),o("code",[e._v("minutes")]),e._v(", "),o("code",[e._v("seconds")]),e._v(", "),o("code",[o("s",[e._v("timezone")])]),e._v(", "),o("code",[e._v("tz")])]),e._v(" "),o("td",[e._v("8/9")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#func-hash",target:"_blank",rel:"noopener"}},[e._v("17.4.6. Hash Functions"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("code",[e._v("MD5")]),e._v(", "),o("code",[e._v("SHA1")]),e._v(", "),o("code",[e._v("SHA256")]),e._v(", "),o("code",[e._v("SHA384")]),e._v(", "),o("code",[e._v("SHA512")])]),e._v(" "),o("td",[e._v("5/5")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#FunctionMapping",target:"_blank",rel:"noopener"}},[e._v("17.5 XPath Constructor Functions"),o("OutboundLink")],1)]),e._v(" "),o("td",[e._v("Casting")]),e._v(" "),o("td",[e._v("-")])]),e._v(" "),o("tr",[o("td",[o("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/#extensionFunctions",target:"_blank",rel:"noopener"}},[e._v("17.6 Extensible Value Testing"),o("OutboundLink")],1)]),e._v(" "),o("td",[o("s",[e._v("user defined functions")])]),e._v(" "),o("td",[e._v("0")])])])]),e._v(" "),o("h3",{attrs:{id:"limitations"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#limitations"}},[e._v("#")]),e._v(" Limitations")]),e._v(" "),o("ul",[o("li",[e._v("The 5 hash functions and functions "),o("code",[e._v("REPLACE")]),e._v(" and "),o("code",[e._v("REGEX")]),e._v(" for regular expressions have limited support because they heavily depend on the DBMS: not all DBMSs provide all hash functions, and many DBMSs have their own regex dialects. Currently, the SPARQL regular expressions of "),o("code",[e._v("REPLACE")]),e._v(" and "),o("code",[e._v("REGEX")]),e._v(" are simply sent to the DBMS by default.")]),e._v(" "),o("li",[e._v("In the implementation of function "),o("code",[e._v("langMatches")]),e._v(", the second argument has to a be a constant: allowing variables will have a negative impact on the performance in our framework.")])]),e._v(" "),o("h2",{attrs:{id:"geosparql-1-0"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#geosparql-1-0"}},[e._v("#")]),e._v(" GeoSPARQL 1.0")]),e._v(" "),o("p",[o("em",[e._v("Starting from 4.1.0.")])]),e._v(" "),o("p",[e._v("The following table provides a summary of the compliance of the latest version of Ontop with "),o("a",{attrs:{href:"https://www.ogc.org/standards/geosparql",target:"_blank",rel:"noopener"}},[e._v("OGC GeoSPARQL 1.0"),o("OutboundLink")],1),e._v(", the standard for representing and querying geospatial linked data. The summary focuses only on the main geospatial functions and properties and unsupported features are "),o("s",[e._v("crossed out")]),e._v(".")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[o("div",{staticStyle:{width:"140px"}},[e._v("Section in OGC GeoSPARQL 1.0")])]),e._v(" "),o("th",[e._v("Features")]),e._v(" "),o("th",[e._v("Coverage")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[e._v("7. Topology Vocabulary Extensions - Properties")]),e._v(" "),o("td",[o("code",[o("s",[e._v("geo:sfEquals")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfDisjoint")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfIntersects")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfTouches")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfCrosses")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfWithin")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfContains")])]),e._v(", "),o("code",[o("s",[e._v("geo:sfOverlaps")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehEquals")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehDisjoint")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehMeet")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehOverlap")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehCovers")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehCoveredBy")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehInside")])]),e._v(", "),o("code",[o("s",[e._v("geo:ehContains")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8eq")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8dc")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8ec")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8po")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8tppi")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8tpp")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8ntpp")])]),e._v(", "),o("code",[o("s",[e._v("geo:rcc8ntppi")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[e._v("8.4. Standard Properties for Geo:Geometry")]),e._v(" "),o("td",[o("code",[o("s",[e._v("geo:dimension")])]),e._v(", "),o("code",[o("s",[e._v("geo:coordinateDimension")])]),e._v(", "),o("code",[o("s",[e._v("geo:spatialDimension")])]),e._v(", "),o("code",[o("s",[e._v("geo:isEmpty")])]),e._v(", "),o("code",[o("s",[e._v("geo:isSimple")])]),e._v(", "),o("code",[o("s",[e._v("geo:hasSerialization")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[e._v("8.5. WKT Serialization")]),e._v(" "),o("td",[o("code",[e._v("geo:wktLiteral")]),e._v(", "),o("code",[e._v("geo:asWKT")])]),e._v(" "),o("td",[e._v("2/2")])]),e._v(" "),o("tr",[o("td",[e._v("8.6. GML Serialization")]),e._v(" "),o("td",[o("code",[o("s",[e._v("geo:gmlLiteral")])]),e._v(", "),o("code",[o("s",[e._v("geo:asGML")])])]),e._v(" "),o("td",[e._v("0")])]),e._v(" "),o("tr",[o("td",[e._v("8.7. Non-Topological Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:distance")]),e._v(", "),o("code",[e._v("geof:buffer")]),e._v(", "),o("code",[e._v("geof:convexHull")]),e._v(" , "),o("code",[e._v("geof:intersection")]),e._v(", "),o("code",[e._v("geof:union")]),e._v(", "),o("code",[e._v("geof:difference")]),e._v(" "),o("code",[e._v("geof:symDifference")]),e._v(", "),o("code",[e._v("geof:envelope")]),e._v(", "),o("code",[e._v("geof:boundary")]),e._v(", "),o("code",[e._v("geof:getSRID")]),e._v(",")]),e._v(" "),o("td",[e._v("10/10")])]),e._v(" "),o("tr",[o("td",[e._v("9.2. Common Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:relate")])]),e._v(" "),o("td",[e._v("1/1")])]),e._v(" "),o("tr",[o("td",[e._v("9.3. Topological Simple Features Relation Family Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:sfEquals")]),e._v(", "),o("code",[e._v("geof:sfDisjoint")]),e._v(", "),o("code",[e._v("geof:sfIntersects")]),e._v(", "),o("code",[e._v("geof:sfTouches")]),e._v(", "),o("code",[e._v("geof:sfCrosses")]),e._v(", "),o("code",[e._v("geof:sfWithin")]),e._v(", "),o("code",[e._v("geof:sfContains")]),e._v(", "),o("code",[e._v("geof:sfOverlaps")])]),e._v(" "),o("td",[e._v("8/8")])]),e._v(" "),o("tr",[o("td",[e._v("9.4. Topological Egenhofer Relation Family Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:ehEquals")]),e._v(", "),o("code",[e._v("geof:ehDisjoint")]),e._v(", "),o("code",[e._v("geof:ehMeet")]),e._v(", "),o("code",[e._v("geof:ehOverlap")]),e._v(", "),o("code",[e._v("geof:ehCovers")]),e._v(", "),o("code",[e._v("geof:ehCoveredBy")]),e._v(", "),o("code",[e._v("geof:ehInside")]),e._v(", "),o("code",[e._v("geof:ehContains")])]),e._v(" "),o("td",[e._v("8/8")])]),e._v(" "),o("tr",[o("td",[e._v("9.5. Topological RCC8 Relation Family Query Functions")]),e._v(" "),o("td",[o("code",[e._v("geof:rcc8eq")]),e._v(", "),o("code",[e._v("geof:rcc8dc")]),e._v(", "),o("code",[e._v("geof:rcc8ec")]),e._v(", "),o("code",[e._v("geof:rcc8po")]),e._v(", "),o("code",[e._v("geof:rcc8tppi")]),e._v(", "),o("code",[e._v("geof:rcc8tpp")]),e._v(", "),o("code",[e._v("geof:rcc8ntpp")]),e._v(", "),o("code",[e._v("geof:rcc8ntppi")])]),e._v(" "),o("td",[e._v("8/8")])])])]),e._v(" "),o("p",[e._v("Several non-topological query functions use a unit of measure URI which OGC defines under a specific namespace e.g. "),o("code",[e._v("")]),e._v(". The latest version of Ontop currently supports the units metre, radian and degree.")]),e._v(" "),o("h2",{attrs:{id:"r2rml"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#r2rml"}},[e._v("#")]),e._v(" R2RML")]),e._v(" "),o("p",[o("em",[e._v("Updated for 4.2.0")])]),e._v(" "),o("p",[e._v("The latest version of Ontop is almost fully compliant with the "),o("a",{attrs:{href:"https://www.w3.org/TR/r2rml",target:"_blank",rel:"noopener"}},[e._v("R2RML"),o("OutboundLink")],1),e._v(" standard.")]),e._v(" "),o("p",[e._v("At the moment, it does NOT support:")]),e._v(" "),o("ul",[o("li",[e._v("Base IRIs")]),e._v(" "),o("li",[o("a",{attrs:{href:"https://www.w3.org/TR/r2rml/#default-mappings",target:"_blank",rel:"noopener"}},[e._v("R2RML default mapping"),o("OutboundLink")],1),e._v(" generation")]),e._v(" "),o("li",[e._v("Normalization of binary SQL datatypes")])]),e._v(" "),o("p",[e._v("For complex SQL queries (e.g. with a "),o("code",[e._v("GROUP BY")]),e._v(") in the mapping, Ontop may not be able to infer the datatype of each column if the option "),o("a",{attrs:{href:"/guide/advanced/configuration"}},[o("code",[e._v("ontop.allowRetrievingBlackBoxViewMetadataFromDB")])]),e._v(" is not enabled (disabled by default). In such a situation, it may not be able to derive the "),o("a",{attrs:{href:"https://www.w3.org/TR/r2rml/#natural-mapping",target:"_blank",rel:"noopener"}},[e._v("natural RDF datatype"),o("OutboundLink")],1),e._v(" of a literal built over a column and may not apply the expected normalization. This can be partially mitigated by expliciting the RDF datatype in the mapping, but normalization would remain unapplied.")]),e._v(" "),o("h2",{attrs:{id:"rdf-1-1"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#rdf-1-1"}},[e._v("#")]),e._v(" RDF 1.1")]),e._v(" "),o("p",[e._v("Ontop complies with "),o("a",{attrs:{href:"https://www.w3.org/TR/rdf11-new/",target:"_blank",rel:"noopener"}},[e._v("RDF 1.1"),o("OutboundLink")],1),e._v(". It types simple literals (from RDF 1.0) as "),o("code",[e._v("xsd:string")]),e._v(" and literals with a language tag as "),o("code",[e._v("rdf:langString")]),e._v(".")]),e._v(" "),o("h2",{attrs:{id:"owl-2-ql"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#owl-2-ql"}},[e._v("#")]),e._v(" OWL 2 QL")]),e._v(" "),o("h2",{attrs:{id:"rdfs"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#rdfs"}},[e._v("#")]),e._v(" RDFS")]),e._v(" "),o("h2",{attrs:{id:"time-functions"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#time-functions"}},[e._v("#")]),e._v(" Time functions")]),e._v(" "),o("p",[o("em",[e._v("Updated for 5.1.0")]),e._v(".")]),e._v(" "),o("p",[e._v("The functions using the prefix "),o("code",[e._v("ofn")]),e._v(" ("),o("code",[e._v("http://www.ontotext.com/sparql/functions/")]),e._v(") and their documentation can be found "),o("a",{attrs:{href:"https://graphdb.ontotext.com/documentation/10.0/devhub/time-functions.html#durations-expressed-in-certain-units",target:"_blank",rel:"noopener"}},[e._v("here"),o("OutboundLink")],1),e._v(". They accept both "),o("code",[e._v("xsd:date")]),e._v(" and "),o("code",[e._v("xsd:dateTime")]),e._v(" as arguments. ("),o("em",[e._v("supported since 4.2.0")]),e._v(").")]),e._v(" "),o("p",[e._v("The functions using the prefix "),o("code",[e._v("obdaf")]),e._v(" ("),o("code",[e._v("https://w3id.org/obda/functions#")]),e._v(") have been introduced in 5.1.0 (see "),o("a",{attrs:{href:"https://github.com/ontop/ontop/pull/705",target:"_blank",rel:"noopener"}},[e._v("#705"),o("OutboundLink")],1),e._v(").")]),e._v(" "),o("table",[o("thead",[o("tr",[o("th",[o("div",{staticStyle:{width:"140px"}},[e._v("Function")])]),e._v(" "),o("th",[e._v("Argument 1")]),e._v(" "),o("th",[e._v("Argument 2")])])]),e._v(" "),o("tbody",[o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:weeksBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:daysBetween")]),e._v("*")]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:date")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:hoursBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:minutesBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:secondsBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("ofn:millisBetween")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:dateTrunc")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:string")])])]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:milliseconds-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:microseconds-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:week-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:quarter-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:decade-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:century-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")]),e._v(" "),o("tr",[o("td",[o("code",[e._v("obdaf:millenium-from-dateTime")])]),e._v(" "),o("td",[o("code",[e._v("xsd:dateTime")])]),e._v(" "),o("td")])])]),e._v(" "),o("p",[e._v("Combinations of argument datatypes marked with the symbol * are not supported for queries over the following data sources: Oracle and Microsoft SQL Server.")]),e._v(" "),o("p",[e._v("The "),o("code",[e._v("obdaf:[datePart]-from-dateTime")]),e._v(" functions are supported for all dialects. They can be used to extract a specific part of the provided "),o("code",[e._v("dateTime")]),e._v(" value in a numeric format ("),o("code",[e._v("xsd:decimal")]),e._v(" for "),o("code",[e._v("milliseconds")]),e._v(" and "),o("code",[e._v("microseconds")]),e._v(", "),o("code",[e._v("xsd:integer")]),e._v(" for the remaining functions).")]),e._v(" "),o("div",{staticClass:"custom-block tip"},[o("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),o("p",[e._v("The function "),o("code",[e._v("obdaf:week-from-dateTime")]),e._v(" returns the ISO week index of the given date, where week 1 is considered the first week with a majority of its days in January.")])]),e._v(" "),o("p",[e._v("The "),o("code",[e._v("obdaf:dateTrunc")]),e._v(" function can be used to truncate a given "),o("code",[e._v("xsd:dateTime")]),e._v(" to a new value with specified granularity. The granularity must be provided as an "),o("code",[e._v("xsd:string")]),e._v(" "),o("strong",[e._v("literal")]),e._v(". The following granularity values are supported:")]),e._v(" "),o("ul",[o("li",[o("code",[e._v("microsecond")])]),e._v(" "),o("li",[o("code",[e._v("millisecond")])]),e._v(" "),o("li",[o("code",[e._v("second")])]),e._v(" "),o("li",[o("code",[e._v("minute")])]),e._v(" "),o("li",[o("code",[e._v("hour")])]),e._v(" "),o("li",[o("code",[e._v("day")])]),e._v(" "),o("li",[o("code",[e._v("week")])]),e._v(" "),o("li",[o("code",[e._v("month")])]),e._v(" "),o("li",[o("code",[e._v("quarter")])]),e._v(" "),o("li",[o("code",[e._v("year")])]),e._v(" "),o("li",[o("code",[e._v("decade")])]),e._v(" "),o("li",[o("code",[e._v("century")])]),e._v(" "),o("li",[o("code",[e._v("millennium")])])]),e._v(" "),o("div",{staticClass:"custom-block warning"},[o("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),o("p",[e._v("Not all database systems support all granularities equally.")]),e._v(" "),o("p",[o("code",[e._v("decade")]),e._v(", "),o("code",[e._v("century")]),e._v(", and "),o("code",[e._v("millennium")]),e._v(" are not supported by:")]),e._v(" "),o("ul",[o("li",[e._v("AWS Athena")]),e._v(" "),o("li",[e._v("Denodo ("),o("code",[e._v("century")]),e._v(" is supported)")]),e._v(" "),o("li",[e._v("MySQL ("),o("code",[e._v("century")]),e._v(" is supported)")]),e._v(" "),o("li",[e._v("MariaDB ("),o("code",[e._v("century")]),e._v(" is supported)")]),e._v(" "),o("li",[e._v("Oracle")]),e._v(" "),o("li",[e._v("Presto")]),e._v(" "),o("li",[e._v("SQLServer")]),e._v(" "),o("li",[e._v("Snowflake")]),e._v(" "),o("li",[e._v("Spark")]),e._v(" "),o("li",[e._v("Trino")])]),e._v(" "),o("p",[o("code",[e._v("second")]),e._v(" is not supported by:")]),e._v(" "),o("ul",[o("li",[e._v("Denodo")])]),e._v(" "),o("p",[o("code",[e._v("millisecond")]),e._v(" and "),o("code",[e._v("microsecond")]),e._v(" are not supported by:")]),e._v(" "),o("ul",[o("li",[e._v("AWS Athena")]),e._v(" "),o("li",[e._v("Denodo")]),e._v(" "),o("li",[e._v("MySQL")]),e._v(" "),o("li",[e._v("MariaDB")]),e._v(" "),o("li",[e._v("Oracle")]),e._v(" "),o("li",[e._v("Presto")]),e._v(" "),o("li",[e._v("Trino")])]),e._v(" "),o("p",[e._v("PostgreSQL requires these granularities to be named "),o("code",[e._v("milliseconds")]),e._v(" and "),o("code",[e._v("microseconds")]),e._v(" instead.")])]),e._v(" "),o("h3",{attrs:{id:"examples"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[e._v("#")]),e._v(" Examples")]),e._v(" "),o("p",[o("code",[e._v('obdaf:year("2023-08-16T09:00:00"^^xsd:dateTime)')]),e._v(" "),o("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[o("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[o("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[o("g",{attrs:{"data-mml-node":"math"}},[o("g",{attrs:{"data-mml-node":"mo"}},[o("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),e._v(" "),o("code",[e._v('"2023"^^xsd:integer')])],1),e._v(" "),o("p",[o("code",[e._v('obdaf:hour("2023-08-16T09:00:00"^^xsd:dateTime)')]),e._v(" "),o("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[o("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[o("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[o("g",{attrs:{"data-mml-node":"math"}},[o("g",{attrs:{"data-mml-node":"mo"}},[o("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),e._v(" "),o("code",[e._v('"9"^^xsd:integer')])],1),e._v(" "),o("p",[o("code",[e._v('obdaf:dateTrunc("2023-08-16T09:00:00"^^xsd:dateTime, "month"^^xsd:string)')]),e._v(" "),o("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[o("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[o("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[o("g",{attrs:{"data-mml-node":"math"}},[o("g",{attrs:{"data-mml-node":"mo"}},[o("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),e._v(" "),o("code",[e._v('"2023-08-01T00:00:00"^^xsd:dateTime')])],1)])}),[],!1,null,null,null);t.default=_.exports}}]); \ No newline at end of file diff --git a/assets/js/36.c44deccc.js b/assets/js/36.69b1ebb1.js similarity index 98% rename from assets/js/36.c44deccc.js rename to assets/js/36.69b1ebb1.js index dcf32d325..aaa141a51 100644 --- a/assets/js/36.c44deccc.js +++ b/assets/js/36.69b1ebb1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{413:function(t,e,a){"use strict";a.r(e);var r=a(51),n=Object(r.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"key-concepts"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#key-concepts"}},[t._v("#")]),t._v(" Key concepts")]),t._v(" "),a("h2",{attrs:{id:"virtual-knowledge-graph-vkg"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#virtual-knowledge-graph-vkg"}},[t._v("#")]),t._v(" Virtual Knowledge Graph (VKG)")]),t._v(" "),a("p",[t._v("A Knowledge Graph (KG) is, in our terminology, a graph using the RDF data model.")]),t._v(" "),a("p",[t._v("A Virtual KG (VKG) is a virtual representation in RDF of non-RDF data, which is generally relational data.\nWith a VKG, the data remains in the data sources in its original format but can be virtually represented as an RDF graph.")]),t._v(" "),a("h2",{attrs:{id:"rdf"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rdf"}},[t._v("#")]),t._v(" RDF")]),t._v(" "),a("p",[t._v("The "),a("a",{attrs:{href:"https://www.w3.org/TR/rdf11-concepts/",target:"_blank",rel:"noopener"}},[t._v("Resource Description Framework (RDF)"),a("OutboundLink")],1),t._v("\nis one of the two main data models for graphs (together with "),a("a",{attrs:{href:"http://graphdatamodeling.com/Graph%20Data%20Modeling/GraphDataModeling/page/PropertyGraphs.html",target:"_blank",rel:"noopener"}},[t._v("property graphs"),a("OutboundLink")],1),t._v(").\nRDF mainly targets "),a("strong",[t._v("data integration")]),t._v(" applications while property graphs are used for building graph databases.")]),t._v(" "),a("p",[t._v("In RDF, data is modelled using classes and properties.")]),t._v(" "),a("p",[t._v("Starting from 3.0, Ontop supports "),a("a",{attrs:{href:"https://www.w3.org/TR/rdf11-concepts/",target:"_blank",rel:"noopener"}},[t._v("RDF 1.1"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"sparql-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-query"}},[t._v("#")]),t._v(" SPARQL query")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[t._v("SPARQL"),a("OutboundLink")],1),t._v(" is the standard query language for RDF graphs.")]),t._v(" "),a("p",[t._v("Ontop is capable of answering SPARQL queries expressed over the VKG.\nOntop translates these SPARQL queries into SQL queries, which are then executed over the relational data sources.")]),t._v(" "),a("p",[t._v("Ontop supports a large fragment of "),a("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[t._v("SPARQL 1.1"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"mappings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mappings"}},[t._v("#")]),t._v(" Mappings")]),t._v(" "),a("p",[t._v("Mappings specify the correspondence between the data models of the relational data sources and the RDF graph.\nOntop supports the "),a("a",{attrs:{href:"https://www.w3.org/TR/r2rml/",target:"_blank",rel:"noopener"}},[t._v("R2RML standard mapping language"),a("OutboundLink")],1),t._v(" and the Ontop mapping language, which is fully interoperable with R2RML.")]),t._v(" "),a("h2",{attrs:{id:"ontology"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontology"}},[t._v("#")]),t._v(" Ontology")]),t._v(" "),a("p",[t._v("An ontology specifies the formal relations between the classes and properties used by the RDF graph. It is mainly used for enriching the RDF graph by, for instance, taking account of class hierarchies.")]),t._v(" "),a("p",[t._v("Ontop supports lightweight ontologies expressed in "),a("a",{attrs:{href:"https://www.w3.org/TR/rdf-schema/",target:"_blank",rel:"noopener"}},[t._v("RDFS"),a("OutboundLink")],1),t._v(" or in the slightly more expressive "),a("a",{attrs:{href:"https://www.w3.org/TR/owl2-profiles/#OWL_2_QL",target:"_blank",rel:"noopener"}},[t._v("OWL 2 QL"),a("OutboundLink")],1),t._v(" fragment of OWL.")]),t._v(" "),a("h2",{attrs:{id:"vkg-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vkg-specification"}},[t._v("#")]),t._v(" VKG specification")]),t._v(" "),a("p",[t._v("VKG specifications are composed of mappings and optionally of ontologies.")]),t._v(" "),a("h2",{attrs:{id:"sparql-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-endpoint"}},[t._v("#")]),t._v(" SPARQL endpoint")]),t._v(" "),a("p",[t._v("A "),a("a",{attrs:{href:"https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/",target:"_blank",rel:"noopener"}},[t._v("SPARQL endpoint"),a("OutboundLink")],1),t._v(" is a standardized HTTP-based Web API.\nIt makes the RDF graph queryable by any HTTP client.")]),t._v(" "),a("p",[t._v("Ontop enables VKG specifications to be deployed as SPARQL endpoints.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{412:function(t,e,a){"use strict";a.r(e);var r=a(51),n=Object(r.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"key-concepts"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#key-concepts"}},[t._v("#")]),t._v(" Key concepts")]),t._v(" "),a("h2",{attrs:{id:"virtual-knowledge-graph-vkg"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#virtual-knowledge-graph-vkg"}},[t._v("#")]),t._v(" Virtual Knowledge Graph (VKG)")]),t._v(" "),a("p",[t._v("A Knowledge Graph (KG) is, in our terminology, a graph using the RDF data model.")]),t._v(" "),a("p",[t._v("A Virtual KG (VKG) is a virtual representation in RDF of non-RDF data, which is generally relational data.\nWith a VKG, the data remains in the data sources in its original format but can be virtually represented as an RDF graph.")]),t._v(" "),a("h2",{attrs:{id:"rdf"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rdf"}},[t._v("#")]),t._v(" RDF")]),t._v(" "),a("p",[t._v("The "),a("a",{attrs:{href:"https://www.w3.org/TR/rdf11-concepts/",target:"_blank",rel:"noopener"}},[t._v("Resource Description Framework (RDF)"),a("OutboundLink")],1),t._v("\nis one of the two main data models for graphs (together with "),a("a",{attrs:{href:"http://graphdatamodeling.com/Graph%20Data%20Modeling/GraphDataModeling/page/PropertyGraphs.html",target:"_blank",rel:"noopener"}},[t._v("property graphs"),a("OutboundLink")],1),t._v(").\nRDF mainly targets "),a("strong",[t._v("data integration")]),t._v(" applications while property graphs are used for building graph databases.")]),t._v(" "),a("p",[t._v("In RDF, data is modelled using classes and properties.")]),t._v(" "),a("p",[t._v("Starting from 3.0, Ontop supports "),a("a",{attrs:{href:"https://www.w3.org/TR/rdf11-concepts/",target:"_blank",rel:"noopener"}},[t._v("RDF 1.1"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"sparql-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-query"}},[t._v("#")]),t._v(" SPARQL query")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[t._v("SPARQL"),a("OutboundLink")],1),t._v(" is the standard query language for RDF graphs.")]),t._v(" "),a("p",[t._v("Ontop is capable of answering SPARQL queries expressed over the VKG.\nOntop translates these SPARQL queries into SQL queries, which are then executed over the relational data sources.")]),t._v(" "),a("p",[t._v("Ontop supports a large fragment of "),a("a",{attrs:{href:"https://www.w3.org/TR/sparql11-query/",target:"_blank",rel:"noopener"}},[t._v("SPARQL 1.1"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"mappings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mappings"}},[t._v("#")]),t._v(" Mappings")]),t._v(" "),a("p",[t._v("Mappings specify the correspondence between the data models of the relational data sources and the RDF graph.\nOntop supports the "),a("a",{attrs:{href:"https://www.w3.org/TR/r2rml/",target:"_blank",rel:"noopener"}},[t._v("R2RML standard mapping language"),a("OutboundLink")],1),t._v(" and the Ontop mapping language, which is fully interoperable with R2RML.")]),t._v(" "),a("h2",{attrs:{id:"ontology"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontology"}},[t._v("#")]),t._v(" Ontology")]),t._v(" "),a("p",[t._v("An ontology specifies the formal relations between the classes and properties used by the RDF graph. It is mainly used for enriching the RDF graph by, for instance, taking account of class hierarchies.")]),t._v(" "),a("p",[t._v("Ontop supports lightweight ontologies expressed in "),a("a",{attrs:{href:"https://www.w3.org/TR/rdf-schema/",target:"_blank",rel:"noopener"}},[t._v("RDFS"),a("OutboundLink")],1),t._v(" or in the slightly more expressive "),a("a",{attrs:{href:"https://www.w3.org/TR/owl2-profiles/#OWL_2_QL",target:"_blank",rel:"noopener"}},[t._v("OWL 2 QL"),a("OutboundLink")],1),t._v(" fragment of OWL.")]),t._v(" "),a("h2",{attrs:{id:"vkg-specification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vkg-specification"}},[t._v("#")]),t._v(" VKG specification")]),t._v(" "),a("p",[t._v("VKG specifications are composed of mappings and optionally of ontologies.")]),t._v(" "),a("h2",{attrs:{id:"sparql-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-endpoint"}},[t._v("#")]),t._v(" SPARQL endpoint")]),t._v(" "),a("p",[t._v("A "),a("a",{attrs:{href:"https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/",target:"_blank",rel:"noopener"}},[t._v("SPARQL endpoint"),a("OutboundLink")],1),t._v(" is a standardized HTTP-based Web API.\nIt makes the RDF graph queryable by any HTTP client.")]),t._v(" "),a("p",[t._v("Ontop enables VKG specifications to be deployed as SPARQL endpoints.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/43.9e2da8d6.js b/assets/js/43.1f88b050.js similarity index 98% rename from assets/js/43.9e2da8d6.js rename to assets/js/43.1f88b050.js index 28c9766d7..cc7309060 100644 --- a/assets/js/43.9e2da8d6.js +++ b/assets/js/43.1f88b050.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{420:function(t,e,s){"use strict";s.r(e);var a=s(51),o=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"duckdb"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#duckdb"}},[t._v("#")]),t._v(" DuckDB")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://duckdb.org",target:"_blank",rel:"noopener"}},[t._v("DuckDB"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on DuckDB database files.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("ul",[s("li",[t._v("DuckDB database files prior to version 1.0 are not guaranteed to be compatible with later versions.")]),t._v(" "),s("li",[t._v("Setting a default schema is not supported when connecting to DuckDB.")]),t._v(" "),s("li",[t._v("Nested data types are only supported starting from version 0.7 of DuckDB.")]),t._v(" "),s("li",[t._v('Accessing struct fields using the "dot operator" is not supported.')]),t._v(" "),s("li",[t._v("The Ontop option "),s("code",[t._v("ontop.exposeSystemTables")]),t._v(" is not supported for DuckDB, as the JBDC does not allow us to access system tables.")]),t._v(" "),s("li",[t._v("DuckDB has a very specific "),s("a",{attrs:{href:"https://duckdb.org/faq#how-does-duckdb-handle-concurrency",target:"_blank",rel:"noopener"}},[t._v("concurrency model"),s("OutboundLink")],1),t._v(". In particular, it does not support concurrent multi-process read-write queries.")])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to DuckDB:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:duckdb:path/to/database.db\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" org.duckdb.DuckDBDriver\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the DuckDB array type "),s("code",[t._v("T[]")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("Nested data types are only supported starting from version 0.7 of DuckDB.")])]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v("Individual struct objects can be accessed by SQL expressions in the dialect's default way:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("SELECT my_struct['my_attribute'] FROM ...\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('Accessing struct fields using the "dot operator" is not supported.')])])])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{421:function(t,e,s){"use strict";s.r(e);var a=s(51),o=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"duckdb"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#duckdb"}},[t._v("#")]),t._v(" DuckDB")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://duckdb.org",target:"_blank",rel:"noopener"}},[t._v("DuckDB"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on DuckDB database files.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("ul",[s("li",[t._v("DuckDB database files prior to version 1.0 are not guaranteed to be compatible with later versions.")]),t._v(" "),s("li",[t._v("Setting a default schema is not supported when connecting to DuckDB.")]),t._v(" "),s("li",[t._v("Nested data types are only supported starting from version 0.7 of DuckDB.")]),t._v(" "),s("li",[t._v('Accessing struct fields using the "dot operator" is not supported.')]),t._v(" "),s("li",[t._v("The Ontop option "),s("code",[t._v("ontop.exposeSystemTables")]),t._v(" is not supported for DuckDB, as the JBDC does not allow us to access system tables.")]),t._v(" "),s("li",[t._v("DuckDB has a very specific "),s("a",{attrs:{href:"https://duckdb.org/faq#how-does-duckdb-handle-concurrency",target:"_blank",rel:"noopener"}},[t._v("concurrency model"),s("OutboundLink")],1),t._v(". In particular, it does not support concurrent multi-process read-write queries.")])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to DuckDB:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:duckdb:path/to/database.db\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" org.duckdb.DuckDBDriver\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the DuckDB array type "),s("code",[t._v("T[]")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("Nested data types are only supported starting from version 0.7 of DuckDB.")])]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v("Individual struct objects can be accessed by SQL expressions in the dialect's default way:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("SELECT my_struct['my_attribute'] FROM ...\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('Accessing struct fields using the "dot operator" is not supported.')])])])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/44.b45be0fb.js b/assets/js/44.3141a4aa.js similarity index 98% rename from assets/js/44.b45be0fb.js rename to assets/js/44.3141a4aa.js index 23939f88e..71197df48 100644 --- a/assets/js/44.b45be0fb.js +++ b/assets/js/44.3141a4aa.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{421:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"aws-dynamodb"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#aws-dynamodb"}},[t._v("#")]),t._v(" AWS DynamoDB")]),t._v(" "),a("p",[a("em",[t._v("Supported (beta) since 5.1.0.")])]),t._v(" "),a("p",[t._v("Through the "),a("a",{attrs:{href:"https://www.amazonaws.cn/en/dynamodb/",target:"_blank",rel:"noopener"}},[t._v("DynamoDB"),a("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on AWS DynamoDB tables using the "),a("a",{attrs:{href:"https://www.cdata.com/drivers/dynamodb/jdbc/",target:"_blank",rel:"noopener"}},[t._v("CData JDBC Driver for Amazon DynamoDB"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("DynamoDB only provides limited information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),a("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("To run Ontop with the CData DynamoDB JDBC, "),a("em",[t._v('"enhanced SQL queries"')]),t._v(" must be enabled. This is achieved by adding "),a("code",[t._v("supportenhancedsql=true")]),t._v(" to the connection properties.")])]),t._v(" "),a("ul",[a("li",[t._v("Nested data structures and the "),a("em",[t._v("FlattenLens")]),t._v(" are not supported.")])]),t._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),a("p",[t._v("The following shows the content of a sample "),a("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to DynamoDB:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:amazondynamodb:AuthScheme"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("AwsRootKeys"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("AWSRegion")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("FRANKFURT"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("supportenhancedsql")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("true\njdbc.property.AWSAccessKey "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" public-access-key\njdbc.property.AWSSecretKey "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" private-access-key\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" cdata.jdbc.amazondynamodb.AmazonDynamoDBDriver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),a("p",[t._v("Nested data types and the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(" are not supported for DynamoDB.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{420:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"aws-dynamodb"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#aws-dynamodb"}},[t._v("#")]),t._v(" AWS DynamoDB")]),t._v(" "),a("p",[a("em",[t._v("Supported (beta) since 5.1.0.")])]),t._v(" "),a("p",[t._v("Through the "),a("a",{attrs:{href:"https://www.amazonaws.cn/en/dynamodb/",target:"_blank",rel:"noopener"}},[t._v("DynamoDB"),a("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on AWS DynamoDB tables using the "),a("a",{attrs:{href:"https://www.cdata.com/drivers/dynamodb/jdbc/",target:"_blank",rel:"noopener"}},[t._v("CData JDBC Driver for Amazon DynamoDB"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("DynamoDB only provides limited information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),a("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("To run Ontop with the CData DynamoDB JDBC, "),a("em",[t._v('"enhanced SQL queries"')]),t._v(" must be enabled. This is achieved by adding "),a("code",[t._v("supportenhancedsql=true")]),t._v(" to the connection properties.")])]),t._v(" "),a("ul",[a("li",[t._v("Nested data structures and the "),a("em",[t._v("FlattenLens")]),t._v(" are not supported.")])]),t._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),a("p",[t._v("The following shows the content of a sample "),a("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to DynamoDB:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:amazondynamodb:AuthScheme"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("AwsRootKeys"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("AWSRegion")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("FRANKFURT"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("supportenhancedsql")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("true\njdbc.property.AWSAccessKey "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" public-access-key\njdbc.property.AWSSecretKey "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" private-access-key\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" cdata.jdbc.amazondynamodb.AmazonDynamoDBDriver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),a("p",[t._v("Nested data types and the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(" are not supported for DynamoDB.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/5.01119bb7.js b/assets/js/5.e8e9de00.js similarity index 67% rename from assets/js/5.01119bb7.js rename to assets/js/5.e8e9de00.js index e69dc5fc7..1d05257aa 100644 --- a/assets/js/5.01119bb7.js +++ b/assets/js/5.e8e9de00.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{350:function(t,e,a){},378:function(t,e,a){"use strict";a(350)},385:function(t,e,a){"use strict";a.r(e);var n={name:"CodeBlock",props:{title:{type:String,required:!0},active:{type:Boolean,default:!1}},mounted:function(){this.$parent&&this.$parent.loadTabs&&this.$parent.loadTabs()}},i=(a(378),a(51)),s=Object(i.a)(n,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"theme-code-block",class:{"theme-code-block__active":this.active}},[this._t("default")],2)}),[],!1,null,"759a7d02",null);e.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{349:function(t,e,a){},377:function(t,e,a){"use strict";a(349)},384:function(t,e,a){"use strict";a.r(e);var n={name:"CodeBlock",props:{title:{type:String,required:!0},active:{type:Boolean,default:!1}},mounted:function(){this.$parent&&this.$parent.loadTabs&&this.$parent.loadTabs()}},i=(a(377),a(51)),s=Object(i.a)(n,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"theme-code-block",class:{"theme-code-block__active":this.active}},[this._t("default")],2)}),[],!1,null,"759a7d02",null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/50.5d9fdced.js b/assets/js/50.a6d14188.js similarity index 98% rename from assets/js/50.5d9fdced.js rename to assets/js/50.a6d14188.js index 6de4803fb..984892e2f 100644 --- a/assets/js/50.5d9fdced.js +++ b/assets/js/50.a6d14188.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{429:function(t,e,a){"use strict";a.r(e);var s=a(51),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"oracle"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#oracle"}},[t._v("#")]),t._v(" Oracle")]),t._v(" "),a("p",[t._v("Through the "),a("a",{attrs:{href:"https://www.oracle.com/database/",target:"_blank",rel:"noopener"}},[t._v("Oracle"),a("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on external Oracle databases.")]),t._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),a("ul",[a("li",[t._v("Ontop cannot perform inference based on nested data types in Oracle.")]),t._v(" "),a("li",[t._v('Ontop represents the "big integer" datatype as '),a("code",[t._v("NUMBER(19)")]),t._v(".")])]),t._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),a("p",[t._v("The following shows the content of a sample "),a("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Oracle:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:oracle:thin:@//localhost:49161/defaultcontainer\njdbc.user "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" oracle.jdbc.OracleDriver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),a("p",[t._v("Ontop does not implement explicit compatibility with nested datatypes in Oracle.\nHowever, Ontop allows the usage of the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(" over string columns that contain JSON-encoded arrays. The output type of the flattened result column cannot be inferred.")]),t._v(" "),a("p",[t._v("To use the flatten lens with Oracle array types, they must first be converted to JSON strings.")]),t._v(" "),a("p",[t._v("In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), "),a("a",{attrs:{href:"https://docs.oracle.com/en/database/oracle/oracle-database/21/adjsn/query-json-data.html#GUID-119E5069-77F2-45DC-B6F0-A1B312945590",target:"_blank",rel:"noopener"}},[t._v("Oracle's JSON functions"),a("OutboundLink")],1),t._v(" can be used to further work with them.")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v('Accessing object fields using the "dot operator" is not supported. Please use SQL JSON functions instead.')])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{427:function(t,e,a){"use strict";a.r(e);var s=a(51),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"oracle"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#oracle"}},[t._v("#")]),t._v(" Oracle")]),t._v(" "),a("p",[t._v("Through the "),a("a",{attrs:{href:"https://www.oracle.com/database/",target:"_blank",rel:"noopener"}},[t._v("Oracle"),a("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on external Oracle databases.")]),t._v(" "),a("h2",{attrs:{id:"limitations-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),a("ul",[a("li",[t._v("Ontop cannot perform inference based on nested data types in Oracle.")]),t._v(" "),a("li",[t._v('Ontop represents the "big integer" datatype as '),a("code",[t._v("NUMBER(19)")]),t._v(".")])]),t._v(" "),a("h2",{attrs:{id:"database-connection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),a("p",[t._v("The following shows the content of a sample "),a("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Oracle:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("jdbc.url "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:oracle:thin:@//localhost:49161/defaultcontainer\njdbc.user "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" oracle.jdbc.OracleDriver\n")])])]),a("h2",{attrs:{id:"nested-type-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),a("p",[t._v("Ontop does not implement explicit compatibility with nested datatypes in Oracle.\nHowever, Ontop allows the usage of the "),a("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(" over string columns that contain JSON-encoded arrays. The output type of the flattened result column cannot be inferred.")]),t._v(" "),a("p",[t._v("To use the flatten lens with Oracle array types, they must first be converted to JSON strings.")]),t._v(" "),a("p",[t._v("In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), "),a("a",{attrs:{href:"https://docs.oracle.com/en/database/oracle/oracle-database/21/adjsn/query-json-data.html#GUID-119E5069-77F2-45DC-B6F0-A1B312945590",target:"_blank",rel:"noopener"}},[t._v("Oracle's JSON functions"),a("OutboundLink")],1),t._v(" can be used to further work with them.")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v('Accessing object fields using the "dot operator" is not supported. Please use SQL JSON functions instead.')])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/51.55dfa97d.js b/assets/js/51.db247110.js similarity index 98% rename from assets/js/51.55dfa97d.js rename to assets/js/51.db247110.js index 5cb482392..78f786150 100644 --- a/assets/js/51.55dfa97d.js +++ b/assets/js/51.db247110.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{427:function(t,e,s){"use strict";s.r(e);var a=s(51),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"postgresql"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#postgresql"}},[t._v("#")]),t._v(" PostgreSQL")]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://postgresql.org",target:"_blank",rel:"noopener"}},[t._v("PostgreSQL"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on external Postgres databases.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("ul",[s("li",[t._v('Accessing JSON object fields with the "arrow operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to PostgreSQL:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:postgresql://localhost:5432/database\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" admin\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" org.postgresql.Driver\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the PostgreSQL array type "),s("code",[t._v("T[]")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("Furthermore, the flatten lens can also be used with the "),s("code",[t._v("JSON")]),t._v(" and "),s("code",[t._v("JSONB")]),t._v(" datatypes, which are both recognized by Ontop. For these types, however, Ontop cannot infer the output type of the flattened column.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v('In PostgreSQL, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.')]),t._v(" "),s("p",[t._v("Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.")]),t._v(" "),s("p",[t._v("Example:")]),t._v(" "),s("p",[s("code",[t._v("my_struct.my_attribute")]),t._v(" "),s("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[s("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[s("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[s("g",{attrs:{"data-mml-node":"math"}},[s("g",{attrs:{"data-mml-node":"mo"}},[s("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),t._v(" "),s("code",[t._v("JSON_EXTRACT_PATH(TO_JSON(my_struct), '$.my_attribute')")])],1),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('The "arrow operators" used to access JSON objects in PostgreSQL are not supported in Ontop. Please use JSON functions instead.')])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{429:function(t,e,s){"use strict";s.r(e);var a=s(51),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"postgresql"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#postgresql"}},[t._v("#")]),t._v(" PostgreSQL")]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://postgresql.org",target:"_blank",rel:"noopener"}},[t._v("PostgreSQL"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on external Postgres databases.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("ul",[s("li",[t._v('Accessing JSON object fields with the "arrow operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to PostgreSQL:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:postgresql://localhost:5432/database\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" admin\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" org.postgresql.Driver\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the PostgreSQL array type "),s("code",[t._v("T[]")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("Furthermore, the flatten lens can also be used with the "),s("code",[t._v("JSON")]),t._v(" and "),s("code",[t._v("JSONB")]),t._v(" datatypes, which are both recognized by Ontop. For these types, however, Ontop cannot infer the output type of the flattened column.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v('In PostgreSQL, individual struct objects can be accessed by SQL expressions using the "dot operator" on the struct column. In Ontop, this feature is not currently supported.')]),t._v(" "),s("p",[t._v("Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.")]),t._v(" "),s("p",[t._v("Example:")]),t._v(" "),s("p",[s("code",[t._v("my_struct.my_attribute")]),t._v(" "),s("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[s("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[s("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[s("g",{attrs:{"data-mml-node":"math"}},[s("g",{attrs:{"data-mml-node":"mo"}},[s("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),t._v(" "),s("code",[t._v("JSON_EXTRACT_PATH(TO_JSON(my_struct), '$.my_attribute')")])],1),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('The "arrow operators" used to access JSON objects in PostgreSQL are not supported in Ontop. Please use JSON functions instead.')])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/53.baae48e1.js b/assets/js/53.7504f725.js similarity index 98% rename from assets/js/53.baae48e1.js rename to assets/js/53.7504f725.js index 584c1d3b6..eb83bb53c 100644 --- a/assets/js/53.baae48e1.js +++ b/assets/js/53.7504f725.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{431:function(t,e,s){"use strict";s.r(e);var a=s(51),o=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"aws-redshift"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#aws-redshift"}},[t._v("#")]),t._v(" AWS Redshift")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://aws.amazon.com/redshift/",target:"_blank",rel:"noopener"}},[t._v("Redshift"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on AWS Redshift databases.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("AWS Redshift does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),s("ul",[s("li",[t._v("The Simba Redshift JDBC does not support the use of default databases when connecting to Redshift.")]),t._v(" "),s("li",[t._v("Accessing "),s("code",[t._v("SUPER")]),t._v(' object fields with the "dot operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Redshift:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:redshift:iam://default.dummyaccount.eu-central-1.redshift-serverless.amazonaws.com:5439/defaultdatabase\njdbc.property.AccessKeyID "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" public-access-key\njdbc.property.SecretAccessKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" private-access-key\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" com.amazon.redshift.jdbc42.Driver\n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("The AWS Redshift JDBC supports different types of authentication methods. The above "),s("code",[t._v(".property")]),t._v(" file corresponds to authentication with access keys. However, any other authentication method can be used with Ontop as well. In these cases, the corresponding connection properties have to be supplied as "),s("code",[t._v("jdbc.property.")]),t._v(" instead of the "),s("code",[t._v("AccessKeyID")]),t._v(" and "),s("code",[t._v("SecretAccessKey")]),t._v(" properties.")])]),t._v(" "),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the Redshift type "),s("code",[t._v("SUPER")]),t._v(".")]),t._v(" "),s("p",[t._v("This type can be used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(". However, Ontop is not able to automatically infer the type of the result column.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v("In Redshift, individual "),s("code",[t._v("SUPER")]),t._v(' struct objects can be accessed by SQL expressions using the "dot operator" on the '),s("code",[t._v("SUPER")]),t._v(" column. In Ontop, this feature is not currently supported.")]),t._v(" "),s("p",[t._v("Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.")]),t._v(" "),s("p",[t._v("Example:")]),t._v(" "),s("p",[s("code",[t._v("my_struct.my_attribute")]),t._v(" "),s("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[s("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[s("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[s("g",{attrs:{"data-mml-node":"math"}},[s("g",{attrs:{"data-mml-node":"mo"}},[s("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),t._v(" "),s("code",[t._v("JSON_EXTRACT_PATH_TEXT(JSON_SERIALIZE(my_struct), 'my_attribute')")])],1)])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{430:function(t,e,s){"use strict";s.r(e);var a=s(51),o=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"aws-redshift"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#aws-redshift"}},[t._v("#")]),t._v(" AWS Redshift")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://aws.amazon.com/redshift/",target:"_blank",rel:"noopener"}},[t._v("Redshift"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on AWS Redshift databases.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("AWS Redshift does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),s("ul",[s("li",[t._v("The Simba Redshift JDBC does not support the use of default databases when connecting to Redshift.")]),t._v(" "),s("li",[t._v("Accessing "),s("code",[t._v("SUPER")]),t._v(' object fields with the "dot operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Redshift:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:redshift:iam://default.dummyaccount.eu-central-1.redshift-serverless.amazonaws.com:5439/defaultdatabase\njdbc.property.AccessKeyID "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" public-access-key\njdbc.property.SecretAccessKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" private-access-key\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" com.amazon.redshift.jdbc42.Driver\n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),s("p",[t._v("The AWS Redshift JDBC supports different types of authentication methods. The above "),s("code",[t._v(".property")]),t._v(" file corresponds to authentication with access keys. However, any other authentication method can be used with Ontop as well. In these cases, the corresponding connection properties have to be supplied as "),s("code",[t._v("jdbc.property.")]),t._v(" instead of the "),s("code",[t._v("AccessKeyID")]),t._v(" and "),s("code",[t._v("SecretAccessKey")]),t._v(" properties.")])]),t._v(" "),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the Redshift type "),s("code",[t._v("SUPER")]),t._v(".")]),t._v(" "),s("p",[t._v("This type can be used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(". However, Ontop is not able to automatically infer the type of the result column.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v("In Redshift, individual "),s("code",[t._v("SUPER")]),t._v(' struct objects can be accessed by SQL expressions using the "dot operator" on the '),s("code",[t._v("SUPER")]),t._v(" column. In Ontop, this feature is not currently supported.")]),t._v(" "),s("p",[t._v("Should any of their elements still be required, then a workaround can be performed by first transforming the struct into a JSON object and then accessing it using JSON functions.")]),t._v(" "),s("p",[t._v("Example:")]),t._v(" "),s("p",[s("code",[t._v("my_struct.my_attribute")]),t._v(" "),s("mjx-container",{staticClass:"MathJax",attrs:{jax:"SVG"}},[s("svg",{staticStyle:{"vertical-align":"-0.025ex"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"2.262ex",height:"1.181ex",viewBox:"0 -511 1000 522"}},[s("g",{attrs:{stroke:"currentColor",fill:"currentColor","stroke-width":"0",transform:"matrix(1 0 0 -1 0 0)"}},[s("g",{attrs:{"data-mml-node":"math"}},[s("g",{attrs:{"data-mml-node":"mo"}},[s("path",{attrs:{"data-c":"2192",d:"M56 237T56 250T70 270H835Q719 357 692 493Q692 494 692 496T691 499Q691 511 708 511H711Q720 511 723 510T729 506T732 497T735 481T743 456Q765 389 816 336T935 261Q944 258 944 250Q944 244 939 241T915 231T877 212Q836 186 806 152T761 85T740 35T732 4Q730 -6 727 -8T711 -11Q691 -11 691 0Q691 7 696 25Q728 151 835 230H70Q56 237 56 250Z"}})])])])])]),t._v(" "),s("code",[t._v("JSON_EXTRACT_PATH_TEXT(JSON_SERIALIZE(my_struct), 'my_attribute')")])],1)])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/54.ea19806d.js b/assets/js/54.fc0ed059.js similarity index 98% rename from assets/js/54.ea19806d.js rename to assets/js/54.fc0ed059.js index ae408fb07..01cc5f473 100644 --- a/assets/js/54.ea19806d.js +++ b/assets/js/54.fc0ed059.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{430:function(e,t,s){"use strict";s.r(t);var a=s(51),o=Object(a.a)({},(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[s("h1",{attrs:{id:"snowflake"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#snowflake"}},[e._v("#")]),e._v(" Snowflake")]),e._v(" "),s("p",[s("em",[e._v("Supported since 5.0.0.")])]),e._v(" "),s("p",[e._v("Through the "),s("a",{attrs:{href:"https://snowflake.com",target:"_blank",rel:"noopener"}},[e._v("Snowflake"),s("OutboundLink")],1),e._v(" connector, Ontop is able to construct VKGs on cloud-based Snowflake databases.")]),e._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[e._v("#")]),e._v(" Limitations & Exceptions")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Integrity constraints are often missing in Snowflake. Make sure to specify the missing ones in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")]),e._v(" for this purpose.")])]),e._v(" "),s("ul",[s("li",[e._v("Due to an issue in the JDBC, quotation marks cannot always be used when defining an alias. Because of this, it is recommended to choose column names without special characters where possible.")]),e._v(" "),s("li",[e._v('Accessing struct fields with the "colon operator" is not supported (see below).')])]),e._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[e._v("#")]),e._v(" Database Connection")]),e._v(" "),s("p",[e._v("The following shows the content of a sample "),s("code",[e._v(".properties")]),e._v(" file that can be used to connect Ontop to Snowflake:")]),e._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[e._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" jdbc:snowflake://dummyuser.snowflakecomputing.com/?warehouse"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("dummywarehouse"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("&")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("db")]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("dummydb"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("&")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("schema")]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("dummyschema\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" user\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" password\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" net.snowflake.client.jdbc.SnowflakeDriver\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[e._v("#")]),e._v(" Nested Type Support")]),e._v(" "),s("p",[e._v("Ontop implements explicit compatibility with the "),s("code",[e._v("ARRAY")]),e._v(" type, which can be used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[e._v("flatten lens")]),e._v(". However, it is not able to automatically infer the type of the resulting column.")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Due to an issue mentioned above, using special characters inside the "),s("code",[e._v("output")]),e._v(" and "),s("code",[e._v("position")]),e._v(" fields of the flatten lens for Snowflake will fail. Furthermore, these fields will always be case-insensitive.")])]),e._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[e._v("#")]),e._v(" Struct Access")]),e._v(" "),s("p",[e._v("Individual object fields can be accessed by SQL expressions in the dialect's default way:")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("SELECT my_object['my_field'] FROM ...\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v('Accessing object fields using the "colon operator" is not supported. Please use the '),s("code",[e._v("[]")]),e._v(" operator instead.")])])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{431:function(e,t,s){"use strict";s.r(t);var a=s(51),o=Object(a.a)({},(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[s("h1",{attrs:{id:"snowflake"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#snowflake"}},[e._v("#")]),e._v(" Snowflake")]),e._v(" "),s("p",[s("em",[e._v("Supported since 5.0.0.")])]),e._v(" "),s("p",[e._v("Through the "),s("a",{attrs:{href:"https://snowflake.com",target:"_blank",rel:"noopener"}},[e._v("Snowflake"),s("OutboundLink")],1),e._v(" connector, Ontop is able to construct VKGs on cloud-based Snowflake databases.")]),e._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[e._v("#")]),e._v(" Limitations & Exceptions")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Integrity constraints are often missing in Snowflake. Make sure to specify the missing ones in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")]),e._v(" for this purpose.")])]),e._v(" "),s("ul",[s("li",[e._v("Due to an issue in the JDBC, quotation marks cannot always be used when defining an alias. Because of this, it is recommended to choose column names without special characters where possible.")]),e._v(" "),s("li",[e._v('Accessing struct fields with the "colon operator" is not supported (see below).')])]),e._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[e._v("#")]),e._v(" Database Connection")]),e._v(" "),s("p",[e._v("The following shows the content of a sample "),s("code",[e._v(".properties")]),e._v(" file that can be used to connect Ontop to Snowflake:")]),e._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[e._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" jdbc:snowflake://dummyuser.snowflakecomputing.com/?warehouse"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("dummywarehouse"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("&")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("db")]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("dummydb"),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("&")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("schema")]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("dummyschema\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" user\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" password\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" net.snowflake.client.jdbc.SnowflakeDriver\n")])])]),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[e._v("#")]),e._v(" Nested Type Support")]),e._v(" "),s("p",[e._v("Ontop implements explicit compatibility with the "),s("code",[e._v("ARRAY")]),e._v(" type, which can be used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[e._v("flatten lens")]),e._v(". However, it is not able to automatically infer the type of the resulting column.")]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v("Due to an issue mentioned above, using special characters inside the "),s("code",[e._v("output")]),e._v(" and "),s("code",[e._v("position")]),e._v(" fields of the flatten lens for Snowflake will fail. Furthermore, these fields will always be case-insensitive.")])]),e._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[e._v("#")]),e._v(" Struct Access")]),e._v(" "),s("p",[e._v("Individual object fields can be accessed by SQL expressions in the dialect's default way:")]),e._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[e._v("SELECT my_object['my_field'] FROM ...\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),s("p",[e._v('Accessing object fields using the "colon operator" is not supported. Please use the '),s("code",[e._v("[]")]),e._v(" operator instead.")])])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/56.f6297f24.js b/assets/js/56.4b4edba3.js similarity index 98% rename from assets/js/56.f6297f24.js rename to assets/js/56.4b4edba3.js index 7177a6e0c..e4e08c5a1 100644 --- a/assets/js/56.f6297f24.js +++ b/assets/js/56.4b4edba3.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{436:function(t,e,s){"use strict";s.r(e);var a=s(51),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"trino"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#trino"}},[t._v("#")]),t._v(" Trino")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://trino.io",target:"_blank",rel:"noopener"}},[t._v("Trino"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on Trino databases.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("Trino does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),s("ul",[s("li",[t._v('Accessing struct fields with the "dot operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Trino:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:trino://localhost:8080/defaultdatabase\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" io.trino.jdbc.TrinoDriver\n")])])]),s("p",[t._v("In case Trino is set up without authentication, the "),s("code",[t._v("jdbc.user")]),t._v(" and "),s("code",[t._v("jdbc.password")]),t._v(" lines can also be left out.")]),t._v(" "),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the Trino array type "),s("code",[t._v("array(t)")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v("Individual "),s("a",{attrs:{href:"https://trino.io/docs/current/language/types.html#map",target:"_blank",rel:"noopener"}},[s("code",[t._v("MAP")]),s("OutboundLink")],1),t._v(" structures can be accessed by SQL expressions in the dialect's default way:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("SELECT my_struct['my_attribute'] FROM ...\n")])])]),s("p",[s("a",{attrs:{href:"https://trino.io/docs/current/language/types.html#row",target:"_blank",rel:"noopener"}},[s("code",[t._v("ROW")]),s("OutboundLink")],1),t._v(" structures can be accessed using the "),s("code",[t._v("[position]")]),t._v(" operator. "),s("code",[t._v("position")]),t._v(" must be an integer index starting from 1:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("SELECT my_struct[1] FROM ...\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('Accessing object fields using the "dot operator" is not supported. Please use the '),s("code",[t._v("[]")]),t._v(" operator instead.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{433:function(t,e,s){"use strict";s.r(e);var a=s(51),r=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"trino"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#trino"}},[t._v("#")]),t._v(" Trino")]),t._v(" "),s("p",[s("em",[t._v("Supported since 5.0.2.")])]),t._v(" "),s("p",[t._v("Through the "),s("a",{attrs:{href:"https://trino.io",target:"_blank",rel:"noopener"}},[t._v("Trino"),s("OutboundLink")],1),t._v(" connector, Ontop is able to construct VKGs on Trino databases.")]),t._v(" "),s("h2",{attrs:{id:"limitations-exceptions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#limitations-exceptions"}},[t._v("#")]),t._v(" Limitations & Exceptions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("Trino does not provide information about integrity constraints. Make sure to provide this information in order to avoid very inefficient queries.\nWe recommend using "),s("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(" for this purpose.")])]),t._v(" "),s("ul",[s("li",[t._v('Accessing struct fields with the "dot operator" is not supported (see below).')])]),t._v(" "),s("h2",{attrs:{id:"database-connection"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#database-connection"}},[t._v("#")]),t._v(" Database Connection")]),t._v(" "),s("p",[t._v("The following shows the content of a sample "),s("code",[t._v(".properties")]),t._v(" file that can be used to connect Ontop to Trino:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("jdbc.url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" jdbc:trino://localhost:8080/defaultdatabase\njdbc.user "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" user\njdbc.password "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" password\njdbc.driver "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" io.trino.jdbc.TrinoDriver\n")])])]),s("p",[t._v("In case Trino is set up without authentication, the "),s("code",[t._v("jdbc.user")]),t._v(" and "),s("code",[t._v("jdbc.password")]),t._v(" lines can also be left out.")]),t._v(" "),s("h2",{attrs:{id:"nested-type-support"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nested-type-support"}},[t._v("#")]),t._v(" Nested Type Support")]),t._v(" "),s("p",[t._v("Ontop implements explicit compatibility with the Trino array type "),s("code",[t._v("array(t)")]),t._v(". When used with the "),s("a",{attrs:{href:"/guide/advanced/lenses#flattenlens"}},[t._v("flatten lens")]),t._v(", it is able to automatically infer the type of the result column.")]),t._v(" "),s("p",[t._v("The flatten lens cannot be used on arrays stored as JSON-encoded columns in the database. For such use cases, the column first has to be converted to an array type.")]),t._v(" "),s("h3",{attrs:{id:"struct-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#struct-access"}},[t._v("#")]),t._v(" Struct Access")]),t._v(" "),s("p",[t._v("Individual "),s("a",{attrs:{href:"https://trino.io/docs/current/language/types.html#map",target:"_blank",rel:"noopener"}},[s("code",[t._v("MAP")]),s("OutboundLink")],1),t._v(" structures can be accessed by SQL expressions in the dialect's default way:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("SELECT my_struct['my_attribute'] FROM ...\n")])])]),s("p",[s("a",{attrs:{href:"https://trino.io/docs/current/language/types.html#row",target:"_blank",rel:"noopener"}},[s("code",[t._v("ROW")]),s("OutboundLink")],1),t._v(" structures can be accessed using the "),s("code",[t._v("[position]")]),t._v(" operator. "),s("code",[t._v("position")]),t._v(" must be an integer index starting from 1:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("SELECT my_struct[1] FROM ...\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v('Accessing object fields using the "dot operator" is not supported. Please use the '),s("code",[t._v("[]")]),t._v(" operator instead.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/57.8c96a344.js b/assets/js/57.a635467f.js similarity index 91% rename from assets/js/57.8c96a344.js rename to assets/js/57.a635467f.js index 405448e88..dee5265d5 100644 --- a/assets/js/57.8c96a344.js +++ b/assets/js/57.a635467f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{433:function(t,s,a){"use strict";a.r(s);var r=a(51),e=Object(r.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"data-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#data-sources"}},[t._v("#")]),t._v(" Data sources")]),t._v(" "),a("h2",{attrs:{id:"postgresql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#postgresql"}},[t._v("#")]),t._v(" PostgreSQL")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("DOUBLE-CHECK restrictions")]),t._v(" "),a("p",[t._v("SIMILAR TO (not parsed by JSQLParser)")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{434:function(t,s,a){"use strict";a.r(s);var r=a(51),e=Object(r.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"data-sources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#data-sources"}},[t._v("#")]),t._v(" Data sources")]),t._v(" "),a("h2",{attrs:{id:"postgresql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#postgresql"}},[t._v("#")]),t._v(" PostgreSQL")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("DOUBLE-CHECK restrictions")]),t._v(" "),a("p",[t._v("SIMILAR TO (not parsed by JSQLParser)")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/58.57f1759b.js b/assets/js/58.5d967bf0.js similarity index 98% rename from assets/js/58.57f1759b.js rename to assets/js/58.5d967bf0.js index c7b8d4e01..9c6a2d768 100644 --- a/assets/js/58.57f1759b.js +++ b/assets/js/58.5d967bf0.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{434:function(t,e,o){"use strict";o.r(e);var a=o(51),n=Object(a.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"getting-started"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[t._v("#")]),t._v(" Getting started")]),t._v(" "),o("h2",{attrs:{id:"tutorial"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#tutorial"}},[t._v("#")]),t._v(" Tutorial")]),t._v(" "),o("p",[t._v("If you are new to Ontop and Virtual Knowledge Graphs, we encourage you to have a look "),o("a",{attrs:{href:"/tutorial"}},[t._v("at the official tutorial")]),t._v(".")]),t._v(" "),o("h2",{attrs:{id:"using-ontop"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#using-ontop"}},[t._v("#")]),t._v(" Using Ontop")]),t._v(" "),o("p",[t._v("Ontop is distributed under various forms. They can be downloaded on "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Github"),o("OutboundLink")],1),t._v(", "),o("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("Docker Hub"),o("OutboundLink")],1),t._v(", "),o("a",{attrs:{href:"http://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("Sourceforge"),o("OutboundLink")],1),t._v(" and in the Protégé plugin repository.")]),t._v(" "),o("h3",{attrs:{id:"mapping-designer"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#mapping-designer"}},[t._v("#")]),t._v(" Mapping designer")]),t._v(" "),o("p",[t._v("For editing and testing your mappings, you can use our plugin of the "),o("a",{attrs:{href:"https://protege.stanford.edu/",target:"_blank",rel:"noopener"}},[t._v("Protégé ontology editor"),o("OutboundLink")],1),t._v(". You can download the latest stable release directly from Protégé. Alternatively, pre-releases can be found on "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Github"),o("OutboundLink")],1),t._v(" and "),o("a",{attrs:{href:"http://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("Sourceforge"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("div",{staticClass:"custom-block warning"},[o("p",{staticClass:"custom-block-title"},[t._v("Limited support of advanced features")]),t._v(" "),o("p",[t._v("In particular, the Protégé plugin doesn't support "),o("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(". For advanced usage, we recommend using text editors or considering commercial offerings.")])]),t._v(" "),o("h3",{attrs:{id:"deployment"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#deployment"}},[t._v("#")]),t._v(" Deployment")]),t._v(" "),o("p",[t._v("Once your mappings and your ontology are ready, you can deploy your VKG as a SPARQL endpoint. The Ontop endpoint is available both as a "),o("a",{attrs:{href:"/guide/cli#ontop-endpoint"}},[t._v("CLI command ("),o("code",[t._v("ontop endpoint")]),t._v(")")]),t._v(" and as a "),o("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("Docker image"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("p",[t._v("You can also use the Ontop endpoint during development as it embeds "),o("a",{attrs:{href:"https://about.yasgui.org/",target:"_blank",rel:"noopener"}},[t._v("a nice YASGUI client"),o("OutboundLink")],1),t._v(" and an optional portal (since 4.0-beta-1) containing pre-defined queries.")]),t._v(" "),o("h3",{attrs:{id:"command-line-interface"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#command-line-interface"}},[t._v("#")]),t._v(" Command Line Interface")]),t._v(" "),o("p",[t._v("Want to materialize your VKG, convert your mappings into R2RML, bootstrap your mappings or start a SPARQL endpoint? You can use "),o("a",{attrs:{href:"/guide/cli"}},[t._v("the CLI")]),t._v(" for that. It can be found on on "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Github"),o("OutboundLink")],1),t._v(" and "),o("a",{attrs:{href:"http://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("Sourceforge"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("h3",{attrs:{id:"former-solutions"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#former-solutions"}},[t._v("#")]),t._v(" Former solutions")]),t._v(" "),o("p",[t._v("Historically, Ontop has been made available under other means that we don't recommend anymore.")]),t._v(" "),o("h4",{attrs:{id:"java-api-not-recommended"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#java-api-not-recommended"}},[t._v("#")]),t._v(" Java API (not recommended)")]),t._v(" "),o("p",[t._v("It remains possible to use Ontop as a Java API through "),o("a",{attrs:{href:"https://rdf4j.org/",target:"_blank",rel:"noopener"}},[t._v("RDF4J"),o("OutboundLink")],1),t._v(" although we recommend the HTTP SPARQL endpoint as a first option (think of a microservice). Why? Because such a Java API would add many dependencies to your project and constraint you to use certain versions of Java.")]),t._v(" "),o("p",[t._v("Ontop-rdf4j is available on "),o("a",{attrs:{href:"https://search.maven.org/artifact/it.unibz.inf.ontop/ontop-rdf4j",target:"_blank",rel:"noopener"}},[t._v("Maven Central"),o("OutboundLink")],1),t._v(".")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{435:function(t,e,o){"use strict";o.r(e);var a=o(51),n=Object(a.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"getting-started"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[t._v("#")]),t._v(" Getting started")]),t._v(" "),o("h2",{attrs:{id:"tutorial"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#tutorial"}},[t._v("#")]),t._v(" Tutorial")]),t._v(" "),o("p",[t._v("If you are new to Ontop and Virtual Knowledge Graphs, we encourage you to have a look "),o("a",{attrs:{href:"/tutorial"}},[t._v("at the official tutorial")]),t._v(".")]),t._v(" "),o("h2",{attrs:{id:"using-ontop"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#using-ontop"}},[t._v("#")]),t._v(" Using Ontop")]),t._v(" "),o("p",[t._v("Ontop is distributed under various forms. They can be downloaded on "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Github"),o("OutboundLink")],1),t._v(", "),o("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("Docker Hub"),o("OutboundLink")],1),t._v(", "),o("a",{attrs:{href:"http://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("Sourceforge"),o("OutboundLink")],1),t._v(" and in the Protégé plugin repository.")]),t._v(" "),o("h3",{attrs:{id:"mapping-designer"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#mapping-designer"}},[t._v("#")]),t._v(" Mapping designer")]),t._v(" "),o("p",[t._v("For editing and testing your mappings, you can use our plugin of the "),o("a",{attrs:{href:"https://protege.stanford.edu/",target:"_blank",rel:"noopener"}},[t._v("Protégé ontology editor"),o("OutboundLink")],1),t._v(". You can download the latest stable release directly from Protégé. Alternatively, pre-releases can be found on "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Github"),o("OutboundLink")],1),t._v(" and "),o("a",{attrs:{href:"http://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("Sourceforge"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("div",{staticClass:"custom-block warning"},[o("p",{staticClass:"custom-block-title"},[t._v("Limited support of advanced features")]),t._v(" "),o("p",[t._v("In particular, the Protégé plugin doesn't support "),o("a",{attrs:{href:"/guide/advanced/lenses"}},[t._v("lenses")]),t._v(". For advanced usage, we recommend using text editors or considering commercial offerings.")])]),t._v(" "),o("h3",{attrs:{id:"deployment"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#deployment"}},[t._v("#")]),t._v(" Deployment")]),t._v(" "),o("p",[t._v("Once your mappings and your ontology are ready, you can deploy your VKG as a SPARQL endpoint. The Ontop endpoint is available both as a "),o("a",{attrs:{href:"/guide/cli#ontop-endpoint"}},[t._v("CLI command ("),o("code",[t._v("ontop endpoint")]),t._v(")")]),t._v(" and as a "),o("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("Docker image"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("p",[t._v("You can also use the Ontop endpoint during development as it embeds "),o("a",{attrs:{href:"https://about.yasgui.org/",target:"_blank",rel:"noopener"}},[t._v("a nice YASGUI client"),o("OutboundLink")],1),t._v(" and an optional portal (since 4.0-beta-1) containing pre-defined queries.")]),t._v(" "),o("h3",{attrs:{id:"command-line-interface"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#command-line-interface"}},[t._v("#")]),t._v(" Command Line Interface")]),t._v(" "),o("p",[t._v("Want to materialize your VKG, convert your mappings into R2RML, bootstrap your mappings or start a SPARQL endpoint? You can use "),o("a",{attrs:{href:"/guide/cli"}},[t._v("the CLI")]),t._v(" for that. It can be found on on "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Github"),o("OutboundLink")],1),t._v(" and "),o("a",{attrs:{href:"http://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("Sourceforge"),o("OutboundLink")],1),t._v(".")]),t._v(" "),o("h3",{attrs:{id:"former-solutions"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#former-solutions"}},[t._v("#")]),t._v(" Former solutions")]),t._v(" "),o("p",[t._v("Historically, Ontop has been made available under other means that we don't recommend anymore.")]),t._v(" "),o("h4",{attrs:{id:"java-api-not-recommended"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#java-api-not-recommended"}},[t._v("#")]),t._v(" Java API (not recommended)")]),t._v(" "),o("p",[t._v("It remains possible to use Ontop as a Java API through "),o("a",{attrs:{href:"https://rdf4j.org/",target:"_blank",rel:"noopener"}},[t._v("RDF4J"),o("OutboundLink")],1),t._v(" although we recommend the HTTP SPARQL endpoint as a first option (think of a microservice). Why? Because such a Java API would add many dependencies to your project and constraint you to use certain versions of Java.")]),t._v(" "),o("p",[t._v("Ontop-rdf4j is available on "),o("a",{attrs:{href:"https://search.maven.org/artifact/it.unibz.inf.ontop/ontop-rdf4j",target:"_blank",rel:"noopener"}},[t._v("Maven Central"),o("OutboundLink")],1),t._v(".")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/59.c250e2f7.js b/assets/js/59.73194a85.js similarity index 96% rename from assets/js/59.c250e2f7.js rename to assets/js/59.73194a85.js index 57af9d539..73bf1ac87 100644 --- a/assets/js/59.c250e2f7.js +++ b/assets/js/59.73194a85.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{435:function(a,t,r){"use strict";r.r(t);var s=r(51),e=Object(s.a)({},(function(){var a=this,t=a.$createElement,r=a._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[r("h1",{attrs:{id:"glossary"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#glossary"}},[a._v("#")]),a._v(" Glossary")]),a._v(" "),r("h2",{attrs:{id:"vkg"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#vkg"}},[a._v("#")]),a._v(" VKG")]),a._v(" "),r("p",[a._v("Virtual Knowledge Graph")]),a._v(" "),r("h2",{attrs:{id:"mapping"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[a._v("#")]),a._v(" Mapping")]),a._v(" "),r("h2",{attrs:{id:"obda"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#obda"}},[a._v("#")]),a._v(" OBDA")]),a._v(" "),r("p",[a._v("Ontology-Based Data Access")]),a._v(" "),r("h2",{attrs:{id:"ontology"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#ontology"}},[a._v("#")]),a._v(" Ontology")]),a._v(" "),r("h2",{attrs:{id:"rdf"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rdf"}},[a._v("#")]),a._v(" RDF")]),a._v(" "),r("h2",{attrs:{id:"rdfs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rdfs"}},[a._v("#")]),a._v(" RDFS")]),a._v(" "),r("h2",{attrs:{id:"sparql"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[a._v("#")]),a._v(" SPARQL")]),a._v(" "),r("h3",{attrs:{id:"sparql-query"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sparql-query"}},[a._v("#")]),a._v(" SPARQL Query")]),a._v(" "),r("h3",{attrs:{id:"sparql-endpoint"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sparql-endpoint"}},[a._v("#")]),a._v(" SPARQL Endpoint")]),a._v(" "),r("h2",{attrs:{id:"owl"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#owl"}},[a._v("#")]),a._v(" OWL")]),a._v(" "),r("h2",{attrs:{id:"r2rml"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#r2rml"}},[a._v("#")]),a._v(" R2RML")])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{436:function(a,t,r){"use strict";r.r(t);var s=r(51),e=Object(s.a)({},(function(){var a=this,t=a.$createElement,r=a._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[r("h1",{attrs:{id:"glossary"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#glossary"}},[a._v("#")]),a._v(" Glossary")]),a._v(" "),r("h2",{attrs:{id:"vkg"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#vkg"}},[a._v("#")]),a._v(" VKG")]),a._v(" "),r("p",[a._v("Virtual Knowledge Graph")]),a._v(" "),r("h2",{attrs:{id:"mapping"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[a._v("#")]),a._v(" Mapping")]),a._v(" "),r("h2",{attrs:{id:"obda"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#obda"}},[a._v("#")]),a._v(" OBDA")]),a._v(" "),r("p",[a._v("Ontology-Based Data Access")]),a._v(" "),r("h2",{attrs:{id:"ontology"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#ontology"}},[a._v("#")]),a._v(" Ontology")]),a._v(" "),r("h2",{attrs:{id:"rdf"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rdf"}},[a._v("#")]),a._v(" RDF")]),a._v(" "),r("h2",{attrs:{id:"rdfs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rdfs"}},[a._v("#")]),a._v(" RDFS")]),a._v(" "),r("h2",{attrs:{id:"sparql"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[a._v("#")]),a._v(" SPARQL")]),a._v(" "),r("h3",{attrs:{id:"sparql-query"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sparql-query"}},[a._v("#")]),a._v(" SPARQL Query")]),a._v(" "),r("h3",{attrs:{id:"sparql-endpoint"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#sparql-endpoint"}},[a._v("#")]),a._v(" SPARQL Endpoint")]),a._v(" "),r("h2",{attrs:{id:"owl"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#owl"}},[a._v("#")]),a._v(" OWL")]),a._v(" "),r("h2",{attrs:{id:"r2rml"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#r2rml"}},[a._v("#")]),a._v(" R2RML")])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/6.a180f86f.js b/assets/js/6.e48edabd.js similarity index 89% rename from assets/js/6.a180f86f.js rename to assets/js/6.e48edabd.js index 2ee9afd2a..bb3078858 100644 --- a/assets/js/6.a180f86f.js +++ b/assets/js/6.e48edabd.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{349:function(e,t,a){},377:function(e,t,a){"use strict";a(349)},384:function(e,t,a){"use strict";a.r(t);a(52),a(37),a(103),a(104);var o={name:"CodeGroup",data:function(){return{codeTabs:[],activeCodeTabIndex:-1}},watch:{activeCodeTabIndex:function(e){this.activateCodeTab(e)}},mounted:function(){this.loadTabs()},methods:{changeCodeTab:function(e){this.activeCodeTabIndex=e},loadTabs:function(){var e=this;this.codeTabs=(this.$slots.default||[]).filter((function(e){return Boolean(e.componentOptions)})).map((function(t,a){return""===t.componentOptions.propsData.active&&(e.activeCodeTabIndex=a),{title:t.componentOptions.propsData.title,elm:t.elm}})),-1===this.activeCodeTabIndex&&this.codeTabs.length>0&&(this.activeCodeTabIndex=0),this.activateCodeTab(0)},activateCodeTab:function(e){this.codeTabs.forEach((function(e){e.elm&&e.elm.classList.remove("theme-code-block__active")})),this.codeTabs[e].elm&&this.codeTabs[e].elm.classList.add("theme-code-block__active")}}},n=(a(377),a(51)),c=Object(n.a)(o,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ClientOnly",[a("div",{staticClass:"theme-code-group"},[a("div",{staticClass:"theme-code-group__nav"},[a("ul",{staticClass:"theme-code-group__ul"},e._l(e.codeTabs,(function(t,o){return a("li",{key:t.title,staticClass:"theme-code-group__li"},[a("button",{staticClass:"theme-code-group__nav-tab",class:{"theme-code-group__nav-tab-active":o===e.activeCodeTabIndex},on:{click:function(t){return e.changeCodeTab(o)}}},[e._v("\n "+e._s(t.title)+"\n ")])])})),0)]),e._v(" "),e._t("default"),e._v(" "),e.codeTabs.length<1?a("pre",{staticClass:"pre-blank"},[e._v("// Make sure to add code blocks to your code group")]):e._e()],2)])}),[],!1,null,"deefee04",null);t.default=c.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{350:function(e,t,a){},378:function(e,t,a){"use strict";a(350)},385:function(e,t,a){"use strict";a.r(t);a(52),a(37),a(103),a(104);var o={name:"CodeGroup",data:function(){return{codeTabs:[],activeCodeTabIndex:-1}},watch:{activeCodeTabIndex:function(e){this.activateCodeTab(e)}},mounted:function(){this.loadTabs()},methods:{changeCodeTab:function(e){this.activeCodeTabIndex=e},loadTabs:function(){var e=this;this.codeTabs=(this.$slots.default||[]).filter((function(e){return Boolean(e.componentOptions)})).map((function(t,a){return""===t.componentOptions.propsData.active&&(e.activeCodeTabIndex=a),{title:t.componentOptions.propsData.title,elm:t.elm}})),-1===this.activeCodeTabIndex&&this.codeTabs.length>0&&(this.activeCodeTabIndex=0),this.activateCodeTab(0)},activateCodeTab:function(e){this.codeTabs.forEach((function(e){e.elm&&e.elm.classList.remove("theme-code-block__active")})),this.codeTabs[e].elm&&this.codeTabs[e].elm.classList.add("theme-code-block__active")}}},n=(a(378),a(51)),c=Object(n.a)(o,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ClientOnly",[a("div",{staticClass:"theme-code-group"},[a("div",{staticClass:"theme-code-group__nav"},[a("ul",{staticClass:"theme-code-group__ul"},e._l(e.codeTabs,(function(t,o){return a("li",{key:t.title,staticClass:"theme-code-group__li"},[a("button",{staticClass:"theme-code-group__nav-tab",class:{"theme-code-group__nav-tab-active":o===e.activeCodeTabIndex},on:{click:function(t){return e.changeCodeTab(o)}}},[e._v("\n "+e._s(t.title)+"\n ")])])})),0)]),e._v(" "),e._t("default"),e._v(" "),e.codeTabs.length<1?a("pre",{staticClass:"pre-blank"},[e._v("// Make sure to add code blocks to your code group")]):e._e()],2)])}),[],!1,null,"deefee04",null);t.default=c.exports}}]); \ No newline at end of file diff --git a/assets/js/61.543bfa7a.js b/assets/js/61.543bfa7a.js new file mode 100644 index 000000000..1c8c854cb --- /dev/null +++ b/assets/js/61.543bfa7a.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{438:function(e,t,a){"use strict";a.r(t);var n=a(51),i=Object(n.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"release-notes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#release-notes"}},[e._v("#")]),e._v(" Release notes")]),e._v(" "),a("h2",{attrs:{id:"_5-1-2-january-17-2024"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-2-january-17-2024"}},[e._v("#")]),e._v(" 5.1.2 (January 17, 2024)")]),e._v(" "),a("h4",{attrs:{id:"bug-fixes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),a("ul",[a("li",[e._v("Conflict between columns in case of a self-join in the bootstrapper "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/786",target:"_blank",rel:"noopener"}},[e._v("#786"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Handling of casts for different versions of MySQL and MariaDB "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/787",target:"_blank",rel:"noopener"}},[e._v("#787"),a("OutboundLink")],1)])]),e._v(" "),a("p",[e._v("Several dependencies updated, including JQuery ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/780",target:"_blank",rel:"noopener"}},[e._v("#780"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("h2",{attrs:{id:"_5-1-1-november-22-2023"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-1-november-22-2023"}},[e._v("#")]),e._v(" 5.1.1 (November 22, 2023)")]),e._v(" "),a("h4",{attrs:{id:"new-features"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Option to expose system tables added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/744",target:"_blank",rel:"noopener"}},[e._v("#744"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Standard deviation and variance functions added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/735",target:"_blank",rel:"noopener"}},[e._v("#735"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Option to disable the registration of custom SPARQL aggregation functions "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/746",target:"_blank",rel:"noopener"}},[e._v("#746"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"bug-fixes-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-2"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),a("p",[e._v("See "),a("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/23?closed=1",target:"_blank",rel:"noopener"}},[e._v("https://github.com/ontop/ontop/milestone/23?closed=1"),a("OutboundLink")],1)]),e._v(" "),a("h2",{attrs:{id:"_5-1-0-august-15-2023"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-0-august-15-2023"}},[e._v("#")]),e._v(" 5.1.0 (August 15, 2023)")]),e._v(" "),a("h4",{attrs:{id:"new-features-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-2"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support for "),a("RouterLink",{attrs:{to:"/guide/advanced/lenses.html#flattenlens"}},[e._v("flatten lenses")]),e._v(" added "),a("em",[e._v("(beta)")]),e._v(" "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/622",target:"_blank",rel:"noopener"}},[e._v("#622"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/625",target:"_blank",rel:"noopener"}},[e._v("#625"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/628",target:"_blank",rel:"noopener"}},[e._v("#628"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/629",target:"_blank",rel:"noopener"}},[e._v("#629"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/633",target:"_blank",rel:"noopener"}},[e._v("#633"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/635",target:"_blank",rel:"noopener"}},[e._v("#635"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/636",target:"_blank",rel:"noopener"}},[e._v("#636"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/637",target:"_blank",rel:"noopener"}},[e._v("#637"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/638",target:"_blank",rel:"noopener"}},[e._v("#638"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/639",target:"_blank",rel:"noopener"}},[e._v("#639"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/640",target:"_blank",rel:"noopener"}},[e._v("#640"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/641",target:"_blank",rel:"noopener"}},[e._v("#641"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/642",target:"_blank",rel:"noopener"}},[e._v("#642"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/643",target:"_blank",rel:"noopener"}},[e._v("#643"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/661",target:"_blank",rel:"noopener"}},[e._v("#661"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/715",target:"_blank",rel:"noopener"}},[e._v("#715"),a("OutboundLink")],1)],1),e._v(" "),a("li",[e._v("Support for "),a("RouterLink",{attrs:{to:"/guide/advanced/lenses.html#unionlens"}},[e._v("union lenses")]),e._v(" added "),a("em",[e._v("(beta)")]),e._v(" "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/612",target:"_blank",rel:"noopener"}},[e._v("#612"),a("OutboundLink")],1)],1),e._v(" "),a("li",[e._v("Support for XSD cast functions added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/630",target:"_blank",rel:"noopener"}},[e._v("#630"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for date-trunc and more date extraction functions added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/705",target:"_blank",rel:"noopener"}},[e._v("#705"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for a separate RDF file for facts added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/666",target:"_blank",rel:"noopener"}},[e._v("#666"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Options to ignore invalid mapping entries "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/631",target:"_blank",rel:"noopener"}},[e._v("#631"),a("OutboundLink")],1),e._v(" and lenses "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/709",target:"_blank",rel:"noopener"}},[e._v("#709"),a("OutboundLink")],1),e._v(" added")]),e._v(" "),a("li",[e._v("Partial support for regular expressions in SQL Server added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/702",target:"_blank",rel:"noopener"}},[e._v("#702"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for DynamoDB using the CData connector added "),a("em",[e._v("(beta)")]),e._v(" "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/693",target:"_blank",rel:"noopener"}},[e._v("#693"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"optimizations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#optimizations"}},[e._v("#")]),e._v(" Optimizations")]),e._v(" "),a("ul",[a("li",[e._v("Upwards propagation of lens unique constraints added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/668",target:"_blank",rel:"noopener"}},[e._v("#668"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Left join optimizations:\n"),a("ul",[a("li",[e._v("Reducing left joins to inner joins when the right child has a left join "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/662",target:"_blank",rel:"noopener"}},[e._v("#662"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Merging left joins nested on the left "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/663",target:"_blank",rel:"noopener"}},[e._v("#663"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/686",target:"_blank",rel:"noopener"}},[e._v("#686"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Robustness to nullable joining columns "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/667",target:"_blank",rel:"noopener"}},[e._v("#667"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Pruning the right of a left join when not contributing")])])]),e._v(" "),a("li",[e._v("VALUES node decomposition added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/680",target:"_blank",rel:"noopener"}},[e._v("#680"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Functional dependency inference added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/681",target:"_blank",rel:"noopener"}},[e._v("#681"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Reduction of aggregation nodes with no aggregation functional terms to distinct added")]),e._v(" "),a("li",[e._v("Transitive closure of functional dependencies added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/732",target:"_blank",rel:"noopener"}},[e._v("#732"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"refactoring"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Substitutions refactored "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/616",target:"_blank",rel:"noopener"}},[e._v("#616"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Typing for math operators added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/706",target:"_blank",rel:"noopener"}},[e._v("#706"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("QuotedIDFactory refactored "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/644",target:"_blank",rel:"noopener"}},[e._v("#644"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Removal of non-required variables improved "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/669",target:"_blank",rel:"noopener"}},[e._v("#669"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for the STRING datatype for DuckDB added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/646",target:"_blank",rel:"noopener"}},[e._v("#646"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for SAMPLE at the database level added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/660",target:"_blank",rel:"noopener"}},[e._v("#660"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"bug-fixes-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-3"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),a("ul",[a("li",[e._v("Support LIMIT/OFFSET in SQL Server improved "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/676",target:"_blank",rel:"noopener"}},[e._v("#676"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/679",target:"_blank",rel:"noopener"}},[e._v("#679"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/682",target:"_blank",rel:"noopener"}},[e._v("#682"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/721",target:"_blank",rel:"noopener"}},[e._v("#721"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Extraction of unique constraints in Oracle made more consistent "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/695",target:"_blank",rel:"noopener"}},[e._v("#695"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Metadata extraction for DuckDB made more robust "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/687",target:"_blank",rel:"noopener"}},[e._v("#687"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Missing casts when using Bnode templates added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/657",target:"_blank",rel:"noopener"}},[e._v("#657"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Invalid SPARQL UNION translation fixed "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/651",target:"_blank",rel:"noopener"}},[e._v("#651"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Empty results for CONSTRUCT queries with unions and different variables fixed "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/652",target:"_blank",rel:"noopener"}},[e._v("#652"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#documentation"}},[e._v("#")]),e._v(" Documentation")]),e._v(" "),a("ul",[a("li",[e._v("Dedicated pages for each supported database (for instance "),a("a",{attrs:{href:"https://ontop-vkg.org/guide/databases/athena",target:"_blank",rel:"noopener"}},[e._v("AWS Athena"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("li",[a("RouterLink",{attrs:{to:"/tutorial/lenses/"}},[e._v("Tutorial about lenses")])],1),e._v(" "),a("li",[a("a",{attrs:{href:"/tutorial/materialization/materialization"}},[e._v("Tutorial about materialization")])])]),e._v(" "),a("h2",{attrs:{id:"_5-0-2-march-9-2023"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-0-2-march-9-2023"}},[e._v("#")]),e._v(" 5.0.2 (March 9, 2023)")]),e._v(" "),a("h4",{attrs:{id:"new-features-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-3"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support for Trino "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/599",target:"_blank",rel:"noopener"}},[e._v("#599"),a("OutboundLink")],1),e._v(", PrestoDB "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/601",target:"_blank",rel:"noopener"}},[e._v("#601"),a("OutboundLink")],1),e._v(", AWS Athena "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/602",target:"_blank",rel:"noopener"}},[e._v("#602"),a("OutboundLink")],1),e._v(", DuckDB "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/604",target:"_blank",rel:"noopener"}},[e._v("#604"),a("OutboundLink")],1),e._v(", AWS Redshift "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/605",target:"_blank",rel:"noopener"}},[e._v("#605"),a("OutboundLink")],1),e._v(" and Google BigQuery "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/615",target:"_blank",rel:"noopener"}},[e._v("#615"),a("OutboundLink")],1),e._v(" added")]),e._v(" "),a("li",[e._v("Declare some columns as IRI-safe in lenses "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/587",target:"_blank",rel:"noopener"}},[e._v("#587"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for arbitrary JDBC properties added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/606",target:"_blank",rel:"noopener"}},[e._v("#606"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"bugfixes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),a("ul",[a("li",[e._v("Missing TLS cypher suite JRE modules added to the Docker image")]),e._v(" "),a("li",[e._v("More system schemas are now ignored in Oracle "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/591",target:"_blank",rel:"noopener"}},[e._v("#591"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"tooling"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tooling"}},[e._v("#")]),e._v(" Tooling")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://github.com/ontop/dialect-factory-scaffolding",target:"_blank",rel:"noopener"}},[e._v("Scaffolding tool"),a("OutboundLink")],1),e._v(" created to make it easier to implement a new SQL dialect adapter.")])]),e._v(" "),a("h2",{attrs:{id:"_5-0-1-january-29-2023"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-0-1-january-29-2023"}},[e._v("#")]),e._v(" 5.0.1 (January 29, 2023)")]),e._v(" "),a("h4",{attrs:{id:"new-feature"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-feature"}},[e._v("#")]),e._v(" New feature")]),e._v(" "),a("ul",[a("li",[e._v("DB metadata extraction for MS Access added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/589",target:"_blank",rel:"noopener"}},[e._v("#589"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("JRE-embedded Ontop-Protégé bundles with Protégé-5.6.0-beta-2 are now provided")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-2"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Support for Spark SQL improved and tests added in the CI")]),e._v(" "),a("li",[e._v("All the tables (besides excluded ones) in Oracle are now extracted, not just the user's ones")])]),e._v(" "),a("p",[e._v("Several dependencies updated.")]),e._v(" "),a("h2",{attrs:{id:"_5-0-0-december-31-2022"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-0-0-december-31-2022"}},[e._v("#")]),e._v(" 5.0.0 (December 31, 2022)")]),e._v(" "),a("h4",{attrs:{id:"important-changes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#important-changes"}},[e._v("#")]),e._v(" Important changes")]),e._v(" "),a("ul",[a("li",[e._v("Java 11 or newer is required")]),e._v(" "),a("li",[e._v("Ontop's Protégé plugin now requires at least Protégé 5.6-beta")]),e._v(" "),a("li",[e._v("RDF4J bindings updated to 4.1.0")]),e._v(" "),a("li",[e._v("The module "),a("code",[e._v("ontop-owlapi")]),e._v(" is not published anymore. We recommend using "),a("code",[e._v("ontop-rdf4j")]),e._v(" instead")]),e._v(" "),a("li",[e._v("RDF4J workbench modules removed")]),e._v(" "),a("li",[e._v("Docker image moved to "),a("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[a("code",[e._v("ontop/ontop")]),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Ontop views renamed "),a("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")])])]),e._v(" "),a("h4",{attrs:{id:"new-features-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-4"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support for SPARQL rules for the extending the VKG added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/576",target:"_blank",rel:"noopener"}},[e._v("#576"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("The "),a("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[e._v("Docker image"),a("OutboundLink")],1),e._v(" now also supported the ARM64 architecture and allows to run all the CLI commands "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/532",target:"_blank",rel:"noopener"}},[e._v("#532"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for Snowflake added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/520",target:"_blank",rel:"noopener"}},[e._v("#520"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for MariaDB added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/271",target:"_blank",rel:"noopener"}},[e._v("#271"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("N-Triples and N-quads are now supported by the SPARQL endpoint "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/566",target:"_blank",rel:"noopener"}},[e._v("#566"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Option to fully reformulate the SPARQL query into SQL added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/577",target:"_blank",rel:"noopener"}},[e._v("#577"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Experimental support for flatten lenses added (only for PostgreSQL)")])]),e._v(" "),a("h4",{attrs:{id:"new-optimizations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-optimizations"}},[e._v("#")]),e._v(" New optimizations")]),e._v(" "),a("ul",[a("li",[e._v("Optimization of joins with a union of class definitions added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/543",target:"_blank",rel:"noopener"}},[e._v("#543"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Optimizations for generic queries with limit added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/578",target:"_blank",rel:"noopener"}},[e._v("#578"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Optimization for queries retrieving all the properties or classes in use in the VKG added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/581",target:"_blank",rel:"noopener"}},[e._v("#581"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"refactoring-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-3"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("New module for testing dialects in the Github CI pipeline added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/568",target:"_blank",rel:"noopener"}},[e._v("#568"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("JSQLParser updated to 4.4")]),e._v(" "),a("li",[e._v("Ontop's Protégé plugin isolated from Ontop modules "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/278",target:"_blank",rel:"noopener"}},[e._v("#278"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for Databricks (Apache Spark) improved")])]),e._v(" "),a("p",[e._v("Many bugfixes. See also "),a("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/16?closed=1",target:"_blank",rel:"noopener"}},[e._v("its milestone on Github"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h2",{attrs:{id:"_4-2-2-november-18-2022"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-2-november-18-2022"}},[e._v("#")]),e._v(" 4.2.2 (November 18, 2022)")]),e._v(" "),a("h4",{attrs:{id:"new-features-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-5"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support for Protege 5.6-beta under Java 11 and Java 17")]),e._v(" "),a("li",[e._v("Support for the Databricks-specific JDBC driver "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/554",target:"_blank",rel:"noopener"}},[e._v("#554"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for LIMIT/OFFSET in SQL Server 2008 "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/531",target:"_blank",rel:"noopener"}},[e._v("#531"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for materialized views in PostgreSQL "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/541",target:"_blank",rel:"noopener"}},[e._v("#541"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"bugfixes-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-2"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),a("ul",[a("li",[e._v("VALUES handling with Teiid "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/525",target:"_blank",rel:"noopener"}},[e._v("#525"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Metadata extraction for Dremio of schema names with dots")]),e._v(" "),a("li",[e._v("Typo in registration of Oracle factories "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/557",target:"_blank",rel:"noopener"}},[e._v("#557"),a("OutboundLink")],1)])]),e._v(" "),a("p",[e._v("Preventive update of dependencies including Jackson and Gson to address potential vulnerabilities.")]),e._v(" "),a("h2",{attrs:{id:"_4-2-1-april-20-2022"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-1-april-20-2022"}},[e._v("#")]),e._v(" 4.2.1 (April 20, 2022)")]),e._v(" "),a("h4",{attrs:{id:"new-feature-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-feature-2"}},[e._v("#")]),e._v(" New feature")]),e._v(" "),a("ul",[a("li",[e._v("Support for partial serialized DB metadata, when "),a("code",[e._v("ontop.allowRetrievingBlackBoxViewMetadataFromDB")]),e._v(" is enabled.")])]),e._v(" "),a("h4",{attrs:{id:"bugfixes-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-3"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),a("ul",[a("li",[e._v("Not renamed variable in sub-query with a distinct ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/417",target:"_blank",rel:"noopener"}},[e._v("#417"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("OBDA to R2RML conversion: require mapping entry IDs to be unique.")]),e._v(" "),a("li",[e._v("Lang tags for constants in R2RML were ignored.")]),e._v(" "),a("li",[e._v("Several fixes related to VALUES.")]),e._v(" "),a("li",[e._v("Better HTTP codes for the ontology download endpoint.")])]),e._v(" "),a("p",[e._v("The Jackson and Spring Boot dependencies have been preventively updated (to 2.13.2.2 and 2.6.6 respectively) to address potential vulnerabilities ("),a("a",{attrs:{href:"https://nvd.nist.gov/vuln/detail/CVE-2020-36518",target:"_blank",rel:"noopener"}},[e._v("CVE-2020-36518"),a("OutboundLink")],1),e._v(" and "),a("a",{attrs:{href:"https://nvd.nist.gov/vuln/detail/cve-2022-22965",target:"_blank",rel:"noopener"}},[e._v("CVE-2022-22965"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("h2",{attrs:{id:"_4-2-0-december-30-2021"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-0-december-30-2021"}},[e._v("#")]),e._v(" 4.2.0 (December 30, 2021)")]),e._v(" "),a("h4",{attrs:{id:"new-features-6"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-6"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support for Apache Spark ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/422",target:"_blank",rel:"noopener"}},[e._v("#422"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("Support for time functions added ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/478",target:"_blank",rel:"noopener"}},[e._v("#478"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("Support for the "),a("code",[e._v("IN")]),e._v(" SPARQL function added.")]),e._v(" "),a("li",[e._v('Datatypes can be extracted from non-supported source queries in the mapping (treated internally as "black-box" views). Disabled by default (see '),a("a",{attrs:{href:"/guide/advanced/configuration"}},[a("code",[e._v("ontop.allowRetrievingBlackBoxViewMetadataFromDB")])]),e._v(").")]),e._v(" "),a("li",[e._v("TBox triples (e.g. sub-classes, domains and ranges) can be added to the default RDF graph. Disabled by default (see "),a("a",{attrs:{href:"/guide/advanced/configuration"}},[a("code",[e._v("ontop.enableFactExtractionWithTBox")])]),e._v(").")]),e._v(" "),a("li",[e._v("Support for "),a("a",{attrs:{href:"/guide/advanced/views"}},[e._v("Ontop join views")]),e._v(" added.")]),e._v(" "),a("li",[e._v("Support for arbitrary levels of Ontop views added (views over views).")]),e._v(" "),a("li",[e._v("Better integrity constraint extraction for Ontop basic and join views.")]),e._v(" "),a("li",[e._v("Non-null information can now be specified for Ontop views.")]),e._v(" "),a("li",[e._v("Support for b-node facts added.")]),e._v(" "),a("li",[e._v("The default query of the SPARQL endpoint portal is now configurable ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/454",target:"_blank",rel:"noopener"}},[e._v("#454"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("Contextually injective IRI templates with numeric or UUID arguments are now decomposed ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/363",target:"_blank",rel:"noopener"}},[e._v("#363"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("JSON-LD serialization now supported by the materializer ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/481",target:"_blank",rel:"noopener"}},[e._v("#481"),a("OutboundLink")],1),e._v(").")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-4"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Support for Java >= 8. Ontop decoupled from Protégé so as to update several common libraries ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/467",target:"_blank",rel:"noopener"}},[e._v("#467"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v('RDF facts provided by the ontology file are now internally grouped together into values blocks (sorts of "in-memory tables") instead of being splitted into large unions. Enabled by default (see '),a("a",{attrs:{href:"/guide/advanced/configuration"}},[a("code",[e._v("ontop.enableValuesNode")])]),e._v(").")]),e._v(" "),a("li",[e._v("Unions are lifted above aggregations when possible.")]),e._v(" "),a("li",[e._v("Docker image updated to JRE 11.")]),e._v(" "),a("li",[e._v("Mutable intermediate queries are not used anymore.")]),e._v(" "),a("li",[e._v("Stronger handling of non well-designed "),a("code",[e._v("OPTIONAL")]),e._v(" blocks.")]),e._v(" "),a("li",[e._v("Stronger handling of "),a("code",[e._v("ORDER BY")]),e._v(" in sub-queries.")]),e._v(" "),a("li",[e._v("Type extractor relaxed ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/438",target:"_blank",rel:"noopener"}},[e._v("#438"),a("OutboundLink")],1),e._v(") to tolerate slightly different datatypes.")]),e._v(" "),a("li",[e._v("JDBC distinct result set removed.")]),e._v(" "),a("li",[e._v("JDBC user name and password are not required anymore. Useful when passed in the JDBC URL.")]),e._v(" "),a("li",[e._v("The Command-Line Interface of the bootstrapper has been refactored (invalid options removed, comments improved).")])]),e._v(" "),a("p",[e._v("Many bugfixes (see for instance "),a("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/14?closed=1",target:"_blank",rel:"noopener"}},[e._v("our Github bugtracker"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("h2",{attrs:{id:"_4-1-1-july-23-2021"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-1-july-23-2021"}},[e._v("#")]),e._v(" 4.1.1 (July 23, 2021)")]),e._v(" "),a("h4",{attrs:{id:"bugfixes-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-4"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),a("ul",[a("li",[e._v("Bugs related to GeoSPARQL support ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/428",target:"_blank",rel:"noopener"}},[e._v("#428"),a("OutboundLink")],1),e._v(","),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/434",target:"_blank",rel:"noopener"}},[e._v("#434"),a("OutboundLink")],1),e._v(" )")]),e._v(" "),a("li",[e._v("Issue with ORDER BY and LIMIT for MS SQL ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/225",target:"_blank",rel:"noopener"}},[e._v("#225"),a("OutboundLink")],1),e._v(","),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/412",target:"_blank",rel:"noopener"}},[e._v("#412"),a("OutboundLink")],1),e._v(")")])]),e._v(" "),a("h4",{attrs:{id:"new-features-7"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-7"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Teiid support ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/336",target:"_blank",rel:"noopener"}},[e._v("#336"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("li",[e._v("Various improvements of the Protégé plugin")])]),e._v(" "),a("h2",{attrs:{id:"_4-1-0-february-28-2021"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-0-february-28-2021"}},[e._v("#")]),e._v(" 4.1.0 (February 28, 2021)")]),e._v(" "),a("h4",{attrs:{id:"changed-behavior"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behavior"}},[e._v("#")]),e._v(" Changed behavior")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"/guide%C3%A9cli#ontop-mapping-to-r2rml"}},[e._v("OBDA to R2RML mapping conversion")]),e._v(" now requires by default access to DB metadata (through credentials or as a serialized file). This requirement can be bypassed with the argument "),a("code",[e._v("--force")]),e._v(".")]),e._v(" "),a("li",[e._v("By default, DESCRIBE queries only return the triples where the described IRI appears as subject. To also consider the triples where it appears as object, set the parameter "),a("code",[e._v("ontop.includeFixedObjectPositionInDescribe")]),e._v(" to true.")]),e._v(" "),a("li",[e._v("The Docker endpoint image is now based on Debian ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/394",target:"_blank",rel:"noopener"}},[e._v("#394"),a("OutboundLink")],1),e._v("), not on Alpine anymore.")])]),e._v(" "),a("h4",{attrs:{id:"new-features-8"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-8"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support for GeoSPARQL functions added ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/335",target:"_blank",rel:"noopener"}},[e._v("#335"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[a("a",{attrs:{href:"/guide/advanced/logging"}},[e._v("Rich JSON-based query logging")]),e._v(" added.")]),e._v(" "),a("li",[a("a",{attrs:{href:"/guide/advanced/predefined"}},[e._v("New endpoint for predefined queries")]),e._v(" added (beta). It enables the specification of custom low-latency Web APIs in a declarative manner.")]),e._v(" "),a("li",[e._v("Support for the "),a("code",[e._v("IF")]),e._v(", "),a("code",[e._v("IRI")]),e._v(", "),a("code",[e._v("BNODE")]),e._v(" SPARQL functions added.")]),e._v(" "),a("li",[e._v("Support for Dremio added.")]),e._v(" "),a("li",[e._v("DB metadata can now be loaded from files instead of connecting to the database.")]),e._v(" "),a("li",[e._v("Bnode labels are now anonymized on-the-fly. Bnode templates can safely use PII.")]),e._v(" "),a("li",[e._v("Sensitive JDBC information (user name, password, URL) can now be passed as arguments or environment variables (for Docker) instead of being written in the properties file. Docker secrets are also supported for further security.")]),e._v(" "),a("li",[e._v("New left join optimization techniques added. General functional dependencies are now taken into account. Sensitivity to left join ordering reduced.")]),e._v(" "),a("li",[a("a",{attrs:{href:"/guide/advanced/caching"}},[e._v("HTTP caching")]),e._v(" headers can now be returned by the Ontop SPARQL endpoint.")]),e._v(" "),a("li",[e._v("Native Protégé bundles for each platform (Windows, MacOS, Linux) with JRE 8 embedded.")]),e._v(" "),a("li",[e._v("Basic support for Ontop views added (experimental), which, in particular, allows specifying integrity constraints on views defined at the Ontop level.")])]),e._v(" "),a("h4",{attrs:{id:"removal"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#removal"}},[e._v("#")]),e._v(" Removal")]),e._v(" "),a("ul",[a("li",[e._v("As announced earlier, the RDF4J Workbench-based bundles are not shipped anymore. However, the webapps war file can still be built with Maven.")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-5"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Drastic reduction of memory consumption when processing SPARQL queries ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/370",target:"_blank",rel:"noopener"}},[e._v("#370"),a("OutboundLink")],1),e._v("), which is significant for materializing large RDF graphs.")]),e._v(" "),a("li",[e._v("Better file resource handling ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/368",target:"_blank",rel:"noopener"}},[e._v("#368"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("Distinct lifting improved.")]),e._v(" "),a("li",[e._v("Self-join elimination based on functional dependencies re-implemented.")]),e._v(" "),a("li",[e._v("Decomposition of heterogeneous IRI templates enabled.")]),e._v(" "),a("li",[e._v("Lexical value space is now considered when decomposing IRIs.")]),e._v(" "),a("li",[e._v("Protégé plugin codebase cleaned, with parts of UI streamlined and redesigned. Improved syntax highlighting in target and source queries. Mapping validation extended. Multiple open ontologies supported ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/282",target:"_blank",rel:"noopener"}},[e._v("#282"),a("OutboundLink")],1),e._v(" and "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/175",target:"_blank",rel:"noopener"}},[e._v("#175"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("RDF4J external binding management refactored.")]),e._v(" "),a("li",[e._v("Bnode handling refactored.")]),e._v(" "),a("li",[e._v("Java 11 support.")]),e._v(" "),a("li",[e._v("Better handling of column names when converting OBDA mappings into R2RML, which now uses DB metadata.")]),e._v(" "),a("li",[e._v("CONSTRUCT and DESCRIBE query handling refactored.")]),e._v(" "),a("li",[e._v("Parser for OBDA mappings refactored.")]),e._v(" "),a("li",[e._v("Character encoding in R2RML templates refactored.")]),e._v(" "),a("li",[e._v("Default file encoding set to UTF-8. Particularly useful on Windows. Can be overridden if needed.")]),e._v(" "),a("li",[a("a",{attrs:{href:"/dev/build"}},[e._v("Build script")]),e._v(" refactored. Now fully based on Maven ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/393",target:"_blank",rel:"noopener"}},[e._v("#393"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("Base Docker image updated.")]),e._v(" "),a("li",[e._v("PostgreSQL transaction handling (in streaming mode) improved.")]),e._v(" "),a("li",[e._v("Timeout support extended to non-SELECT queries.")])]),e._v(" "),a("p",[e._v("Many bugfixes.")]),e._v(" "),a("h2",{attrs:{id:"_4-0-3-october-16-2020"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-3-october-16-2020"}},[e._v("#")]),e._v(" 4.0.3 (October 16, 2020)")]),e._v(" "),a("h4",{attrs:{id:"bugfixes-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-5"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),a("ul",[a("li",[e._v("Wrong IRI decomposition ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/358",target:"_blank",rel:"noopener"}},[e._v("#358"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("li",[e._v("Logback config file ignored by Ontop CLI ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/361",target:"_blank",rel:"noopener"}},[e._v("#361"),a("OutboundLink")],1),e._v(")")])]),e._v(" "),a("h2",{attrs:{id:"_4-0-2-september-3-2020"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-2-september-3-2020"}},[e._v("#")]),e._v(" 4.0.2 (September 3, 2020)")]),e._v(" "),a("ul",[a("li",[e._v("Fixed Named Graphs (quad) grammar in the target of the Ontop native mapping language.")])]),e._v(" "),a("h2",{attrs:{id:"_4-0-1-august-28-2020"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-1-august-28-2020"}},[e._v("#")]),e._v(" 4.0.1 (August 28, 2020)")]),e._v(" "),a("h4",{attrs:{id:"new-features-and-bugfixes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-and-bugfixes"}},[e._v("#")]),e._v(" New features and bugfixes")]),e._v(" "),a("ul",[a("li",[e._v("Named Graphs (quad) are supported in materialization ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/343",target:"_blank",rel:"noopener"}},[e._v("#343"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("li",[e._v("Removal of Jena as a dependency ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/349",target:"_blank",rel:"noopener"}},[e._v("#349"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("li",[a("code",[e._v("com.mysql.cj.jdbc.Driver")]),e._v(" is now also recognized. Non-recognized drivers now use the default SQL factories instead of the mock-up one.")])]),e._v(" "),a("h2",{attrs:{id:"_4-0-0-july-31-2020"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-0-july-31-2020"}},[e._v("#")]),e._v(" 4.0.0 (July 31, 2020)")]),e._v(" "),a("h4",{attrs:{id:"refactoring-6"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-6"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Dependencies updated (e.g. RDF4J 3.3.0)")]),e._v(" "),a("li",[e._v("SERIAL datatypes of PostgreSQL better handled")]),e._v(" "),a("li",[e._v("Anonymous blank nodes are now supported in CONSTRUCT blocks")]),e._v(" "),a("li",[e._v("JSON-LD now supported for graph queries")]),e._v(" "),a("li",[e._v("Denodo support improved.")])]),e._v(" "),a("p",[e._v("Few bugfixes.")]),e._v(" "),a("h2",{attrs:{id:"_4-0-0-rc-1-july-8-2020"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-0-rc-1-july-8-2020"}},[e._v("#")]),e._v(" 4.0.0-rc-1 (July 8, 2020)")]),e._v(" "),a("h4",{attrs:{id:"changed-behavior-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behavior-2"}},[e._v("#")]),e._v(" Changed behavior")]),e._v(" "),a("ul",[a("li",[e._v("Streaming mode is enabled by default for query answering. It fetches data by batches of 500 results.")])]),e._v(" "),a("h4",{attrs:{id:"new-features-9"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-9"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support of GROUP_CONCAT added. All the standard SPARQL aggregation functions are now supported.")]),e._v(" "),a("li",[e._v("Named graphs are now supported.")]),e._v(" "),a("li",[e._v("Support of Denodo added. Support of Dremio is postponed to 4.1.")]),e._v(" "),a("li",[e._v("Support XML catalog file added (beta). It enables resolving "),a("code",[e._v("owl:imports")]),e._v(" assertions from the ontology by loading local files instead of fetching remote URLs. It is available in Protégé and with the "),a("code",[e._v("ontop endpoint")]),e._v(" CLI command.")]),e._v(" "),a("li",[e._v("DB metadata extraction CLI command added (experimental).")]),e._v(" "),a("li",[e._v("CASE and CAST is now supported in the mapping.")]),e._v(" "),a("li",[e._v("Streaming mode for query answering added.")])]),e._v(" "),a("h4",{attrs:{id:"deprecation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#deprecation"}},[e._v("#")]),e._v(" Deprecation")]),e._v(" "),a("ul",[a("li",[e._v("The RDF4J Workbench-based SPARQL endpint is deprecated. Tomcat, Jetty bundles and webapps (.war files) will be removed in a future version. Users are recommended to switch to the "),a("code",[e._v("ontop endpoint")]),e._v(" CLI or its Docker image.")])]),e._v(" "),a("h4",{attrs:{id:"removal-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#removal-2"}},[e._v("#")]),e._v(" Removal")]),e._v(" "),a("ul",[a("li",[e._v("The Mapping Assistant panel has been removed from the Ontop Protégé plugin.")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-7"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-7"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("SQL parsing of the mapping improved. JSQLParser's version has been updated.")]),e._v(" "),a("li",[e._v("Metadata extraction refactored, and SQLDialectAdapter has been eliminated.")]),e._v(" "),a("li",[e._v("Meta-mapping management improved.")]),e._v(" "),a("li",[e._v("Non-recognized SQL functions in the mapping are now only assumed to be deterministic. Other assumptions have been removed.")]),e._v(" "),a("li",[e._v("Internal data nodes now create variables only for database columns that are used in the query. This sparse usage of variables strongly improve reformulation time and log readibility when using tables with 100+ columns in the mapping.")])]),e._v(" "),a("p",[e._v("Many bugfixes.")]),e._v(" "),a("h2",{attrs:{id:"_4-0-0-beta-1-december-23-2019"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-0-beta-1-december-23-2019"}},[e._v("#")]),e._v(" 4.0.0-beta-1 (December 23, 2019)")]),e._v(" "),a("h4",{attrs:{id:"changed-behaviors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviors"}},[e._v("#")]),e._v(" Changed behaviors")]),e._v(" "),a("ul",[a("li",[e._v("Cardinality is now enforced by default (duplicates are removed at\nthe mapping level). This is required to support most of the\naggregation functions.")]),e._v(" "),a("li",[e._v("Functions in the SQL queries of the mapping that are unknown to\nOntop do no cause the creation of SQL views anymore. The strategy\nregarding SQL functions moved from white-list to black-list.")]),e._v(" "),a("li",[e._v("Types returned by supported SPARQL functions now strictly follow the\nSPARQL 1.1 specification.")])]),e._v(" "),a("h4",{attrs:{id:"new-features-10"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-10"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("SPARQL Aggregation functions SUM, COUNT, AVG, MIN, MAX are now\nsupported. SAMPLE is currently implemented as MIN.")]),e._v(" "),a("li",[e._v("Joins over terms that are constructed using different functions are\nnow supported.")]),e._v(" "),a("li",[e._v("Some functions (such as IRI templates) can now be post-processed\n(that is, they are not always included in the SQL query anymore).\nGenerated SQL queries are generally less verbose than before.")]),e._v(" "),a("li",[e._v("The Ontop endpoint now has the portal option, where predefined\nqueries are shown in the Web interface.")]),e._v(" "),a("li",[e._v("The NULLIF SQL function is now supported and optimized. Useful for\nfiltering out some unwanted values in the mapping assertions.")]),e._v(" "),a("li",[e._v("OPTIONALs outside the well-designed fragment are now supported.\nWeakly well-designed queries encoding preferences are optimized.")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-8"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-8"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("The typing system have been entirely redesigned. RDF types and\ndatabase types are now clearly separated. Each database engine can\nnow bring in its own data types.")]),e._v(" "),a("li",[e._v("The Datalog data structure (from version 1.x) for representing\nqueries internally has been removed.")]),e._v(" "),a("li",[e._v("Function symbol creation and optimization has been entirely\nrefactored. They are constructed by two factories, the\nFunctionSymbolFactory and the DBFunctionSymbolFactory.")]),e._v(" "),a("li",[e._v("Most of the logic of SQLDialectAdapter has been moved to\nDBFunctionSymbolFactory and DBTypeFactory. Each database engine is\nexpected to have its own implementation of these new interfaces.")]),e._v(" "),a("li",[e._v("The SPARQL translation has been rewritten (was formerly translating\ninto Datalog).")]),e._v(" "),a("li",[e._v("The SQL generator has been rewritten (was formerly translating from\nDatalog).")])]),e._v(" "),a("h4",{attrs:{id:"temporary-limitation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#temporary-limitation"}},[e._v("#")]),e._v(" Temporary limitation")]),e._v(" "),a("ul",[a("li",[e._v("Due to a complete refactoring of the SQL dialect management, only\nthe H2, MySQL, PostgreSQL, Oracle, SQL server and DB2 dialects are\nsupported in this beta. Dremio and Denodo dialects are expected to\nbe supported in a next beta release.")])]),e._v(" "),a("p",[e._v("Many bugfixes.")]),e._v(" "),a("h2",{attrs:{id:"_3-0-1-december-9-2019"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-1-december-9-2019"}},[e._v("#")]),e._v(" 3.0.1 (December 9, 2019)")]),e._v(" "),a("h4",{attrs:{id:"changed-behaviors-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviors-2"}},[e._v("#")]),e._v(" Changed behaviors")]),e._v(" "),a("ul",[a("li",[e._v("Protégé: no property file (resp. mapping file) is created if no data\nsource (resp. mapping assertion) is specified by the user.")])]),e._v(" "),a("h4",{attrs:{id:"new-features-11"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-11"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Ontop endpoint now supports R2RML files and doesn't require an\nontology.")]),e._v(" "),a("li",[e._v("Materialization: N-triples format is now supported.")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-9"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-9"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Rewriting of the tree-witness rewriter (now independent from\nDatalog)")])]),e._v(" "),a("h4",{attrs:{id:"bug-fixes-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-4"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),a("ul",[a("li",[e._v("Protégé: fixed issues related to prefix management.")]),e._v(" "),a("li",[e._v("Reasoning: issue related to the handling of inverse properties\nfixed.")])]),e._v(" "),a("h2",{attrs:{id:"_3-0-0-august-23-2019"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-0-august-23-2019"}},[e._v("#")]),e._v(" 3.0.0 (August 23, 2019)")]),e._v(" "),a("h4",{attrs:{id:"changed-behaviors-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviors-3"}},[e._v("#")]),e._v(" Changed behaviors")]),e._v(" "),a("ul",[a("li",[e._v("The `rdfs:range` of a data property is not used anymore for\ninferring the non-specified datatype in a mapping assertion but for\nvalidating the datatype once specified or inferred. Datatype\ninference is now based on the DB datatype and follows the R2RML\nnatural mapping (https://www.w3.org/TR/r2rml/#natural-mapping)")])]),e._v(" "),a("h4",{attrs:{id:"new-features-12"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-12"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support of Protege 5.5")]),e._v(" "),a("li",[e._v("Support of BNode in R2RML")]),e._v(" "),a("li",[e._v("Basic support for the `geo:wktLiteral` datatype (#256)")]),e._v(" "),a("li",[e._v("New command-line interface for SPARQL endpoint")]),e._v(" "),a("li",[e._v("Docker container for SPARQL endpoint\n(https://hub.docker.com/r/ontop/ontop-endpoint)")]),e._v(" "),a("li",[e._v("Preliminary support of Dremio")]),e._v(" "),a("li",[e._v("Preliminary support of Denodo")]),e._v(" "),a("li",[e._v("The ordering of SPARQL variables is now preserved (#291)")]),e._v(" "),a("li",[e._v("N-Triples output for materialization added")]),e._v(" "),a("li",[e._v("The SQL translation now appears as a sub-tab in the Protégé Ontop\nSPARQL tab")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-10"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-10"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("The triple predicate is now systematically used in the mapping and\nduring query unfolding")]),e._v(" "),a("li",[e._v("Atom predicates and function symbols are now clearly distinguished")]),e._v(" "),a("li",[e._v("The Datalog-based data structure is not used anymore at mapping\nprocessing time and by the default rewriter")]),e._v(" "),a("li",[e._v("Query containment-based optimizations applied to the mapping after\nsaturation improved")]),e._v(" "),a("li",[e._v("The materializer is now based on RDF4J (instead of OWLAPI)")])]),e._v(" "),a("h4",{attrs:{id:"project-organisation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#project-organisation"}},[e._v("#")]),e._v(" Project organisation")]),e._v(" "),a("ul",[a("li",[e._v("Release of Ontop on both SourceForge and GitHub (#274)")]),e._v(" "),a("li",[e._v("A new repository for the tutorial\n(https://github.com/ontop/ontop-tutorial)")])]),e._v(" "),a("p",[e._v("Many bugfixes.")]),e._v(" "),a("h2",{attrs:{id:"_3-0-0-beta-2-february-28-2018"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-0-beta-2-february-28-2018"}},[e._v("#")]),e._v(" 3.0.0-beta-2 (February 28, 2018)")]),e._v(" "),a("h4",{attrs:{id:"changed-behaviours"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviours"}},[e._v("#")]),e._v(" Changed Behaviours")]),e._v(" "),a("ul",[a("li",[e._v("The JDBC driver class name is now required in Protégé (issue #248)")])]),e._v(" "),a("h4",{attrs:{id:"new-features-13"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-13"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Novel left join optimization techniques (issue #230)")]),e._v(" "),a("li",[e._v("LIMIT appended to test SQL queries and SPARQL queries in Protégé")]),e._v(" "),a("li",[e._v("Report illegal usage of Fully qualified column names (FQDN) in the\ntarget part of a mapping assertion")]),e._v(" "),a("li",[e._v("Support for the SPARQL isNumeric function")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-11"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-11"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Internal representation of the ontology improved")]),e._v(" "),a("li",[e._v("Improvement of the intermediate query representation (issues #235,\n#236)")]),e._v(" "),a("li",[e._v("Switch to ANTLR4 to parse ontop native mapping (issues #238, #239)")]),e._v(" "),a("li",[e._v("Make ResultSet.next() robust (issue #219)")]),e._v(" "),a("li",[e._v("More robust handling of IRI-safe encoding (issue #245)")])]),e._v(" "),a("h4",{attrs:{id:"bug-fixes-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-5"}},[e._v("#")]),e._v(" Bug Fixes")]),e._v(" "),a("p",[e._v("Many, see "),a("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/7?closed=1",target:"_blank",rel:"noopener"}},[e._v("closed issues"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h2",{attrs:{id:"_3-0-0-beta-1-august-11-2017"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-0-beta-1-august-11-2017"}},[e._v("#")]),e._v(" 3.0.0-beta-1 (August 11, 2017)")]),e._v(" "),a("p",[e._v("Note that this is the first release from version 3 series with many\ninternal refactoring and improvements, and bug fixes. However, these\nchanges also cause incompatibility with Ontop v1. See "),a("a",{attrs:{href:"MigrationGuideV1toV3",title:"wikilink"}},[e._v("the migration\nguide")]),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"changed-behaviours-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviours-2"}},[e._v("#")]),e._v(" Changed Behaviours")]),e._v(" "),a("ul",[a("li",[e._v("JDBC connection information is stored in a separate properties file")]),e._v(" "),a("li",[e._v("Fully qualified columns (table.column) are not allowed in the target\npart of the mapping language. One has to explicitly create an alias\n(e.g. table.column AS table_column) and use the alias in the\ntarget. (complying with R2RML)")]),e._v(" "),a("li",[e._v("The rules for datatype type inference and checking are changed. Now\nwe use only mapping and database to infer the datatypes (complying\nwith R2RML), and the (range axioms) in the ontologies to check the\ncompatibility (complying with OWL).")])]),e._v(" "),a("h4",{attrs:{id:"new-features-14"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-14"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Major refactoring of the internal structure of the Ontop system")]),e._v(" "),a("li",[e._v("Databases for Integration Tests have been dockerized.")]),e._v(" "),a("li",[e._v("Upgrade Sesame to the latest version of RDF4J (v2.2.2).")]),e._v(" "),a("li",[e._v("The redesigned OWLAPI and RDF4J API bindings of Ontop API (see\nexamples: "),a("a",{attrs:{href:"https://github.com/ontop/ontop-api-examples",target:"_blank",rel:"noopener"}},[e._v("https://github.com/ontop/ontop-api-examples"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("li",[e._v("Upgrade of R2RML API to v0.6.0")]),e._v(" "),a("li",[e._v("Official support of both Tomcat and Jetty (v9) for deploying a\nSPARQL endpoint")]),e._v(" "),a("li",[e._v("Better support of Optional (bugfix #190)")]),e._v(" "),a("li",[e._v('Protege: support for "Synchronize Reasoner" in the Reasoner menu')]),e._v(" "),a("li",[e._v("Improved error messages for incorrect mapping")]),e._v(" "),a("li",[e._v("CLI tool for converting Mapping from v1 to v3")])]),e._v(" "),a("h2",{attrs:{id:"_1-18-1-june-16-2017"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-18-1-june-16-2017"}},[e._v("#")]),e._v(" 1.18.1 (June 16, 2017)")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("Return a correct extension for files in ontop cli materializer\n(issue #145)")])]),e._v(" "),a("li",[a("p",[e._v("Materialize support non-http resource uris")])]),e._v(" "),a("li",[a("p",[e._v("Bug Fixes")]),e._v(" "),a("ul",[a("li",[e._v("Small fixes in cli (issues #127, #141, #188)")]),e._v(" "),a("li",[e._v("PostgreSQL JDBC driver fix for quotation marks")]),e._v(" "),a("li",[e._v("Remove unknown property warning for owl:sameAs")]),e._v(" "),a("li",[e._v("Remove duplicate annotations during materialization (issues\n#183 #186)")]),e._v(" "),a("li",[e._v("Generate different file names for properties and classes during\nmaterialization with separate files (issue #165)")]),e._v(" "),a("li",[e._v("R2RML\n"),a("ul",[a("li",[e._v("Small changes in api")]),e._v(" "),a("li",[e._v("Fix R2RML import of SQL query (issues #181 #182)")]),e._v(" "),a("li",[e._v("Fix export from OBDA mapping to R2RML (issues #158 #159\n#160)")])])]),e._v(" "),a("li",[e._v("Fix in SPARQL use of filter and values with a IRI (issue #191)")]),e._v(" "),a("li",[e._v("Fix handling of mysql metadata with lower_case_table_names\nsetting on (issue #192)")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-18-0-may-26-2016"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-18-0-may-26-2016"}},[e._v("#")]),e._v(" 1.18.0 (May 26, 2016)")]),e._v(" "),a("ul",[a("li",[e._v("Protege\n"),a("ul",[a("li",[e._v("Redesigned materialization gui")]),e._v(" "),a("li",[e._v("Upgrade to Protege 5.0.0")])])]),e._v(" "),a("li",[e._v("Support of querying annotation property from ontology (issue #105)\n(disabled by default)")]),e._v(" "),a("li",[e._v("Support of the use of owl:sameAs in mappings (disabled by default)")]),e._v(" "),a("li",[e._v("Package names have been unified to it.unibz.inf.ontop")]),e._v(" "),a("li",[e._v("Upgrade OWLAPI to v4.2.5")]),e._v(" "),a("li",[e._v("Bug Fixes\n"),a("ul",[a("li",[e._v("Fix obda-to-r2rml convert for template like <{uri}> (issue\n#97)")]),e._v(" "),a("li",[e._v("Fix an issue in Protege when renaming data source.")]),e._v(" "),a("li",[e._v("Fix error messages in protege mapping assistant panel and SPARQL\nquery")]),e._v(" "),a("li",[e._v("Fix issue with multiple schemas (issue #99)")]),e._v(" "),a("li",[e._v("Fix internal SQL conversion for Teiid jdbc driver")]),e._v(" "),a("li",[e._v("Fix support of anonymous ontology (issue #101)")]),e._v(" "),a("li",[e._v("Fix warning message in Protege (issue #102)")]),e._v(" "),a("li",[e._v("Fix xml uri (issue #104)")]),e._v(" "),a("li",[e._v("Fix r2rml api, error predicateMap with template (issue #107)")]),e._v(" "),a("li",[e._v("Fix in Protege import of additional ontology and add classes and\nproperties of imported ontologies at runtime (issues #106\n#108)")]),e._v(" "),a("li",[e._v("Fix querying URI constants (issue #111)")]),e._v(" "),a("li",[e._v("Fix error message creating new mapping (issue #120)")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-17-1-february-16-2016"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-17-1-february-16-2016"}},[e._v("#")]),e._v(" 1.17.1 (February 16, 2016)")]),e._v(" "),a("ul",[a("li",[e._v("Bug Fixes\n"),a("ul",[a("li",[e._v("Fix an issue when creating new datasource in Protege")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-17-0-february-4-2016"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-17-0-february-4-2016"}},[e._v("#")]),e._v(" 1.17.0 (February 4, 2016)")]),e._v(" "),a("ul",[a("li",[e._v("Protege\n"),a("ul",[a("li",[e._v("Ontop protege plugin now available on official Protege Plugin\nRepository!")]),e._v(" "),a("li",[e._v("Upgrade Protege to 5.0.0-beta-21 (latest version)")]),e._v(" "),a("li",[e._v("Ontop protege plugin is packed as one jar now -- no need for\nseparated OSGI JDBC configuration jars")]),e._v(" "),a("li",[e._v("do not generate .obda and .q file when no datasource is present")]),e._v(" "),a("li",[e._v("General improvement of UI -- more intuitive and less confusion")])])]),e._v(" "),a("li",[e._v("Support for Annotation Properties in mappings")]),e._v(" "),a("li",[e._v("Improvement of Ontop mapping language for URIs/Literals retrieved\nfrom DB columns")]),e._v(" "),a("li",[e._v("Support for SPARQL VALUES keyword for SPARQL federation")]),e._v(" "),a("li",[e._v("Java 8")]),e._v(" "),a("li",[e._v("Upgrade OWLAPI to v4.1.3 (latest version)")]),e._v(" "),a("li",[e._v("Bash Completion for command line interface")]),e._v(" "),a("li",[e._v("Better structured Wiki: "),a("a",{attrs:{href:"https://github.com/ontop/ontop/wiki",target:"_blank",rel:"noopener"}},[e._v("https://github.com/ontop/ontop/wiki"),a("OutboundLink")],1)])]),e._v(" "),a("h2",{attrs:{id:"_1-16-1-november-16-2015"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-1-november-16-2015"}},[e._v("#")]),e._v(" 1.16.1 (November 16, 2015)")]),e._v(" "),a("ul",[a("li",[e._v("Optimizations exploiting foreign key constraints over multiple\ncolumns")]),e._v(" "),a("li",[e._v("Improvement in the RDB2RDF compliance test (contributed by Evren\nSrin)")])]),e._v(" "),a("h2",{attrs:{id:"_1-16-0-october-14-2015"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-0-october-14-2015"}},[e._v("#")]),e._v(" 1.16.0 (October 14, 2015)")]),e._v(" "),a("ul",[a("li",[e._v("Support for "),a("a",{attrs:{href:"OntopSPARQLFunctions",title:"wikilink"}},[e._v(" SPARQL functions ")])]),e._v(" "),a("li",[e._v("Support for column oriented RDBMS "),a("a",{attrs:{href:"ObdalibPluginJDBC",title:"wikilink"}},[e._v("\nMonetDB")])]),e._v(" "),a("li",[e._v("Support for cloud RDBMS "),a("a",{attrs:{href:"ObdalibPluginJDBC",title:"wikilink"}},[e._v(" SAP HANA")])]),e._v(" "),a("li",[e._v("New Optimization technique: "),a("a",{attrs:{href:"Implicit-database-constraints",title:"wikilink"}},[e._v("\nImplicit-database-constraints")])]),e._v(" "),a("li",[e._v("New Optimization technique: "),a("a",{attrs:{href:"Exact-Mappings",title:"wikilink"}},[e._v("\nExact-Mappings")])]),e._v(" "),a("li",[e._v("Bug Fixes\n"),a("ul",[a("li",[e._v("Handling quotes in the WHERE clause of SQL query in mappings .")]),e._v(" "),a("li",[e._v("Allow multiple subjects in the target of mapping of Ontop native\nsyntax.")]),e._v(" "),a("li",[e._v("Return correct value from datetime columns using jtds driver")]),e._v(" "),a("li",[e._v("Fix the translation of LIMIT with ORDER BY in oracle database")]),e._v(" "),a("li",[e._v("Fix a bug in MetaMappingExpander")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-15-0-may-13-2015"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-15-0-may-13-2015"}},[e._v("#")]),e._v(" 1.15.0 (May 13, 2015)")]),e._v(" "),a("ul",[a("li",[e._v("Upgrade the Protege plugin to Protégé 5")]),e._v(" "),a("li",[e._v("New Command line interface")]),e._v(" "),a("li",[e._v("Better support for SPARQL BIND")]),e._v(" "),a("li",[e._v("Support for SPARQL Concat and Replace")]),e._v(" "),a("li",[e._v("Support for SQL Concat and Replace (in the mappings)")]),e._v(" "),a("li",[e._v("Support for xsd:dateTimeStamp")]),e._v(" "),a("li",[e._v("Improved Optimization techniques (Contribution by Roman Konchakov)")]),e._v(" "),a("li",[e._v("Implementation of Autoclosable interface for core classes in the API\nto support `try with resource`.")]),e._v(" "),a("li",[e._v("Create a sub-query when SELECT DISTINCT is used in the mappings.")]),e._v(" "),a("li",[e._v("Bug Fixes\n"),a("ul",[a("li",[e._v("Handle the 30-characters limit for variable names in Oracle.")]),e._v(" "),a("li",[e._v("Fix the mapping render of Protege when multiple subjects are in\nthe target of mapping.")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-14-0-november-4-2014"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-14-0-november-4-2014"}},[e._v("#")]),e._v(" 1.14.0 (November 4, 2014)")]),e._v(" "),a("ul",[a("li",[e._v("Added support in ontology and mappings for datatypes xsd:int,\nxsd:long, xsd:positiveInteger, xsd:negativeInteger,\nxsd:nonPositiveInteger, xsd:nonNegativeInteger, xsd:float")]),e._v(" "),a("li",[e._v("Optimized implementations of TBox classifications, and query\ncontainment checking, which are much faster than before")]),e._v(" "),a("li",[e._v("Validation for Sesame Workbench made stronger. It prevents\nrepositories with an invalid configuration to be created.")]),e._v(" "),a("li",[e._v("Bug Fixes:\n"),a("ul",[a("li",[e._v("Fix SPARQL functions (str(), lang()) to use rdfs:Literal instead\nof xsd:string")]),e._v(" "),a("li",[e._v("Issue converting datatypes of R2RML constants")]),e._v(" "),a("li",[e._v("Support UNICODE characters in TurtleParser")]),e._v(" "),a("li",[e._v("Catch exceptions for Protege R2RML Export")]),e._v(" "),a("li",[e._v("Fix conversion from ontop mappings to R2RML of language tag and\ntriples")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-13-1-september-29-2014"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-13-1-september-29-2014"}},[e._v("#")]),e._v(" 1.13.1 (September 29, 2014)")]),e._v(" "),a("ul",[a("li",[e._v("Bug Fixes:\n"),a("ul",[a("li",[e._v("The redundant query elimination optimization sometimes does not\nhandle facts properly")]),e._v(" "),a("li",[e._v("Some warning messages related to datatype range axioms are\nambiguous")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-13-0-september-25-2014"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-13-0-september-25-2014"}},[e._v("#")]),e._v(" 1.13.0 (September 25, 2014)")]),e._v(" "),a("ul",[a("li",[e._v("Support for providing implicit DB Constraints (e.g. foreign keys) to\nOntop to generate efficient SQL")]),e._v(" "),a("li",[e._v("Command line feature to generate pretty R2RML")]),e._v(" "),a("li",[e._v("Stream output in the Protege Plugin")]),e._v(" "),a("li",[e._v("Support for Regex in mappings")]),e._v(" "),a("li",[e._v("Proper handling of datatypes in ontology and mappings")]),e._v(" "),a("li",[e._v("Support for hsql database")]),e._v(" "),a("li",[e._v("Support for datatypes xsd:date, xsd:time and xsd:gYear")]),e._v(" "),a("li",[e._v("Bug Fixes:\n"),a("ul",[a("li",[e._v("Issue with nested equivalences in unfolder")]),e._v(" "),a("li",[e._v("Problem with multiple join conditions in R2RML")]),e._v(" "),a("li",[e._v("Cancelling running queries in Protege")]),e._v(" "),a("li",[e._v("Blank lines in generated sql causes problems for oracle")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-12-0-june-26-2014"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-0-june-26-2014"}},[e._v("#")]),e._v(" 1.12.0 (June 26, 2014)")]),e._v(" "),a("ul",[a("li",[e._v("Support for finding empty concepts and properties")]),e._v(" "),a("li",[e._v("Integration with a new R2RML API")]),e._v(" "),a("li",[e._v("Less restrictive mode for JDBC driver validation")]),e._v(" "),a("li",[e._v("Faster TBox reasoner implementation")]),e._v(" "),a("li",[e._v('Optional "Replace" Statement in the SQL translation. When\n"Replace" is off the SQL performs much better.')]),e._v(" "),a("li",[e._v("Several Bug Fixes:\n"),a("ul",[a("li",[e._v("Issue with 'true' in Oracle")]),e._v(" "),a("li",[e._v("Meta-mapping editing in Protege")]),e._v(" "),a("li",[e._v("Problem with regex in Oracle")]),e._v(" "),a("li",[e._v("Several issues with R2RML")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-11-0-february-19-2014"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-11-0-february-19-2014"}},[e._v("#")]),e._v(" 1.11.0 (February 19, 2014)")]),e._v(" "),a("ul",[a("li",[e._v("Support for Consistency Checking")]),e._v(" "),a("li",[e._v("Improved Performance")]),e._v(" "),a("li",[e._v("Support for Multi-schema queries")]),e._v(" "),a("li",[e._v("New SQL parser for the mapping based on JSQLParser.")]),e._v(" "),a("li",[e._v("Extended the supported SQL language: IN, BETWEEN, LIKE, etc.")]),e._v(" "),a("li",[e._v("Extended the supported SPARQL: BIND")]),e._v(" "),a("li",[e._v("Improved the Treewitness rewriting algorithm.")]),e._v(" "),a("li",[e._v("Upgraded to Sesame 2.7.10")]),e._v(" "),a("li",[e._v("General clean-up")]),e._v(" "),a("li",[e._v("Fixed a number of bugs:\n"),a("ul",[a("li",[e._v("Translation of SAPRQL REGEX into SQL")]),e._v(" "),a("li",[e._v("Infinite loop triggered by some nested Optionals")]),e._v(" "),a("li",[e._v("Several issues with Construct")]),e._v(" "),a("li",[e._v("Several issues with R2RML")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-10-0-december-16-2013"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-10-0-december-16-2013"}},[e._v("#")]),e._v(" 1.10.0 (December 16, 2013)")]),e._v(" "),a("ul",[a("li",[e._v("Ontop under Apache license")]),e._v(" "),a("li",[e._v("Ontop packages in central maven repository")])]),e._v(" "),a("h2",{attrs:{id:"_1-9-0-september-18-2013"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-9-0-september-18-2013"}},[e._v("#")]),e._v(" 1.9.0 (September 18, 2013)")]),e._v(" "),a("ul",[a("li",[e._v("Update to Sesame 2.7.6 (latest)")]),e._v(" "),a("li",[e._v("Validation of datatypes w.r.t. XMLSchema specification")]),e._v(" "),a("li",[e._v("New hybrid Abox functionality support")]),e._v(" "),a("li",[e._v("Removed all dependencies to Jena")]),e._v(" "),a("li",[e._v("Removed wrong/unnecessary dependencies")]),e._v(" "),a("li",[e._v("Turtle parser can handle variables in the predicate")]),e._v(" "),a("li",[e._v("Mappings with URI templates in class or properties suppot")]),e._v(" "),a("li",[e._v("First version of mapping splitter")]),e._v(" "),a("li",[e._v("Bug fix: Null pointer exception when the URI in Protege plugin was\nempty")]),e._v(" "),a("li",[e._v("Bug fix: Literal and literal with language tag handling")]),e._v(" "),a("li",[e._v("Bug fix: Shutdown of Sesame repoConnection")]),e._v(" "),a("li",[e._v("Bug fix: Object column literal gerenation in R2RML")]),e._v(" "),a("li",[e._v("Bug fix: Queries that would not finish execution")]),e._v(" "),a("li",[e._v("Bug fix: Unexpected bindings in unfolder")]),e._v(" "),a("li",[e._v("Bug fix: Null pointer exception in ontology translation in the case\nof unsupported axiom")]),e._v(" "),a("li",[e._v("Bug fix: OWL class assertion generation, inverted arguments")]),e._v(" "),a("li",[e._v("Bug fix: SameTerm in sparql algebra to datalog translation")]),e._v(" "),a("li",[e._v("Bug fix: URI template matcher to find most specific matches first")]),e._v(" "),a("li",[e._v("Bug fix: Construct queries")]),e._v(" "),a("li",[e._v("Bug fix: Describe queries")])]),e._v(" "),a("h2",{attrs:{id:"_1-8-0-july-29-2013"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-8-0-july-29-2013"}},[e._v("#")]),e._v(" 1.8.0 (July 29, 2013)")]),e._v(" "),a("ul",[a("li",[e._v("Improve error message and better exception handling.")]),e._v(" "),a("li",[e._v("Change the representation of "),a("code",[e._v("null")]),e._v(" value in BindingSet")]),e._v(" "),a("li",[e._v("Modified the computation of the LeftJoin to support empty evaluation\nin its second argument.")]),e._v(" "),a("li",[e._v("Changed the type of the semantic index table for integer data\nproperty assertion from INT to BIGINT to be able to handle\n"),a("code",[e._v("xsd:integer")]),e._v(" type")]),e._v(" "),a("li",[e._v("Set index creation during Quest startup")]),e._v(" "),a("li",[e._v("Implement new feature for bootstrapping, command line scripts,\nintegration in ontoPro plugin")]),e._v(" "),a("li",[e._v("Updated the URI templates in Turtle mapping syntax to make it\nsimpler and closer to Turtle. Now quotes, question marks and\nclass/property declarations are no longer required")])]),e._v(" "),a("p",[e._v("For example, in the previous syntax:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",[a("code",[e._v(' <"test;person/{?id}"> a :MyClass; :hasName {?name}.\n')])])]),a("p",[e._v("becomes simply")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",[a("code",[e._v(" test:person/{id} a :MyClass ; :hasName {name} .\n")])])]),a("ul",[a("li",[e._v('Support "%", "=", ";" characters in the URI template.')])]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",[a("code",[e._v(" :class/{id};{name}%{class type}\n")])])]),a("ul",[a("li",[e._v("Bug fix: Major bugs in execution handling SPARQL Construct and\nSPARQL Describe queries.")]),e._v(" "),a("li",[e._v("Bug fix: Issues related to commits and batch sizes in\nQuestOWLStatement")]),e._v(" "),a("li",[e._v("Bug fix: Issue with URI template matcher that generates "),a("code",[e._v("null")]),e._v(' in\ncase failed template (now it generates URI("xxxx") where xxx is\nthe URI that was being matched.)')]),e._v(" "),a("li",[e._v("Bug fix: Issue in existential clause in tree-witness algorithm")]),e._v(" "),a("li",[e._v("Bug fix: Issue in the maximum size of URI that has more than 400\ncharacters")]),e._v(" "),a("li",[e._v("Bug fix: Issue in some data that can not be tracked when inserted\ninto the database. In particular if the data comes from\nclasses/properties that were simplified by the equivalence\nresolution.")]),e._v(" "),a("li",[e._v("Bug fix: Issue in exception handling during index creation in\nsemantic index test.")]),e._v(" "),a("li",[e._v("Bug fix: Issue in SQL parser that it doesn't capture the scope\nwithin parentheses in the WHERE clause.")]),e._v(" "),a("li",[e._v("Remove table and column identifier quotes in the SQL target query\nstring so that the parser can parse properly. For example:")])]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",[a("code",[e._v(' SELECT "Student"."sid" from "Student"\n')])])]),a("p",[e._v("will become:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",[a("code",[e._v(" SELECT Student.sid from Student\n")])])]),a("ul",[a("li",[e._v("New semantic index implementation with integer references for URIs\nfor faster query answering (faster joins on integers instead of\nstrings)")])]),e._v(" "),a("p",[a("strong",[e._v("Ontop source code")])]),e._v(" "),a("ul",[a("li",[e._v("Ontop is now in GitHub!")]),e._v(" "),a("li",[e._v("Cleaner and slimmer project structure. We removed obsolete classes\nand tests.")]),e._v(" "),a("li",[e._v("Code refactor in Materialiser API, MinimalCQProducer and\nConstruct-Describe query execution.")]),e._v(" "),a("li",[e._v("More complete test cases for testing Quest features, e.g.,\nTree-Witness rewriting, Data materialiser, SQL parser, SPARQL\nConstruct, SPARQL Describe, SPARQL Optional, Database metadata and\nQuery completeness.")]),e._v(" "),a("li",[e._v("Support JUnit4 test cases.")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha2-rev-2305-april-5-2013"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha2-rev-2305-april-5-2013"}},[e._v("#")]),e._v(" 1.7-alpha2 (rev 2305, April 5, 2013)")]),e._v(" "),a("ul",[a("li",[e._v("Support for importing/exporting R2RML mappings")]),e._v(" "),a("li",[e._v('Support for automated mapping generation as defined by the "Direct\nMapping" W3C specification')]),e._v(" "),a("li",[e._v("Various options for data materialization (similar to dump-rdf in\nD2RQ)")]),e._v(" "),a("li",[e._v("Support for concurrent queries in the SPARQL endpoint through\nconnection pooling")]),e._v(" "),a("li",[e._v("Better support for Oracle, Postgres, SQL Server and DB2")]),e._v(" "),a("li",[e._v("Improved the SQL queries generated by Quest by avoiding some\noperations when unnecessary (e.g., casting), and placing optimally\nthe JOIN conditions in the SQL query.")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha2-rev-2178-february-7-2013"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha2-rev-2178-february-7-2013"}},[e._v("#")]),e._v(" 1.7-alpha2 (rev 2178, February 7, 2013)")]),e._v(" "),a("p",[a("strong",[e._v("-ontopQuest-")])]),e._v(" "),a("ul",[a("li",[e._v("Mapping optimiser: improved the generation of OR mappings")]),e._v(" "),a("li",[e._v("Mapping optimiser: improved the simplification of mappings using\nFOREIGN KEYS")]),e._v(" "),a("li",[e._v("Query optimiser: Improved the query optimiser to avoid generation of\nredundant JOINs and redundant UNIONs w.r.t. FOREIGN KEYs")]),e._v(" "),a("li",[e._v("Support percent encoding in strings in URI templates as defined by\nthe R2RML standard.")]),e._v(" "),a("li",[e._v("Better propagation of Exception messages in the Sesame provider")]),e._v(" "),a("li",[e._v("New "),a("strong",[e._v("scripts for querying quest")]),e._v(" from the command line")])]),e._v(" "),a("p",[a("strong",[e._v("-ontopPro- plugin")])]),e._v(" "),a("ul",[a("li",[a("strong",[e._v("Introducing mapping assistant")]),e._v(". A new GUI-based tool for creating\nmappings. This is an experimental GUI to help you create mappings in\na faster way, please help us improve it by reporting any issues you\nmay find. (See "),a("a",{attrs:{href:"ObdalibPluginMappingAssistant",title:"wikilink"}},[e._v("\nguideliness")]),e._v(").")]),e._v(" "),a("li",[e._v('Users can set the max number of tuples returned in "OBDA Query"\ntab.')])]),e._v(" "),a("p",[a("strong",[e._v("Mapping language features (-ontopQuest- and -ontopCore-)")])]),e._v(" "),a("ul",[a("li",[e._v("Support URI identifier obtained directly from the database (no using\nURI template).")]),e._v(" "),a("li",[e._v("Support multiple lines when wrting SQL source query (See "),a("a",{attrs:{href:"ObdalibObdaFile#SourceandMappingDeclaration",title:"wikilink"}},[e._v(" feature\nnotes")]),e._v(")")])]),e._v(" "),a("p",[a("strong",[e._v("Bug fixes")])]),e._v(" "),a("ul",[a("li",[e._v("Bug fix: Issue with MySQL and UTF8 characters (Korean in particular)")]),e._v(" "),a("li",[e._v('Bug fix: Issue with "unbound variable freshX_X found while\ngenerating SQL" fixed.')]),e._v(" "),a("li",[e._v("Bug fix: Inverse minimum cardinality assertion was being ignored.")]),e._v(" "),a("li",[e._v("Bug fix: Source SQL query doesn't accept parenthesis in WHERE\nclause.")]),e._v(" "),a("li",[e._v("Bug fix: JDBC connection doesn't recover when connection lost.")]),e._v(" "),a("li",[e._v("Bug fix: Sesame virtual repository fails to read Quest preferences.")]),e._v(" "),a("li",[e._v("Bug fix: CSV export function only exports 101 tuples instead of all\nthe tuples.")]),e._v(" "),a("li",[e._v("Bug fix: Null pointer exception in the query result table.")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-2039-december-30-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-2039-december-30-2012"}},[e._v("#")]),e._v(" 1.7-alpha (rev 2039, December 30, 2012)")]),e._v(" "),a("p",[a("strong",[e._v("SPARQL support")])]),e._v(" "),a("ul",[a("li",[e._v("Support for most SPARQL built in functions, e.g., arithmetics, type\nchecking, etc.")]),e._v(" "),a("li",[e._v("Support for CONSTRUCT and DESCRIBE result forms")]),e._v(" "),a("li",[e._v("Support for OPTIONAL and bound, which allow you to have NEGATION in\nthe usual SPARQL 1.0 style.")]),e._v(" "),a("li",[e._v('Support for variables in ANY position, e.g., to allow queries such\nas SELECT ?p ?v WHERE { ?x :name "John Smith". ?x ?p ?v }')]),e._v(" "),a("li",[e._v("Stronger compliance to standard RDF and SPARQL semantics for FILTER\nexpressions")])]),e._v(" "),a("p",[a("strong",[e._v("Performance")])]),e._v(" "),a("ul",[a("li",[e._v("Multiple improvements to the SPARQL-to-rule translation, mapping and\nTBox optimization algorithms.")]),e._v(" "),a("li",[e._v("New algorithm for query rewriting w.r.t. the TBox that increases the\nperformance of query answering by many orders of magnitude when\ninference w.r.t. to existential constants is enabled. The\nimplementation has been contributed by Dr. Roman Kontchakov.")]),e._v(" "),a("li",[e._v("New benchmarks. We tested against Virtuoso triple store, Virtuoso\nRDF views and D2R Server using the BSBM and FishMark benchmarks.")])]),e._v(" "),a("p",[a("strong",[e._v("APIs and Accessibility")])]),e._v(" "),a("ul",[a("li",[e._v('Completely new Sesame API provider, now users of Sesame can create\n"Virtual RDF repositories" with -ontop-')]),e._v(" "),a("li",[e._v("SPARQL end-point support through integration with Sesame's\nworkbench")])]),e._v(" "),a("p",[a("strong",[e._v("Mapping language")])]),e._v(" "),a("ul",[a("li",[e._v('Improved support for default literal types, now it conforms with the\nR2RML "Natural Mapping" specification')]),e._v(" "),a("li",[e._v("Support for language tags obtained from the DB")]),e._v(" "),a("li",[e._v("Proper support for constants in the mappings")]),e._v(" "),a("li",[e._v("Proper internal handling of NULL values in the database (as\nrecommended by the R2RML standard)")])]),e._v(" "),a("p",[a("strong",[e._v("Database support")])]),e._v(" "),a("ul",[a("li",[e._v("Restored support for Oracle, DB2 and SQL Server")]),e._v(" "),a("li",[e._v("Improved support and performance over MySQL")])]),e._v(" "),a("p",[a("strong",[e._v("Documentation")])]),e._v(" "),a("ul",[a("li",[e._v("Revised and extended all technical documentation")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-1692-august-16-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1692-august-16-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1692 (August 16, 2012)")]),e._v(" "),a("p",[a("strong",[e._v("-ontop- general")])]),e._v(" "),a("ul",[a("li",[e._v("New file content for the OBDA output file. The file is no longer in\nXML format but instead it uses plain text for simplicity (Issue:\n#244).")]),e._v(" "),a("li",[e._v("Improved error messages when the system initializes, parses\nmappings, fails to")])]),e._v(" "),a("p",[a("code",[e._v("execute queries, etc.")]),a("br"),e._v(" "),a("code")]),e._v(" "),a("p",[a("strong",[e._v("-ontopPro- Protege plugin")])]),e._v(" "),a("ul",[a("li",[e._v("Support Protégé 4.2")]),e._v(" "),a("li",[e._v("Add cancel button during query execution to terminate the process\nimmediately.")]),e._v(" "),a("li",[e._v("Add help button to guide filling data source parameters.")]),e._v(" "),a("li",[e._v("The plugin no longer introduces prefix definitions")]),e._v(" "),a("li",[e._v('Implemented "Cancel" function for query execution')]),e._v(" "),a("li",[e._v("New shortcut CONTROL + T to test mappings in the mapping creator")]),e._v(" "),a("li",[e._v("Fixed several issues with prefix management and rendering of")])]),e._v(" "),a("p",[a("code",[e._v("URIs short forms")])]),e._v(" "),a("ul",[a("li",[e._v("Improved GUI, hints and suggestions for JDBC connections, improved\nTAB navigation")])]),e._v(" "),a("p",[a("code",[e._v("in all dialogs")])]),e._v(" "),a("ul",[a("li",[e._v("Bug fix: Improve error reporting and stack trace printing (Issue:\n#255, #262)")]),e._v(" "),a("li",[e._v("Bug fix: The target and source string got saved partially if\nnewlines are used.")]),e._v(" "),a("li",[e._v("Bug fix: The OBDA model doesn't get loaded if the query has an\nexception.")]),e._v(" "),a("li",[e._v("Improved error management during .obda and query file load")]),e._v(" "),a("li",[e._v("Fixed null pointer exception and blank window that appear in cases\nwhere the .owl file")])]),e._v(" "),a("p",[a("code",[e._v("in OWL/RDF contained different default ns and a default prefix")])]),e._v(" "),a("p",[a("strong",[e._v("-ontopQuest- OWL Reasoner")])]),e._v(" "),a("ul",[a("li",[e._v("Added support for SPARQL query modifiers: ORDER BY, OFFSET and LIMIT\n(Issue: #261).")]),e._v(" "),a("li",[e._v("Add query caching to speed up the system performance, now repeated\nquery execution will not require SQL generation every time.")]),e._v(" "),a("li",[e._v("Relaxed on punning checks to allow loading of DBPedia and similar\nontologies.")]),e._v(" "),a("li",[e._v("EXPERIMENTAL: Added support for mixed ABoxes for class assertions,\ni.e., most data comes from the mappings but a bit of data is also\nallowed in the ABox, e.g., global facts Planet('mars')")]),e._v(" "),a("li",[e._v("Improved support for MySQL, Postgres, DB2 and SQL Server dialects")]),e._v(" "),a("li",[e._v("Added a warnings when axioms are being ignored because of being out\nof OWL 2 QL")]),e._v(" "),a("li",[e._v("Improved error reporting on failed connections")]),e._v(" "),a("li",[e._v("Improved support for SQL AS for table and column renaming in\nmappings")]),e._v(" "),a("li",[e._v("New way to generate SQL. SQL now includes typing information and is\npretty printed.")]),e._v(" "),a("li",[e._v("Bug fix: Fixed issue with INVALID URI that appeared when mappings\nused data that contained invalid characters for URI's (e.g., white\nspace) Now we call URIEncode (Jena's) before returning the value.")]),e._v(" "),a("li",[e._v("Bug fix: Exception when importing data as ABox individuals.")]),e._v(" "),a("li",[e._v("Bug fix: Exception when null values is used as constants.")]),e._v(" "),a("li",[e._v("Bug fix: Exception if ambiguous column names are used in SQL\nqueries.")]),e._v(" "),a("li",[e._v("Bug fix: Wrong URI shorten if there are two or more namespaces with\noverlapping strings.")]),e._v(" "),a("li",[e._v("Bug fix: Null pointer exception due to inconsistent OBDA model\nidentifier string.")]),e._v(" "),a("li",[e._v("Bug fix: Unknown signature in the SELECT clause if the name is a\nqualified name and it comes from a view (Issue: #259)")]),e._v(" "),a("li",[e._v("Bug fix: Exception when using URIs as a constant values in SPARQL.")]),e._v(" "),a("li",[e._v("Bug fix: Prefix Manager accepts any string including invalid prefix\nnames.")])]),e._v(" "),a("p",[e._v("Known issues:")]),e._v(" "),a("ul",[a("li",[e._v("The ORDER BY modifier is not ready for columns with literal datatype")]),e._v(" "),a("li",[e._v("Issues with MySQL in non-ANSI mode")]),e._v(" "),a("li",[e._v("DateTime data properties in Oracle can crash the system.")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-1529-june-12-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1529-june-12-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1529 (June 12, 2012)")]),e._v(" "),a("p",[a("strong",[e._v("-ontopPro- plugin")])]),e._v(" "),a("ul",[a("li",[e._v("Better layout, fonts and command icons.")]),e._v(" "),a("li",[e._v("Better query saving mechanism (Issue: #248)")]),e._v(" "),a("li",[e._v("Better error reporting to users and crash handling (Issue:\n#255, 256)")]),e._v(" "),a("li",[e._v("Pretty printing of SQL queries (Issue: #254)")]),e._v(" "),a("li",[e._v("Re-enabled the export function in the Query Interface panel (Issue:\n#213, #250)")]),e._v(" "),a("li",[e._v("Improved syntax-error messages in the mapping editor tooltip")]),e._v(" "),a("li",[e._v("Cleaned console messages")]),e._v(" "),a("li",[e._v('Added "Number of sources" indicator to show how many sources are\nalready declared in the OBDA model.')]),e._v(" "),a("li",[e._v("Improved ESC and CONTROL+ENTER shortcuts in most dialogs in the GUI.")]),e._v(" "),a("li",[e._v("Replaced JDBC Driver text box with an editable Combo Box with\ndefault driver string.")]),e._v(" "),a("li",[e._v("Better OBDA statistics table (Issue: #251)")]),e._v(" "),a("li",[e._v("Bug fix: CRITICAL stability issue that would rise an end-less cycle\nof warning messages when Quest crashed.")]),e._v(" "),a("li",[e._v('Bug fix: issue with final dot "." in mappings.')])]),e._v(" "),a("p",[a("strong",[e._v("-ontopQuest-")])]),e._v(" "),a("ul",[a("li",[e._v("Added support for data-type UUIDs for SQL Server (Issue: #253)")]),e._v(" "),a("li",[e._v("Now we create forward-only and concur-read-only JDBC Statements by\ndefault to allow for server side cursors.")]),e._v(" "),a("li",[e._v("Bug fix: issue with SQL parser and table renamings in SQL queries\n(Issue: #259)")]),e._v(" "),a("li",[e._v("Bug fix: issue with NULL pointer when primary key optimization in\nunfolding when there is a join on primary condition but atoms are\nnot unifiable.")])]),e._v(" "),a("p",[e._v("Known issues:")]),e._v(" "),a("ul",[a("li",[e._v("Oracle is unstable")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-1479-may-22-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1479-may-22-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1479 (May 22, 2012)")]),e._v(" "),a("p",[e._v("Quest performance and features:")]),e._v(" "),a("ul",[a("li",[e._v("T-Mappings algorithm optimization: Combine disjunctive conditions in\nOR clauses instead of multiple mappings. This reduces the size of\nthe final query and improves its performance. (Issue: #237)")])]),e._v(" "),a("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),a("ul",[a("li",[e._v("Support using IS NULL and IS NOT NULL in SQL query (Issue: #200).")]),e._v(" "),a("li",[e._v("Support using UNION in SPARQL queries.")])]),e._v(" "),a("p",[e._v("Bug Fixes:")]),e._v(" "),a("ul",[a("li",[e._v("Fix packing problem in Windows XP (Issue: #228)")]),e._v(" "),a("li",[e._v("Fix packing problem in Linux")]),e._v(" "),a("li",[e._v("Fix unresponsive plugin when using mapping filter (Issue: #217).")]),e._v(" "),a("li",[e._v("Fix unresponsive plugin when inserting a new mapping (Issue: #232).")]),e._v(" "),a("li",[e._v("Fix support for MySQL in both virtual and classic mode (Issue:\n#238).")]),e._v(" "),a("li",[e._v("Fix support for Oracle in virtual mode (Issue: #226).")]),e._v(" "),a("li",[e._v('Fix issue where creating or modifying a mapping would not trigger a\n"ontology out of synch" flag.')])]),e._v(" "),a("p",[e._v("Known Issue:")]),e._v(" "),a("ul",[a("li",[e._v("Oracle still has some issues in classic mode.")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-1446-may-4-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1446-may-4-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1446 (May 4, 2012)")]),e._v(" "),a("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),a("ul",[a("li",[e._v("Add support on writing qualified name for atom predicates.")]),e._v(" "),a("li",[e._v("Add coloring for atoms typed Individual in the target query.")])]),e._v(" "),a("p",[e._v("Bug Fixes:")]),e._v(" "),a("ul",[a("li",[e._v('Fix the "Show Short URIs" feature in the query panel.')])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-1440-may-2-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1440-may-2-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1440 (May 2, 2012)")]),e._v(" "),a("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),a("ul",[a("li",[e._v("Support writing URI constants in target queries (Issue: #227)")])]),e._v(" "),a("p",[e._v("General:")]),e._v(" "),a("ul",[a("li",[e._v("Better system logging for recording exceptions.")])]),e._v(" "),a("p",[e._v("Bug Fixes:")]),e._v(" "),a("ul",[a("li",[e._v("Fix the null pointer exception due to the old OBDA preferences.")]),e._v(" "),a("li",[e._v("Fix bugs related to vocabulary prefixes.")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-1427-april-17-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1427-april-17-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1427 (April 17, 2012)")]),e._v(" "),a("p",[e._v("Quest performance and features:")]),e._v(" "),a("ul",[a("li",[e._v("Implemented the T-Mappings mapping optimization algorithm improved\nperformance of query rewriting in Virtual Mode. Now query rewriting\nis as fast in virtual ABox mode as in classic ABox mode (Issue:\n#169)")]),e._v(" "),a("li",[e._v("Implemented a new query containment algorithm that is many times\nfaster than before.")]),e._v(" "),a("li",[e._v("Added data source analysis to obtain DB metadata for SQL query\ngeneration.")]),e._v(" "),a("li",[e._v("Added analysis of SQL queries in the mappings to produce better SQL\nqueries.")]),e._v(" "),a("li",[e._v("Added "),a("strong",[e._v("SQL JOIN ELIMINATION")]),e._v(" using PRIMARY KEY metadata.")]),e._v(" "),a("li",[e._v("Added mappings optimization using query containment w.r.t.\nconstraints")]),e._v(" "),a("li",[e._v("Added initial support for "),a("strong",[e._v("FILTER")])]),e._v(" "),a("li",[e._v("Added support for typed constants in SPARQL queries (Issue: #157)")]),e._v(" "),a("li",[e._v("Small updates to internal API for speed of equality, hash and clone\ncomputation")])]),e._v(" "),a("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),a("ul",[a("li",[e._v("New Turtle-like syntax for mappings allows for more succinct and\neasy to read mappings.")]),e._v(" "),a("li",[e._v("Added support for LANGUAGE tag for the Literal datatype (Issue:\n#198)")]),e._v(" "),a("li",[e._v("Added support for datatypes in the OBDA mapping axioms (Issue:\n#147, #194, #196)")]),e._v(" "),a("li",[e._v("Added URI templates for URI creation in mapping mapping axioms\n(Issue: #151)")]),e._v(" "),a("li",[e._v("New feature for typing literals in mapping axioms (Issue: #194,\n#207)")])]),e._v(" "),a("p",[e._v("General:")]),e._v(" "),a("ul",[a("li",[e._v("Added support for OWL API 3 (Issue: #98)")]),e._v(" "),a("li",[e._v("Internal refactoring of all modules and packages for a cleaner API")])]),e._v(" "),a("p",[e._v("ontopPro:")]),e._v(" "),a("ul",[a("li",[e._v("The plugin is now compatible with Protege 4.1 (Issue: #99)")]),e._v(" "),a("li",[e._v("The plugin has a new and fresh GUI display.")]),e._v(" "),a("li",[e._v("Stronger integration with Protege's refactoring mechanism")]),e._v(" "),a("li",[e._v("The ABox materializer can import data complete with datatype\ninformation (Issue: #195)")]),e._v(" "),a("li",[e._v("The target query use Turtle syntax for better display and management\n(Issue: #204)")]),e._v(" "),a("li",[e._v("The plugin has Class/Property panel for better navigation and\nfiltering.")])]),e._v(" "),a("p",[e._v("Bug Fixes:")]),e._v(" "),a("ul",[a("li",[e._v("Fixed a problem with the encoding of axioms of the form\nsubClassOf(Person, hasFather some Person)")]),e._v(" "),a("li",[e._v("Fixed issues with open and dead JDBC connections")]),e._v(" "),a("li",[e._v("Cleaned OWLReasoner synchronization issue")]),e._v(" "),a("li",[e._v("Fixed null pointer exceptions related to incorrect mappings")]),e._v(" "),a("li",[e._v("Proper error handling for translating an empty datalog program\n(Issue: #197)")]),e._v(" "),a("li",[e._v('Fixed the "Attach Prefixes" feature in the OBDA Query panel\n(Issue: #211)')]),e._v(" "),a("li",[e._v("Fixed issue regarding xsd:dateTime (Issue: #199)")])]),e._v(" "),a("h2",{attrs:{id:"_1-6-1-october-19-2011"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-6-1-october-19-2011"}},[e._v("#")]),e._v(" 1.6.1 (October 19, 2011)")]),e._v(" "),a("ul",[a("li",[e._v("Fast patch in the query translation module.")])]),e._v(" "),a("h2",{attrs:{id:"_1-6-october-18-2011"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-6-october-18-2011"}},[e._v("#")]),e._v(" 1.6 (October 18, 2011)")]),e._v(" "),a("ul",[a("li",[e._v("Allow fast navigation using TAB key in the new mapping form (Issue:\n#92)")]),e._v(" "),a("li",[e._v("Allow SQL query execution in the mapping tree (Issue: #104)")]),e._v(" "),a("li",[e._v("Improvement in the error message deliveries (Issues: #107, #112,\n#118)")]),e._v(" "),a("li",[e._v('Improvement in the data source management tab, including adding\n"Test Connection" button (Issues: #108, #111, #114)')]),e._v(" "),a("li",[e._v("Add OBDA model statistics report (Issues: #106, #117)")]),e._v(" "),a("li",[e._v("Add support for adding integrated data source in Teiid (Issue: #89)")]),e._v(" "),a("li",[e._v("Fix the unresponsive cancel button during importing OWL Individuals\n(Issue: #88)")]),e._v(" "),a("li",[e._v("Fix CSV header in the exported query result (Issue: #120)")]),e._v(" "),a("li",[e._v("Fix connection failure when users change the parameters (Issue:\n#121)")]),e._v(" "),a("li",[e._v("Fix the password field so now the text is hidden (Issue: #113)")]),e._v(" "),a("li",[e._v("Fix query selection in the OBDA query tab (Issue: #91)")]),e._v(" "),a("li",[e._v("Fix import failure when storing very long record values (Issue:\n#95)")]),e._v(" "),a("li",[e._v("Fix import failure when storing records that contain single quotes\n(Issue: #96)")])]),e._v(" "),a("h2",{attrs:{id:"_1-5-1-rc1-july-15-2011"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-5-1-rc1-july-15-2011"}},[e._v("#")]),e._v(" 1.5.1-RC1 (July 15, 2011)")]),e._v(" "),a("ul",[a("li",[e._v("Significant code refactoring in the plugin. This effort makes the\ncode easier to debug and to extend, and is almost ready for Protege\n4.1 and OWL-API 3.0 support.")]),e._v(" "),a("li",[e._v("Term renaming. Modified the term 'Mapping Head' to 'Target\nQuery' and 'Mapping Body' to 'Source Query' to maintain the\nconsistency with the literature.")]),e._v(" "),a("li",[e._v("Temporarly disabled the SPARQL query coloring.")]),e._v(" "),a("li",[e._v("Temporarly disabled the 'Load OWL Individuals into DB'\nfunctionality.")]),e._v(" "),a("li",[e._v("Add improved search filters in the mapping manager (Issues: #37,\n#54).")]),e._v(" "),a("li",[e._v("Add 'show short URIs' option in the query results to hide long URI\nstrings.")]),e._v(" "),a("li",[e._v("Add 'select all', 'select none', 'expand all' and 'collapse\nall' buttons for easy browsing in the mapping tree (Issues: #35,\n#36).")]),e._v(" "),a("li",[e._v("Add mapping validation with respect to the vocabulary in the\nontology (Issues: #42).")]),e._v(" "),a("li",[e._v("Add input validation to many parts of the GUI (Issues: #63, #64,\n#65, #67, #68, #69, #70, #71, #76).")]),e._v(" "),a("li",[e._v("Fix the save query functionality in the Query manager (Issues:\n#57).")]),e._v(" "),a("li",[e._v("Fix the persistency of user preferences when opening/closing Protege\n(Issues: #58).")]),e._v(" "),a("li",[e._v("Fix the exceptions that appeared when loading/saving/reloading\nontologies (Issues: #59, #60, #61, #75).")]),e._v(" "),a("li",[e._v("Fix problems with several progress dialogs in the GUI (Issues: #50,\n#87).")]),e._v(" "),a("li",[e._v("Fix problems in the 'tuple count' functionality (Issues: #82,\n#84).")])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/61.e93e67cb.js b/assets/js/61.e93e67cb.js deleted file mode 100644 index 43e42f917..000000000 --- a/assets/js/61.e93e67cb.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{438:function(e,t,a){"use strict";a.r(t);var n=a(51),i=Object(n.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"release-notes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#release-notes"}},[e._v("#")]),e._v(" Release notes")]),e._v(" "),a("h2",{attrs:{id:"_5-1-1-november-22-2023"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-1-november-22-2023"}},[e._v("#")]),e._v(" 5.1.1 (November 22, 2023)")]),e._v(" "),a("h4",{attrs:{id:"new-features"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Option to expose system tables added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/744",target:"_blank",rel:"noopener"}},[e._v("#744"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Standard deviation and variance functions added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/735",target:"_blank",rel:"noopener"}},[e._v("#735"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Option to disable the registration of custom SPARQL aggregation functions "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/746",target:"_blank",rel:"noopener"}},[e._v("#746"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"bug-fixes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),a("p",[e._v("See "),a("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/23?closed=1",target:"_blank",rel:"noopener"}},[e._v("https://github.com/ontop/ontop/milestone/23?closed=1"),a("OutboundLink")],1)]),e._v(" "),a("h2",{attrs:{id:"_5-1-0-august-15-2023"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-0-august-15-2023"}},[e._v("#")]),e._v(" 5.1.0 (August 15, 2023)")]),e._v(" "),a("h4",{attrs:{id:"new-features-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-2"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support for "),a("RouterLink",{attrs:{to:"/guide/advanced/lenses.html#flattenlens"}},[e._v("flatten lenses")]),e._v(" added "),a("em",[e._v("(beta)")]),e._v(" "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/622",target:"_blank",rel:"noopener"}},[e._v("#622"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/625",target:"_blank",rel:"noopener"}},[e._v("#625"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/628",target:"_blank",rel:"noopener"}},[e._v("#628"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/629",target:"_blank",rel:"noopener"}},[e._v("#629"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/633",target:"_blank",rel:"noopener"}},[e._v("#633"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/635",target:"_blank",rel:"noopener"}},[e._v("#635"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/636",target:"_blank",rel:"noopener"}},[e._v("#636"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/637",target:"_blank",rel:"noopener"}},[e._v("#637"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/638",target:"_blank",rel:"noopener"}},[e._v("#638"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/639",target:"_blank",rel:"noopener"}},[e._v("#639"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/640",target:"_blank",rel:"noopener"}},[e._v("#640"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/641",target:"_blank",rel:"noopener"}},[e._v("#641"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/642",target:"_blank",rel:"noopener"}},[e._v("#642"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/643",target:"_blank",rel:"noopener"}},[e._v("#643"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/661",target:"_blank",rel:"noopener"}},[e._v("#661"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/715",target:"_blank",rel:"noopener"}},[e._v("#715"),a("OutboundLink")],1)],1),e._v(" "),a("li",[e._v("Support for "),a("RouterLink",{attrs:{to:"/guide/advanced/lenses.html#unionlens"}},[e._v("union lenses")]),e._v(" added "),a("em",[e._v("(beta)")]),e._v(" "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/612",target:"_blank",rel:"noopener"}},[e._v("#612"),a("OutboundLink")],1)],1),e._v(" "),a("li",[e._v("Support for XSD cast functions added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/630",target:"_blank",rel:"noopener"}},[e._v("#630"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for date-trunc and more date extraction functions added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/705",target:"_blank",rel:"noopener"}},[e._v("#705"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for a separate RDF file for facts added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/666",target:"_blank",rel:"noopener"}},[e._v("#666"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Options to ignore invalid mapping entries "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/631",target:"_blank",rel:"noopener"}},[e._v("#631"),a("OutboundLink")],1),e._v(" and lenses "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/709",target:"_blank",rel:"noopener"}},[e._v("#709"),a("OutboundLink")],1),e._v(" added")]),e._v(" "),a("li",[e._v("Partial support for regular expressions in SQL Server added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/702",target:"_blank",rel:"noopener"}},[e._v("#702"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for DynamoDB using the CData connector added "),a("em",[e._v("(beta)")]),e._v(" "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/693",target:"_blank",rel:"noopener"}},[e._v("#693"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"optimizations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#optimizations"}},[e._v("#")]),e._v(" Optimizations")]),e._v(" "),a("ul",[a("li",[e._v("Upwards propagation of lens unique constraints added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/668",target:"_blank",rel:"noopener"}},[e._v("#668"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Left join optimizations:\n"),a("ul",[a("li",[e._v("Reducing left joins to inner joins when the right child has a left join "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/662",target:"_blank",rel:"noopener"}},[e._v("#662"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Merging left joins nested on the left "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/663",target:"_blank",rel:"noopener"}},[e._v("#663"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/686",target:"_blank",rel:"noopener"}},[e._v("#686"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Robustness to nullable joining columns "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/667",target:"_blank",rel:"noopener"}},[e._v("#667"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Pruning the right of a left join when not contributing")])])]),e._v(" "),a("li",[e._v("VALUES node decomposition added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/680",target:"_blank",rel:"noopener"}},[e._v("#680"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Functional dependency inference added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/681",target:"_blank",rel:"noopener"}},[e._v("#681"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Reduction of aggregation nodes with no aggregation functional terms to distinct added")]),e._v(" "),a("li",[e._v("Transitive closure of functional dependencies added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/732",target:"_blank",rel:"noopener"}},[e._v("#732"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"refactoring"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Substitutions refactored "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/616",target:"_blank",rel:"noopener"}},[e._v("#616"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Typing for math operators added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/706",target:"_blank",rel:"noopener"}},[e._v("#706"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("QuotedIDFactory refactored "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/644",target:"_blank",rel:"noopener"}},[e._v("#644"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Removal of non-required variables improved "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/669",target:"_blank",rel:"noopener"}},[e._v("#669"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for the STRING datatype for DuckDB added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/646",target:"_blank",rel:"noopener"}},[e._v("#646"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for SAMPLE at the database level added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/660",target:"_blank",rel:"noopener"}},[e._v("#660"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"bug-fixes-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-2"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),a("ul",[a("li",[e._v("Support LIMIT/OFFSET in SQL Server improved "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/676",target:"_blank",rel:"noopener"}},[e._v("#676"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/679",target:"_blank",rel:"noopener"}},[e._v("#679"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/682",target:"_blank",rel:"noopener"}},[e._v("#682"),a("OutboundLink")],1),e._v(", "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/721",target:"_blank",rel:"noopener"}},[e._v("#721"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Extraction of unique constraints in Oracle made more consistent "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/695",target:"_blank",rel:"noopener"}},[e._v("#695"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Metadata extraction for DuckDB made more robust "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/687",target:"_blank",rel:"noopener"}},[e._v("#687"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Missing casts when using Bnode templates added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/657",target:"_blank",rel:"noopener"}},[e._v("#657"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Invalid SPARQL UNION translation fixed "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/651",target:"_blank",rel:"noopener"}},[e._v("#651"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Empty results for CONSTRUCT queries with unions and different variables fixed "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/652",target:"_blank",rel:"noopener"}},[e._v("#652"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"documentation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#documentation"}},[e._v("#")]),e._v(" Documentation")]),e._v(" "),a("ul",[a("li",[e._v("Dedicated pages for each supported database (for instance "),a("a",{attrs:{href:"https://ontop-vkg.org/guide/databases/athena",target:"_blank",rel:"noopener"}},[e._v("AWS Athena"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("li",[a("RouterLink",{attrs:{to:"/tutorial/lenses/"}},[e._v("Tutorial about lenses")])],1),e._v(" "),a("li",[a("a",{attrs:{href:"/tutorial/materialization/materialization"}},[e._v("Tutorial about materialization")])])]),e._v(" "),a("h2",{attrs:{id:"_5-0-2-march-9-2023"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-0-2-march-9-2023"}},[e._v("#")]),e._v(" 5.0.2 (March 9, 2023)")]),e._v(" "),a("h4",{attrs:{id:"new-features-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-3"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support for Trino "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/599",target:"_blank",rel:"noopener"}},[e._v("#599"),a("OutboundLink")],1),e._v(", PrestoDB "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/601",target:"_blank",rel:"noopener"}},[e._v("#601"),a("OutboundLink")],1),e._v(", AWS Athena "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/602",target:"_blank",rel:"noopener"}},[e._v("#602"),a("OutboundLink")],1),e._v(", DuckDB "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/604",target:"_blank",rel:"noopener"}},[e._v("#604"),a("OutboundLink")],1),e._v(", AWS Redshift "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/605",target:"_blank",rel:"noopener"}},[e._v("#605"),a("OutboundLink")],1),e._v(" and Google BigQuery "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/615",target:"_blank",rel:"noopener"}},[e._v("#615"),a("OutboundLink")],1),e._v(" added")]),e._v(" "),a("li",[e._v("Declare some columns as IRI-safe in lenses "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/587",target:"_blank",rel:"noopener"}},[e._v("#587"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for arbitrary JDBC properties added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/606",target:"_blank",rel:"noopener"}},[e._v("#606"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"bugfixes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),a("ul",[a("li",[e._v("Missing TLS cypher suite JRE modules added to the Docker image")]),e._v(" "),a("li",[e._v("More system schemas are now ignored in Oracle "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/591",target:"_blank",rel:"noopener"}},[e._v("#591"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"tooling"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tooling"}},[e._v("#")]),e._v(" Tooling")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://github.com/ontop/dialect-factory-scaffolding",target:"_blank",rel:"noopener"}},[e._v("Scaffolding tool"),a("OutboundLink")],1),e._v(" created to make it easier to implement a new SQL dialect adapter.")])]),e._v(" "),a("h2",{attrs:{id:"_5-0-1-january-29-2023"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-0-1-january-29-2023"}},[e._v("#")]),e._v(" 5.0.1 (January 29, 2023)")]),e._v(" "),a("h4",{attrs:{id:"new-feature"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-feature"}},[e._v("#")]),e._v(" New feature")]),e._v(" "),a("ul",[a("li",[e._v("DB metadata extraction for MS Access added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/589",target:"_blank",rel:"noopener"}},[e._v("#589"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("JRE-embedded Ontop-Protégé bundles with Protégé-5.6.0-beta-2 are now provided")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-2"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Support for Spark SQL improved and tests added in the CI")]),e._v(" "),a("li",[e._v("All the tables (besides excluded ones) in Oracle are now extracted, not just the user's ones")])]),e._v(" "),a("p",[e._v("Several dependencies updated.")]),e._v(" "),a("h2",{attrs:{id:"_5-0-0-december-31-2022"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-0-0-december-31-2022"}},[e._v("#")]),e._v(" 5.0.0 (December 31, 2022)")]),e._v(" "),a("h4",{attrs:{id:"important-changes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#important-changes"}},[e._v("#")]),e._v(" Important changes")]),e._v(" "),a("ul",[a("li",[e._v("Java 11 or newer is required")]),e._v(" "),a("li",[e._v("Ontop's Protégé plugin now requires at least Protégé 5.6-beta")]),e._v(" "),a("li",[e._v("RDF4J bindings updated to 4.1.0")]),e._v(" "),a("li",[e._v("The module "),a("code",[e._v("ontop-owlapi")]),e._v(" is not published anymore. We recommend using "),a("code",[e._v("ontop-rdf4j")]),e._v(" instead")]),e._v(" "),a("li",[e._v("RDF4J workbench modules removed")]),e._v(" "),a("li",[e._v("Docker image moved to "),a("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[a("code",[e._v("ontop/ontop")]),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Ontop views renamed "),a("a",{attrs:{href:"/guide/advanced/lenses"}},[e._v("lenses")])])]),e._v(" "),a("h4",{attrs:{id:"new-features-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-4"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support for SPARQL rules for the extending the VKG added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/576",target:"_blank",rel:"noopener"}},[e._v("#576"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("The "),a("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[e._v("Docker image"),a("OutboundLink")],1),e._v(" now also supported the ARM64 architecture and allows to run all the CLI commands "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/532",target:"_blank",rel:"noopener"}},[e._v("#532"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for Snowflake added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/520",target:"_blank",rel:"noopener"}},[e._v("#520"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for MariaDB added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/271",target:"_blank",rel:"noopener"}},[e._v("#271"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("N-Triples and N-quads are now supported by the SPARQL endpoint "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/566",target:"_blank",rel:"noopener"}},[e._v("#566"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Option to fully reformulate the SPARQL query into SQL added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/577",target:"_blank",rel:"noopener"}},[e._v("#577"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Experimental support for flatten lenses added (only for PostgreSQL)")])]),e._v(" "),a("h4",{attrs:{id:"new-optimizations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-optimizations"}},[e._v("#")]),e._v(" New optimizations")]),e._v(" "),a("ul",[a("li",[e._v("Optimization of joins with a union of class definitions added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/543",target:"_blank",rel:"noopener"}},[e._v("#543"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Optimizations for generic queries with limit added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/578",target:"_blank",rel:"noopener"}},[e._v("#578"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Optimization for queries retrieving all the properties or classes in use in the VKG added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/581",target:"_blank",rel:"noopener"}},[e._v("#581"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"refactoring-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-3"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("New module for testing dialects in the Github CI pipeline added "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/568",target:"_blank",rel:"noopener"}},[e._v("#568"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("JSQLParser updated to 4.4")]),e._v(" "),a("li",[e._v("Ontop's Protégé plugin isolated from Ontop modules "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/278",target:"_blank",rel:"noopener"}},[e._v("#278"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for Databricks (Apache Spark) improved")])]),e._v(" "),a("p",[e._v("Many bugfixes. See also "),a("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/16?closed=1",target:"_blank",rel:"noopener"}},[e._v("its milestone on Github"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h2",{attrs:{id:"_4-2-2-november-18-2022"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-2-november-18-2022"}},[e._v("#")]),e._v(" 4.2.2 (November 18, 2022)")]),e._v(" "),a("h4",{attrs:{id:"new-features-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-5"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support for Protege 5.6-beta under Java 11 and Java 17")]),e._v(" "),a("li",[e._v("Support for the Databricks-specific JDBC driver "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/554",target:"_blank",rel:"noopener"}},[e._v("#554"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for LIMIT/OFFSET in SQL Server 2008 "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/531",target:"_blank",rel:"noopener"}},[e._v("#531"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Support for materialized views in PostgreSQL "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/541",target:"_blank",rel:"noopener"}},[e._v("#541"),a("OutboundLink")],1)])]),e._v(" "),a("h4",{attrs:{id:"bugfixes-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-2"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),a("ul",[a("li",[e._v("VALUES handling with Teiid "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/525",target:"_blank",rel:"noopener"}},[e._v("#525"),a("OutboundLink")],1)]),e._v(" "),a("li",[e._v("Metadata extraction for Dremio of schema names with dots")]),e._v(" "),a("li",[e._v("Typo in registration of Oracle factories "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/557",target:"_blank",rel:"noopener"}},[e._v("#557"),a("OutboundLink")],1)])]),e._v(" "),a("p",[e._v("Preventive update of dependencies including Jackson and Gson to address potential vulnerabilities.")]),e._v(" "),a("h2",{attrs:{id:"_4-2-1-april-20-2022"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-1-april-20-2022"}},[e._v("#")]),e._v(" 4.2.1 (April 20, 2022)")]),e._v(" "),a("h4",{attrs:{id:"new-feature-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-feature-2"}},[e._v("#")]),e._v(" New feature")]),e._v(" "),a("ul",[a("li",[e._v("Support for partial serialized DB metadata, when "),a("code",[e._v("ontop.allowRetrievingBlackBoxViewMetadataFromDB")]),e._v(" is enabled.")])]),e._v(" "),a("h4",{attrs:{id:"bugfixes-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-3"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),a("ul",[a("li",[e._v("Not renamed variable in sub-query with a distinct ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/417",target:"_blank",rel:"noopener"}},[e._v("#417"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("OBDA to R2RML conversion: require mapping entry IDs to be unique.")]),e._v(" "),a("li",[e._v("Lang tags for constants in R2RML were ignored.")]),e._v(" "),a("li",[e._v("Several fixes related to VALUES.")]),e._v(" "),a("li",[e._v("Better HTTP codes for the ontology download endpoint.")])]),e._v(" "),a("p",[e._v("The Jackson and Spring Boot dependencies have been preventively updated (to 2.13.2.2 and 2.6.6 respectively) to address potential vulnerabilities ("),a("a",{attrs:{href:"https://nvd.nist.gov/vuln/detail/CVE-2020-36518",target:"_blank",rel:"noopener"}},[e._v("CVE-2020-36518"),a("OutboundLink")],1),e._v(" and "),a("a",{attrs:{href:"https://nvd.nist.gov/vuln/detail/cve-2022-22965",target:"_blank",rel:"noopener"}},[e._v("CVE-2022-22965"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("h2",{attrs:{id:"_4-2-0-december-30-2021"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-0-december-30-2021"}},[e._v("#")]),e._v(" 4.2.0 (December 30, 2021)")]),e._v(" "),a("h4",{attrs:{id:"new-features-6"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-6"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support for Apache Spark ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/422",target:"_blank",rel:"noopener"}},[e._v("#422"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("Support for time functions added ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/478",target:"_blank",rel:"noopener"}},[e._v("#478"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("Support for the "),a("code",[e._v("IN")]),e._v(" SPARQL function added.")]),e._v(" "),a("li",[e._v('Datatypes can be extracted from non-supported source queries in the mapping (treated internally as "black-box" views). Disabled by default (see '),a("a",{attrs:{href:"/guide/advanced/configuration"}},[a("code",[e._v("ontop.allowRetrievingBlackBoxViewMetadataFromDB")])]),e._v(").")]),e._v(" "),a("li",[e._v("TBox triples (e.g. sub-classes, domains and ranges) can be added to the default RDF graph. Disabled by default (see "),a("a",{attrs:{href:"/guide/advanced/configuration"}},[a("code",[e._v("ontop.enableFactExtractionWithTBox")])]),e._v(").")]),e._v(" "),a("li",[e._v("Support for "),a("a",{attrs:{href:"/guide/advanced/views"}},[e._v("Ontop join views")]),e._v(" added.")]),e._v(" "),a("li",[e._v("Support for arbitrary levels of Ontop views added (views over views).")]),e._v(" "),a("li",[e._v("Better integrity constraint extraction for Ontop basic and join views.")]),e._v(" "),a("li",[e._v("Non-null information can now be specified for Ontop views.")]),e._v(" "),a("li",[e._v("Support for b-node facts added.")]),e._v(" "),a("li",[e._v("The default query of the SPARQL endpoint portal is now configurable ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/454",target:"_blank",rel:"noopener"}},[e._v("#454"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("Contextually injective IRI templates with numeric or UUID arguments are now decomposed ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/363",target:"_blank",rel:"noopener"}},[e._v("#363"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("JSON-LD serialization now supported by the materializer ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/481",target:"_blank",rel:"noopener"}},[e._v("#481"),a("OutboundLink")],1),e._v(").")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-4"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Support for Java >= 8. Ontop decoupled from Protégé so as to update several common libraries ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/467",target:"_blank",rel:"noopener"}},[e._v("#467"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v('RDF facts provided by the ontology file are now internally grouped together into values blocks (sorts of "in-memory tables") instead of being splitted into large unions. Enabled by default (see '),a("a",{attrs:{href:"/guide/advanced/configuration"}},[a("code",[e._v("ontop.enableValuesNode")])]),e._v(").")]),e._v(" "),a("li",[e._v("Unions are lifted above aggregations when possible.")]),e._v(" "),a("li",[e._v("Docker image updated to JRE 11.")]),e._v(" "),a("li",[e._v("Mutable intermediate queries are not used anymore.")]),e._v(" "),a("li",[e._v("Stronger handling of non well-designed "),a("code",[e._v("OPTIONAL")]),e._v(" blocks.")]),e._v(" "),a("li",[e._v("Stronger handling of "),a("code",[e._v("ORDER BY")]),e._v(" in sub-queries.")]),e._v(" "),a("li",[e._v("Type extractor relaxed ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/438",target:"_blank",rel:"noopener"}},[e._v("#438"),a("OutboundLink")],1),e._v(") to tolerate slightly different datatypes.")]),e._v(" "),a("li",[e._v("JDBC distinct result set removed.")]),e._v(" "),a("li",[e._v("JDBC user name and password are not required anymore. Useful when passed in the JDBC URL.")]),e._v(" "),a("li",[e._v("The Command-Line Interface of the bootstrapper has been refactored (invalid options removed, comments improved).")])]),e._v(" "),a("p",[e._v("Many bugfixes (see for instance "),a("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/14?closed=1",target:"_blank",rel:"noopener"}},[e._v("our Github bugtracker"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("h2",{attrs:{id:"_4-1-1-july-23-2021"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-1-july-23-2021"}},[e._v("#")]),e._v(" 4.1.1 (July 23, 2021)")]),e._v(" "),a("h4",{attrs:{id:"bugfixes-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-4"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),a("ul",[a("li",[e._v("Bugs related to GeoSPARQL support ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/428",target:"_blank",rel:"noopener"}},[e._v("#428"),a("OutboundLink")],1),e._v(","),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/434",target:"_blank",rel:"noopener"}},[e._v("#434"),a("OutboundLink")],1),e._v(" )")]),e._v(" "),a("li",[e._v("Issue with ORDER BY and LIMIT for MS SQL ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/225",target:"_blank",rel:"noopener"}},[e._v("#225"),a("OutboundLink")],1),e._v(","),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/412",target:"_blank",rel:"noopener"}},[e._v("#412"),a("OutboundLink")],1),e._v(")")])]),e._v(" "),a("h4",{attrs:{id:"new-features-7"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-7"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Teiid support ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/336",target:"_blank",rel:"noopener"}},[e._v("#336"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("li",[e._v("Various improvements of the Protégé plugin")])]),e._v(" "),a("h2",{attrs:{id:"_4-1-0-february-28-2021"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-0-february-28-2021"}},[e._v("#")]),e._v(" 4.1.0 (February 28, 2021)")]),e._v(" "),a("h4",{attrs:{id:"changed-behavior"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behavior"}},[e._v("#")]),e._v(" Changed behavior")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"/guide%C3%A9cli#ontop-mapping-to-r2rml"}},[e._v("OBDA to R2RML mapping conversion")]),e._v(" now requires by default access to DB metadata (through credentials or as a serialized file). This requirement can be bypassed with the argument "),a("code",[e._v("--force")]),e._v(".")]),e._v(" "),a("li",[e._v("By default, DESCRIBE queries only return the triples where the described IRI appears as subject. To also consider the triples where it appears as object, set the parameter "),a("code",[e._v("ontop.includeFixedObjectPositionInDescribe")]),e._v(" to true.")]),e._v(" "),a("li",[e._v("The Docker endpoint image is now based on Debian ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/394",target:"_blank",rel:"noopener"}},[e._v("#394"),a("OutboundLink")],1),e._v("), not on Alpine anymore.")])]),e._v(" "),a("h4",{attrs:{id:"new-features-8"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-8"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support for GeoSPARQL functions added ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/335",target:"_blank",rel:"noopener"}},[e._v("#335"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[a("a",{attrs:{href:"/guide/advanced/logging"}},[e._v("Rich JSON-based query logging")]),e._v(" added.")]),e._v(" "),a("li",[a("a",{attrs:{href:"/guide/advanced/predefined"}},[e._v("New endpoint for predefined queries")]),e._v(" added (beta). It enables the specification of custom low-latency Web APIs in a declarative manner.")]),e._v(" "),a("li",[e._v("Support for the "),a("code",[e._v("IF")]),e._v(", "),a("code",[e._v("IRI")]),e._v(", "),a("code",[e._v("BNODE")]),e._v(" SPARQL functions added.")]),e._v(" "),a("li",[e._v("Support for Dremio added.")]),e._v(" "),a("li",[e._v("DB metadata can now be loaded from files instead of connecting to the database.")]),e._v(" "),a("li",[e._v("Bnode labels are now anonymized on-the-fly. Bnode templates can safely use PII.")]),e._v(" "),a("li",[e._v("Sensitive JDBC information (user name, password, URL) can now be passed as arguments or environment variables (for Docker) instead of being written in the properties file. Docker secrets are also supported for further security.")]),e._v(" "),a("li",[e._v("New left join optimization techniques added. General functional dependencies are now taken into account. Sensitivity to left join ordering reduced.")]),e._v(" "),a("li",[a("a",{attrs:{href:"/guide/advanced/caching"}},[e._v("HTTP caching")]),e._v(" headers can now be returned by the Ontop SPARQL endpoint.")]),e._v(" "),a("li",[e._v("Native Protégé bundles for each platform (Windows, MacOS, Linux) with JRE 8 embedded.")]),e._v(" "),a("li",[e._v("Basic support for Ontop views added (experimental), which, in particular, allows specifying integrity constraints on views defined at the Ontop level.")])]),e._v(" "),a("h4",{attrs:{id:"removal"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#removal"}},[e._v("#")]),e._v(" Removal")]),e._v(" "),a("ul",[a("li",[e._v("As announced earlier, the RDF4J Workbench-based bundles are not shipped anymore. However, the webapps war file can still be built with Maven.")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-5"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Drastic reduction of memory consumption when processing SPARQL queries ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/370",target:"_blank",rel:"noopener"}},[e._v("#370"),a("OutboundLink")],1),e._v("), which is significant for materializing large RDF graphs.")]),e._v(" "),a("li",[e._v("Better file resource handling ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/368",target:"_blank",rel:"noopener"}},[e._v("#368"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("Distinct lifting improved.")]),e._v(" "),a("li",[e._v("Self-join elimination based on functional dependencies re-implemented.")]),e._v(" "),a("li",[e._v("Decomposition of heterogeneous IRI templates enabled.")]),e._v(" "),a("li",[e._v("Lexical value space is now considered when decomposing IRIs.")]),e._v(" "),a("li",[e._v("Protégé plugin codebase cleaned, with parts of UI streamlined and redesigned. Improved syntax highlighting in target and source queries. Mapping validation extended. Multiple open ontologies supported ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/282",target:"_blank",rel:"noopener"}},[e._v("#282"),a("OutboundLink")],1),e._v(" and "),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/175",target:"_blank",rel:"noopener"}},[e._v("#175"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("RDF4J external binding management refactored.")]),e._v(" "),a("li",[e._v("Bnode handling refactored.")]),e._v(" "),a("li",[e._v("Java 11 support.")]),e._v(" "),a("li",[e._v("Better handling of column names when converting OBDA mappings into R2RML, which now uses DB metadata.")]),e._v(" "),a("li",[e._v("CONSTRUCT and DESCRIBE query handling refactored.")]),e._v(" "),a("li",[e._v("Parser for OBDA mappings refactored.")]),e._v(" "),a("li",[e._v("Character encoding in R2RML templates refactored.")]),e._v(" "),a("li",[e._v("Default file encoding set to UTF-8. Particularly useful on Windows. Can be overridden if needed.")]),e._v(" "),a("li",[a("a",{attrs:{href:"/dev/build"}},[e._v("Build script")]),e._v(" refactored. Now fully based on Maven ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/pull/393",target:"_blank",rel:"noopener"}},[e._v("#393"),a("OutboundLink")],1),e._v(").")]),e._v(" "),a("li",[e._v("Base Docker image updated.")]),e._v(" "),a("li",[e._v("PostgreSQL transaction handling (in streaming mode) improved.")]),e._v(" "),a("li",[e._v("Timeout support extended to non-SELECT queries.")])]),e._v(" "),a("p",[e._v("Many bugfixes.")]),e._v(" "),a("h2",{attrs:{id:"_4-0-3-october-16-2020"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-3-october-16-2020"}},[e._v("#")]),e._v(" 4.0.3 (October 16, 2020)")]),e._v(" "),a("h4",{attrs:{id:"bugfixes-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bugfixes-5"}},[e._v("#")]),e._v(" Bugfixes")]),e._v(" "),a("ul",[a("li",[e._v("Wrong IRI decomposition ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/358",target:"_blank",rel:"noopener"}},[e._v("#358"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("li",[e._v("Logback config file ignored by Ontop CLI ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/361",target:"_blank",rel:"noopener"}},[e._v("#361"),a("OutboundLink")],1),e._v(")")])]),e._v(" "),a("h2",{attrs:{id:"_4-0-2-september-3-2020"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-2-september-3-2020"}},[e._v("#")]),e._v(" 4.0.2 (September 3, 2020)")]),e._v(" "),a("ul",[a("li",[e._v("Fixed Named Graphs (quad) grammar in the target of the Ontop native mapping language.")])]),e._v(" "),a("h2",{attrs:{id:"_4-0-1-august-28-2020"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-1-august-28-2020"}},[e._v("#")]),e._v(" 4.0.1 (August 28, 2020)")]),e._v(" "),a("h4",{attrs:{id:"new-features-and-bugfixes"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-and-bugfixes"}},[e._v("#")]),e._v(" New features and bugfixes")]),e._v(" "),a("ul",[a("li",[e._v("Named Graphs (quad) are supported in materialization ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/343",target:"_blank",rel:"noopener"}},[e._v("#343"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("li",[e._v("Removal of Jena as a dependency ("),a("a",{attrs:{href:"https://github.com/ontop/ontop/issues/349",target:"_blank",rel:"noopener"}},[e._v("#349"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("li",[a("code",[e._v("com.mysql.cj.jdbc.Driver")]),e._v(" is now also recognized. Non-recognized drivers now use the default SQL factories instead of the mock-up one.")])]),e._v(" "),a("h2",{attrs:{id:"_4-0-0-july-31-2020"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-0-july-31-2020"}},[e._v("#")]),e._v(" 4.0.0 (July 31, 2020)")]),e._v(" "),a("h4",{attrs:{id:"refactoring-6"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-6"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Dependencies updated (e.g. RDF4J 3.3.0)")]),e._v(" "),a("li",[e._v("SERIAL datatypes of PostgreSQL better handled")]),e._v(" "),a("li",[e._v("Anonymous blank nodes are now supported in CONSTRUCT blocks")]),e._v(" "),a("li",[e._v("JSON-LD now supported for graph queries")]),e._v(" "),a("li",[e._v("Denodo support improved.")])]),e._v(" "),a("p",[e._v("Few bugfixes.")]),e._v(" "),a("h2",{attrs:{id:"_4-0-0-rc-1-july-8-2020"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-0-rc-1-july-8-2020"}},[e._v("#")]),e._v(" 4.0.0-rc-1 (July 8, 2020)")]),e._v(" "),a("h4",{attrs:{id:"changed-behavior-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behavior-2"}},[e._v("#")]),e._v(" Changed behavior")]),e._v(" "),a("ul",[a("li",[e._v("Streaming mode is enabled by default for query answering. It fetches data by batches of 500 results.")])]),e._v(" "),a("h4",{attrs:{id:"new-features-9"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-9"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support of GROUP_CONCAT added. All the standard SPARQL aggregation functions are now supported.")]),e._v(" "),a("li",[e._v("Named graphs are now supported.")]),e._v(" "),a("li",[e._v("Support of Denodo added. Support of Dremio is postponed to 4.1.")]),e._v(" "),a("li",[e._v("Support XML catalog file added (beta). It enables resolving "),a("code",[e._v("owl:imports")]),e._v(" assertions from the ontology by loading local files instead of fetching remote URLs. It is available in Protégé and with the "),a("code",[e._v("ontop endpoint")]),e._v(" CLI command.")]),e._v(" "),a("li",[e._v("DB metadata extraction CLI command added (experimental).")]),e._v(" "),a("li",[e._v("CASE and CAST is now supported in the mapping.")]),e._v(" "),a("li",[e._v("Streaming mode for query answering added.")])]),e._v(" "),a("h4",{attrs:{id:"deprecation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#deprecation"}},[e._v("#")]),e._v(" Deprecation")]),e._v(" "),a("ul",[a("li",[e._v("The RDF4J Workbench-based SPARQL endpint is deprecated. Tomcat, Jetty bundles and webapps (.war files) will be removed in a future version. Users are recommended to switch to the "),a("code",[e._v("ontop endpoint")]),e._v(" CLI or its Docker image.")])]),e._v(" "),a("h4",{attrs:{id:"removal-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#removal-2"}},[e._v("#")]),e._v(" Removal")]),e._v(" "),a("ul",[a("li",[e._v("The Mapping Assistant panel has been removed from the Ontop Protégé plugin.")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-7"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-7"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("SQL parsing of the mapping improved. JSQLParser's version has been updated.")]),e._v(" "),a("li",[e._v("Metadata extraction refactored, and SQLDialectAdapter has been eliminated.")]),e._v(" "),a("li",[e._v("Meta-mapping management improved.")]),e._v(" "),a("li",[e._v("Non-recognized SQL functions in the mapping are now only assumed to be deterministic. Other assumptions have been removed.")]),e._v(" "),a("li",[e._v("Internal data nodes now create variables only for database columns that are used in the query. This sparse usage of variables strongly improve reformulation time and log readibility when using tables with 100+ columns in the mapping.")])]),e._v(" "),a("p",[e._v("Many bugfixes.")]),e._v(" "),a("h2",{attrs:{id:"_4-0-0-beta-1-december-23-2019"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-0-0-beta-1-december-23-2019"}},[e._v("#")]),e._v(" 4.0.0-beta-1 (December 23, 2019)")]),e._v(" "),a("h4",{attrs:{id:"changed-behaviors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviors"}},[e._v("#")]),e._v(" Changed behaviors")]),e._v(" "),a("ul",[a("li",[e._v("Cardinality is now enforced by default (duplicates are removed at\nthe mapping level). This is required to support most of the\naggregation functions.")]),e._v(" "),a("li",[e._v("Functions in the SQL queries of the mapping that are unknown to\nOntop do no cause the creation of SQL views anymore. The strategy\nregarding SQL functions moved from white-list to black-list.")]),e._v(" "),a("li",[e._v("Types returned by supported SPARQL functions now strictly follow the\nSPARQL 1.1 specification.")])]),e._v(" "),a("h4",{attrs:{id:"new-features-10"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-10"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("SPARQL Aggregation functions SUM, COUNT, AVG, MIN, MAX are now\nsupported. SAMPLE is currently implemented as MIN.")]),e._v(" "),a("li",[e._v("Joins over terms that are constructed using different functions are\nnow supported.")]),e._v(" "),a("li",[e._v("Some functions (such as IRI templates) can now be post-processed\n(that is, they are not always included in the SQL query anymore).\nGenerated SQL queries are generally less verbose than before.")]),e._v(" "),a("li",[e._v("The Ontop endpoint now has the portal option, where predefined\nqueries are shown in the Web interface.")]),e._v(" "),a("li",[e._v("The NULLIF SQL function is now supported and optimized. Useful for\nfiltering out some unwanted values in the mapping assertions.")]),e._v(" "),a("li",[e._v("OPTIONALs outside the well-designed fragment are now supported.\nWeakly well-designed queries encoding preferences are optimized.")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-8"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-8"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("The typing system have been entirely redesigned. RDF types and\ndatabase types are now clearly separated. Each database engine can\nnow bring in its own data types.")]),e._v(" "),a("li",[e._v("The Datalog data structure (from version 1.x) for representing\nqueries internally has been removed.")]),e._v(" "),a("li",[e._v("Function symbol creation and optimization has been entirely\nrefactored. They are constructed by two factories, the\nFunctionSymbolFactory and the DBFunctionSymbolFactory.")]),e._v(" "),a("li",[e._v("Most of the logic of SQLDialectAdapter has been moved to\nDBFunctionSymbolFactory and DBTypeFactory. Each database engine is\nexpected to have its own implementation of these new interfaces.")]),e._v(" "),a("li",[e._v("The SPARQL translation has been rewritten (was formerly translating\ninto Datalog).")]),e._v(" "),a("li",[e._v("The SQL generator has been rewritten (was formerly translating from\nDatalog).")])]),e._v(" "),a("h4",{attrs:{id:"temporary-limitation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#temporary-limitation"}},[e._v("#")]),e._v(" Temporary limitation")]),e._v(" "),a("ul",[a("li",[e._v("Due to a complete refactoring of the SQL dialect management, only\nthe H2, MySQL, PostgreSQL, Oracle, SQL server and DB2 dialects are\nsupported in this beta. Dremio and Denodo dialects are expected to\nbe supported in a next beta release.")])]),e._v(" "),a("p",[e._v("Many bugfixes.")]),e._v(" "),a("h2",{attrs:{id:"_3-0-1-december-9-2019"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-1-december-9-2019"}},[e._v("#")]),e._v(" 3.0.1 (December 9, 2019)")]),e._v(" "),a("h4",{attrs:{id:"changed-behaviors-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviors-2"}},[e._v("#")]),e._v(" Changed behaviors")]),e._v(" "),a("ul",[a("li",[e._v("Protégé: no property file (resp. mapping file) is created if no data\nsource (resp. mapping assertion) is specified by the user.")])]),e._v(" "),a("h4",{attrs:{id:"new-features-11"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-11"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Ontop endpoint now supports R2RML files and doesn't require an\nontology.")]),e._v(" "),a("li",[e._v("Materialization: N-triples format is now supported.")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-9"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-9"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Rewriting of the tree-witness rewriter (now independent from\nDatalog)")])]),e._v(" "),a("h4",{attrs:{id:"bug-fixes-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-3"}},[e._v("#")]),e._v(" Bug fixes")]),e._v(" "),a("ul",[a("li",[e._v("Protégé: fixed issues related to prefix management.")]),e._v(" "),a("li",[e._v("Reasoning: issue related to the handling of inverse properties\nfixed.")])]),e._v(" "),a("h2",{attrs:{id:"_3-0-0-august-23-2019"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-0-august-23-2019"}},[e._v("#")]),e._v(" 3.0.0 (August 23, 2019)")]),e._v(" "),a("h4",{attrs:{id:"changed-behaviors-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviors-3"}},[e._v("#")]),e._v(" Changed behaviors")]),e._v(" "),a("ul",[a("li",[e._v("The `rdfs:range` of a data property is not used anymore for\ninferring the non-specified datatype in a mapping assertion but for\nvalidating the datatype once specified or inferred. Datatype\ninference is now based on the DB datatype and follows the R2RML\nnatural mapping (https://www.w3.org/TR/r2rml/#natural-mapping)")])]),e._v(" "),a("h4",{attrs:{id:"new-features-12"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-12"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Support of Protege 5.5")]),e._v(" "),a("li",[e._v("Support of BNode in R2RML")]),e._v(" "),a("li",[e._v("Basic support for the `geo:wktLiteral` datatype (#256)")]),e._v(" "),a("li",[e._v("New command-line interface for SPARQL endpoint")]),e._v(" "),a("li",[e._v("Docker container for SPARQL endpoint\n(https://hub.docker.com/r/ontop/ontop-endpoint)")]),e._v(" "),a("li",[e._v("Preliminary support of Dremio")]),e._v(" "),a("li",[e._v("Preliminary support of Denodo")]),e._v(" "),a("li",[e._v("The ordering of SPARQL variables is now preserved (#291)")]),e._v(" "),a("li",[e._v("N-Triples output for materialization added")]),e._v(" "),a("li",[e._v("The SQL translation now appears as a sub-tab in the Protégé Ontop\nSPARQL tab")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-10"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-10"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("The triple predicate is now systematically used in the mapping and\nduring query unfolding")]),e._v(" "),a("li",[e._v("Atom predicates and function symbols are now clearly distinguished")]),e._v(" "),a("li",[e._v("The Datalog-based data structure is not used anymore at mapping\nprocessing time and by the default rewriter")]),e._v(" "),a("li",[e._v("Query containment-based optimizations applied to the mapping after\nsaturation improved")]),e._v(" "),a("li",[e._v("The materializer is now based on RDF4J (instead of OWLAPI)")])]),e._v(" "),a("h4",{attrs:{id:"project-organisation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#project-organisation"}},[e._v("#")]),e._v(" Project organisation")]),e._v(" "),a("ul",[a("li",[e._v("Release of Ontop on both SourceForge and GitHub (#274)")]),e._v(" "),a("li",[e._v("A new repository for the tutorial\n(https://github.com/ontop/ontop-tutorial)")])]),e._v(" "),a("p",[e._v("Many bugfixes.")]),e._v(" "),a("h2",{attrs:{id:"_3-0-0-beta-2-february-28-2018"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-0-beta-2-february-28-2018"}},[e._v("#")]),e._v(" 3.0.0-beta-2 (February 28, 2018)")]),e._v(" "),a("h4",{attrs:{id:"changed-behaviours"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviours"}},[e._v("#")]),e._v(" Changed Behaviours")]),e._v(" "),a("ul",[a("li",[e._v("The JDBC driver class name is now required in Protégé (issue #248)")])]),e._v(" "),a("h4",{attrs:{id:"new-features-13"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-13"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Novel left join optimization techniques (issue #230)")]),e._v(" "),a("li",[e._v("LIMIT appended to test SQL queries and SPARQL queries in Protégé")]),e._v(" "),a("li",[e._v("Report illegal usage of Fully qualified column names (FQDN) in the\ntarget part of a mapping assertion")]),e._v(" "),a("li",[e._v("Support for the SPARQL isNumeric function")])]),e._v(" "),a("h4",{attrs:{id:"refactoring-11"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#refactoring-11"}},[e._v("#")]),e._v(" Refactoring")]),e._v(" "),a("ul",[a("li",[e._v("Internal representation of the ontology improved")]),e._v(" "),a("li",[e._v("Improvement of the intermediate query representation (issues #235,\n#236)")]),e._v(" "),a("li",[e._v("Switch to ANTLR4 to parse ontop native mapping (issues #238, #239)")]),e._v(" "),a("li",[e._v("Make ResultSet.next() robust (issue #219)")]),e._v(" "),a("li",[e._v("More robust handling of IRI-safe encoding (issue #245)")])]),e._v(" "),a("h4",{attrs:{id:"bug-fixes-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bug-fixes-4"}},[e._v("#")]),e._v(" Bug Fixes")]),e._v(" "),a("p",[e._v("Many, see "),a("a",{attrs:{href:"https://github.com/ontop/ontop/milestone/7?closed=1",target:"_blank",rel:"noopener"}},[e._v("closed issues"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("h2",{attrs:{id:"_3-0-0-beta-1-august-11-2017"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-0-0-beta-1-august-11-2017"}},[e._v("#")]),e._v(" 3.0.0-beta-1 (August 11, 2017)")]),e._v(" "),a("p",[e._v("Note that this is the first release from version 3 series with many\ninternal refactoring and improvements, and bug fixes. However, these\nchanges also cause incompatibility with Ontop v1. See "),a("a",{attrs:{href:"MigrationGuideV1toV3",title:"wikilink"}},[e._v("the migration\nguide")]),e._v(".")]),e._v(" "),a("h4",{attrs:{id:"changed-behaviours-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#changed-behaviours-2"}},[e._v("#")]),e._v(" Changed Behaviours")]),e._v(" "),a("ul",[a("li",[e._v("JDBC connection information is stored in a separate properties file")]),e._v(" "),a("li",[e._v("Fully qualified columns (table.column) are not allowed in the target\npart of the mapping language. One has to explicitly create an alias\n(e.g. table.column AS table_column) and use the alias in the\ntarget. (complying with R2RML)")]),e._v(" "),a("li",[e._v("The rules for datatype type inference and checking are changed. Now\nwe use only mapping and database to infer the datatypes (complying\nwith R2RML), and the (range axioms) in the ontologies to check the\ncompatibility (complying with OWL).")])]),e._v(" "),a("h4",{attrs:{id:"new-features-14"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-features-14"}},[e._v("#")]),e._v(" New features")]),e._v(" "),a("ul",[a("li",[e._v("Major refactoring of the internal structure of the Ontop system")]),e._v(" "),a("li",[e._v("Databases for Integration Tests have been dockerized.")]),e._v(" "),a("li",[e._v("Upgrade Sesame to the latest version of RDF4J (v2.2.2).")]),e._v(" "),a("li",[e._v("The redesigned OWLAPI and RDF4J API bindings of Ontop API (see\nexamples: "),a("a",{attrs:{href:"https://github.com/ontop/ontop-api-examples",target:"_blank",rel:"noopener"}},[e._v("https://github.com/ontop/ontop-api-examples"),a("OutboundLink")],1),e._v(")")]),e._v(" "),a("li",[e._v("Upgrade of R2RML API to v0.6.0")]),e._v(" "),a("li",[e._v("Official support of both Tomcat and Jetty (v9) for deploying a\nSPARQL endpoint")]),e._v(" "),a("li",[e._v("Better support of Optional (bugfix #190)")]),e._v(" "),a("li",[e._v('Protege: support for "Synchronize Reasoner" in the Reasoner menu')]),e._v(" "),a("li",[e._v("Improved error messages for incorrect mapping")]),e._v(" "),a("li",[e._v("CLI tool for converting Mapping from v1 to v3")])]),e._v(" "),a("h2",{attrs:{id:"_1-18-1-june-16-2017"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-18-1-june-16-2017"}},[e._v("#")]),e._v(" 1.18.1 (June 16, 2017)")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("Return a correct extension for files in ontop cli materializer\n(issue #145)")])]),e._v(" "),a("li",[a("p",[e._v("Materialize support non-http resource uris")])]),e._v(" "),a("li",[a("p",[e._v("Bug Fixes")]),e._v(" "),a("ul",[a("li",[e._v("Small fixes in cli (issues #127, #141, #188)")]),e._v(" "),a("li",[e._v("PostgreSQL JDBC driver fix for quotation marks")]),e._v(" "),a("li",[e._v("Remove unknown property warning for owl:sameAs")]),e._v(" "),a("li",[e._v("Remove duplicate annotations during materialization (issues\n#183 #186)")]),e._v(" "),a("li",[e._v("Generate different file names for properties and classes during\nmaterialization with separate files (issue #165)")]),e._v(" "),a("li",[e._v("R2RML\n"),a("ul",[a("li",[e._v("Small changes in api")]),e._v(" "),a("li",[e._v("Fix R2RML import of SQL query (issues #181 #182)")]),e._v(" "),a("li",[e._v("Fix export from OBDA mapping to R2RML (issues #158 #159\n#160)")])])]),e._v(" "),a("li",[e._v("Fix in SPARQL use of filter and values with a IRI (issue #191)")]),e._v(" "),a("li",[e._v("Fix handling of mysql metadata with lower_case_table_names\nsetting on (issue #192)")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-18-0-may-26-2016"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-18-0-may-26-2016"}},[e._v("#")]),e._v(" 1.18.0 (May 26, 2016)")]),e._v(" "),a("ul",[a("li",[e._v("Protege\n"),a("ul",[a("li",[e._v("Redesigned materialization gui")]),e._v(" "),a("li",[e._v("Upgrade to Protege 5.0.0")])])]),e._v(" "),a("li",[e._v("Support of querying annotation property from ontology (issue #105)\n(disabled by default)")]),e._v(" "),a("li",[e._v("Support of the use of owl:sameAs in mappings (disabled by default)")]),e._v(" "),a("li",[e._v("Package names have been unified to it.unibz.inf.ontop")]),e._v(" "),a("li",[e._v("Upgrade OWLAPI to v4.2.5")]),e._v(" "),a("li",[e._v("Bug Fixes\n"),a("ul",[a("li",[e._v("Fix obda-to-r2rml convert for template like <{uri}> (issue\n#97)")]),e._v(" "),a("li",[e._v("Fix an issue in Protege when renaming data source.")]),e._v(" "),a("li",[e._v("Fix error messages in protege mapping assistant panel and SPARQL\nquery")]),e._v(" "),a("li",[e._v("Fix issue with multiple schemas (issue #99)")]),e._v(" "),a("li",[e._v("Fix internal SQL conversion for Teiid jdbc driver")]),e._v(" "),a("li",[e._v("Fix support of anonymous ontology (issue #101)")]),e._v(" "),a("li",[e._v("Fix warning message in Protege (issue #102)")]),e._v(" "),a("li",[e._v("Fix xml uri (issue #104)")]),e._v(" "),a("li",[e._v("Fix r2rml api, error predicateMap with template (issue #107)")]),e._v(" "),a("li",[e._v("Fix in Protege import of additional ontology and add classes and\nproperties of imported ontologies at runtime (issues #106\n#108)")]),e._v(" "),a("li",[e._v("Fix querying URI constants (issue #111)")]),e._v(" "),a("li",[e._v("Fix error message creating new mapping (issue #120)")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-17-1-february-16-2016"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-17-1-february-16-2016"}},[e._v("#")]),e._v(" 1.17.1 (February 16, 2016)")]),e._v(" "),a("ul",[a("li",[e._v("Bug Fixes\n"),a("ul",[a("li",[e._v("Fix an issue when creating new datasource in Protege")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-17-0-february-4-2016"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-17-0-february-4-2016"}},[e._v("#")]),e._v(" 1.17.0 (February 4, 2016)")]),e._v(" "),a("ul",[a("li",[e._v("Protege\n"),a("ul",[a("li",[e._v("Ontop protege plugin now available on official Protege Plugin\nRepository!")]),e._v(" "),a("li",[e._v("Upgrade Protege to 5.0.0-beta-21 (latest version)")]),e._v(" "),a("li",[e._v("Ontop protege plugin is packed as one jar now -- no need for\nseparated OSGI JDBC configuration jars")]),e._v(" "),a("li",[e._v("do not generate .obda and .q file when no datasource is present")]),e._v(" "),a("li",[e._v("General improvement of UI -- more intuitive and less confusion")])])]),e._v(" "),a("li",[e._v("Support for Annotation Properties in mappings")]),e._v(" "),a("li",[e._v("Improvement of Ontop mapping language for URIs/Literals retrieved\nfrom DB columns")]),e._v(" "),a("li",[e._v("Support for SPARQL VALUES keyword for SPARQL federation")]),e._v(" "),a("li",[e._v("Java 8")]),e._v(" "),a("li",[e._v("Upgrade OWLAPI to v4.1.3 (latest version)")]),e._v(" "),a("li",[e._v("Bash Completion for command line interface")]),e._v(" "),a("li",[e._v("Better structured Wiki: "),a("a",{attrs:{href:"https://github.com/ontop/ontop/wiki",target:"_blank",rel:"noopener"}},[e._v("https://github.com/ontop/ontop/wiki"),a("OutboundLink")],1)])]),e._v(" "),a("h2",{attrs:{id:"_1-16-1-november-16-2015"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-1-november-16-2015"}},[e._v("#")]),e._v(" 1.16.1 (November 16, 2015)")]),e._v(" "),a("ul",[a("li",[e._v("Optimizations exploiting foreign key constraints over multiple\ncolumns")]),e._v(" "),a("li",[e._v("Improvement in the RDB2RDF compliance test (contributed by Evren\nSrin)")])]),e._v(" "),a("h2",{attrs:{id:"_1-16-0-october-14-2015"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-0-october-14-2015"}},[e._v("#")]),e._v(" 1.16.0 (October 14, 2015)")]),e._v(" "),a("ul",[a("li",[e._v("Support for "),a("a",{attrs:{href:"OntopSPARQLFunctions",title:"wikilink"}},[e._v(" SPARQL functions ")])]),e._v(" "),a("li",[e._v("Support for column oriented RDBMS "),a("a",{attrs:{href:"ObdalibPluginJDBC",title:"wikilink"}},[e._v("\nMonetDB")])]),e._v(" "),a("li",[e._v("Support for cloud RDBMS "),a("a",{attrs:{href:"ObdalibPluginJDBC",title:"wikilink"}},[e._v(" SAP HANA")])]),e._v(" "),a("li",[e._v("New Optimization technique: "),a("a",{attrs:{href:"Implicit-database-constraints",title:"wikilink"}},[e._v("\nImplicit-database-constraints")])]),e._v(" "),a("li",[e._v("New Optimization technique: "),a("a",{attrs:{href:"Exact-Mappings",title:"wikilink"}},[e._v("\nExact-Mappings")])]),e._v(" "),a("li",[e._v("Bug Fixes\n"),a("ul",[a("li",[e._v("Handling quotes in the WHERE clause of SQL query in mappings .")]),e._v(" "),a("li",[e._v("Allow multiple subjects in the target of mapping of Ontop native\nsyntax.")]),e._v(" "),a("li",[e._v("Return correct value from datetime columns using jtds driver")]),e._v(" "),a("li",[e._v("Fix the translation of LIMIT with ORDER BY in oracle database")]),e._v(" "),a("li",[e._v("Fix a bug in MetaMappingExpander")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-15-0-may-13-2015"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-15-0-may-13-2015"}},[e._v("#")]),e._v(" 1.15.0 (May 13, 2015)")]),e._v(" "),a("ul",[a("li",[e._v("Upgrade the Protege plugin to Protégé 5")]),e._v(" "),a("li",[e._v("New Command line interface")]),e._v(" "),a("li",[e._v("Better support for SPARQL BIND")]),e._v(" "),a("li",[e._v("Support for SPARQL Concat and Replace")]),e._v(" "),a("li",[e._v("Support for SQL Concat and Replace (in the mappings)")]),e._v(" "),a("li",[e._v("Support for xsd:dateTimeStamp")]),e._v(" "),a("li",[e._v("Improved Optimization techniques (Contribution by Roman Konchakov)")]),e._v(" "),a("li",[e._v("Implementation of Autoclosable interface for core classes in the API\nto support `try with resource`.")]),e._v(" "),a("li",[e._v("Create a sub-query when SELECT DISTINCT is used in the mappings.")]),e._v(" "),a("li",[e._v("Bug Fixes\n"),a("ul",[a("li",[e._v("Handle the 30-characters limit for variable names in Oracle.")]),e._v(" "),a("li",[e._v("Fix the mapping render of Protege when multiple subjects are in\nthe target of mapping.")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-14-0-november-4-2014"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-14-0-november-4-2014"}},[e._v("#")]),e._v(" 1.14.0 (November 4, 2014)")]),e._v(" "),a("ul",[a("li",[e._v("Added support in ontology and mappings for datatypes xsd:int,\nxsd:long, xsd:positiveInteger, xsd:negativeInteger,\nxsd:nonPositiveInteger, xsd:nonNegativeInteger, xsd:float")]),e._v(" "),a("li",[e._v("Optimized implementations of TBox classifications, and query\ncontainment checking, which are much faster than before")]),e._v(" "),a("li",[e._v("Validation for Sesame Workbench made stronger. It prevents\nrepositories with an invalid configuration to be created.")]),e._v(" "),a("li",[e._v("Bug Fixes:\n"),a("ul",[a("li",[e._v("Fix SPARQL functions (str(), lang()) to use rdfs:Literal instead\nof xsd:string")]),e._v(" "),a("li",[e._v("Issue converting datatypes of R2RML constants")]),e._v(" "),a("li",[e._v("Support UNICODE characters in TurtleParser")]),e._v(" "),a("li",[e._v("Catch exceptions for Protege R2RML Export")]),e._v(" "),a("li",[e._v("Fix conversion from ontop mappings to R2RML of language tag and\ntriples")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-13-1-september-29-2014"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-13-1-september-29-2014"}},[e._v("#")]),e._v(" 1.13.1 (September 29, 2014)")]),e._v(" "),a("ul",[a("li",[e._v("Bug Fixes:\n"),a("ul",[a("li",[e._v("The redundant query elimination optimization sometimes does not\nhandle facts properly")]),e._v(" "),a("li",[e._v("Some warning messages related to datatype range axioms are\nambiguous")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-13-0-september-25-2014"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-13-0-september-25-2014"}},[e._v("#")]),e._v(" 1.13.0 (September 25, 2014)")]),e._v(" "),a("ul",[a("li",[e._v("Support for providing implicit DB Constraints (e.g. foreign keys) to\nOntop to generate efficient SQL")]),e._v(" "),a("li",[e._v("Command line feature to generate pretty R2RML")]),e._v(" "),a("li",[e._v("Stream output in the Protege Plugin")]),e._v(" "),a("li",[e._v("Support for Regex in mappings")]),e._v(" "),a("li",[e._v("Proper handling of datatypes in ontology and mappings")]),e._v(" "),a("li",[e._v("Support for hsql database")]),e._v(" "),a("li",[e._v("Support for datatypes xsd:date, xsd:time and xsd:gYear")]),e._v(" "),a("li",[e._v("Bug Fixes:\n"),a("ul",[a("li",[e._v("Issue with nested equivalences in unfolder")]),e._v(" "),a("li",[e._v("Problem with multiple join conditions in R2RML")]),e._v(" "),a("li",[e._v("Cancelling running queries in Protege")]),e._v(" "),a("li",[e._v("Blank lines in generated sql causes problems for oracle")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-12-0-june-26-2014"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-0-june-26-2014"}},[e._v("#")]),e._v(" 1.12.0 (June 26, 2014)")]),e._v(" "),a("ul",[a("li",[e._v("Support for finding empty concepts and properties")]),e._v(" "),a("li",[e._v("Integration with a new R2RML API")]),e._v(" "),a("li",[e._v("Less restrictive mode for JDBC driver validation")]),e._v(" "),a("li",[e._v("Faster TBox reasoner implementation")]),e._v(" "),a("li",[e._v('Optional "Replace" Statement in the SQL translation. When\n"Replace" is off the SQL performs much better.')]),e._v(" "),a("li",[e._v("Several Bug Fixes:\n"),a("ul",[a("li",[e._v("Issue with 'true' in Oracle")]),e._v(" "),a("li",[e._v("Meta-mapping editing in Protege")]),e._v(" "),a("li",[e._v("Problem with regex in Oracle")]),e._v(" "),a("li",[e._v("Several issues with R2RML")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-11-0-february-19-2014"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-11-0-february-19-2014"}},[e._v("#")]),e._v(" 1.11.0 (February 19, 2014)")]),e._v(" "),a("ul",[a("li",[e._v("Support for Consistency Checking")]),e._v(" "),a("li",[e._v("Improved Performance")]),e._v(" "),a("li",[e._v("Support for Multi-schema queries")]),e._v(" "),a("li",[e._v("New SQL parser for the mapping based on JSQLParser.")]),e._v(" "),a("li",[e._v("Extended the supported SQL language: IN, BETWEEN, LIKE, etc.")]),e._v(" "),a("li",[e._v("Extended the supported SPARQL: BIND")]),e._v(" "),a("li",[e._v("Improved the Treewitness rewriting algorithm.")]),e._v(" "),a("li",[e._v("Upgraded to Sesame 2.7.10")]),e._v(" "),a("li",[e._v("General clean-up")]),e._v(" "),a("li",[e._v("Fixed a number of bugs:\n"),a("ul",[a("li",[e._v("Translation of SAPRQL REGEX into SQL")]),e._v(" "),a("li",[e._v("Infinite loop triggered by some nested Optionals")]),e._v(" "),a("li",[e._v("Several issues with Construct")]),e._v(" "),a("li",[e._v("Several issues with R2RML")])])])]),e._v(" "),a("h2",{attrs:{id:"_1-10-0-december-16-2013"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-10-0-december-16-2013"}},[e._v("#")]),e._v(" 1.10.0 (December 16, 2013)")]),e._v(" "),a("ul",[a("li",[e._v("Ontop under Apache license")]),e._v(" "),a("li",[e._v("Ontop packages in central maven repository")])]),e._v(" "),a("h2",{attrs:{id:"_1-9-0-september-18-2013"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-9-0-september-18-2013"}},[e._v("#")]),e._v(" 1.9.0 (September 18, 2013)")]),e._v(" "),a("ul",[a("li",[e._v("Update to Sesame 2.7.6 (latest)")]),e._v(" "),a("li",[e._v("Validation of datatypes w.r.t. XMLSchema specification")]),e._v(" "),a("li",[e._v("New hybrid Abox functionality support")]),e._v(" "),a("li",[e._v("Removed all dependencies to Jena")]),e._v(" "),a("li",[e._v("Removed wrong/unnecessary dependencies")]),e._v(" "),a("li",[e._v("Turtle parser can handle variables in the predicate")]),e._v(" "),a("li",[e._v("Mappings with URI templates in class or properties suppot")]),e._v(" "),a("li",[e._v("First version of mapping splitter")]),e._v(" "),a("li",[e._v("Bug fix: Null pointer exception when the URI in Protege plugin was\nempty")]),e._v(" "),a("li",[e._v("Bug fix: Literal and literal with language tag handling")]),e._v(" "),a("li",[e._v("Bug fix: Shutdown of Sesame repoConnection")]),e._v(" "),a("li",[e._v("Bug fix: Object column literal gerenation in R2RML")]),e._v(" "),a("li",[e._v("Bug fix: Queries that would not finish execution")]),e._v(" "),a("li",[e._v("Bug fix: Unexpected bindings in unfolder")]),e._v(" "),a("li",[e._v("Bug fix: Null pointer exception in ontology translation in the case\nof unsupported axiom")]),e._v(" "),a("li",[e._v("Bug fix: OWL class assertion generation, inverted arguments")]),e._v(" "),a("li",[e._v("Bug fix: SameTerm in sparql algebra to datalog translation")]),e._v(" "),a("li",[e._v("Bug fix: URI template matcher to find most specific matches first")]),e._v(" "),a("li",[e._v("Bug fix: Construct queries")]),e._v(" "),a("li",[e._v("Bug fix: Describe queries")])]),e._v(" "),a("h2",{attrs:{id:"_1-8-0-july-29-2013"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-8-0-july-29-2013"}},[e._v("#")]),e._v(" 1.8.0 (July 29, 2013)")]),e._v(" "),a("ul",[a("li",[e._v("Improve error message and better exception handling.")]),e._v(" "),a("li",[e._v("Change the representation of "),a("code",[e._v("null")]),e._v(" value in BindingSet")]),e._v(" "),a("li",[e._v("Modified the computation of the LeftJoin to support empty evaluation\nin its second argument.")]),e._v(" "),a("li",[e._v("Changed the type of the semantic index table for integer data\nproperty assertion from INT to BIGINT to be able to handle\n"),a("code",[e._v("xsd:integer")]),e._v(" type")]),e._v(" "),a("li",[e._v("Set index creation during Quest startup")]),e._v(" "),a("li",[e._v("Implement new feature for bootstrapping, command line scripts,\nintegration in ontoPro plugin")]),e._v(" "),a("li",[e._v("Updated the URI templates in Turtle mapping syntax to make it\nsimpler and closer to Turtle. Now quotes, question marks and\nclass/property declarations are no longer required")])]),e._v(" "),a("p",[e._v("For example, in the previous syntax:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",[a("code",[e._v(' <"test;person/{?id}"> a :MyClass; :hasName {?name}.\n')])])]),a("p",[e._v("becomes simply")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",[a("code",[e._v(" test:person/{id} a :MyClass ; :hasName {name} .\n")])])]),a("ul",[a("li",[e._v('Support "%", "=", ";" characters in the URI template.')])]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",[a("code",[e._v(" :class/{id};{name}%{class type}\n")])])]),a("ul",[a("li",[e._v("Bug fix: Major bugs in execution handling SPARQL Construct and\nSPARQL Describe queries.")]),e._v(" "),a("li",[e._v("Bug fix: Issues related to commits and batch sizes in\nQuestOWLStatement")]),e._v(" "),a("li",[e._v("Bug fix: Issue with URI template matcher that generates "),a("code",[e._v("null")]),e._v(' in\ncase failed template (now it generates URI("xxxx") where xxx is\nthe URI that was being matched.)')]),e._v(" "),a("li",[e._v("Bug fix: Issue in existential clause in tree-witness algorithm")]),e._v(" "),a("li",[e._v("Bug fix: Issue in the maximum size of URI that has more than 400\ncharacters")]),e._v(" "),a("li",[e._v("Bug fix: Issue in some data that can not be tracked when inserted\ninto the database. In particular if the data comes from\nclasses/properties that were simplified by the equivalence\nresolution.")]),e._v(" "),a("li",[e._v("Bug fix: Issue in exception handling during index creation in\nsemantic index test.")]),e._v(" "),a("li",[e._v("Bug fix: Issue in SQL parser that it doesn't capture the scope\nwithin parentheses in the WHERE clause.")]),e._v(" "),a("li",[e._v("Remove table and column identifier quotes in the SQL target query\nstring so that the parser can parse properly. For example:")])]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",[a("code",[e._v(' SELECT "Student"."sid" from "Student"\n')])])]),a("p",[e._v("will become:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",[a("code",[e._v(" SELECT Student.sid from Student\n")])])]),a("ul",[a("li",[e._v("New semantic index implementation with integer references for URIs\nfor faster query answering (faster joins on integers instead of\nstrings)")])]),e._v(" "),a("p",[a("strong",[e._v("Ontop source code")])]),e._v(" "),a("ul",[a("li",[e._v("Ontop is now in GitHub!")]),e._v(" "),a("li",[e._v("Cleaner and slimmer project structure. We removed obsolete classes\nand tests.")]),e._v(" "),a("li",[e._v("Code refactor in Materialiser API, MinimalCQProducer and\nConstruct-Describe query execution.")]),e._v(" "),a("li",[e._v("More complete test cases for testing Quest features, e.g.,\nTree-Witness rewriting, Data materialiser, SQL parser, SPARQL\nConstruct, SPARQL Describe, SPARQL Optional, Database metadata and\nQuery completeness.")]),e._v(" "),a("li",[e._v("Support JUnit4 test cases.")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha2-rev-2305-april-5-2013"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha2-rev-2305-april-5-2013"}},[e._v("#")]),e._v(" 1.7-alpha2 (rev 2305, April 5, 2013)")]),e._v(" "),a("ul",[a("li",[e._v("Support for importing/exporting R2RML mappings")]),e._v(" "),a("li",[e._v('Support for automated mapping generation as defined by the "Direct\nMapping" W3C specification')]),e._v(" "),a("li",[e._v("Various options for data materialization (similar to dump-rdf in\nD2RQ)")]),e._v(" "),a("li",[e._v("Support for concurrent queries in the SPARQL endpoint through\nconnection pooling")]),e._v(" "),a("li",[e._v("Better support for Oracle, Postgres, SQL Server and DB2")]),e._v(" "),a("li",[e._v("Improved the SQL queries generated by Quest by avoiding some\noperations when unnecessary (e.g., casting), and placing optimally\nthe JOIN conditions in the SQL query.")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha2-rev-2178-february-7-2013"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha2-rev-2178-february-7-2013"}},[e._v("#")]),e._v(" 1.7-alpha2 (rev 2178, February 7, 2013)")]),e._v(" "),a("p",[a("strong",[e._v("-ontopQuest-")])]),e._v(" "),a("ul",[a("li",[e._v("Mapping optimiser: improved the generation of OR mappings")]),e._v(" "),a("li",[e._v("Mapping optimiser: improved the simplification of mappings using\nFOREIGN KEYS")]),e._v(" "),a("li",[e._v("Query optimiser: Improved the query optimiser to avoid generation of\nredundant JOINs and redundant UNIONs w.r.t. FOREIGN KEYs")]),e._v(" "),a("li",[e._v("Support percent encoding in strings in URI templates as defined by\nthe R2RML standard.")]),e._v(" "),a("li",[e._v("Better propagation of Exception messages in the Sesame provider")]),e._v(" "),a("li",[e._v("New "),a("strong",[e._v("scripts for querying quest")]),e._v(" from the command line")])]),e._v(" "),a("p",[a("strong",[e._v("-ontopPro- plugin")])]),e._v(" "),a("ul",[a("li",[a("strong",[e._v("Introducing mapping assistant")]),e._v(". A new GUI-based tool for creating\nmappings. This is an experimental GUI to help you create mappings in\na faster way, please help us improve it by reporting any issues you\nmay find. (See "),a("a",{attrs:{href:"ObdalibPluginMappingAssistant",title:"wikilink"}},[e._v("\nguideliness")]),e._v(").")]),e._v(" "),a("li",[e._v('Users can set the max number of tuples returned in "OBDA Query"\ntab.')])]),e._v(" "),a("p",[a("strong",[e._v("Mapping language features (-ontopQuest- and -ontopCore-)")])]),e._v(" "),a("ul",[a("li",[e._v("Support URI identifier obtained directly from the database (no using\nURI template).")]),e._v(" "),a("li",[e._v("Support multiple lines when wrting SQL source query (See "),a("a",{attrs:{href:"ObdalibObdaFile#SourceandMappingDeclaration",title:"wikilink"}},[e._v(" feature\nnotes")]),e._v(")")])]),e._v(" "),a("p",[a("strong",[e._v("Bug fixes")])]),e._v(" "),a("ul",[a("li",[e._v("Bug fix: Issue with MySQL and UTF8 characters (Korean in particular)")]),e._v(" "),a("li",[e._v('Bug fix: Issue with "unbound variable freshX_X found while\ngenerating SQL" fixed.')]),e._v(" "),a("li",[e._v("Bug fix: Inverse minimum cardinality assertion was being ignored.")]),e._v(" "),a("li",[e._v("Bug fix: Source SQL query doesn't accept parenthesis in WHERE\nclause.")]),e._v(" "),a("li",[e._v("Bug fix: JDBC connection doesn't recover when connection lost.")]),e._v(" "),a("li",[e._v("Bug fix: Sesame virtual repository fails to read Quest preferences.")]),e._v(" "),a("li",[e._v("Bug fix: CSV export function only exports 101 tuples instead of all\nthe tuples.")]),e._v(" "),a("li",[e._v("Bug fix: Null pointer exception in the query result table.")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-2039-december-30-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-2039-december-30-2012"}},[e._v("#")]),e._v(" 1.7-alpha (rev 2039, December 30, 2012)")]),e._v(" "),a("p",[a("strong",[e._v("SPARQL support")])]),e._v(" "),a("ul",[a("li",[e._v("Support for most SPARQL built in functions, e.g., arithmetics, type\nchecking, etc.")]),e._v(" "),a("li",[e._v("Support for CONSTRUCT and DESCRIBE result forms")]),e._v(" "),a("li",[e._v("Support for OPTIONAL and bound, which allow you to have NEGATION in\nthe usual SPARQL 1.0 style.")]),e._v(" "),a("li",[e._v('Support for variables in ANY position, e.g., to allow queries such\nas SELECT ?p ?v WHERE { ?x :name "John Smith". ?x ?p ?v }')]),e._v(" "),a("li",[e._v("Stronger compliance to standard RDF and SPARQL semantics for FILTER\nexpressions")])]),e._v(" "),a("p",[a("strong",[e._v("Performance")])]),e._v(" "),a("ul",[a("li",[e._v("Multiple improvements to the SPARQL-to-rule translation, mapping and\nTBox optimization algorithms.")]),e._v(" "),a("li",[e._v("New algorithm for query rewriting w.r.t. the TBox that increases the\nperformance of query answering by many orders of magnitude when\ninference w.r.t. to existential constants is enabled. The\nimplementation has been contributed by Dr. Roman Kontchakov.")]),e._v(" "),a("li",[e._v("New benchmarks. We tested against Virtuoso triple store, Virtuoso\nRDF views and D2R Server using the BSBM and FishMark benchmarks.")])]),e._v(" "),a("p",[a("strong",[e._v("APIs and Accessibility")])]),e._v(" "),a("ul",[a("li",[e._v('Completely new Sesame API provider, now users of Sesame can create\n"Virtual RDF repositories" with -ontop-')]),e._v(" "),a("li",[e._v("SPARQL end-point support through integration with Sesame's\nworkbench")])]),e._v(" "),a("p",[a("strong",[e._v("Mapping language")])]),e._v(" "),a("ul",[a("li",[e._v('Improved support for default literal types, now it conforms with the\nR2RML "Natural Mapping" specification')]),e._v(" "),a("li",[e._v("Support for language tags obtained from the DB")]),e._v(" "),a("li",[e._v("Proper support for constants in the mappings")]),e._v(" "),a("li",[e._v("Proper internal handling of NULL values in the database (as\nrecommended by the R2RML standard)")])]),e._v(" "),a("p",[a("strong",[e._v("Database support")])]),e._v(" "),a("ul",[a("li",[e._v("Restored support for Oracle, DB2 and SQL Server")]),e._v(" "),a("li",[e._v("Improved support and performance over MySQL")])]),e._v(" "),a("p",[a("strong",[e._v("Documentation")])]),e._v(" "),a("ul",[a("li",[e._v("Revised and extended all technical documentation")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-1692-august-16-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1692-august-16-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1692 (August 16, 2012)")]),e._v(" "),a("p",[a("strong",[e._v("-ontop- general")])]),e._v(" "),a("ul",[a("li",[e._v("New file content for the OBDA output file. The file is no longer in\nXML format but instead it uses plain text for simplicity (Issue:\n#244).")]),e._v(" "),a("li",[e._v("Improved error messages when the system initializes, parses\nmappings, fails to")])]),e._v(" "),a("p",[a("code",[e._v("execute queries, etc.")]),a("br"),e._v(" "),a("code")]),e._v(" "),a("p",[a("strong",[e._v("-ontopPro- Protege plugin")])]),e._v(" "),a("ul",[a("li",[e._v("Support Protégé 4.2")]),e._v(" "),a("li",[e._v("Add cancel button during query execution to terminate the process\nimmediately.")]),e._v(" "),a("li",[e._v("Add help button to guide filling data source parameters.")]),e._v(" "),a("li",[e._v("The plugin no longer introduces prefix definitions")]),e._v(" "),a("li",[e._v('Implemented "Cancel" function for query execution')]),e._v(" "),a("li",[e._v("New shortcut CONTROL + T to test mappings in the mapping creator")]),e._v(" "),a("li",[e._v("Fixed several issues with prefix management and rendering of")])]),e._v(" "),a("p",[a("code",[e._v("URIs short forms")])]),e._v(" "),a("ul",[a("li",[e._v("Improved GUI, hints and suggestions for JDBC connections, improved\nTAB navigation")])]),e._v(" "),a("p",[a("code",[e._v("in all dialogs")])]),e._v(" "),a("ul",[a("li",[e._v("Bug fix: Improve error reporting and stack trace printing (Issue:\n#255, #262)")]),e._v(" "),a("li",[e._v("Bug fix: The target and source string got saved partially if\nnewlines are used.")]),e._v(" "),a("li",[e._v("Bug fix: The OBDA model doesn't get loaded if the query has an\nexception.")]),e._v(" "),a("li",[e._v("Improved error management during .obda and query file load")]),e._v(" "),a("li",[e._v("Fixed null pointer exception and blank window that appear in cases\nwhere the .owl file")])]),e._v(" "),a("p",[a("code",[e._v("in OWL/RDF contained different default ns and a default prefix")])]),e._v(" "),a("p",[a("strong",[e._v("-ontopQuest- OWL Reasoner")])]),e._v(" "),a("ul",[a("li",[e._v("Added support for SPARQL query modifiers: ORDER BY, OFFSET and LIMIT\n(Issue: #261).")]),e._v(" "),a("li",[e._v("Add query caching to speed up the system performance, now repeated\nquery execution will not require SQL generation every time.")]),e._v(" "),a("li",[e._v("Relaxed on punning checks to allow loading of DBPedia and similar\nontologies.")]),e._v(" "),a("li",[e._v("EXPERIMENTAL: Added support for mixed ABoxes for class assertions,\ni.e., most data comes from the mappings but a bit of data is also\nallowed in the ABox, e.g., global facts Planet('mars')")]),e._v(" "),a("li",[e._v("Improved support for MySQL, Postgres, DB2 and SQL Server dialects")]),e._v(" "),a("li",[e._v("Added a warnings when axioms are being ignored because of being out\nof OWL 2 QL")]),e._v(" "),a("li",[e._v("Improved error reporting on failed connections")]),e._v(" "),a("li",[e._v("Improved support for SQL AS for table and column renaming in\nmappings")]),e._v(" "),a("li",[e._v("New way to generate SQL. SQL now includes typing information and is\npretty printed.")]),e._v(" "),a("li",[e._v("Bug fix: Fixed issue with INVALID URI that appeared when mappings\nused data that contained invalid characters for URI's (e.g., white\nspace) Now we call URIEncode (Jena's) before returning the value.")]),e._v(" "),a("li",[e._v("Bug fix: Exception when importing data as ABox individuals.")]),e._v(" "),a("li",[e._v("Bug fix: Exception when null values is used as constants.")]),e._v(" "),a("li",[e._v("Bug fix: Exception if ambiguous column names are used in SQL\nqueries.")]),e._v(" "),a("li",[e._v("Bug fix: Wrong URI shorten if there are two or more namespaces with\noverlapping strings.")]),e._v(" "),a("li",[e._v("Bug fix: Null pointer exception due to inconsistent OBDA model\nidentifier string.")]),e._v(" "),a("li",[e._v("Bug fix: Unknown signature in the SELECT clause if the name is a\nqualified name and it comes from a view (Issue: #259)")]),e._v(" "),a("li",[e._v("Bug fix: Exception when using URIs as a constant values in SPARQL.")]),e._v(" "),a("li",[e._v("Bug fix: Prefix Manager accepts any string including invalid prefix\nnames.")])]),e._v(" "),a("p",[e._v("Known issues:")]),e._v(" "),a("ul",[a("li",[e._v("The ORDER BY modifier is not ready for columns with literal datatype")]),e._v(" "),a("li",[e._v("Issues with MySQL in non-ANSI mode")]),e._v(" "),a("li",[e._v("DateTime data properties in Oracle can crash the system.")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-1529-june-12-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1529-june-12-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1529 (June 12, 2012)")]),e._v(" "),a("p",[a("strong",[e._v("-ontopPro- plugin")])]),e._v(" "),a("ul",[a("li",[e._v("Better layout, fonts and command icons.")]),e._v(" "),a("li",[e._v("Better query saving mechanism (Issue: #248)")]),e._v(" "),a("li",[e._v("Better error reporting to users and crash handling (Issue:\n#255, 256)")]),e._v(" "),a("li",[e._v("Pretty printing of SQL queries (Issue: #254)")]),e._v(" "),a("li",[e._v("Re-enabled the export function in the Query Interface panel (Issue:\n#213, #250)")]),e._v(" "),a("li",[e._v("Improved syntax-error messages in the mapping editor tooltip")]),e._v(" "),a("li",[e._v("Cleaned console messages")]),e._v(" "),a("li",[e._v('Added "Number of sources" indicator to show how many sources are\nalready declared in the OBDA model.')]),e._v(" "),a("li",[e._v("Improved ESC and CONTROL+ENTER shortcuts in most dialogs in the GUI.")]),e._v(" "),a("li",[e._v("Replaced JDBC Driver text box with an editable Combo Box with\ndefault driver string.")]),e._v(" "),a("li",[e._v("Better OBDA statistics table (Issue: #251)")]),e._v(" "),a("li",[e._v("Bug fix: CRITICAL stability issue that would rise an end-less cycle\nof warning messages when Quest crashed.")]),e._v(" "),a("li",[e._v('Bug fix: issue with final dot "." in mappings.')])]),e._v(" "),a("p",[a("strong",[e._v("-ontopQuest-")])]),e._v(" "),a("ul",[a("li",[e._v("Added support for data-type UUIDs for SQL Server (Issue: #253)")]),e._v(" "),a("li",[e._v("Now we create forward-only and concur-read-only JDBC Statements by\ndefault to allow for server side cursors.")]),e._v(" "),a("li",[e._v("Bug fix: issue with SQL parser and table renamings in SQL queries\n(Issue: #259)")]),e._v(" "),a("li",[e._v("Bug fix: issue with NULL pointer when primary key optimization in\nunfolding when there is a join on primary condition but atoms are\nnot unifiable.")])]),e._v(" "),a("p",[e._v("Known issues:")]),e._v(" "),a("ul",[a("li",[e._v("Oracle is unstable")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-1479-may-22-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1479-may-22-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1479 (May 22, 2012)")]),e._v(" "),a("p",[e._v("Quest performance and features:")]),e._v(" "),a("ul",[a("li",[e._v("T-Mappings algorithm optimization: Combine disjunctive conditions in\nOR clauses instead of multiple mappings. This reduces the size of\nthe final query and improves its performance. (Issue: #237)")])]),e._v(" "),a("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),a("ul",[a("li",[e._v("Support using IS NULL and IS NOT NULL in SQL query (Issue: #200).")]),e._v(" "),a("li",[e._v("Support using UNION in SPARQL queries.")])]),e._v(" "),a("p",[e._v("Bug Fixes:")]),e._v(" "),a("ul",[a("li",[e._v("Fix packing problem in Windows XP (Issue: #228)")]),e._v(" "),a("li",[e._v("Fix packing problem in Linux")]),e._v(" "),a("li",[e._v("Fix unresponsive plugin when using mapping filter (Issue: #217).")]),e._v(" "),a("li",[e._v("Fix unresponsive plugin when inserting a new mapping (Issue: #232).")]),e._v(" "),a("li",[e._v("Fix support for MySQL in both virtual and classic mode (Issue:\n#238).")]),e._v(" "),a("li",[e._v("Fix support for Oracle in virtual mode (Issue: #226).")]),e._v(" "),a("li",[e._v('Fix issue where creating or modifying a mapping would not trigger a\n"ontology out of synch" flag.')])]),e._v(" "),a("p",[e._v("Known Issue:")]),e._v(" "),a("ul",[a("li",[e._v("Oracle still has some issues in classic mode.")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-1446-may-4-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1446-may-4-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1446 (May 4, 2012)")]),e._v(" "),a("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),a("ul",[a("li",[e._v("Add support on writing qualified name for atom predicates.")]),e._v(" "),a("li",[e._v("Add coloring for atoms typed Individual in the target query.")])]),e._v(" "),a("p",[e._v("Bug Fixes:")]),e._v(" "),a("ul",[a("li",[e._v('Fix the "Show Short URIs" feature in the query panel.')])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-1440-may-2-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1440-may-2-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1440 (May 2, 2012)")]),e._v(" "),a("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),a("ul",[a("li",[e._v("Support writing URI constants in target queries (Issue: #227)")])]),e._v(" "),a("p",[e._v("General:")]),e._v(" "),a("ul",[a("li",[e._v("Better system logging for recording exceptions.")])]),e._v(" "),a("p",[e._v("Bug Fixes:")]),e._v(" "),a("ul",[a("li",[e._v("Fix the null pointer exception due to the old OBDA preferences.")]),e._v(" "),a("li",[e._v("Fix bugs related to vocabulary prefixes.")])]),e._v(" "),a("h2",{attrs:{id:"_1-7-alpha-rev-1427-april-17-2012"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-7-alpha-rev-1427-april-17-2012"}},[e._v("#")]),e._v(" 1.7-alpha-rev-1427 (April 17, 2012)")]),e._v(" "),a("p",[e._v("Quest performance and features:")]),e._v(" "),a("ul",[a("li",[e._v("Implemented the T-Mappings mapping optimization algorithm improved\nperformance of query rewriting in Virtual Mode. Now query rewriting\nis as fast in virtual ABox mode as in classic ABox mode (Issue:\n#169)")]),e._v(" "),a("li",[e._v("Implemented a new query containment algorithm that is many times\nfaster than before.")]),e._v(" "),a("li",[e._v("Added data source analysis to obtain DB metadata for SQL query\ngeneration.")]),e._v(" "),a("li",[e._v("Added analysis of SQL queries in the mappings to produce better SQL\nqueries.")]),e._v(" "),a("li",[e._v("Added "),a("strong",[e._v("SQL JOIN ELIMINATION")]),e._v(" using PRIMARY KEY metadata.")]),e._v(" "),a("li",[e._v("Added mappings optimization using query containment w.r.t.\nconstraints")]),e._v(" "),a("li",[e._v("Added initial support for "),a("strong",[e._v("FILTER")])]),e._v(" "),a("li",[e._v("Added support for typed constants in SPARQL queries (Issue: #157)")]),e._v(" "),a("li",[e._v("Small updates to internal API for speed of equality, hash and clone\ncomputation")])]),e._v(" "),a("p",[e._v("Mapping language features (Quest and ontopCore):")]),e._v(" "),a("ul",[a("li",[e._v("New Turtle-like syntax for mappings allows for more succinct and\neasy to read mappings.")]),e._v(" "),a("li",[e._v("Added support for LANGUAGE tag for the Literal datatype (Issue:\n#198)")]),e._v(" "),a("li",[e._v("Added support for datatypes in the OBDA mapping axioms (Issue:\n#147, #194, #196)")]),e._v(" "),a("li",[e._v("Added URI templates for URI creation in mapping mapping axioms\n(Issue: #151)")]),e._v(" "),a("li",[e._v("New feature for typing literals in mapping axioms (Issue: #194,\n#207)")])]),e._v(" "),a("p",[e._v("General:")]),e._v(" "),a("ul",[a("li",[e._v("Added support for OWL API 3 (Issue: #98)")]),e._v(" "),a("li",[e._v("Internal refactoring of all modules and packages for a cleaner API")])]),e._v(" "),a("p",[e._v("ontopPro:")]),e._v(" "),a("ul",[a("li",[e._v("The plugin is now compatible with Protege 4.1 (Issue: #99)")]),e._v(" "),a("li",[e._v("The plugin has a new and fresh GUI display.")]),e._v(" "),a("li",[e._v("Stronger integration with Protege's refactoring mechanism")]),e._v(" "),a("li",[e._v("The ABox materializer can import data complete with datatype\ninformation (Issue: #195)")]),e._v(" "),a("li",[e._v("The target query use Turtle syntax for better display and management\n(Issue: #204)")]),e._v(" "),a("li",[e._v("The plugin has Class/Property panel for better navigation and\nfiltering.")])]),e._v(" "),a("p",[e._v("Bug Fixes:")]),e._v(" "),a("ul",[a("li",[e._v("Fixed a problem with the encoding of axioms of the form\nsubClassOf(Person, hasFather some Person)")]),e._v(" "),a("li",[e._v("Fixed issues with open and dead JDBC connections")]),e._v(" "),a("li",[e._v("Cleaned OWLReasoner synchronization issue")]),e._v(" "),a("li",[e._v("Fixed null pointer exceptions related to incorrect mappings")]),e._v(" "),a("li",[e._v("Proper error handling for translating an empty datalog program\n(Issue: #197)")]),e._v(" "),a("li",[e._v('Fixed the "Attach Prefixes" feature in the OBDA Query panel\n(Issue: #211)')]),e._v(" "),a("li",[e._v("Fixed issue regarding xsd:dateTime (Issue: #199)")])]),e._v(" "),a("h2",{attrs:{id:"_1-6-1-october-19-2011"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-6-1-october-19-2011"}},[e._v("#")]),e._v(" 1.6.1 (October 19, 2011)")]),e._v(" "),a("ul",[a("li",[e._v("Fast patch in the query translation module.")])]),e._v(" "),a("h2",{attrs:{id:"_1-6-october-18-2011"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-6-october-18-2011"}},[e._v("#")]),e._v(" 1.6 (October 18, 2011)")]),e._v(" "),a("ul",[a("li",[e._v("Allow fast navigation using TAB key in the new mapping form (Issue:\n#92)")]),e._v(" "),a("li",[e._v("Allow SQL query execution in the mapping tree (Issue: #104)")]),e._v(" "),a("li",[e._v("Improvement in the error message deliveries (Issues: #107, #112,\n#118)")]),e._v(" "),a("li",[e._v('Improvement in the data source management tab, including adding\n"Test Connection" button (Issues: #108, #111, #114)')]),e._v(" "),a("li",[e._v("Add OBDA model statistics report (Issues: #106, #117)")]),e._v(" "),a("li",[e._v("Add support for adding integrated data source in Teiid (Issue: #89)")]),e._v(" "),a("li",[e._v("Fix the unresponsive cancel button during importing OWL Individuals\n(Issue: #88)")]),e._v(" "),a("li",[e._v("Fix CSV header in the exported query result (Issue: #120)")]),e._v(" "),a("li",[e._v("Fix connection failure when users change the parameters (Issue:\n#121)")]),e._v(" "),a("li",[e._v("Fix the password field so now the text is hidden (Issue: #113)")]),e._v(" "),a("li",[e._v("Fix query selection in the OBDA query tab (Issue: #91)")]),e._v(" "),a("li",[e._v("Fix import failure when storing very long record values (Issue:\n#95)")]),e._v(" "),a("li",[e._v("Fix import failure when storing records that contain single quotes\n(Issue: #96)")])]),e._v(" "),a("h2",{attrs:{id:"_1-5-1-rc1-july-15-2011"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-5-1-rc1-july-15-2011"}},[e._v("#")]),e._v(" 1.5.1-RC1 (July 15, 2011)")]),e._v(" "),a("ul",[a("li",[e._v("Significant code refactoring in the plugin. This effort makes the\ncode easier to debug and to extend, and is almost ready for Protege\n4.1 and OWL-API 3.0 support.")]),e._v(" "),a("li",[e._v("Term renaming. Modified the term 'Mapping Head' to 'Target\nQuery' and 'Mapping Body' to 'Source Query' to maintain the\nconsistency with the literature.")]),e._v(" "),a("li",[e._v("Temporarly disabled the SPARQL query coloring.")]),e._v(" "),a("li",[e._v("Temporarly disabled the 'Load OWL Individuals into DB'\nfunctionality.")]),e._v(" "),a("li",[e._v("Add improved search filters in the mapping manager (Issues: #37,\n#54).")]),e._v(" "),a("li",[e._v("Add 'show short URIs' option in the query results to hide long URI\nstrings.")]),e._v(" "),a("li",[e._v("Add 'select all', 'select none', 'expand all' and 'collapse\nall' buttons for easy browsing in the mapping tree (Issues: #35,\n#36).")]),e._v(" "),a("li",[e._v("Add mapping validation with respect to the vocabulary in the\nontology (Issues: #42).")]),e._v(" "),a("li",[e._v("Add input validation to many parts of the GUI (Issues: #63, #64,\n#65, #67, #68, #69, #70, #71, #76).")]),e._v(" "),a("li",[e._v("Fix the save query functionality in the Query manager (Issues:\n#57).")]),e._v(" "),a("li",[e._v("Fix the persistency of user preferences when opening/closing Protege\n(Issues: #58).")]),e._v(" "),a("li",[e._v("Fix the exceptions that appeared when loading/saving/reloading\nontologies (Issues: #59, #60, #61, #75).")]),e._v(" "),a("li",[e._v("Fix problems with several progress dialogs in the GUI (Issues: #50,\n#87).")]),e._v(" "),a("li",[e._v("Fix problems in the 'tuple count' functionality (Issues: #82,\n#84).")])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/62.da84513e.js b/assets/js/62.6fd12f06.js similarity index 99% rename from assets/js/62.da84513e.js rename to assets/js/62.6fd12f06.js index 04414d0f0..375d8fd6e 100644 --- a/assets/js/62.da84513e.js +++ b/assets/js/62.6fd12f06.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[62],{439:function(e,t,r){"use strict";r.r(t);var o=r(51),a=Object(o.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"faq"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),r("p",[e._v("Some Frequently Asked Questions")]),e._v(" "),r("h2",{attrs:{id:"general"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#general"}},[e._v("#")]),e._v(" General")]),e._v(" "),r("h3",{attrs:{id:"which-mapping-syntaxes-are-supported"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#which-mapping-syntaxes-are-supported"}},[e._v("#")]),e._v(" Which mapping syntaxes are supported?")]),e._v(" "),r("p",[e._v("We support "),r("a",{attrs:{href:"https://www.w3.org/TR/r2rml/",target:"_blank",rel:"noopener"}},[e._v("R2RML"),r("OutboundLink")],1),e._v(" and our own mapping syntax, which can be automatically converted into R2RML using Ontop CLI command "),r("a",{attrs:{href:"/guide/cli#ontop-mapping-to-r2rml"}},[r("code",[e._v("ontop mapping to-r2rml")])])]),e._v(" "),r("h3",{attrs:{id:"is-it-open-source"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#is-it-open-source"}},[e._v("#")]),e._v(" Is it open source?")]),e._v(" "),r("p",[e._v("Yes! Ontop is available under the Apache License, Version 2.0.")]),e._v(" "),r("h3",{attrs:{id:"how-can-i-report-a-bug-or-ask-other-questions"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-report-a-bug-or-ask-other-questions"}},[e._v("#")]),e._v(" How can I report a bug or ask other questions?")]),e._v(" "),r("p",[e._v("You can get in touch with us through "),r("a",{attrs:{href:"/community/support"}},[e._v("our support channels")]),e._v(" and "),r("RouterLink",{attrs:{to:"/community/contributing/"}},[e._v("contribute to the project")]),e._v("\nby, for instance, filing a "),r("a",{attrs:{href:"/community/contributing/bug-report"}},[e._v("bug report")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"does-ontop-support-sparql-update"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#does-ontop-support-sparql-update"}},[e._v("#")]),e._v(" Does Ontop support SPARQL Update?")]),e._v(" "),r("p",[e._v("No, as for now, Ontop is a read-only system, it does not support "),r("a",{attrs:{href:"https://www.w3.org/TR/sparql11-update/",target:"_blank",rel:"noopener"}},[e._v("SPARQL Update queries"),r("OutboundLink")],1),e._v(" but only SELECT, CONSTRUCT, ASK and DESCRIBE queries. For more details, see "),r("a",{attrs:{href:"/guide/compliance"}},[e._v("the compliance page")]),e._v(".")]),e._v(" "),r("h2",{attrs:{id:"protege"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#protege"}},[e._v("#")]),e._v(" Protégé")]),e._v(" "),r("h3",{attrs:{id:"no-suitable-driver-found-for-driver"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#no-suitable-driver-found-for-driver"}},[e._v("#")]),e._v(" No suitable driver found for .. (driver)")]),e._v(" "),r("p",[e._v("You need to download and install the right JDBC driver in Protégé.\nThis is required in order to query using SPARQL and use other features of Ontop. To add a new JDBC Driver:")]),e._v(" "),r("ul",[r("li",[e._v("in Protégé, go to "),r("em",[e._v("Preference")]),e._v(" -> "),r("em",[e._v("JDBC Drivers")]),e._v(" tab;")]),e._v(" "),r("li",[e._v("add a new entry;")]),e._v(" "),r("li",[e._v("type a description, e.g., "),r("em",[e._v("PostgreSQL JDBC Driver")]),e._v(";")]),e._v(" "),r("li",[e._v("type the driver’s class string, e.g., "),r("em",[e._v("org.postgresql.Driver")]),e._v(";")]),e._v(" "),r("li",[e._v("type or select the location of the driver’s JAR file, e.g., "),r("em",[e._v("postgresql-8.4-701.jdbc4.jar")]),e._v(";")]),e._v(" "),r("li",[e._v("click OK .")])]),e._v(" "),r("p",[e._v("See also\n"),r("a",{attrs:{href:"https://github.com/ontop/ontop/wiki/ontopProInstallation#setting-up-the-jdbc-drivers-in-protege",target:"_blank",rel:"noopener"}},[e._v("Setting up JDBC Drivers"),r("OutboundLink")],1),e._v("\nand "),r("a",{attrs:{href:"https://github.com/ontop/ontop/wiki/ObdalibPluginJDBC",target:"_blank",rel:"noopener"}},[e._v("JDBC Information"),r("OutboundLink")],1),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"no-jdbc-drivers-tab-in-the-preferences"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#no-jdbc-drivers-tab-in-the-preferences"}},[e._v("#")]),e._v(' No "JDBC drivers" tab in the preferences')]),e._v(" "),r("p",[e._v("You probably can see the following message in the Protégé console:")]),e._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[e._v("org.osgi.framework.BundleException: Activator start error in bundle org.protege.osgi.jdbc.prefs [20].)\norg.protege.osgi.jdbc.RegistryException: java.lang.ClassNotFoundException: org.h2.Driver\n")])])]),r("p",[e._v("Please go to the "),r("em",[e._v("Preferences")]),e._v(" and click on "),r("em",[e._v('"Reset preferences"')]),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"protege-does-not-show-the-ontop-tabs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#protege-does-not-show-the-ontop-tabs"}},[e._v("#")]),e._v(" Protégé does not show the Ontop tabs")]),e._v(" "),r("p",[e._v("To see the tabs go to "),r("em",[e._v("Windows -> tabs -> Ontop Mappings and Ontop SPARQL")]),e._v(".")]),e._v(" "),r("h2",{attrs:{id:"rdf4j-workbench-not-supported-anymore"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rdf4j-workbench-not-supported-anymore"}},[e._v("#")]),e._v(" RDF4J workbench (not supported anymore)")]),e._v(" "),r("h3",{attrs:{id:"why-rdf4j-workbench-refuses-to-delete-some-repositories"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#why-rdf4j-workbench-refuses-to-delete-some-repositories"}},[e._v("#")]),e._v(" Why RDF4J Workbench refuses to delete some repositories?")]),e._v(" "),r("p",[e._v("For deleting metadata about a repository, the RDF4J Workbench should be able to create an instance of this repository. However, if the repository configuration is invalid (due to, for instance to bad mapping and ontology files), such an instance cannot be created.\nTo avoid this situation, the configuration is validated in depth when a new repository is added to the Workbench. However, if the mapping and ontology files are changed afterwards, we offer no protection. One workaround is to create a valid repository with the same name and then to delete it. Another workaround is to delete it from the RDF4J console.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[62],{440:function(e,t,r){"use strict";r.r(t);var o=r(51),a=Object(o.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"faq"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),r("p",[e._v("Some Frequently Asked Questions")]),e._v(" "),r("h2",{attrs:{id:"general"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#general"}},[e._v("#")]),e._v(" General")]),e._v(" "),r("h3",{attrs:{id:"which-mapping-syntaxes-are-supported"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#which-mapping-syntaxes-are-supported"}},[e._v("#")]),e._v(" Which mapping syntaxes are supported?")]),e._v(" "),r("p",[e._v("We support "),r("a",{attrs:{href:"https://www.w3.org/TR/r2rml/",target:"_blank",rel:"noopener"}},[e._v("R2RML"),r("OutboundLink")],1),e._v(" and our own mapping syntax, which can be automatically converted into R2RML using Ontop CLI command "),r("a",{attrs:{href:"/guide/cli#ontop-mapping-to-r2rml"}},[r("code",[e._v("ontop mapping to-r2rml")])])]),e._v(" "),r("h3",{attrs:{id:"is-it-open-source"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#is-it-open-source"}},[e._v("#")]),e._v(" Is it open source?")]),e._v(" "),r("p",[e._v("Yes! Ontop is available under the Apache License, Version 2.0.")]),e._v(" "),r("h3",{attrs:{id:"how-can-i-report-a-bug-or-ask-other-questions"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-report-a-bug-or-ask-other-questions"}},[e._v("#")]),e._v(" How can I report a bug or ask other questions?")]),e._v(" "),r("p",[e._v("You can get in touch with us through "),r("a",{attrs:{href:"/community/support"}},[e._v("our support channels")]),e._v(" and "),r("RouterLink",{attrs:{to:"/community/contributing/"}},[e._v("contribute to the project")]),e._v("\nby, for instance, filing a "),r("a",{attrs:{href:"/community/contributing/bug-report"}},[e._v("bug report")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"does-ontop-support-sparql-update"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#does-ontop-support-sparql-update"}},[e._v("#")]),e._v(" Does Ontop support SPARQL Update?")]),e._v(" "),r("p",[e._v("No, as for now, Ontop is a read-only system, it does not support "),r("a",{attrs:{href:"https://www.w3.org/TR/sparql11-update/",target:"_blank",rel:"noopener"}},[e._v("SPARQL Update queries"),r("OutboundLink")],1),e._v(" but only SELECT, CONSTRUCT, ASK and DESCRIBE queries. For more details, see "),r("a",{attrs:{href:"/guide/compliance"}},[e._v("the compliance page")]),e._v(".")]),e._v(" "),r("h2",{attrs:{id:"protege"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#protege"}},[e._v("#")]),e._v(" Protégé")]),e._v(" "),r("h3",{attrs:{id:"no-suitable-driver-found-for-driver"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#no-suitable-driver-found-for-driver"}},[e._v("#")]),e._v(" No suitable driver found for .. (driver)")]),e._v(" "),r("p",[e._v("You need to download and install the right JDBC driver in Protégé.\nThis is required in order to query using SPARQL and use other features of Ontop. To add a new JDBC Driver:")]),e._v(" "),r("ul",[r("li",[e._v("in Protégé, go to "),r("em",[e._v("Preference")]),e._v(" -> "),r("em",[e._v("JDBC Drivers")]),e._v(" tab;")]),e._v(" "),r("li",[e._v("add a new entry;")]),e._v(" "),r("li",[e._v("type a description, e.g., "),r("em",[e._v("PostgreSQL JDBC Driver")]),e._v(";")]),e._v(" "),r("li",[e._v("type the driver’s class string, e.g., "),r("em",[e._v("org.postgresql.Driver")]),e._v(";")]),e._v(" "),r("li",[e._v("type or select the location of the driver’s JAR file, e.g., "),r("em",[e._v("postgresql-8.4-701.jdbc4.jar")]),e._v(";")]),e._v(" "),r("li",[e._v("click OK .")])]),e._v(" "),r("p",[e._v("See also\n"),r("a",{attrs:{href:"https://github.com/ontop/ontop/wiki/ontopProInstallation#setting-up-the-jdbc-drivers-in-protege",target:"_blank",rel:"noopener"}},[e._v("Setting up JDBC Drivers"),r("OutboundLink")],1),e._v("\nand "),r("a",{attrs:{href:"https://github.com/ontop/ontop/wiki/ObdalibPluginJDBC",target:"_blank",rel:"noopener"}},[e._v("JDBC Information"),r("OutboundLink")],1),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"no-jdbc-drivers-tab-in-the-preferences"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#no-jdbc-drivers-tab-in-the-preferences"}},[e._v("#")]),e._v(' No "JDBC drivers" tab in the preferences')]),e._v(" "),r("p",[e._v("You probably can see the following message in the Protégé console:")]),e._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[e._v("org.osgi.framework.BundleException: Activator start error in bundle org.protege.osgi.jdbc.prefs [20].)\norg.protege.osgi.jdbc.RegistryException: java.lang.ClassNotFoundException: org.h2.Driver\n")])])]),r("p",[e._v("Please go to the "),r("em",[e._v("Preferences")]),e._v(" and click on "),r("em",[e._v('"Reset preferences"')]),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"protege-does-not-show-the-ontop-tabs"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#protege-does-not-show-the-ontop-tabs"}},[e._v("#")]),e._v(" Protégé does not show the Ontop tabs")]),e._v(" "),r("p",[e._v("To see the tabs go to "),r("em",[e._v("Windows -> tabs -> Ontop Mappings and Ontop SPARQL")]),e._v(".")]),e._v(" "),r("h2",{attrs:{id:"rdf4j-workbench-not-supported-anymore"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#rdf4j-workbench-not-supported-anymore"}},[e._v("#")]),e._v(" RDF4J workbench (not supported anymore)")]),e._v(" "),r("h3",{attrs:{id:"why-rdf4j-workbench-refuses-to-delete-some-repositories"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#why-rdf4j-workbench-refuses-to-delete-some-repositories"}},[e._v("#")]),e._v(" Why RDF4J Workbench refuses to delete some repositories?")]),e._v(" "),r("p",[e._v("For deleting metadata about a repository, the RDF4J Workbench should be able to create an instance of this repository. However, if the repository configuration is invalid (due to, for instance to bad mapping and ontology files), such an instance cannot be created.\nTo avoid this situation, the configuration is validated in depth when a new repository is added to the Workbench. However, if the mapping and ontology files are changed afterwards, we offer no protection. One workaround is to create a valid repository with the same name and then to delete it. Another workaround is to delete it from the RDF4J console.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/63.88b74908.js b/assets/js/63.ab25da0d.js similarity index 97% rename from assets/js/63.88b74908.js rename to assets/js/63.ab25da0d.js index 9abbc6446..b805c854a 100644 --- a/assets/js/63.88b74908.js +++ b/assets/js/63.ab25da0d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{440:function(t,e,r){"use strict";r.r(e);var o=r(51),n=Object(o.a)({},(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"work-with-us"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#work-with-us"}},[t._v("#")]),t._v(" Work with us")]),t._v(" "),r("p",[t._v("if you are enthusiastic in the Ontop system and the Virtual Knowledge Graph technology,\nthere are many opportunities, which range from a small course project, to a complete PhD study, or a full time developer position.")]),t._v(" "),r("h2",{attrs:{id:"free-university-of-bozen-bolzano"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#free-university-of-bozen-bolzano"}},[t._v("#")]),t._v(" Free University of Bozen-Bolzano")]),t._v(" "),r("p",[t._v("At the "),r("a",{attrs:{href:"https://www.inf.unibz.it/krdb/in2data/",target:"_blank",rel:"noopener"}},[t._v("In2Data research group"),r("OutboundLink")],1),t._v(" at the KBDB group of Free University of Bozen-Bolzano, we are offering:")]),t._v(" "),r("ul",[r("li",[t._v("Student course project")]),t._v(" "),r("li",[t._v("Bachelor/Master thesis")]),t._v(" "),r("li",[t._v("PhD student positions ("),r("a",{attrs:{href:"https://www.inf.unibz.it/krdb/phd/",target:"_blank",rel:"noopener"}},[t._v("https://www.inf.unibz.it/krdb/phd/"),r("OutboundLink")],1),t._v(")")]),t._v(" "),r("li",[t._v("Research assistant / Scientific programmer / PostDoc researcher positions")])]),t._v(" "),r("p",[t._v("If you are interested, please get in touch with "),r("a",{attrs:{href:"http://www.inf.unibz.it/~calvanese/",target:"_blank",rel:"noopener"}},[t._v("Prof. Diego Calvanese"),r("OutboundLink")],1),t._v(" or "),r("a",{attrs:{href:"https://www.ghxiao.org/",target:"_blank",rel:"noopener"}},[t._v("Dr. Guohui Xiao"),r("OutboundLink")],1),t._v(".")]),t._v(" "),r("h2",{attrs:{id:"ontopic"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#ontopic"}},[t._v("#")]),t._v(" Ontopic")]),t._v(" "),r("p",[t._v("At the company "),r("a",{attrs:{href:"https://ontopic.ai/",target:"_blank",rel:"noopener"}},[t._v("Ontopic s.r.l."),r("OutboundLink")],1),t._v(", we are offering:")]),t._v(" "),r("ul",[r("li",[t._v("Student internship")]),t._v(" "),r("li",[t._v("Bachelor/Master thesis")]),t._v(" "),r("li",[t._v("Part time or full time developer positions.")])]),t._v(" "),r("p",[t._v("If you are interested, please get in touch with "),r("code",[t._v("inquiry@ontopic.ai")]),t._v(".")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{439:function(t,e,r){"use strict";r.r(e);var o=r(51),n=Object(o.a)({},(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"work-with-us"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#work-with-us"}},[t._v("#")]),t._v(" Work with us")]),t._v(" "),r("p",[t._v("if you are enthusiastic in the Ontop system and the Virtual Knowledge Graph technology,\nthere are many opportunities, which range from a small course project, to a complete PhD study, or a full time developer position.")]),t._v(" "),r("h2",{attrs:{id:"free-university-of-bozen-bolzano"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#free-university-of-bozen-bolzano"}},[t._v("#")]),t._v(" Free University of Bozen-Bolzano")]),t._v(" "),r("p",[t._v("At the "),r("a",{attrs:{href:"https://www.inf.unibz.it/krdb/in2data/",target:"_blank",rel:"noopener"}},[t._v("In2Data research group"),r("OutboundLink")],1),t._v(" at the KBDB group of Free University of Bozen-Bolzano, we are offering:")]),t._v(" "),r("ul",[r("li",[t._v("Student course project")]),t._v(" "),r("li",[t._v("Bachelor/Master thesis")]),t._v(" "),r("li",[t._v("PhD student positions ("),r("a",{attrs:{href:"https://www.inf.unibz.it/krdb/phd/",target:"_blank",rel:"noopener"}},[t._v("https://www.inf.unibz.it/krdb/phd/"),r("OutboundLink")],1),t._v(")")]),t._v(" "),r("li",[t._v("Research assistant / Scientific programmer / PostDoc researcher positions")])]),t._v(" "),r("p",[t._v("If you are interested, please get in touch with "),r("a",{attrs:{href:"http://www.inf.unibz.it/~calvanese/",target:"_blank",rel:"noopener"}},[t._v("Prof. Diego Calvanese"),r("OutboundLink")],1),t._v(" or "),r("a",{attrs:{href:"https://www.ghxiao.org/",target:"_blank",rel:"noopener"}},[t._v("Dr. Guohui Xiao"),r("OutboundLink")],1),t._v(".")]),t._v(" "),r("h2",{attrs:{id:"ontopic"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#ontopic"}},[t._v("#")]),t._v(" Ontopic")]),t._v(" "),r("p",[t._v("At the company "),r("a",{attrs:{href:"https://ontopic.ai/",target:"_blank",rel:"noopener"}},[t._v("Ontopic s.r.l."),r("OutboundLink")],1),t._v(", we are offering:")]),t._v(" "),r("ul",[r("li",[t._v("Student internship")]),t._v(" "),r("li",[t._v("Bachelor/Master thesis")]),t._v(" "),r("li",[t._v("Part time or full time developer positions.")])]),t._v(" "),r("p",[t._v("If you are interested, please get in touch with "),r("code",[t._v("inquiry@ontopic.ai")]),t._v(".")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/64.62ca893d.js b/assets/js/64.ef1c6023.js similarity index 89% rename from assets/js/64.62ca893d.js rename to assets/js/64.ef1c6023.js index 5a5baf88c..59bd18795 100644 --- a/assets/js/64.62ca893d.js +++ b/assets/js/64.ef1c6023.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{443:function(t,s,a){"use strict";a.r(s);var o=a(51),e=Object(o.a)({},(function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("h1",{attrs:{id:"vocabularies-for-ontology-based-data-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#vocabularies-for-ontology-based-data-access"}},[this._v("#")]),this._v(" Vocabularies for Ontology-Based Data Access")]),this._v(" "),s("p",[this._v("Coming soon!")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{441:function(t,s,a){"use strict";a.r(s);var o=a(51),e=Object(o.a)({},(function(){var t=this.$createElement,s=this._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[s("h1",{attrs:{id:"vocabularies-for-ontology-based-data-access"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#vocabularies-for-ontology-based-data-access"}},[this._v("#")]),this._v(" Vocabularies for Ontology-Based Data Access")]),this._v(" "),s("p",[this._v("Coming soon!")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/65.7c651a30.js b/assets/js/65.1955838d.js similarity index 98% rename from assets/js/65.7c651a30.js rename to assets/js/65.1955838d.js index 0440bbe4f..982cf7ec3 100644 --- a/assets/js/65.7c651a30.js +++ b/assets/js/65.1955838d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{441:function(e,t,a){"use strict";a.r(t);var r=a(51),n=Object(r.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"research-team"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#research-team"}},[e._v("#")]),e._v(" Research team")]),e._v(" "),a("p",[e._v("Ontop is a project initiated by Diego Calvanese and Mariano Rodriguez-Muro in 2009 in "),a("a",{attrs:{href:"https://www.inf.unibz.it/krdb/",target:"_blank",rel:"noopener"}},[e._v("the KRDB research centre for Knowledge and Data"),a("OutboundLink")],1),e._v(" at "),a("a",{attrs:{href:"https://www.unibz.it/en/faculties/computer-science/",target:"_blank",rel:"noopener"}},[e._v("the Free University of Bolzano"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("p",[e._v("A decade after, Ontop remains very active, both from a research and a software development point of view.")]),e._v(" "),a("h2",{attrs:{id:"researchers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#researchers"}},[e._v("#")]),e._v(" Researchers")]),e._v(" "),a("p",[e._v("Here we list the people who has been involved in the research side of the Ontop project.\nFor the development side, see "),a("a",{attrs:{href:"/community"}},[e._v("the community page")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"at-the-free-university-of-bozen-bolzano-unibz"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#at-the-free-university-of-bozen-bolzano-unibz"}},[e._v("#")]),e._v(" At the Free University of Bozen-Bolzano (Unibz)")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"http://www.ghxiao.org",target:"_blank",rel:"noopener"}},[e._v("Assistant Prof. Dr. Guohui Xiao"),a("OutboundLink")],1),e._v(" (Team Leader)")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.inf.unibz.it/~calvanese/",target:"_blank",rel:"noopener"}},[e._v("Prof. Dr. Diego Calvanese"),a("OutboundLink")],1),e._v(" (Scientific Coordinator)")]),e._v(" "),a("li",[e._v("Dr. Julien Corman")]),e._v(" "),a("li",[e._v("Dr. Linfang Ding")]),e._v(" "),a("li",[e._v("Dr. Davide Lanti")])]),e._v(" "),a("h3",{attrs:{id:"international-collaborations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#international-collaborations"}},[e._v("#")]),e._v(" International collaborations")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"http://www.dcs.bbk.ac.uk/~roman/",target:"_blank",rel:"noopener"}},[e._v("Dr. Roman Kontchakov"),a("OutboundLink")],1),e._v(" (Birkbeck, University of London, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.dcs.bbk.ac.uk/~michael/",target:"_blank",rel:"noopener"}},[e._v("Prof. Dr. Michael Zakharyaschev"),a("OutboundLink")],1),e._v(" (Birkbeck, University of London, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://www.dcs.bbk.ac.uk/~vlad/",target:"_blank",rel:"noopener"}},[e._v("Dr. Vladislav Ryzhikov"),a("OutboundLink")],1),e._v(" (Birkbeck, University of London, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.ii.uib.no/~dagh/",target:"_blank",rel:"noopener"}},[e._v("Dr. Dag Hovland"),a("OutboundLink")],1),e._v(" (Institutt for informatikk Universitetet i Oslo, Norway)")])]),e._v(" "),a("h3",{attrs:{id:"alumni-researchers-from-unibz"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#alumni-researchers-from-unibz"}},[e._v("#")]),e._v(" Alumni researchers from Unibz")]),e._v(" "),a("ul",[a("li",[e._v("Dr. Mariano Rodríguez-Muro (Google USA / Founder / Former Team Leader: 2011 – Oct. 2013)")]),e._v(" "),a("li",[e._v("Dr. Martin Rezk (Google USA / Former Team Leader: Oct. 2013 – Nov. 2015)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://www.kent.ac.uk/computing/people/3838/botoeva-elena",target:"_blank",rel:"noopener"}},[e._v("Dr. Elena Botoeva"),a("OutboundLink")],1),e._v(" (University of Kent, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://research.bcgl.fr",target:"_blank",rel:"noopener"}},[e._v("Dr. Benjamin Cogrel"),a("OutboundLink")],1),e._v(" ("),a("a",{attrs:{href:"https://ontopic.ai",target:"_blank",rel:"noopener"}},[e._v("Ontopic"),a("OutboundLink")],1),e._v(", Bolzano)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://scholar.google.it/citations?user=WYEhpZYAAAAJ&hl=en",target:"_blank",rel:"noopener"}},[e._v("Dr. Elem Güzel Kalaycı"),a("OutboundLink")],1),e._v(" (Virtual Vehicle Research GmbH, Austria)")])]),e._v(" "),a("h2",{attrs:{id:"projects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#projects"}},[e._v("#")]),e._v(" Projects")]),e._v(" "),a("p",[e._v("The development and the research around Ontop over the years have been mainly funded by research projects.")]),e._v(" "),a("h3",{attrs:{id:"past-projects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#past-projects"}},[e._v("#")]),e._v(" Past projects")]),e._v(" "),a("ul",[a("li",[e._v("Thinking ONtologiES (TONES), EU FET project")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://optique-project.eu/",target:"_blank",rel:"noopener"}},[e._v("Optique"),a("OutboundLink")],1),e._v(" (Scalable End-User Access to Big Data) FP7 project")]),e._v(" "),a("li",[e._v("Ontology-based Data Access to NoSQL Database (OBDAM), Unibz project")]),e._v(" "),a("li",[e._v("Ontology-based analysis of temporal and streaming data (OBATS), Unibz project")])]),e._v(" "),a("h3",{attrs:{id:"current-projects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#current-projects"}},[e._v("#")]),e._v(" Current projects")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"http://www.inode-project.eu/",target:"_blank",rel:"noopener"}},[e._v("INODE"),a("OutboundLink")],1),e._v(" (data management infrastructures), H2020 EU project")]),e._v(" "),a("li",[e._v("High quality Open data Publishing and Enrichment (HOPE), Italian national PRIN (Research Projects of National Relevance)")]),e._v(" "),a("li",[e._v("PACMEL (VKG for process mining), CHIST-ERA EU Project")]),e._v(" "),a("li",[e._v("IDEE (data integration in the energy sector), FESR Project")]),e._v(" "),a("li",[e._v("GeoVKG (geo-spatial VKG), Unibz project")]),e._v(" "),a("li",[e._v("High Quality Data Integration with Ontologies (QUADRO), Unibz project")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{442:function(e,t,a){"use strict";a.r(t);var r=a(51),n=Object(r.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"research-team"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#research-team"}},[e._v("#")]),e._v(" Research team")]),e._v(" "),a("p",[e._v("Ontop is a project initiated by Diego Calvanese and Mariano Rodriguez-Muro in 2009 in "),a("a",{attrs:{href:"https://www.inf.unibz.it/krdb/",target:"_blank",rel:"noopener"}},[e._v("the KRDB research centre for Knowledge and Data"),a("OutboundLink")],1),e._v(" at "),a("a",{attrs:{href:"https://www.unibz.it/en/faculties/computer-science/",target:"_blank",rel:"noopener"}},[e._v("the Free University of Bolzano"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("p",[e._v("A decade after, Ontop remains very active, both from a research and a software development point of view.")]),e._v(" "),a("h2",{attrs:{id:"researchers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#researchers"}},[e._v("#")]),e._v(" Researchers")]),e._v(" "),a("p",[e._v("Here we list the people who has been involved in the research side of the Ontop project.\nFor the development side, see "),a("a",{attrs:{href:"/community"}},[e._v("the community page")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"at-the-free-university-of-bozen-bolzano-unibz"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#at-the-free-university-of-bozen-bolzano-unibz"}},[e._v("#")]),e._v(" At the Free University of Bozen-Bolzano (Unibz)")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"http://www.ghxiao.org",target:"_blank",rel:"noopener"}},[e._v("Assistant Prof. Dr. Guohui Xiao"),a("OutboundLink")],1),e._v(" (Team Leader)")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.inf.unibz.it/~calvanese/",target:"_blank",rel:"noopener"}},[e._v("Prof. Dr. Diego Calvanese"),a("OutboundLink")],1),e._v(" (Scientific Coordinator)")]),e._v(" "),a("li",[e._v("Dr. Julien Corman")]),e._v(" "),a("li",[e._v("Dr. Linfang Ding")]),e._v(" "),a("li",[e._v("Dr. Davide Lanti")])]),e._v(" "),a("h3",{attrs:{id:"international-collaborations"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#international-collaborations"}},[e._v("#")]),e._v(" International collaborations")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"http://www.dcs.bbk.ac.uk/~roman/",target:"_blank",rel:"noopener"}},[e._v("Dr. Roman Kontchakov"),a("OutboundLink")],1),e._v(" (Birkbeck, University of London, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.dcs.bbk.ac.uk/~michael/",target:"_blank",rel:"noopener"}},[e._v("Prof. Dr. Michael Zakharyaschev"),a("OutboundLink")],1),e._v(" (Birkbeck, University of London, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://www.dcs.bbk.ac.uk/~vlad/",target:"_blank",rel:"noopener"}},[e._v("Dr. Vladislav Ryzhikov"),a("OutboundLink")],1),e._v(" (Birkbeck, University of London, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.ii.uib.no/~dagh/",target:"_blank",rel:"noopener"}},[e._v("Dr. Dag Hovland"),a("OutboundLink")],1),e._v(" (Institutt for informatikk Universitetet i Oslo, Norway)")])]),e._v(" "),a("h3",{attrs:{id:"alumni-researchers-from-unibz"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#alumni-researchers-from-unibz"}},[e._v("#")]),e._v(" Alumni researchers from Unibz")]),e._v(" "),a("ul",[a("li",[e._v("Dr. Mariano Rodríguez-Muro (Google USA / Founder / Former Team Leader: 2011 – Oct. 2013)")]),e._v(" "),a("li",[e._v("Dr. Martin Rezk (Google USA / Former Team Leader: Oct. 2013 – Nov. 2015)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://www.kent.ac.uk/computing/people/3838/botoeva-elena",target:"_blank",rel:"noopener"}},[e._v("Dr. Elena Botoeva"),a("OutboundLink")],1),e._v(" (University of Kent, UK)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://research.bcgl.fr",target:"_blank",rel:"noopener"}},[e._v("Dr. Benjamin Cogrel"),a("OutboundLink")],1),e._v(" ("),a("a",{attrs:{href:"https://ontopic.ai",target:"_blank",rel:"noopener"}},[e._v("Ontopic"),a("OutboundLink")],1),e._v(", Bolzano)")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://scholar.google.it/citations?user=WYEhpZYAAAAJ&hl=en",target:"_blank",rel:"noopener"}},[e._v("Dr. Elem Güzel Kalaycı"),a("OutboundLink")],1),e._v(" (Virtual Vehicle Research GmbH, Austria)")])]),e._v(" "),a("h2",{attrs:{id:"projects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#projects"}},[e._v("#")]),e._v(" Projects")]),e._v(" "),a("p",[e._v("The development and the research around Ontop over the years have been mainly funded by research projects.")]),e._v(" "),a("h3",{attrs:{id:"past-projects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#past-projects"}},[e._v("#")]),e._v(" Past projects")]),e._v(" "),a("ul",[a("li",[e._v("Thinking ONtologiES (TONES), EU FET project")]),e._v(" "),a("li",[a("a",{attrs:{href:"http://optique-project.eu/",target:"_blank",rel:"noopener"}},[e._v("Optique"),a("OutboundLink")],1),e._v(" (Scalable End-User Access to Big Data) FP7 project")]),e._v(" "),a("li",[e._v("Ontology-based Data Access to NoSQL Database (OBDAM), Unibz project")]),e._v(" "),a("li",[e._v("Ontology-based analysis of temporal and streaming data (OBATS), Unibz project")])]),e._v(" "),a("h3",{attrs:{id:"current-projects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#current-projects"}},[e._v("#")]),e._v(" Current projects")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"http://www.inode-project.eu/",target:"_blank",rel:"noopener"}},[e._v("INODE"),a("OutboundLink")],1),e._v(" (data management infrastructures), H2020 EU project")]),e._v(" "),a("li",[e._v("High quality Open data Publishing and Enrichment (HOPE), Italian national PRIN (Research Projects of National Relevance)")]),e._v(" "),a("li",[e._v("PACMEL (VKG for process mining), CHIST-ERA EU Project")]),e._v(" "),a("li",[e._v("IDEE (data integration in the energy sector), FESR Project")]),e._v(" "),a("li",[e._v("GeoVKG (geo-spatial VKG), Unibz project")]),e._v(" "),a("li",[e._v("High Quality Data Integration with Ontologies (QUADRO), Unibz project")])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/66.494844b3.js b/assets/js/66.a8296a9b.js similarity index 99% rename from assets/js/66.494844b3.js rename to assets/js/66.a8296a9b.js index 39bfda1d7..23593ac86 100644 --- a/assets/js/66.494844b3.js +++ b/assets/js/66.a8296a9b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{442:function(e,n,t){"use strict";t.r(n);var a=t(51),i=Object(a.a)({},(function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"formal-characterization-of-iqs"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#formal-characterization-of-iqs"}},[e._v("#")]),e._v(" Formal characterization of IQs")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("TODO: CHECK/UPDATE (2 years old and formatted in AsciiDocs)")])]),e._v(" "),t("p",[e._v("This section aims at providing a more precise characterization of an "),t("em",[e._v("intermediate query")]),e._v(" ("),t("em",[e._v("IQ")]),e._v(" in what follows),\nwhich is the main query representation format used internally in Ontop.")]),e._v(" "),t("p",[e._v("An IQ is a standard (rooted and ordered) tree representation of an algebraic query expression.\nMore exactly,\nfor each node N of a well-formed IQ Q,\nthe maximal subtree or Q rooted in N represents a valid algebraic expression.")]),e._v(" "),t("p",[e._v("In order to give a more precise characterization of this algebra,\nwe will rely on its similarity with Relational Algebra ("),t("em",[e._v("RA")]),e._v(" in what follows),\nmore exactly the select/project/join/rename/union RA with named attributes (and no duplicate attribute),\nextended with additional operators supported by SQL DBMS (and relevant for Ontop's setting).\nThese additional operators are:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("left outer join (which corresponds to the SPARQL OPTIONAL operator),\nand")])]),e._v(" "),t("li",[t("p",[e._v("extended projection")])])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),t("p",[e._v("As of now, difference is not supported.")])]),e._v(" "),t("p",[e._v("For readability,\nsome similarities with the SPARQL language will also be (informally) higlighted.")]),e._v(" "),t("p",[e._v("NOTE: This is only one possible way of characterizing the meaning of an IQ.\nOther options would be for instance relying on (a customized version of) the SPARQL algebra,\nor defining from scratch a full-fledged semantic.")]),e._v(" "),t("p",[e._v("link:notation[The first section] introduces some notational conventions,\nwhereas the following ones present the different types of nodes which may appear in an IQ,\nand how they relate to RA operands and operators.\nIn order to simplify notation,\ntheir interpretation is first given in terms of set semantics (which is also the standard interpretation of RA).")]),e._v(" "),t("p",[e._v("The extension to bag semantics has specific implications in an OBDA setting,\nand is discussed in link:bagSemantics[a dedicated Section].")]),e._v(" "),t("h2",{attrs:{id:"notation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#notation"}},[e._v("#")]),e._v(" Notation")]),e._v(" "),t("h3",{attrs:{id:"interpretation-of-algebraic-expressions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#interpretation-of-algebraic-expressions"}},[e._v("#")]),e._v(" Interpretation of algebraic expressions")]),e._v(" "),t("p",[e._v("We assume the following mutually disjoint sets:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("a countably infinite domain D being queried,")])]),e._v(" "),t("li",[t("p",[e._v("a countably infinite set V of variables names (similar to SPARQL variables,\nor to a lesser extent to RA attribute names).")])]),e._v(" "),t("li",[t("p",[e._v("a finite set P of predicates,\nand")])]),e._v(" "),t("li",[t("p",[e._v("For each p ∈ P with arity n > 0,\na set {p_1, .., p_n} of base attribute names.")])])]),e._v(" "),t("p",[e._v("A database instance will be viewed as a total function I over P,\nwhich,\nto each element p of its domain,\nassociates a set I(p) of partial functions from {p_1, .., p_n} to D.")]),e._v(" "),t("p",[e._v("The "),t("em",[e._v("signature")]),e._v(" sig(M) of an algebraic query expression M is the set of its base operands,\nand it is assumed that for any well-formed M,\nsig(M) ⊆ P holds.")]),e._v(" "),t("p",[e._v("Given a database instance I over P,\nthe "),t("em",[e._v("interpretation")]),e._v(" ||M|| of a well-formed algebraic expression M is built inductively out of all I(p) such that p ∈ sig(M),\nby application of algebraic operators.\nTo each element of its domain,\n||.|| associates a (possibly empty) set of partial functions from a unique subset var(M) of V to D.\nvar(M) will be called the "),t("em",[e._v("projected variables")]),e._v(" of M,\nand does not depend on ||.||,\nbut only on M.")]),e._v(" "),t("h3",{attrs:{id:"interpretation-of-iq-nodes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#interpretation-of-iq-nodes"}},[e._v("#")]),e._v(" Interpretation of IQ nodes")]),e._v(" "),t("p",[e._v("If Q is a well-formed IQ,\nthen nodes(Q) will designate its nodes.\nAnd by extension,\nif N ∈ nodes(Q),\nthen sig(N) (resp. ||N|| and var(N)) will designate the signature (resp. the interpretation and the projected variables) of the algebraic expression represented by (the maximal subtree of Q rooted in) N.")]),e._v(" "),t("h3",{attrs:{id:"boolean-expressions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#boolean-expressions"}},[e._v("#")]),e._v(" Boolean expressions")]),e._v(" "),t("p",[e._v("A "),t("em",[e._v("boolean expression")]),e._v(" in what follows designates a quantifier-free first-order formula,\nwith variables in V,\nconstants in D and predicates among the ones listed link:[in the dedicated section].")]),e._v(" "),t("p",[e._v("For instance,\nx ≠ y,\n(x ≥ 2) ∨ (x = z) and IsNotNull(x) are valid expressions.")]),e._v(" "),t("p",[e._v('Given a boolean expression φ and a partial function f : V ↦ D,\nthe formula φ[f] is obtained by replacing each variable x appearing in φ by f(x) if defined,\nand by NULL otherwise.\nThen the valuation val(φ[f]) of φ[f] corresponds to the one expected in SQL,\nand operators like "=" or ≥ are polymorphic.\nFor instance,\nfor any d ∈ D,\nval(d ≤ d) = TRUE,\nval(d ≠= d) = FALSE,\nval(NULL = d) = UNKNOWN,\nval(NULL ≤ d) = UNKNOWN,\netc.,')]),e._v(" "),t("p",[e._v("These boolean expressions are explicit RA selection conditions.\nImplicit selection conditions (exclusively equality between variables and/or constant) may also be expressed,\nfor instance by joining two algebraic expressions with shared variables (natural join).")]),e._v(" "),t("h2",{attrs:{id:"leaf-node-types"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#leaf-node-types"}},[e._v("#")]),e._v(" Leaf node types")]),e._v(" "),t("h3",{attrs:{id:"data-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#data-node"}},[e._v("#")]),e._v(" Data node")]),e._v(" "),t("p",[e._v("Data nodes are prototypical leaf nodes of IQs.\nIntuitively,\na data node is similar to a SPARQL triple pattern,\nbut extended to n-uples.")]),e._v(" "),t("p",[e._v("Equivalently,\na data node may represent the application to some p ∈ P of a (possibly trivial) selection (σ in RA),\nfollowed by a variable renaming (ρ in RA).")]),e._v(" "),t("p",[e._v("Internally,\na data node N is characterized (using logical notation) with an expression of the form p(v~1~, .., v~n~),\nwhere p ∈ P,\nand each v~i~ is either a constant or a variable,\ni.e. v~i~ ∈ D ∪ V.\nIn addition,\nwe have var(N) = {v~1~, .., v~n~} ∩ V.")]),e._v(" "),t("p",[e._v("Constants and repeated variable names express selection in the expected way.")]),e._v(" "),t("p",[e._v("For instance,\nif N is characterized by p(x,x),\nthen it represents the RA expression ρ~[x/p1,x/p2]~ (σ~[p1=p2]~ p).")]),e._v(" "),t("p",[e._v("Therefore,\nif I(p) = { {p1 ↦ 1, p2 ↦ 2}, {p1 ↦ 3, p2 ↦ 3} },\nthen ||N|| = { {p1 ↦ 3, p2 ↦ 3} } will hold.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Second order queries")]),e._v(" "),t("p",[e._v('SPARQL triple patterns allow for querying over the name of an RDF property,\ni.e. the name of a binary predicate.\nIn an IQ,\nthe data node corresponding to such a triple pattern is characterized by a ternary predicate with a meaningless predicate name (currently "triple"),\nand the property name variable as first argument.\nFor instance,\na data node encoding the SPARQL triple pattern ?s ?p ?o (where ?p stands for RDF property names) will be characterized by the expression triple(p,s,o).')]),e._v(" "),t("p",[e._v('This mechanism may be extended in future versions to all predicates.\nIn other words,\nP may be reduced to a set of one predicate per arity ("pair", "triple, "quadruple", etc),\nwith the current (n-1 ary) predicate names as first argument.')])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Intensional VS extensional data nodes")]),e._v(" "),t("p",[e._v("Todo")])]),e._v(" "),t("h3",{attrs:{id:"empty-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#empty-node"}},[e._v("#")]),e._v(" Empty node")]),e._v(" "),t("p",[e._v("An empty node E can be viewed as a specific kind of data node (whether it should be considered as intensional or extensional is not important).\nThe evaluation of the subquery rooted in E will always be (similar to) the RA n-ary empty relation,\nwith n ≥ 0.")]),e._v(" "),t("p",[e._v("In other words,\nfor any database instance,\n||E|| = {} holds (although var(E) may be nonempty).")]),e._v(" "),t("p",[e._v("Alternatively,\nif var(E) = {v~1~, .., v~n~},\nassuming some p ∈ P with arity n,\n(the subtree whose only node is) E can be viewed as representing the RA expression ρ~[v1/p1,..,vn/pn]~ (σ~FALSE~ p).")]),e._v(" "),t("p",[e._v("The behavior of ||E|| as an operand is similar to the behavior of an empty relation in RA.\nIn particular (see link:nonLeafNodes[the dedicated sections] below for the definitions of the corresponding operators):")]),e._v(" "),t("ul",[t("li",[e._v("(Left and right) identity element for union: ||E UNION M|| = ||M||,\nfor any M s.t. var(M) = var(E)")]),e._v(" "),t("li",[e._v("(Left and right) absorbing element for a natural join: ||E JOIN M|| = ||E||,\nfor any M")]),e._v(" "),t("li",[e._v("Left absorbing for left outer join,\nand right identity element if there is no join condition,\nor if the condition is met (right absorbing otherwise)")]),e._v(" "),t("li",[e._v("Fixpoint for selection.")])]),e._v(" "),t("h3",{attrs:{id:"true-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#true-node"}},[e._v("#")]),e._v(" True node")]),e._v(" "),t("p",[e._v("True nodes represent another limit case.\nThe evaluation of the subquery rooted in a true node T will always be (similar to) the RA nonempty but 0-ary relation.\nOr in other words,\nvar(T) = {},\nand for any database instance,\n||T|| = {f},\nwhere f has an empty domain.")]),e._v(" "),t("p",[e._v("The behavior of ||T|| as an operand is in most cases similar to the behavior of its RA counterpart.\nIn particular (see link:nonLeafNodes[the dedicated sections] below for the definitions of the corresponding operators):")]),e._v(" "),t("ul",[t("li",[e._v("(Left and right) identity element for a natural join: ||T JOIN M|| = ||M||,\nfor any M")]),e._v(" "),t("li",[e._v("||T UNION T|| = ||T|| (see the section about link:bagSemantics[bag semantics] for the treatment of cardinalities in this specific case).")])]),e._v(" "),t("p",[e._v("As expected,\nT is also the right identity element for the left outer join operator:")]),e._v(" "),t("ul",[t("li",[e._v("||M LEFT JOIN T|| = ||M||,\nfor any M.")])]),e._v(" "),t("p",[e._v("In the case where T is the left operand,\nwe have:")]),e._v(" "),t("ul",[t("li",[e._v("||T LEFT JOIN M|| = ||M||,\nif ||M|| ≠ {}")]),e._v(" "),t("li",[e._v("||T LEFT JOIN M|| = ||T|| otherwise.")])]),e._v(" "),t("p",[e._v("Note that in RA,\nbecause the left outer join operator is traditionally defined in terms of join,\nprojection,\nunion and difference,\nthese two queries would be syntactically invalid (implying a difference and a union of two relations with different arities).\nIn IQs on the other hand,\nthe left outer join is viewed as a primitive operator.")]),e._v(" "),t("h2",{attrs:{id:"non-leaf-node-types"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#non-leaf-node-types"}},[e._v("#")]),e._v(" Non-leaf node types")]),e._v(" "),t("h3",{attrs:{id:"inner-join-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#inner-join-node"}},[e._v("#")]),e._v(" Inner join node")]),e._v(" "),t("p",[e._v("An inner join node N represents the n-ary natural join of the evaluations of its children nodes,\nExplicit joining conditions can also be attached to it,\nin the form of a boolean expression φ~N~,\nas defined above.")]),e._v(" "),t("p",[e._v("It can be defined almost identically to its SPARQL counterpart.\nFirst,\nfor any two partial functions f and g from V to D,\nlet f ~ g hold iff for all x ∈ dom(f) ∩ dom(g),\nwe have f(x) = g(x).")]),e._v(" "),t("p",[e._v("Then algebraic operation represented by an inner join node with explicit joining condition φ,\ndenoted with JOIN~φ~,\nis defined by:")]),e._v(" "),t("p",[e._v("Then ||N_1 JOIN~φ~ N_2|| = { f ∪ g | (f,g) ∈ ||N1|| × ||N2|| and f ~ g holds and val(φ[f ∪ g]) = TRUE},\nand V(N_1 JOIN N_2) = v(N1) ∪ v(N2).")]),e._v(" "),t("p",[e._v("If there is no explicit condition attached to an inner join node,\nthen it represents the operation N1 JOIN~1=1~ N2,\nabbreviated as N1 JOIN N2.")]),e._v(" "),t("h3",{attrs:{id:"left-join-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#left-join-node"}},[e._v("#")]),e._v(" Left join node")]),e._v(" "),t("p",[e._v("A left join node represents the RA binary natural left outer join (or SPARQL OPTIONAL) of the evaluations of its children nodes.\nThe left and right children nodes respectively stand for the left and right part of the join.")]),e._v(" "),t("p",[e._v("Explicit joining conditions may also be attached to it.")]),e._v(" "),t("p",[e._v("As for join nodes,\nthis algebraic operation can be defined similarly to its SPARQL counterpart.\nAn inner join node with explicit joining condition φ,\nrepresents the algebraic operation INNER JOIN~φ~,\ndefined by:")]),e._v(" "),t("p",[e._v("||N_1 INNER JOIN~φ~ N_2|| = ||N1 JOIN N2|| ∪ { f & isin ||N1|| | for all (g) ∈ ||N2||,\nf ~ g or val(φ[f ∪ g]) = TRUE does not hold}.")]),e._v(" "),t("p",[e._v("As for join nodes,\nif there is no explicit condition attached to an inner join node,\nthen it represents the operation N1 INNER JOIN~1=1~ N2,\nabbreviated as N1 INNER JOIN N2.")]),e._v(" "),t("h3",{attrs:{id:"union-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#union-node"}},[e._v("#")]),e._v(" Union node")]),e._v(" "),t("h3",{attrs:{id:"construction-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#construction-node"}},[e._v("#")]),e._v(" Construction node")]),e._v(" "),t("p",[e._v("A construction represents a RA extended projection,\nfollowed by an attribute renaming.")]),e._v(" "),t("p",[e._v('"Extended" projection means here that some additional operations on the values of the projected attributes can be expressed,\nprototypically string concatenation to create URIs out of data values (but also for instance arithmetic operations).')]),e._v(" "),t("p",[e._v("Attribute renaming is always the second operation,\ni.e. it is alway performed on the output of the (extended) projection.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("optional projection and renaming")]),e._v(" "),t("p",[e._v("Both operations (extended projection and renaming) are in a sense optional,\nin that the projection with all selected attributes (and no non-trivial additional operation) is the identity operator,\nand so is renaming with empty substituion.\nSo in practice,\na construction node may encode one of these operations.")])])])}),[],!1,null,null,null);n.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{443:function(e,n,t){"use strict";t.r(n);var a=t(51),i=Object(a.a)({},(function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"formal-characterization-of-iqs"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#formal-characterization-of-iqs"}},[e._v("#")]),e._v(" Formal characterization of IQs")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("TODO: CHECK/UPDATE (2 years old and formatted in AsciiDocs)")])]),e._v(" "),t("p",[e._v("This section aims at providing a more precise characterization of an "),t("em",[e._v("intermediate query")]),e._v(" ("),t("em",[e._v("IQ")]),e._v(" in what follows),\nwhich is the main query representation format used internally in Ontop.")]),e._v(" "),t("p",[e._v("An IQ is a standard (rooted and ordered) tree representation of an algebraic query expression.\nMore exactly,\nfor each node N of a well-formed IQ Q,\nthe maximal subtree or Q rooted in N represents a valid algebraic expression.")]),e._v(" "),t("p",[e._v("In order to give a more precise characterization of this algebra,\nwe will rely on its similarity with Relational Algebra ("),t("em",[e._v("RA")]),e._v(" in what follows),\nmore exactly the select/project/join/rename/union RA with named attributes (and no duplicate attribute),\nextended with additional operators supported by SQL DBMS (and relevant for Ontop's setting).\nThese additional operators are:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("left outer join (which corresponds to the SPARQL OPTIONAL operator),\nand")])]),e._v(" "),t("li",[t("p",[e._v("extended projection")])])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),t("p",[e._v("As of now, difference is not supported.")])]),e._v(" "),t("p",[e._v("For readability,\nsome similarities with the SPARQL language will also be (informally) higlighted.")]),e._v(" "),t("p",[e._v("NOTE: This is only one possible way of characterizing the meaning of an IQ.\nOther options would be for instance relying on (a customized version of) the SPARQL algebra,\nor defining from scratch a full-fledged semantic.")]),e._v(" "),t("p",[e._v("link:notation[The first section] introduces some notational conventions,\nwhereas the following ones present the different types of nodes which may appear in an IQ,\nand how they relate to RA operands and operators.\nIn order to simplify notation,\ntheir interpretation is first given in terms of set semantics (which is also the standard interpretation of RA).")]),e._v(" "),t("p",[e._v("The extension to bag semantics has specific implications in an OBDA setting,\nand is discussed in link:bagSemantics[a dedicated Section].")]),e._v(" "),t("h2",{attrs:{id:"notation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#notation"}},[e._v("#")]),e._v(" Notation")]),e._v(" "),t("h3",{attrs:{id:"interpretation-of-algebraic-expressions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#interpretation-of-algebraic-expressions"}},[e._v("#")]),e._v(" Interpretation of algebraic expressions")]),e._v(" "),t("p",[e._v("We assume the following mutually disjoint sets:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("a countably infinite domain D being queried,")])]),e._v(" "),t("li",[t("p",[e._v("a countably infinite set V of variables names (similar to SPARQL variables,\nor to a lesser extent to RA attribute names).")])]),e._v(" "),t("li",[t("p",[e._v("a finite set P of predicates,\nand")])]),e._v(" "),t("li",[t("p",[e._v("For each p ∈ P with arity n > 0,\na set {p_1, .., p_n} of base attribute names.")])])]),e._v(" "),t("p",[e._v("A database instance will be viewed as a total function I over P,\nwhich,\nto each element p of its domain,\nassociates a set I(p) of partial functions from {p_1, .., p_n} to D.")]),e._v(" "),t("p",[e._v("The "),t("em",[e._v("signature")]),e._v(" sig(M) of an algebraic query expression M is the set of its base operands,\nand it is assumed that for any well-formed M,\nsig(M) ⊆ P holds.")]),e._v(" "),t("p",[e._v("Given a database instance I over P,\nthe "),t("em",[e._v("interpretation")]),e._v(" ||M|| of a well-formed algebraic expression M is built inductively out of all I(p) such that p ∈ sig(M),\nby application of algebraic operators.\nTo each element of its domain,\n||.|| associates a (possibly empty) set of partial functions from a unique subset var(M) of V to D.\nvar(M) will be called the "),t("em",[e._v("projected variables")]),e._v(" of M,\nand does not depend on ||.||,\nbut only on M.")]),e._v(" "),t("h3",{attrs:{id:"interpretation-of-iq-nodes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#interpretation-of-iq-nodes"}},[e._v("#")]),e._v(" Interpretation of IQ nodes")]),e._v(" "),t("p",[e._v("If Q is a well-formed IQ,\nthen nodes(Q) will designate its nodes.\nAnd by extension,\nif N ∈ nodes(Q),\nthen sig(N) (resp. ||N|| and var(N)) will designate the signature (resp. the interpretation and the projected variables) of the algebraic expression represented by (the maximal subtree of Q rooted in) N.")]),e._v(" "),t("h3",{attrs:{id:"boolean-expressions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#boolean-expressions"}},[e._v("#")]),e._v(" Boolean expressions")]),e._v(" "),t("p",[e._v("A "),t("em",[e._v("boolean expression")]),e._v(" in what follows designates a quantifier-free first-order formula,\nwith variables in V,\nconstants in D and predicates among the ones listed link:[in the dedicated section].")]),e._v(" "),t("p",[e._v("For instance,\nx ≠ y,\n(x ≥ 2) ∨ (x = z) and IsNotNull(x) are valid expressions.")]),e._v(" "),t("p",[e._v('Given a boolean expression φ and a partial function f : V ↦ D,\nthe formula φ[f] is obtained by replacing each variable x appearing in φ by f(x) if defined,\nand by NULL otherwise.\nThen the valuation val(φ[f]) of φ[f] corresponds to the one expected in SQL,\nand operators like "=" or ≥ are polymorphic.\nFor instance,\nfor any d ∈ D,\nval(d ≤ d) = TRUE,\nval(d ≠= d) = FALSE,\nval(NULL = d) = UNKNOWN,\nval(NULL ≤ d) = UNKNOWN,\netc.,')]),e._v(" "),t("p",[e._v("These boolean expressions are explicit RA selection conditions.\nImplicit selection conditions (exclusively equality between variables and/or constant) may also be expressed,\nfor instance by joining two algebraic expressions with shared variables (natural join).")]),e._v(" "),t("h2",{attrs:{id:"leaf-node-types"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#leaf-node-types"}},[e._v("#")]),e._v(" Leaf node types")]),e._v(" "),t("h3",{attrs:{id:"data-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#data-node"}},[e._v("#")]),e._v(" Data node")]),e._v(" "),t("p",[e._v("Data nodes are prototypical leaf nodes of IQs.\nIntuitively,\na data node is similar to a SPARQL triple pattern,\nbut extended to n-uples.")]),e._v(" "),t("p",[e._v("Equivalently,\na data node may represent the application to some p ∈ P of a (possibly trivial) selection (σ in RA),\nfollowed by a variable renaming (ρ in RA).")]),e._v(" "),t("p",[e._v("Internally,\na data node N is characterized (using logical notation) with an expression of the form p(v~1~, .., v~n~),\nwhere p ∈ P,\nand each v~i~ is either a constant or a variable,\ni.e. v~i~ ∈ D ∪ V.\nIn addition,\nwe have var(N) = {v~1~, .., v~n~} ∩ V.")]),e._v(" "),t("p",[e._v("Constants and repeated variable names express selection in the expected way.")]),e._v(" "),t("p",[e._v("For instance,\nif N is characterized by p(x,x),\nthen it represents the RA expression ρ~[x/p1,x/p2]~ (σ~[p1=p2]~ p).")]),e._v(" "),t("p",[e._v("Therefore,\nif I(p) = { {p1 ↦ 1, p2 ↦ 2}, {p1 ↦ 3, p2 ↦ 3} },\nthen ||N|| = { {p1 ↦ 3, p2 ↦ 3} } will hold.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Second order queries")]),e._v(" "),t("p",[e._v('SPARQL triple patterns allow for querying over the name of an RDF property,\ni.e. the name of a binary predicate.\nIn an IQ,\nthe data node corresponding to such a triple pattern is characterized by a ternary predicate with a meaningless predicate name (currently "triple"),\nand the property name variable as first argument.\nFor instance,\na data node encoding the SPARQL triple pattern ?s ?p ?o (where ?p stands for RDF property names) will be characterized by the expression triple(p,s,o).')]),e._v(" "),t("p",[e._v('This mechanism may be extended in future versions to all predicates.\nIn other words,\nP may be reduced to a set of one predicate per arity ("pair", "triple, "quadruple", etc),\nwith the current (n-1 ary) predicate names as first argument.')])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Intensional VS extensional data nodes")]),e._v(" "),t("p",[e._v("Todo")])]),e._v(" "),t("h3",{attrs:{id:"empty-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#empty-node"}},[e._v("#")]),e._v(" Empty node")]),e._v(" "),t("p",[e._v("An empty node E can be viewed as a specific kind of data node (whether it should be considered as intensional or extensional is not important).\nThe evaluation of the subquery rooted in E will always be (similar to) the RA n-ary empty relation,\nwith n ≥ 0.")]),e._v(" "),t("p",[e._v("In other words,\nfor any database instance,\n||E|| = {} holds (although var(E) may be nonempty).")]),e._v(" "),t("p",[e._v("Alternatively,\nif var(E) = {v~1~, .., v~n~},\nassuming some p ∈ P with arity n,\n(the subtree whose only node is) E can be viewed as representing the RA expression ρ~[v1/p1,..,vn/pn]~ (σ~FALSE~ p).")]),e._v(" "),t("p",[e._v("The behavior of ||E|| as an operand is similar to the behavior of an empty relation in RA.\nIn particular (see link:nonLeafNodes[the dedicated sections] below for the definitions of the corresponding operators):")]),e._v(" "),t("ul",[t("li",[e._v("(Left and right) identity element for union: ||E UNION M|| = ||M||,\nfor any M s.t. var(M) = var(E)")]),e._v(" "),t("li",[e._v("(Left and right) absorbing element for a natural join: ||E JOIN M|| = ||E||,\nfor any M")]),e._v(" "),t("li",[e._v("Left absorbing for left outer join,\nand right identity element if there is no join condition,\nor if the condition is met (right absorbing otherwise)")]),e._v(" "),t("li",[e._v("Fixpoint for selection.")])]),e._v(" "),t("h3",{attrs:{id:"true-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#true-node"}},[e._v("#")]),e._v(" True node")]),e._v(" "),t("p",[e._v("True nodes represent another limit case.\nThe evaluation of the subquery rooted in a true node T will always be (similar to) the RA nonempty but 0-ary relation.\nOr in other words,\nvar(T) = {},\nand for any database instance,\n||T|| = {f},\nwhere f has an empty domain.")]),e._v(" "),t("p",[e._v("The behavior of ||T|| as an operand is in most cases similar to the behavior of its RA counterpart.\nIn particular (see link:nonLeafNodes[the dedicated sections] below for the definitions of the corresponding operators):")]),e._v(" "),t("ul",[t("li",[e._v("(Left and right) identity element for a natural join: ||T JOIN M|| = ||M||,\nfor any M")]),e._v(" "),t("li",[e._v("||T UNION T|| = ||T|| (see the section about link:bagSemantics[bag semantics] for the treatment of cardinalities in this specific case).")])]),e._v(" "),t("p",[e._v("As expected,\nT is also the right identity element for the left outer join operator:")]),e._v(" "),t("ul",[t("li",[e._v("||M LEFT JOIN T|| = ||M||,\nfor any M.")])]),e._v(" "),t("p",[e._v("In the case where T is the left operand,\nwe have:")]),e._v(" "),t("ul",[t("li",[e._v("||T LEFT JOIN M|| = ||M||,\nif ||M|| ≠ {}")]),e._v(" "),t("li",[e._v("||T LEFT JOIN M|| = ||T|| otherwise.")])]),e._v(" "),t("p",[e._v("Note that in RA,\nbecause the left outer join operator is traditionally defined in terms of join,\nprojection,\nunion and difference,\nthese two queries would be syntactically invalid (implying a difference and a union of two relations with different arities).\nIn IQs on the other hand,\nthe left outer join is viewed as a primitive operator.")]),e._v(" "),t("h2",{attrs:{id:"non-leaf-node-types"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#non-leaf-node-types"}},[e._v("#")]),e._v(" Non-leaf node types")]),e._v(" "),t("h3",{attrs:{id:"inner-join-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#inner-join-node"}},[e._v("#")]),e._v(" Inner join node")]),e._v(" "),t("p",[e._v("An inner join node N represents the n-ary natural join of the evaluations of its children nodes,\nExplicit joining conditions can also be attached to it,\nin the form of a boolean expression φ~N~,\nas defined above.")]),e._v(" "),t("p",[e._v("It can be defined almost identically to its SPARQL counterpart.\nFirst,\nfor any two partial functions f and g from V to D,\nlet f ~ g hold iff for all x ∈ dom(f) ∩ dom(g),\nwe have f(x) = g(x).")]),e._v(" "),t("p",[e._v("Then algebraic operation represented by an inner join node with explicit joining condition φ,\ndenoted with JOIN~φ~,\nis defined by:")]),e._v(" "),t("p",[e._v("Then ||N_1 JOIN~φ~ N_2|| = { f ∪ g | (f,g) ∈ ||N1|| × ||N2|| and f ~ g holds and val(φ[f ∪ g]) = TRUE},\nand V(N_1 JOIN N_2) = v(N1) ∪ v(N2).")]),e._v(" "),t("p",[e._v("If there is no explicit condition attached to an inner join node,\nthen it represents the operation N1 JOIN~1=1~ N2,\nabbreviated as N1 JOIN N2.")]),e._v(" "),t("h3",{attrs:{id:"left-join-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#left-join-node"}},[e._v("#")]),e._v(" Left join node")]),e._v(" "),t("p",[e._v("A left join node represents the RA binary natural left outer join (or SPARQL OPTIONAL) of the evaluations of its children nodes.\nThe left and right children nodes respectively stand for the left and right part of the join.")]),e._v(" "),t("p",[e._v("Explicit joining conditions may also be attached to it.")]),e._v(" "),t("p",[e._v("As for join nodes,\nthis algebraic operation can be defined similarly to its SPARQL counterpart.\nAn inner join node with explicit joining condition φ,\nrepresents the algebraic operation INNER JOIN~φ~,\ndefined by:")]),e._v(" "),t("p",[e._v("||N_1 INNER JOIN~φ~ N_2|| = ||N1 JOIN N2|| ∪ { f & isin ||N1|| | for all (g) ∈ ||N2||,\nf ~ g or val(φ[f ∪ g]) = TRUE does not hold}.")]),e._v(" "),t("p",[e._v("As for join nodes,\nif there is no explicit condition attached to an inner join node,\nthen it represents the operation N1 INNER JOIN~1=1~ N2,\nabbreviated as N1 INNER JOIN N2.")]),e._v(" "),t("h3",{attrs:{id:"union-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#union-node"}},[e._v("#")]),e._v(" Union node")]),e._v(" "),t("h3",{attrs:{id:"construction-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#construction-node"}},[e._v("#")]),e._v(" Construction node")]),e._v(" "),t("p",[e._v("A construction represents a RA extended projection,\nfollowed by an attribute renaming.")]),e._v(" "),t("p",[e._v('"Extended" projection means here that some additional operations on the values of the projected attributes can be expressed,\nprototypically string concatenation to create URIs out of data values (but also for instance arithmetic operations).')]),e._v(" "),t("p",[e._v("Attribute renaming is always the second operation,\ni.e. it is alway performed on the output of the (extended) projection.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("optional projection and renaming")]),e._v(" "),t("p",[e._v("Both operations (extended projection and renaming) are in a sense optional,\nin that the projection with all selected attributes (and no non-trivial additional operation) is the identity operator,\nand so is renaming with empty substituion.\nSo in practice,\na construction node may encode one of these operations.")])])])}),[],!1,null,null,null);n.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/67.aabf2d98.js b/assets/js/67.5d0d2637.js similarity index 96% rename from assets/js/67.aabf2d98.js rename to assets/js/67.5d0d2637.js index 11c092ff1..ccabf2e51 100644 --- a/assets/js/67.aabf2d98.js +++ b/assets/js/67.5d0d2637.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{444:function(t,e,n){"use strict";n.r(e);var i=n(51),a=Object(i.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"notation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#notation"}},[t._v("#")]),t._v(" Notation")]),t._v(" "),n("div",{staticClass:"custom-block warning"},[n("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),n("p",[t._v("TODO: CHECK/UPDATE (2 years old and formatted in AsciiDocs)")])]),t._v(" "),n("p",[t._v("We assume a countably infinite domain D being queried,\na finite set P of predicates disjoint from D,\nand an interpretation function ||.|| defined over P,\nwhich to each predicate p in P associates a subset ||p|| of (D \\union {NULL})^i^,\nfor some positive integer i.\nThe "),n("em",[t._v("signature")]),t._v(" sig(Q) of a (sub)query Q is a subset of P.\nAn the interpretation ||Q|| of Q is built inductively as usual,\nout of all ||p|| such that p is sig(Q),\nby application of RA operators.")]),t._v(" "),n("p",[t._v("In addition,\nwe assume a countably infinite set A of attribute names,\ndistinct from D and P.\nIf ||Q|| is the interpretation of (sub)query Q,\nthen the function att(||Q||) associates to ||Q|| a finite tuple ofn distinct elements of A,\nand n is called the "),n("em",[t._v("arity")]),t._v(" of ||Q||.")]),t._v(" "),n("p",[t._v("NOTE: It is also assumed in what follows that the algebraic expression corresponding to an intermediate query is syntactically valid,\naccording to standard requirements on RA operators.\nFor instance,\nwhen a projection is performed,\nthe projected attributes must be a subset of the attributes of the argument relation.\nSimilarly,\nthe arguments of a union operator must have identical set of attributes (this is not natively the case of the UNION SPARQL operator,\nbut can be enforced with a straightforward normalization).")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{445:function(t,e,n){"use strict";n.r(e);var i=n(51),a=Object(i.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"notation"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#notation"}},[t._v("#")]),t._v(" Notation")]),t._v(" "),n("div",{staticClass:"custom-block warning"},[n("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),n("p",[t._v("TODO: CHECK/UPDATE (2 years old and formatted in AsciiDocs)")])]),t._v(" "),n("p",[t._v("We assume a countably infinite domain D being queried,\na finite set P of predicates disjoint from D,\nand an interpretation function ||.|| defined over P,\nwhich to each predicate p in P associates a subset ||p|| of (D \\union {NULL})^i^,\nfor some positive integer i.\nThe "),n("em",[t._v("signature")]),t._v(" sig(Q) of a (sub)query Q is a subset of P.\nAn the interpretation ||Q|| of Q is built inductively as usual,\nout of all ||p|| such that p is sig(Q),\nby application of RA operators.")]),t._v(" "),n("p",[t._v("In addition,\nwe assume a countably infinite set A of attribute names,\ndistinct from D and P.\nIf ||Q|| is the interpretation of (sub)query Q,\nthen the function att(||Q||) associates to ||Q|| a finite tuple ofn distinct elements of A,\nand n is called the "),n("em",[t._v("arity")]),t._v(" of ||Q||.")]),t._v(" "),n("p",[t._v("NOTE: It is also assumed in what follows that the algebraic expression corresponding to an intermediate query is syntactically valid,\naccording to standard requirements on RA operators.\nFor instance,\nwhen a projection is performed,\nthe projected attributes must be a subset of the attributes of the argument relation.\nSimilarly,\nthe arguments of a union operator must have identical set of attributes (this is not natively the case of the UNION SPARQL operator,\nbut can be enforced with a straightforward normalization).")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/68.5b14c426.js b/assets/js/68.3d5a8aed.js similarity index 99% rename from assets/js/68.5b14c426.js rename to assets/js/68.3d5a8aed.js index 1872e71de..b0dc4f1f4 100644 --- a/assets/js/68.5b14c426.js +++ b/assets/js/68.3d5a8aed.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[68],{445:function(e,n,t){"use strict";t.r(n);var i=t(51),o=Object(i.a)({},(function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"intermediate-query-optimization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#intermediate-query-optimization"}},[e._v("#")]),e._v(" Intermediate query optimization")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("TODO: UPDATE AND CHECK (2 years old, imported from AsciiDocs)")])]),e._v(" "),t("p",[e._v("This section provides a high level description of different transformations which may be applied to "),t("a",{attrs:{href:"/dev/iq"}},[e._v("Intermediate Queries")]),e._v(" ("),t("em",[e._v("IQs")]),e._v(" in what follows) for optimization purposes.")]),e._v(" "),t("h2",{attrs:{id:"notation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#notation"}},[e._v("#")]),e._v(" Notation")]),e._v(" "),t("p",[e._v("The different types of nodes of an IQ are presented "),t("a",{attrs:{href:"/dev/iq#query-nodes"}},[e._v("in the dedicated section")]),e._v(".\nThe following notation will also be use in the current document.")]),e._v(" "),t("h3",{attrs:{id:"sub-trees"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sub-trees"}},[e._v("#")]),e._v(" (Sub)trees")]),e._v(" "),t("p",[e._v("If s is a tree,\nthen root(s) will designate its root.")]),e._v(" "),t("p",[e._v('If n is a node in an IQ Q,\nthen children~Q~(n) (resp. children(n) when Q is obvious from the context) will designate the immediate children of n in Q,\nand subtree~Q~(n) (resp. subtree(n)) the maximal subtree of Q rooted in n.\nIn addition,\na "subtree of Q" will be understood as a maximal subtree of Q rooted in some node of Q.\nFinally,\nchildSubtrees~Q~(n) (resp. childSubtrees(n)) will stand for {subtree~Q~(c) | c ∈ children~Q~(n)}')]),e._v(" "),t("h3",{attrs:{id:"projected-variables"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#projected-variables"}},[e._v("#")]),e._v(" Projected variables")]),e._v(" "),t("p",[e._v("If s is a subtree in an IQ,\nthen var(s) will designate the "),t("em",[e._v("variables projected out by s")]),e._v(",\ndefined inductively as follows:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("If root(s) explicitly projects out variables (construction node,\nunion node,\ndata node or empty node),\nthen var(s) is the set of such variables.")])]),e._v(" "),t("li",[t("p",[e._v("Otherwise,\nvar(s) = ⋃ ~s∈childSubtrees(n)~ var(s)")])])]),e._v(" "),t("p",[e._v("If e is an (explicit) join or filter condition,\nthen var(e) will designate the variables appearing in e.")]),e._v(" "),t("h2",{attrs:{id:"propagating-down-boolean-expressions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#propagating-down-boolean-expressions"}},[e._v("#")]),e._v(" Propagating down boolean expressions")]),e._v(" "),t("p",[e._v("This optimization is used for (some) NoSQL underlying DBMS.\nIt consists in transforming an input IQ into an equivalent one such that,\nwhenever possible,\nselections precede other algebraic operations.\nOr in other words,\nit consists in propagating (explicit) boolean expressions down the algebraic tree.")]),e._v(" "),t("p",[e._v("Three types of IQ nodes support boolean expressions,\nnamely:")]),e._v(" "),t("ul",[t("li",[e._v("filter nodes,")]),e._v(" "),t("li",[e._v("inner join nodes, and")]),e._v(" "),t("li",[e._v("left join nodes")])]),e._v(" "),t("p",[e._v("For each node n of one of these types,\nif n has an explicit boolean expression e attached to it,\nthen e is put into DNF,\nand each resulting conjunct may be propagated down independently.\nFor instance,\nn may be a filter node,\nand e the expression (x > y) ∧ (y ≠ z).\nThen (x > y) and (y ≠ z) may both be propagated down,\nindependently from each other.\nIf n is a node of one of the three types just mentioned,\nthen bool(n) will designate the set of such conjuncts.")]),e._v(" "),t("h3",{attrs:{id:"propagation-decision-and-recipient-selection"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#propagation-decision-and-recipient-selection"}},[e._v("#")]),e._v(" Propagation decision and recipient selection")]),e._v(" "),t("p",[e._v("Propagation decisions are primarily taken based on a comparison between:")]),e._v(" "),t("ul",[t("li",[e._v("the variables var(e) present in the conjunct e being propagated down,\nand")]),e._v(" "),t("li",[e._v("the variables var(s) projected out by each candidate subtree s for the propagation of e.")])]),e._v(" "),t("h4",{attrs:{id:"default-case-inner-join-of-filter-provider-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#default-case-inner-join-of-filter-provider-node"}},[e._v("#")]),e._v(" Default case (inner join of filter provider node)")]),e._v(" "),t("p",[e._v("Let e ∈ bool(n).\nThe default rule to decide whether e can be propagated down from n is the following:\nfor each s ∈ childSubtrees(n),\nif var(e) ⊆ var(s),\nthen e can be propagated down to s.")]),e._v(" "),t("p",[e._v("An expression e being propagated down a subtree s also needs (a) new recipient node(s) to support it.\nThe recipients selection procedure is the following:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("if root(s) is neither a union node,\nconstruction node or left join node,\nthen it is the (only) recipient of e in s.")])]),e._v(" "),t("li",[t("p",[e._v("Otherwise,\neach s' ∈ childSubtrees(root(s)) recursively becomes a new candidate subtree for propagation.\nIf there no s' ∈ childSubtrees(root(s)) to which e can be propagated down,\nthen root(s) is the (only) recipient of e in s.\nNote that in a valid IQ,\nif s is a construction or union node,\nthen var(s) ⊆ var(s') must hold for each s' ∈ childSubtrees(root(s)),\ntherefore var(e) ⊆ var(s') holds by transitivity,\nsuch that root(s) cannot be the recipient for e in s.\nBut it may be the case if s is a left join node.")])])]),e._v(" "),t("p",[e._v('Finally,\nif a recipient node r for e in s (or s\') does not natively supports non-conditional boolean expressions,\ni.e. if r is neither a filter nor an inner join node,\nthen a new filter node is created as the (immediate) parent of r,\nin order to support e.\nAlternatively (as a form of syntactic sugar),\nif the node n initially providing e is the immediate parent of r,\nthen this new filter node is not needed,\nand e can remain attached to n,\nwhich in this case plays the role of "pseudo-recipient" of e in s.')]),e._v(" "),t("p",[e._v("Note that if n is the pseudo-recipient of e in s,\nthen from the above selection procedure,\nroot(s) must be a data node,\nempty node,\ntrue node,\nor a left join node with no child accepting e,\nwhich in all cases guarantees that e cannot be further propagated down s.")]),e._v(" "),t("h4",{attrs:{id:"specific-case-left-join-provider-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#specific-case-left-join-provider-node"}},[e._v("#")]),e._v(" Specific case (left join provider node)")]),e._v(" "),t("p",[e._v("The propagation decision and recipient selection procedures are identical for a boolean conjunct e provided by a left join node n,\nbut with an exception:\ne may only be propagated down the subtree rooted in the right child of n.\nIndeed,\nif e was propagated down the left subtree,\nan additional selection would be added to the algebraic expression represented by that left branch,\nviolating the semantics of conditions attached to a left join (see link:intermediateQuery_detailed.adoc#leftjoinNode[the dedicated section] for an explanation).")]),e._v(" "),t("h3",{attrs:{id:"duplication-decision"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#duplication-decision"}},[e._v("#")]),e._v(" Duplication decision")]),e._v(" "),t("p",[e._v("Let e ∈ bool(n) for some node n in an IQ Q.\nAnd let us assume that there is at least one s ∈ childSubtrees(n) to which e can be propagated,\nand that in each such s,\na proper recipient node for e,\ndifferent from n,\nhas been found (or in other words that n is not the pseudo-recipient of e for any such s).")]),e._v(" "),t("p",[e._v("Then the decision still needs to be taken whether e should remain attached to n,\n(i.e. be duplicated down) or not (i.e. be strictly pushed down).")]),e._v(" "),t("h4",{attrs:{id:"default-case"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#default-case"}},[e._v("#")]),e._v(" Default case")]),e._v(" "),t("p",[e._v("By default,\nan attempt is made to strictly push down e if it can be propagated down to at least one s ∈ childSubtrees(n).\nSo in the default case,\nand provided n is not a pseudo-recipient for e in any s,\ne will not remain attached to n.")]),e._v(" "),t("h4",{attrs:{id:"specific-case-left-join-rooted-candidate-subtree"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#specific-case-left-join-rooted-candidate-subtree"}},[e._v("#")]),e._v(" Specific case (left-join-rooted candidate subtree)")]),e._v(" "),t("p",[e._v("If s is a candidate subtree for the propagation of e,\nand if a recipient node r in s has been found such that the path in Q from the provider node n of e to r comprises a left join node j and the right child j' of j,\nthen e will remain attached to the provider node n,\ni.e. e will be duplicated down,\ninstead of strictly pushed down.")]),e._v(" "),t("p",[e._v("This prevents an alteration of the semantic of the IQ.\nConsider for instance the following example (where r = j' for simplicity).")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),t("p",[e._v("Let:")]),e._v(" "),t("ul",[t("li",[e._v("Q1 be a well-formed IQ")]),e._v(" "),t("li",[e._v("n1 be a filter node,\nn1 ∈ Q1,\nand bool(n1) = {e},\nwhere e is the expression x < 1")]),e._v(" "),t("li",[e._v("j1 be a left join node with (explicit) joining condition x ≤ y,\nand such that children(n1) = {j1}")]),e._v(" "),t("li",[e._v("l1 be the left child of j1,\nwith var(subtree(l1)) = {y}")]),e._v(" "),t("li",[e._v("r1 be a filter node and the right child of j1,\nwith var(subtree(r1)) = {x}")])]),e._v(" "),t("p",[e._v("Then r1 is a recipient for e.")]),e._v(" "),t("p",[e._v("Now consider the query Q2 identical to Q1,\nwhere n2 (resp. j2, r2, etc.) is the counterpart of n1 (resp. j1, r1, etc.),\nbut such that e has been pushed down to r2 (and therefore is not attached to n2 anymore).\nAnd let us assume a database instance defining an evaluation function ||.||,\nsuch that ||l1|| = { {y ↦ 2} } and ||r1|| = { {x ↦ 1} }.")]),e._v(" "),t("p",[e._v("Then ||j1|| = { {x ↦ 1, y ↦ 2} },\nand ||n1|| = { {} }.")]),e._v(" "),t("p",[e._v("But ||l2|| = { {y ↦ 2} } and ||r2|| = { {} } must also hold,\ntherefore ||j2|| = { {y ↦ 2} } and ||n2|| = { {y ↦ 2} },\nsuch that ||n1|| ≠ ||n2||.")])])])}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[68],{444:function(e,n,t){"use strict";t.r(n);var i=t(51),o=Object(i.a)({},(function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"intermediate-query-optimization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#intermediate-query-optimization"}},[e._v("#")]),e._v(" Intermediate query optimization")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("TODO: UPDATE AND CHECK (2 years old, imported from AsciiDocs)")])]),e._v(" "),t("p",[e._v("This section provides a high level description of different transformations which may be applied to "),t("a",{attrs:{href:"/dev/iq"}},[e._v("Intermediate Queries")]),e._v(" ("),t("em",[e._v("IQs")]),e._v(" in what follows) for optimization purposes.")]),e._v(" "),t("h2",{attrs:{id:"notation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#notation"}},[e._v("#")]),e._v(" Notation")]),e._v(" "),t("p",[e._v("The different types of nodes of an IQ are presented "),t("a",{attrs:{href:"/dev/iq#query-nodes"}},[e._v("in the dedicated section")]),e._v(".\nThe following notation will also be use in the current document.")]),e._v(" "),t("h3",{attrs:{id:"sub-trees"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sub-trees"}},[e._v("#")]),e._v(" (Sub)trees")]),e._v(" "),t("p",[e._v("If s is a tree,\nthen root(s) will designate its root.")]),e._v(" "),t("p",[e._v('If n is a node in an IQ Q,\nthen children~Q~(n) (resp. children(n) when Q is obvious from the context) will designate the immediate children of n in Q,\nand subtree~Q~(n) (resp. subtree(n)) the maximal subtree of Q rooted in n.\nIn addition,\na "subtree of Q" will be understood as a maximal subtree of Q rooted in some node of Q.\nFinally,\nchildSubtrees~Q~(n) (resp. childSubtrees(n)) will stand for {subtree~Q~(c) | c ∈ children~Q~(n)}')]),e._v(" "),t("h3",{attrs:{id:"projected-variables"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#projected-variables"}},[e._v("#")]),e._v(" Projected variables")]),e._v(" "),t("p",[e._v("If s is a subtree in an IQ,\nthen var(s) will designate the "),t("em",[e._v("variables projected out by s")]),e._v(",\ndefined inductively as follows:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("If root(s) explicitly projects out variables (construction node,\nunion node,\ndata node or empty node),\nthen var(s) is the set of such variables.")])]),e._v(" "),t("li",[t("p",[e._v("Otherwise,\nvar(s) = ⋃ ~s∈childSubtrees(n)~ var(s)")])])]),e._v(" "),t("p",[e._v("If e is an (explicit) join or filter condition,\nthen var(e) will designate the variables appearing in e.")]),e._v(" "),t("h2",{attrs:{id:"propagating-down-boolean-expressions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#propagating-down-boolean-expressions"}},[e._v("#")]),e._v(" Propagating down boolean expressions")]),e._v(" "),t("p",[e._v("This optimization is used for (some) NoSQL underlying DBMS.\nIt consists in transforming an input IQ into an equivalent one such that,\nwhenever possible,\nselections precede other algebraic operations.\nOr in other words,\nit consists in propagating (explicit) boolean expressions down the algebraic tree.")]),e._v(" "),t("p",[e._v("Three types of IQ nodes support boolean expressions,\nnamely:")]),e._v(" "),t("ul",[t("li",[e._v("filter nodes,")]),e._v(" "),t("li",[e._v("inner join nodes, and")]),e._v(" "),t("li",[e._v("left join nodes")])]),e._v(" "),t("p",[e._v("For each node n of one of these types,\nif n has an explicit boolean expression e attached to it,\nthen e is put into DNF,\nand each resulting conjunct may be propagated down independently.\nFor instance,\nn may be a filter node,\nand e the expression (x > y) ∧ (y ≠ z).\nThen (x > y) and (y ≠ z) may both be propagated down,\nindependently from each other.\nIf n is a node of one of the three types just mentioned,\nthen bool(n) will designate the set of such conjuncts.")]),e._v(" "),t("h3",{attrs:{id:"propagation-decision-and-recipient-selection"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#propagation-decision-and-recipient-selection"}},[e._v("#")]),e._v(" Propagation decision and recipient selection")]),e._v(" "),t("p",[e._v("Propagation decisions are primarily taken based on a comparison between:")]),e._v(" "),t("ul",[t("li",[e._v("the variables var(e) present in the conjunct e being propagated down,\nand")]),e._v(" "),t("li",[e._v("the variables var(s) projected out by each candidate subtree s for the propagation of e.")])]),e._v(" "),t("h4",{attrs:{id:"default-case-inner-join-of-filter-provider-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#default-case-inner-join-of-filter-provider-node"}},[e._v("#")]),e._v(" Default case (inner join of filter provider node)")]),e._v(" "),t("p",[e._v("Let e ∈ bool(n).\nThe default rule to decide whether e can be propagated down from n is the following:\nfor each s ∈ childSubtrees(n),\nif var(e) ⊆ var(s),\nthen e can be propagated down to s.")]),e._v(" "),t("p",[e._v("An expression e being propagated down a subtree s also needs (a) new recipient node(s) to support it.\nThe recipients selection procedure is the following:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("if root(s) is neither a union node,\nconstruction node or left join node,\nthen it is the (only) recipient of e in s.")])]),e._v(" "),t("li",[t("p",[e._v("Otherwise,\neach s' ∈ childSubtrees(root(s)) recursively becomes a new candidate subtree for propagation.\nIf there no s' ∈ childSubtrees(root(s)) to which e can be propagated down,\nthen root(s) is the (only) recipient of e in s.\nNote that in a valid IQ,\nif s is a construction or union node,\nthen var(s) ⊆ var(s') must hold for each s' ∈ childSubtrees(root(s)),\ntherefore var(e) ⊆ var(s') holds by transitivity,\nsuch that root(s) cannot be the recipient for e in s.\nBut it may be the case if s is a left join node.")])])]),e._v(" "),t("p",[e._v('Finally,\nif a recipient node r for e in s (or s\') does not natively supports non-conditional boolean expressions,\ni.e. if r is neither a filter nor an inner join node,\nthen a new filter node is created as the (immediate) parent of r,\nin order to support e.\nAlternatively (as a form of syntactic sugar),\nif the node n initially providing e is the immediate parent of r,\nthen this new filter node is not needed,\nand e can remain attached to n,\nwhich in this case plays the role of "pseudo-recipient" of e in s.')]),e._v(" "),t("p",[e._v("Note that if n is the pseudo-recipient of e in s,\nthen from the above selection procedure,\nroot(s) must be a data node,\nempty node,\ntrue node,\nor a left join node with no child accepting e,\nwhich in all cases guarantees that e cannot be further propagated down s.")]),e._v(" "),t("h4",{attrs:{id:"specific-case-left-join-provider-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#specific-case-left-join-provider-node"}},[e._v("#")]),e._v(" Specific case (left join provider node)")]),e._v(" "),t("p",[e._v("The propagation decision and recipient selection procedures are identical for a boolean conjunct e provided by a left join node n,\nbut with an exception:\ne may only be propagated down the subtree rooted in the right child of n.\nIndeed,\nif e was propagated down the left subtree,\nan additional selection would be added to the algebraic expression represented by that left branch,\nviolating the semantics of conditions attached to a left join (see link:intermediateQuery_detailed.adoc#leftjoinNode[the dedicated section] for an explanation).")]),e._v(" "),t("h3",{attrs:{id:"duplication-decision"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#duplication-decision"}},[e._v("#")]),e._v(" Duplication decision")]),e._v(" "),t("p",[e._v("Let e ∈ bool(n) for some node n in an IQ Q.\nAnd let us assume that there is at least one s ∈ childSubtrees(n) to which e can be propagated,\nand that in each such s,\na proper recipient node for e,\ndifferent from n,\nhas been found (or in other words that n is not the pseudo-recipient of e for any such s).")]),e._v(" "),t("p",[e._v("Then the decision still needs to be taken whether e should remain attached to n,\n(i.e. be duplicated down) or not (i.e. be strictly pushed down).")]),e._v(" "),t("h4",{attrs:{id:"default-case"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#default-case"}},[e._v("#")]),e._v(" Default case")]),e._v(" "),t("p",[e._v("By default,\nan attempt is made to strictly push down e if it can be propagated down to at least one s ∈ childSubtrees(n).\nSo in the default case,\nand provided n is not a pseudo-recipient for e in any s,\ne will not remain attached to n.")]),e._v(" "),t("h4",{attrs:{id:"specific-case-left-join-rooted-candidate-subtree"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#specific-case-left-join-rooted-candidate-subtree"}},[e._v("#")]),e._v(" Specific case (left-join-rooted candidate subtree)")]),e._v(" "),t("p",[e._v("If s is a candidate subtree for the propagation of e,\nand if a recipient node r in s has been found such that the path in Q from the provider node n of e to r comprises a left join node j and the right child j' of j,\nthen e will remain attached to the provider node n,\ni.e. e will be duplicated down,\ninstead of strictly pushed down.")]),e._v(" "),t("p",[e._v("This prevents an alteration of the semantic of the IQ.\nConsider for instance the following example (where r = j' for simplicity).")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),t("p",[e._v("Let:")]),e._v(" "),t("ul",[t("li",[e._v("Q1 be a well-formed IQ")]),e._v(" "),t("li",[e._v("n1 be a filter node,\nn1 ∈ Q1,\nand bool(n1) = {e},\nwhere e is the expression x < 1")]),e._v(" "),t("li",[e._v("j1 be a left join node with (explicit) joining condition x ≤ y,\nand such that children(n1) = {j1}")]),e._v(" "),t("li",[e._v("l1 be the left child of j1,\nwith var(subtree(l1)) = {y}")]),e._v(" "),t("li",[e._v("r1 be a filter node and the right child of j1,\nwith var(subtree(r1)) = {x}")])]),e._v(" "),t("p",[e._v("Then r1 is a recipient for e.")]),e._v(" "),t("p",[e._v("Now consider the query Q2 identical to Q1,\nwhere n2 (resp. j2, r2, etc.) is the counterpart of n1 (resp. j1, r1, etc.),\nbut such that e has been pushed down to r2 (and therefore is not attached to n2 anymore).\nAnd let us assume a database instance defining an evaluation function ||.||,\nsuch that ||l1|| = { {y ↦ 2} } and ||r1|| = { {x ↦ 1} }.")]),e._v(" "),t("p",[e._v("Then ||j1|| = { {x ↦ 1, y ↦ 2} },\nand ||n1|| = { {} }.")]),e._v(" "),t("p",[e._v("But ||l2|| = { {y ↦ 2} } and ||r2|| = { {} } must also hold,\ntherefore ||j2|| = { {y ↦ 2} } and ||n2|| = { {y ↦ 2} },\nsuch that ||n1|| ≠ ||n2||.")])])])}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/70.390c1b51.js b/assets/js/70.d4fb42d5.js similarity index 98% rename from assets/js/70.390c1b51.js rename to assets/js/70.d4fb42d5.js index 0cae8df63..4c9bbee63 100644 --- a/assets/js/70.390c1b51.js +++ b/assets/js/70.d4fb42d5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[70],{447:function(e,t,a){"use strict";a.r(t);var n=a(51),i=Object(n.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"cikm-2018-tutorial"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cikm-2018-tutorial"}},[e._v("#")]),e._v(" CIKM 2018 Tutorial")]),e._v(" "),a("h2",{attrs:{id:"semantic-technologies-for-data-access-and-integration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#semantic-technologies-for-data-access-and-integration"}},[e._v("#")]),e._v(" Semantic Technologies for Data Access and Integration")]),e._v(" "),a("h3",{attrs:{id:"presented-by"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#presented-by"}},[e._v("#")]),e._v(" Presented by")]),e._v(" "),a("p",[e._v("Diego Calvanese, Guohui Xiao")]),e._v(" "),a("h3",{attrs:{id:"time"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#time"}},[e._v("#")]),e._v(" Time")]),e._v(" "),a("p",[e._v("Friday, 26 October 2018"),a("br"),e._v("\n08:15AM-09:45AM & 10:15AM-11:45AM & 01:00PM-02:30PM")]),e._v(" "),a("h3",{attrs:{id:"abstract"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#abstract"}},[e._v("#")]),e._v(" Abstract")]),e._v(" "),a("p",[e._v("In this tutorial, we cover such principles and the main (semantic)\ntechnologies underlying OBDA/I. In addition to the theoretical\nunderpinning, we provide participants also with a practical hands-on\nexperience on state-of-the-art tools. In this way, industry\npractitioners and researchers gain a good understanding of semantic\ntechnologies for OBDA/I, and are able to deploy them for their data\naccess and data integration needs in practical use-cases.")]),e._v(" "),a("h3",{attrs:{id:"schedule"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#schedule"}},[e._v("#")]),e._v(" Schedule")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("Session 1. 08:15AM-09:45AM")]),e._v(" "),a("ul",[a("li",[e._v("Motivation")]),e._v(" "),a("li",[e._v("Elements of OBDA systems")]),e._v(" "),a("li",[e._v("Semantic Web standards")])])]),e._v(" "),a("li",[a("p",[e._v("Session 2. 10:15AM-11:45AM")]),e._v(" "),a("ul",[a("li",[e._v("OBDA systems and Use cases (30 mins)")]),e._v(" "),a("li",[e._v("Hands-on with Protege (60min) [link]")])])]),e._v(" "),a("li",[a("p",[e._v("Session 3. 01:00PM-02:30PM")]),e._v(" "),a("ul",[a("li",[e._v("Query processing (rewriting) and optimization (60min)")]),e._v(" "),a("li",[e._v("Demo on integrating Web APIs using Ontop and Denodo (30min)")])]),e._v(" "),a("p",[e._v("All the slides are available at\n"),a("a",{attrs:{href:"https://github.com/ontop/ontop-examples/tree/master/cikm-2018-tutorial",target:"_blank",rel:"noopener"}},[e._v("GitHub"),a("OutboundLink")],1)])])]),e._v(" "),a("h3",{attrs:{id:"target-audience"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#target-audience"}},[e._v("#")]),e._v(" Target Audience")]),e._v(" "),a("p",[e._v("The target audience of the tutorial are researchers, PhD students,\nand practitioners, who are interested in deepening their theoretical\nunderstanding of semantic technologies for accessing and integrating\ndata, and in getting insight into recent developments in this area.")]),e._v(" "),a("h3",{attrs:{id:"prerequisite-knowledge"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#prerequisite-knowledge"}},[e._v("#")]),e._v(" Prerequisite Knowledge")]),e._v(" "),a("p",[e._v("We assume from participants basic knowledge on relational database\nfoundations (relational model, relational algebra and SQL) and\ntechnologies (use of relational engines, JDBC). Some knowledge of\nfirst-order logic might be useful, but is not required to follow the\ntutorial. Similarly, background in Semantic Web standards, such as\nRDF and SPARQL can be of help, although these notions are an\nintegral part of the tutorial, and are introduced and discussed in\nthe first part.")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[70],{448:function(e,t,a){"use strict";a.r(t);var n=a(51),i=Object(n.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"cikm-2018-tutorial"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cikm-2018-tutorial"}},[e._v("#")]),e._v(" CIKM 2018 Tutorial")]),e._v(" "),a("h2",{attrs:{id:"semantic-technologies-for-data-access-and-integration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#semantic-technologies-for-data-access-and-integration"}},[e._v("#")]),e._v(" Semantic Technologies for Data Access and Integration")]),e._v(" "),a("h3",{attrs:{id:"presented-by"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#presented-by"}},[e._v("#")]),e._v(" Presented by")]),e._v(" "),a("p",[e._v("Diego Calvanese, Guohui Xiao")]),e._v(" "),a("h3",{attrs:{id:"time"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#time"}},[e._v("#")]),e._v(" Time")]),e._v(" "),a("p",[e._v("Friday, 26 October 2018"),a("br"),e._v("\n08:15AM-09:45AM & 10:15AM-11:45AM & 01:00PM-02:30PM")]),e._v(" "),a("h3",{attrs:{id:"abstract"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#abstract"}},[e._v("#")]),e._v(" Abstract")]),e._v(" "),a("p",[e._v("In this tutorial, we cover such principles and the main (semantic)\ntechnologies underlying OBDA/I. In addition to the theoretical\nunderpinning, we provide participants also with a practical hands-on\nexperience on state-of-the-art tools. In this way, industry\npractitioners and researchers gain a good understanding of semantic\ntechnologies for OBDA/I, and are able to deploy them for their data\naccess and data integration needs in practical use-cases.")]),e._v(" "),a("h3",{attrs:{id:"schedule"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#schedule"}},[e._v("#")]),e._v(" Schedule")]),e._v(" "),a("ul",[a("li",[a("p",[e._v("Session 1. 08:15AM-09:45AM")]),e._v(" "),a("ul",[a("li",[e._v("Motivation")]),e._v(" "),a("li",[e._v("Elements of OBDA systems")]),e._v(" "),a("li",[e._v("Semantic Web standards")])])]),e._v(" "),a("li",[a("p",[e._v("Session 2. 10:15AM-11:45AM")]),e._v(" "),a("ul",[a("li",[e._v("OBDA systems and Use cases (30 mins)")]),e._v(" "),a("li",[e._v("Hands-on with Protege (60min) [link]")])])]),e._v(" "),a("li",[a("p",[e._v("Session 3. 01:00PM-02:30PM")]),e._v(" "),a("ul",[a("li",[e._v("Query processing (rewriting) and optimization (60min)")]),e._v(" "),a("li",[e._v("Demo on integrating Web APIs using Ontop and Denodo (30min)")])]),e._v(" "),a("p",[e._v("All the slides are available at\n"),a("a",{attrs:{href:"https://github.com/ontop/ontop-examples/tree/master/cikm-2018-tutorial",target:"_blank",rel:"noopener"}},[e._v("GitHub"),a("OutboundLink")],1)])])]),e._v(" "),a("h3",{attrs:{id:"target-audience"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#target-audience"}},[e._v("#")]),e._v(" Target Audience")]),e._v(" "),a("p",[e._v("The target audience of the tutorial are researchers, PhD students,\nand practitioners, who are interested in deepening their theoretical\nunderstanding of semantic technologies for accessing and integrating\ndata, and in getting insight into recent developments in this area.")]),e._v(" "),a("h3",{attrs:{id:"prerequisite-knowledge"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#prerequisite-knowledge"}},[e._v("#")]),e._v(" Prerequisite Knowledge")]),e._v(" "),a("p",[e._v("We assume from participants basic knowledge on relational database\nfoundations (relational model, relational algebra and SQL) and\ntechnologies (use of relational engines, JDBC). Some knowledge of\nfirst-order logic might be useful, but is not required to follow the\ntutorial. Similarly, background in Semantic Web standards, such as\nRDF and SPARQL can be of help, although these notions are an\nintegral part of the tutorial, and are introduced and discussed in\nthe first part.")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/71.22635f37.js b/assets/js/71.b3774464.js similarity index 98% rename from assets/js/71.22635f37.js rename to assets/js/71.b3774464.js index 23b2ba5aa..96a98503a 100644 --- a/assets/js/71.22635f37.js +++ b/assets/js/71.b3774464.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[71],{451:function(t,e,o){"use strict";o.r(e);var i=o(51),a=Object(i.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"presentation"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#presentation"}},[t._v("#")]),t._v(" Presentation")]),t._v(" "),o("p",[t._v("In this tutorial, we will see how to design a Virtual Knowledge Graph (VKG) specification, how to deploy it as a SPARQL endpoint, how to consume it and further more advanced topics.")]),t._v(" "),o("h2",{attrs:{id:"requirements"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),o("ul",[o("li",[o("a",{attrs:{href:"http://www.oracle.com/technetwork/java/javase/downloads/index.html",target:"_blank",rel:"noopener"}},[t._v("Java 11"),o("OutboundLink")],1)]),t._v(" "),o("li",[t._v("Latest version of Ontop from "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("GitHub"),o("OutboundLink")],1),t._v(" or "),o("a",{attrs:{href:"https://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("SourceForge"),o("OutboundLink")],1)]),t._v(" "),o("li",[t._v("H2 with preloaded datasets "),o("a",{attrs:{href:"h2.zip"}},[t._v("h2.zip")])]),t._v(" "),o("li",[o("a",{attrs:{href:"https://git-scm.com/",target:"_blank",rel:"noopener"}},[t._v("Git"),o("OutboundLink")],1)])]),t._v(" "),o("h2",{attrs:{id:"clone-this-repository"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#clone-this-repository"}},[t._v("#")]),t._v(" Clone this repository")]),t._v(" "),o("p",[t._v("Before start, please clone this repository in order to download all the files")]),t._v(" "),o("div",{staticClass:"language-console extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[t._v("git clone https://github.com/ontop/ontop-tutorial.git\ncd ontop-tutorial\n")])])]),o("h2",{attrs:{id:"program"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#program"}},[t._v("#")]),t._v(" Program")]),t._v(" "),o("ol",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/basic/setup.html"}},[t._v("Basics of VKG Modeling")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/basic/university-1.html"}},[t._v("Mapping the first data source")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/basic/university-2.html"}},[t._v("Mapping the second data source")])],1)])],1),t._v(" "),o("li",[o("a",{attrs:{href:"endpoint"}},[t._v("Deploying an Ontop SPARQL endpoint")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-cli.html"}},[t._v("Using Ontop CLI")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-docker.html"}},[t._v("Using Ontop Docker image")])],1)])]),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/interact/cli.html"}},[t._v("Interacting with an Ontop SPARQL endpoint")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/interact/cli.html"}},[t._v("Command Line Tools (curl, http)")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/interact/jupyter.html"}},[t._v("Python and Jupyter Notebook")])],1)])],1),t._v(" "),o("li",[o("a",{attrs:{href:"mapping"}},[t._v("Mapping Engineering")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/primary-keys.html"}},[t._v("Role of primary keys")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/foreign-keys.html"}},[t._v("Role of foreign keys")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/uri-templates.html"}},[t._v("Choice of the URI templates")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/existential.html"}},[t._v("Bonus: existential reasoning")])],1)])]),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/materialization/materialization.html"}},[t._v("Materialization using Ontop")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/materialization/materialization.html"}},[t._v("How to materialize data into a graph database using Ontop")])],1)])],1),t._v(" "),o("li",[o("a",{attrs:{href:"federation"}},[t._v("Federating multiple databases")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/federation/dremio/"}},[t._v("Ontop with Dremio")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/federation/denodo/"}},[t._v("Ontop with Denodo")])],1)])]),t._v(" "),o("li",[o("a",{attrs:{href:"lenses"}},[t._v("Lenses")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/basic-lens.html"}},[t._v("Basic Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/join-lens.html"}},[t._v("Join Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/sql-lens.html"}},[t._v("SQL Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/union-lens.html"}},[t._v("Union Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/flatten-lens.html"}},[t._v("Flatten Lens")])],1)])]),t._v(" "),o("li",[o("a",{attrs:{href:"external-tutorials"}},[t._v("External tutorials")])])])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[71],{447:function(t,e,o){"use strict";o.r(e);var i=o(51),a=Object(i.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"presentation"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#presentation"}},[t._v("#")]),t._v(" Presentation")]),t._v(" "),o("p",[t._v("In this tutorial, we will see how to design a Virtual Knowledge Graph (VKG) specification, how to deploy it as a SPARQL endpoint, how to consume it and further more advanced topics.")]),t._v(" "),o("h2",{attrs:{id:"requirements"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),o("ul",[o("li",[o("a",{attrs:{href:"http://www.oracle.com/technetwork/java/javase/downloads/index.html",target:"_blank",rel:"noopener"}},[t._v("Java 11"),o("OutboundLink")],1)]),t._v(" "),o("li",[t._v("Latest version of Ontop from "),o("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("GitHub"),o("OutboundLink")],1),t._v(" or "),o("a",{attrs:{href:"https://sourceforge.net/projects/ontop4obda/files/",target:"_blank",rel:"noopener"}},[t._v("SourceForge"),o("OutboundLink")],1)]),t._v(" "),o("li",[t._v("H2 with preloaded datasets "),o("a",{attrs:{href:"h2.zip"}},[t._v("h2.zip")])]),t._v(" "),o("li",[o("a",{attrs:{href:"https://git-scm.com/",target:"_blank",rel:"noopener"}},[t._v("Git"),o("OutboundLink")],1)])]),t._v(" "),o("h2",{attrs:{id:"clone-this-repository"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#clone-this-repository"}},[t._v("#")]),t._v(" Clone this repository")]),t._v(" "),o("p",[t._v("Before start, please clone this repository in order to download all the files")]),t._v(" "),o("div",{staticClass:"language-console extra-class"},[o("pre",{pre:!0,attrs:{class:"language-text"}},[o("code",[t._v("git clone https://github.com/ontop/ontop-tutorial.git\ncd ontop-tutorial\n")])])]),o("h2",{attrs:{id:"program"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#program"}},[t._v("#")]),t._v(" Program")]),t._v(" "),o("ol",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/basic/setup.html"}},[t._v("Basics of VKG Modeling")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/basic/university-1.html"}},[t._v("Mapping the first data source")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/basic/university-2.html"}},[t._v("Mapping the second data source")])],1)])],1),t._v(" "),o("li",[o("a",{attrs:{href:"endpoint"}},[t._v("Deploying an Ontop SPARQL endpoint")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-cli.html"}},[t._v("Using Ontop CLI")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-docker.html"}},[t._v("Using Ontop Docker image")])],1)])]),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/interact/cli.html"}},[t._v("Interacting with an Ontop SPARQL endpoint")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/interact/cli.html"}},[t._v("Command Line Tools (curl, http)")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/interact/jupyter.html"}},[t._v("Python and Jupyter Notebook")])],1)])],1),t._v(" "),o("li",[o("a",{attrs:{href:"mapping"}},[t._v("Mapping Engineering")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/primary-keys.html"}},[t._v("Role of primary keys")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/foreign-keys.html"}},[t._v("Role of foreign keys")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/uri-templates.html"}},[t._v("Choice of the URI templates")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/mapping/existential.html"}},[t._v("Bonus: existential reasoning")])],1)])]),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/materialization/materialization.html"}},[t._v("Materialization using Ontop")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/materialization/materialization.html"}},[t._v("How to materialize data into a graph database using Ontop")])],1)])],1),t._v(" "),o("li",[o("a",{attrs:{href:"federation"}},[t._v("Federating multiple databases")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/federation/dremio/"}},[t._v("Ontop with Dremio")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/federation/denodo/"}},[t._v("Ontop with Denodo")])],1)])]),t._v(" "),o("li",[o("a",{attrs:{href:"lenses"}},[t._v("Lenses")]),t._v(" "),o("ul",[o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/basic-lens.html"}},[t._v("Basic Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/join-lens.html"}},[t._v("Join Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/sql-lens.html"}},[t._v("SQL Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/union-lens.html"}},[t._v("Union Lens")])],1),t._v(" "),o("li",[o("RouterLink",{attrs:{to:"/tutorial/lenses/flatten-lens.html"}},[t._v("Flatten Lens")])],1)])]),t._v(" "),o("li",[o("a",{attrs:{href:"external-tutorials"}},[t._v("External tutorials")])])])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/72.0b75bd8c.js b/assets/js/72.a13877f6.js similarity index 92% rename from assets/js/72.0b75bd8c.js rename to assets/js/72.a13877f6.js index dad87179b..4f0e5336c 100644 --- a/assets/js/72.0b75bd8c.js +++ b/assets/js/72.a13877f6.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{448:function(t,o,e){"use strict";e.r(o);var a=e(51),n=Object(a.a)({},(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"ontop-api"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ontop-api"}},[t._v("#")]),t._v(" Ontop API")]),t._v(" "),e("p",[t._v("Ontop API examples are available at its own repository:")]),t._v(" "),e("p",[e("a",{attrs:{href:"https://github.com/ontop/ontop-api-examples",target:"_blank",rel:"noopener"}},[t._v("https://github.com/ontop/ontop-api-examples"),e("OutboundLink")],1)]),t._v(" "),e("p",[t._v("You can import it directly into a Java IDE. IntelliJ is recommended.")])])}),[],!1,null,null,null);o.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{450:function(t,o,e){"use strict";e.r(o);var a=e(51),n=Object(a.a)({},(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"ontop-api"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ontop-api"}},[t._v("#")]),t._v(" Ontop API")]),t._v(" "),e("p",[t._v("Ontop API examples are available at its own repository:")]),t._v(" "),e("p",[e("a",{attrs:{href:"https://github.com/ontop/ontop-api-examples",target:"_blank",rel:"noopener"}},[t._v("https://github.com/ontop/ontop-api-examples"),e("OutboundLink")],1)]),t._v(" "),e("p",[t._v("You can import it directly into a Java IDE. IntelliJ is recommended.")])])}),[],!1,null,null,null);o.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/74.601e7783.js b/assets/js/74.557f1c4c.js similarity index 99% rename from assets/js/74.601e7783.js rename to assets/js/74.557f1c4c.js index 17e51caff..1549b3144 100644 --- a/assets/js/74.601e7783.js +++ b/assets/js/74.557f1c4c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[74],{450:function(t,s,a){"use strict";a.r(s);var n=a(51),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"first-data-source-university-1"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#first-data-source-university-1"}},[t._v("#")]),t._v(" First data source: university 1")]),t._v(" "),a("p",[t._v("As a first step, we focus on the database of a first university. It has\nthe schema "),a("em",[t._v("uni1")]),t._v(".\nIt is composed of 5 tables.")]),t._v(" "),a("h4",{attrs:{id:"uni1-student"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-student"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.student")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.student")]),t._v(" contains the local ID, first and last names of the students.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("s_id")]),t._v(" "),a("th",[t._v("first_name")]),t._v(" "),a("th",[t._v("last_name")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("Mary")]),t._v(" "),a("td",[t._v("Smith")])]),t._v(" "),a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("John")]),t._v(" "),a("td",[t._v("Doe")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("s_id")]),t._v(" is a primary key.")]),t._v(" "),a("h4",{attrs:{id:"uni1-academic"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-academic"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.academic")])]),t._v(" "),a("p",[t._v("Similarly, the table "),a("em",[t._v("uni1.academic")]),t._v(" contains the local ID,\nfirst and last names of the academic staff, but also information about their position.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("a_id")]),t._v(" "),a("th",[t._v("first_name")]),t._v(" "),a("th",[t._v("last_name")]),t._v(" "),a("th",[t._v("position")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("Anna")]),t._v(" "),a("td",[t._v("Chambers")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("Edward")]),t._v(" "),a("td",[t._v("May")]),t._v(" "),a("td",[t._v("9")])]),t._v(" "),a("tr",[a("td",[t._v("3")]),t._v(" "),a("td",[t._v("Rachel")]),t._v(" "),a("td",[t._v("Ward")]),t._v(" "),a("td",[t._v("8")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("position")]),t._v(" is populated with magic numbers:")]),t._v(" "),a("ul",[a("li",[t._v("1 -> Full Professor")]),t._v(" "),a("li",[t._v("2 -> Associate Professor")]),t._v(" "),a("li",[t._v("3 -> Assistant Professor")]),t._v(" "),a("li",[t._v("8 -> External Teacher")]),t._v(" "),a("li",[t._v("9 -> PostDoc")])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("a_id")]),t._v(" is a primary key.")]),t._v(" "),a("h4",{attrs:{id:"uni1-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-course"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.course")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.course")]),t._v(" contains the local ID\nand the title of the courses.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("c_id")]),t._v(" "),a("th",[t._v("title")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("Linear Algebra")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("c_id")]),t._v(" is a primary key.")]),t._v(" "),a("h4",{attrs:{id:"uni1-teaching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-teaching"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.teaching")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.teaching")]),t._v(" contains the n-n relation\nbetween courses and teachers.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("c_id")]),t._v(" "),a("th",[t._v("a_id")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("2")])])])]),t._v(" "),a("p",[t._v("There is no primary key, but two foreign keys to the tables "),a("em",[t._v("uni1.course")]),t._v(" and "),a("em",[t._v("uni1.academic")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"uni1-course-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-course-registration"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.course-registration")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.course-registration")]),t._v(" contains the n-n relation\nbetween courses and students.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("c_id")]),t._v(" "),a("th",[t._v("s_id")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("2")])])])]),t._v(" "),a("p",[t._v("There is no primary key, but two foreign keys to the tables "),a("em",[t._v("uni1.course")]),t._v(" and "),a("em",[t._v("uni1.student")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"ontology-classes-and-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontology-classes-and-properties"}},[t._v("#")]),t._v(" Ontology: classes and properties")]),t._v(" "),a("ol",[a("li",[t._v("Download "),a("a",{attrs:{href:"university.ttl"}},[t._v("this OWL ontology file")]),t._v(".")]),t._v(" "),a("li",[t._v("Download "),a("a",{attrs:{href:"university.obda"}},[t._v("this mapping file")]),t._v(".")]),t._v(" "),a("li",[t._v("Download "),a("a",{attrs:{href:"university.properties"}},[t._v("this properties file")]),t._v(".")]),t._v(" "),a("li",[t._v("In Protégé, go to "),a("em",[t._v("File/Open...")]),t._v(" to load the ontology file (be sure you have all three files in the same folder).")]),t._v(" "),a("li",[t._v("In the tab "),a("em",[t._v("Classes")]),t._v(" you can visualize the class hierarchy\n"),a("figure",[a("img",{attrs:{src:"ontology_classes.png",width:"303px"}})])]),t._v(" "),a("li",[t._v("In the tab "),a("em",[t._v("Object properties")]),t._v(" you can see the properties "),a("em",[t._v("attends")]),t._v(", "),a("em",[t._v("isGivenAt")]),t._v(", "),a("em",[t._v("isSupervisedBy")]),t._v(", "),a("em",[t._v("isTaughtBy")]),t._v(" and "),a("em",[t._v("teaches")]),t._v(" (with its two sub-properties "),a("em",[t._v("givesLab")]),t._v(" and "),a("em",[t._v("givesLecture")]),t._v(").\n"),a("figure",[a("span",[a("img",{attrs:{src:"ontology_object_properties.png",width:"208px"}})])])]),t._v(" "),a("li",[t._v("In the tab "),a("em",[t._v("Data properties")]),t._v(" you can see the properties "),a("em",[t._v("firstName")]),t._v(", "),a("em",[t._v("lastName")]),t._v(" and "),a("em",[t._v("title")]),t._v(".\n"),a("figure",[a("img",{attrs:{src:"ontology_data_properties.png",width:"197px"}})])])]),t._v(" "),a("h2",{attrs:{id:"mappings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mappings"}},[t._v("#")]),t._v(" Mappings")]),t._v(" "),a("ol",[a("li",[t._v("Go to the "),a("em",[t._v("Window")]),t._v(" -> "),a("em",[t._v("Tabs")]),t._v(" -> "),a("em",[t._v("Ontop mapping")]),t._v(" tab")]),t._v(" "),a("li",[t._v("Test the already defined connection configuration using the "),a("em",[t._v("Test Connection")]),t._v(" button")]),t._v(" "),a("li",[t._v("Switch to the "),a("em",[t._v("Mapping Manager")]),t._v(" tab in the ontop mappings tab")]),t._v(" "),a("li",[t._v("You should see a first mapping assertion called "),a("em",[t._v("uni1-student")])]),t._v(" "),a("li",[t._v("Double-click on it to observe it and then close this pop-up window.")])]),t._v(" "),a("h4",{attrs:{id:"mapping-uni1-student"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-student"}},[t._v("#")]),t._v(" Mapping uni1-student")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Student")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"student"')]),t._v("\n")])])]),a("p",[t._v("Some remarks:")]),t._v(" "),a("ul",[a("li",[t._v("The target part is described using a "),a("a",{attrs:{href:"https://github.com/ontop/ontop/wiki/TurtleSyntax",target:"_blank",rel:"noopener"}},[t._v("Turtle-like syntax"),a("OutboundLink")],1),t._v(" while the source part is a regular SQL query.")]),t._v(" "),a("li",[t._v("We used the primary key "),a("code",[t._v("s_id")]),t._v(" to create the IRI. "),a("RouterLink",{attrs:{to:"/tutorial/mapping/primary-keys.html"}},[t._v("As we will see later")]),t._v(",\nthis practice enables Ontop to remove self-joins, which is very important for optimizing\nthe query performance.")],1),t._v(" "),a("li",[t._v("This entry could be split into three mapping assertions")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Student")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("p",[t._v("Let us now add the other mapping assertions by clicking on "),a("em",[t._v("create")]),t._v(":")]),t._v(" "),a("h4",{attrs:{id:"mapping-uni1-academic"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-academic"}},[t._v("#")]),t._v(" Mapping uni1-academic")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FacultyMember")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"academic"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-course"}},[t._v("#")]),t._v(" Mapping uni1-course")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Course")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("title")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("title"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isGivenAt")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/university "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-teaching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-teaching"}},[t._v("#")]),t._v(" Mapping uni1-teaching")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("teaches")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"teaching"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-registration"}},[t._v("#")]),t._v(" Mapping uni1-registration")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("attends")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course-registration"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-fullprofessor"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-fullprofessor"}},[t._v("#")]),t._v(" Mapping uni1-fullProfessor")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FullProfessor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"academic"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"position"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n")])])]),a("p",[t._v("Then proceed in a similar way for the other positions (associate professor, assistant professor, external teacher, postdoc).")]),t._v(" "),a("h3",{attrs:{id:"sparql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[t._v("#")]),t._v(" SPARQL")]),t._v(" "),a("ol",[a("li",[t._v("Run Protégé and go to the "),a("em",[t._v("Window")]),t._v(" -> "),a("em",[t._v("Tabs")]),t._v(" -> "),a("em",[t._v("Ontop SPARQL")]),t._v(" tab")]),t._v(" "),a("li",[t._v("Select Ontop in the "),a("em",[t._v("Reasoner")]),t._v(" menu")]),t._v(" "),a("li",[t._v("Start the reasoner")]),t._v(" "),a("li",[t._v("Add a query in the "),a("em",[t._v("Query Manager")]),t._v(" and run the following query in "),a("em",[t._v("SPARQL query editor")]),t._v(":")])]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DISTINCT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FullProfessor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Tip: do a right click on the SPARQL query field to visualize the generated SQL query.")]),t._v(" "),a("h3",{attrs:{id:"inference"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#inference"}},[t._v("#")]),t._v(" Inference")]),t._v(" "),a("p",[t._v("Ontop embeds some inference capabilities and is thus capable of answering a query like the following:")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DISTINCT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?teacher")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?teacher")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Teacher")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("These inference capabilities can be, for a large part, understood as the ability to infer new mappings\nfrom the original mappings and the ontological axioms (e.g. Professor is a sub-class of Teacher). We will discuss it "),a("RouterLink",{attrs:{to:"/tutorial/mapping/foreign-keys.html"}},[t._v("later in this tutorial")]),t._v(".")],1)])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[74],{452:function(t,s,a){"use strict";a.r(s);var n=a(51),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"first-data-source-university-1"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#first-data-source-university-1"}},[t._v("#")]),t._v(" First data source: university 1")]),t._v(" "),a("p",[t._v("As a first step, we focus on the database of a first university. It has\nthe schema "),a("em",[t._v("uni1")]),t._v(".\nIt is composed of 5 tables.")]),t._v(" "),a("h4",{attrs:{id:"uni1-student"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-student"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.student")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.student")]),t._v(" contains the local ID, first and last names of the students.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("s_id")]),t._v(" "),a("th",[t._v("first_name")]),t._v(" "),a("th",[t._v("last_name")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("Mary")]),t._v(" "),a("td",[t._v("Smith")])]),t._v(" "),a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("John")]),t._v(" "),a("td",[t._v("Doe")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("s_id")]),t._v(" is a primary key.")]),t._v(" "),a("h4",{attrs:{id:"uni1-academic"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-academic"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.academic")])]),t._v(" "),a("p",[t._v("Similarly, the table "),a("em",[t._v("uni1.academic")]),t._v(" contains the local ID,\nfirst and last names of the academic staff, but also information about their position.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("a_id")]),t._v(" "),a("th",[t._v("first_name")]),t._v(" "),a("th",[t._v("last_name")]),t._v(" "),a("th",[t._v("position")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("Anna")]),t._v(" "),a("td",[t._v("Chambers")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("Edward")]),t._v(" "),a("td",[t._v("May")]),t._v(" "),a("td",[t._v("9")])]),t._v(" "),a("tr",[a("td",[t._v("3")]),t._v(" "),a("td",[t._v("Rachel")]),t._v(" "),a("td",[t._v("Ward")]),t._v(" "),a("td",[t._v("8")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("position")]),t._v(" is populated with magic numbers:")]),t._v(" "),a("ul",[a("li",[t._v("1 -> Full Professor")]),t._v(" "),a("li",[t._v("2 -> Associate Professor")]),t._v(" "),a("li",[t._v("3 -> Assistant Professor")]),t._v(" "),a("li",[t._v("8 -> External Teacher")]),t._v(" "),a("li",[t._v("9 -> PostDoc")])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("a_id")]),t._v(" is a primary key.")]),t._v(" "),a("h4",{attrs:{id:"uni1-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-course"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.course")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.course")]),t._v(" contains the local ID\nand the title of the courses.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("c_id")]),t._v(" "),a("th",[t._v("title")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("Linear Algebra")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("c_id")]),t._v(" is a primary key.")]),t._v(" "),a("h4",{attrs:{id:"uni1-teaching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-teaching"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.teaching")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.teaching")]),t._v(" contains the n-n relation\nbetween courses and teachers.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("c_id")]),t._v(" "),a("th",[t._v("a_id")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("2")])])])]),t._v(" "),a("p",[t._v("There is no primary key, but two foreign keys to the tables "),a("em",[t._v("uni1.course")]),t._v(" and "),a("em",[t._v("uni1.academic")]),t._v(".")]),t._v(" "),a("h4",{attrs:{id:"uni1-course-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni1-course-registration"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni1.course-registration")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni1.course-registration")]),t._v(" contains the n-n relation\nbetween courses and students.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("c_id")]),t._v(" "),a("th",[t._v("s_id")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("1234")]),t._v(" "),a("td",[t._v("2")])])])]),t._v(" "),a("p",[t._v("There is no primary key, but two foreign keys to the tables "),a("em",[t._v("uni1.course")]),t._v(" and "),a("em",[t._v("uni1.student")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"ontology-classes-and-properties"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontology-classes-and-properties"}},[t._v("#")]),t._v(" Ontology: classes and properties")]),t._v(" "),a("ol",[a("li",[t._v("Download "),a("a",{attrs:{href:"university.ttl"}},[t._v("this OWL ontology file")]),t._v(".")]),t._v(" "),a("li",[t._v("Download "),a("a",{attrs:{href:"university.obda"}},[t._v("this mapping file")]),t._v(".")]),t._v(" "),a("li",[t._v("Download "),a("a",{attrs:{href:"university.properties"}},[t._v("this properties file")]),t._v(".")]),t._v(" "),a("li",[t._v("In Protégé, go to "),a("em",[t._v("File/Open...")]),t._v(" to load the ontology file (be sure you have all three files in the same folder).")]),t._v(" "),a("li",[t._v("In the tab "),a("em",[t._v("Classes")]),t._v(" you can visualize the class hierarchy\n"),a("figure",[a("img",{attrs:{src:"ontology_classes.png",width:"303px"}})])]),t._v(" "),a("li",[t._v("In the tab "),a("em",[t._v("Object properties")]),t._v(" you can see the properties "),a("em",[t._v("attends")]),t._v(", "),a("em",[t._v("isGivenAt")]),t._v(", "),a("em",[t._v("isSupervisedBy")]),t._v(", "),a("em",[t._v("isTaughtBy")]),t._v(" and "),a("em",[t._v("teaches")]),t._v(" (with its two sub-properties "),a("em",[t._v("givesLab")]),t._v(" and "),a("em",[t._v("givesLecture")]),t._v(").\n"),a("figure",[a("span",[a("img",{attrs:{src:"ontology_object_properties.png",width:"208px"}})])])]),t._v(" "),a("li",[t._v("In the tab "),a("em",[t._v("Data properties")]),t._v(" you can see the properties "),a("em",[t._v("firstName")]),t._v(", "),a("em",[t._v("lastName")]),t._v(" and "),a("em",[t._v("title")]),t._v(".\n"),a("figure",[a("img",{attrs:{src:"ontology_data_properties.png",width:"197px"}})])])]),t._v(" "),a("h2",{attrs:{id:"mappings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mappings"}},[t._v("#")]),t._v(" Mappings")]),t._v(" "),a("ol",[a("li",[t._v("Go to the "),a("em",[t._v("Window")]),t._v(" -> "),a("em",[t._v("Tabs")]),t._v(" -> "),a("em",[t._v("Ontop mapping")]),t._v(" tab")]),t._v(" "),a("li",[t._v("Test the already defined connection configuration using the "),a("em",[t._v("Test Connection")]),t._v(" button")]),t._v(" "),a("li",[t._v("Switch to the "),a("em",[t._v("Mapping Manager")]),t._v(" tab in the ontop mappings tab")]),t._v(" "),a("li",[t._v("You should see a first mapping assertion called "),a("em",[t._v("uni1-student")])]),t._v(" "),a("li",[t._v("Double-click on it to observe it and then close this pop-up window.")])]),t._v(" "),a("h4",{attrs:{id:"mapping-uni1-student"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-student"}},[t._v("#")]),t._v(" Mapping uni1-student")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Student")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"student"')]),t._v("\n")])])]),a("p",[t._v("Some remarks:")]),t._v(" "),a("ul",[a("li",[t._v("The target part is described using a "),a("a",{attrs:{href:"https://github.com/ontop/ontop/wiki/TurtleSyntax",target:"_blank",rel:"noopener"}},[t._v("Turtle-like syntax"),a("OutboundLink")],1),t._v(" while the source part is a regular SQL query.")]),t._v(" "),a("li",[t._v("We used the primary key "),a("code",[t._v("s_id")]),t._v(" to create the IRI. "),a("RouterLink",{attrs:{to:"/tutorial/mapping/primary-keys.html"}},[t._v("As we will see later")]),t._v(",\nthis practice enables Ontop to remove self-joins, which is very important for optimizing\nthe query performance.")],1),t._v(" "),a("li",[t._v("This entry could be split into three mapping assertions")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Student")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("p",[t._v("Let us now add the other mapping assertions by clicking on "),a("em",[t._v("create")]),t._v(":")]),t._v(" "),a("h4",{attrs:{id:"mapping-uni1-academic"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-academic"}},[t._v("#")]),t._v(" Mapping uni1-academic")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FacultyMember")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"academic"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-course"}},[t._v("#")]),t._v(" Mapping uni1-course")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Course")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("title")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("title"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isGivenAt")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/university "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-teaching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-teaching"}},[t._v("#")]),t._v(" Mapping uni1-teaching")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("teaches")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"teaching"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-registration"}},[t._v("#")]),t._v(" Mapping uni1-registration")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("attends")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course-registration"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-fullprofessor"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-fullprofessor"}},[t._v("#")]),t._v(" Mapping uni1-fullProfessor")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni1")])]),t._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FullProfessor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"academic"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"position"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n")])])]),a("p",[t._v("Then proceed in a similar way for the other positions (associate professor, assistant professor, external teacher, postdoc).")]),t._v(" "),a("h3",{attrs:{id:"sparql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[t._v("#")]),t._v(" SPARQL")]),t._v(" "),a("ol",[a("li",[t._v("Run Protégé and go to the "),a("em",[t._v("Window")]),t._v(" -> "),a("em",[t._v("Tabs")]),t._v(" -> "),a("em",[t._v("Ontop SPARQL")]),t._v(" tab")]),t._v(" "),a("li",[t._v("Select Ontop in the "),a("em",[t._v("Reasoner")]),t._v(" menu")]),t._v(" "),a("li",[t._v("Start the reasoner")]),t._v(" "),a("li",[t._v("Add a query in the "),a("em",[t._v("Query Manager")]),t._v(" and run the following query in "),a("em",[t._v("SPARQL query editor")]),t._v(":")])]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DISTINCT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FullProfessor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Tip: do a right click on the SPARQL query field to visualize the generated SQL query.")]),t._v(" "),a("h3",{attrs:{id:"inference"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#inference"}},[t._v("#")]),t._v(" Inference")]),t._v(" "),a("p",[t._v("Ontop embeds some inference capabilities and is thus capable of answering a query like the following:")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DISTINCT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?teacher")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?teacher")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Teacher")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("These inference capabilities can be, for a large part, understood as the ability to infer new mappings\nfrom the original mappings and the ontological axioms (e.g. Professor is a sub-class of Teacher). We will discuss it "),a("RouterLink",{attrs:{to:"/tutorial/mapping/foreign-keys.html"}},[t._v("later in this tutorial")]),t._v(".")],1)])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/75.5f9e9c52.js b/assets/js/75.480169f5.js similarity index 99% rename from assets/js/75.5f9e9c52.js rename to assets/js/75.480169f5.js index 473504c10..0c2510d0e 100644 --- a/assets/js/75.5f9e9c52.js +++ b/assets/js/75.480169f5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[75],{452:function(t,s,a){"use strict";a.r(s);var n=a(51),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"second-data-source-university-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#second-data-source-university-2"}},[t._v("#")]),t._v(" Second data source: university 2")]),t._v(" "),a("p",[t._v("We now consider the database of another university. It has a different schema,\ncomposed of three tables:")]),t._v(" "),a("h4",{attrs:{id:"uni2-person"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni2-person"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni2.person")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni2.person")]),t._v(" describes the students and the academic staff of the university.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("pid")]),t._v(" "),a("th",[t._v("fname")]),t._v(" "),a("th",[t._v("lname")]),t._v(" "),a("th",[t._v("status")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("Zak")]),t._v(" "),a("td",[t._v("Lane")]),t._v(" "),a("td",[t._v("8")])]),t._v(" "),a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("Mattie")]),t._v(" "),a("td",[t._v("Moses")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("3")]),t._v(" "),a("td",[t._v("Céline")]),t._v(" "),a("td",[t._v("Mendez")]),t._v(" "),a("td",[t._v("2")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("status")]),t._v(" is populated with magic numbers (they differ from the ones of the first university):")]),t._v(" "),a("ul",[a("li",[t._v("1 -> Undergraduate Student")]),t._v(" "),a("li",[t._v("2 -> Graduate Student")]),t._v(" "),a("li",[t._v("3 -> PostDoc")]),t._v(" "),a("li",[t._v("7 -> Full Professor")]),t._v(" "),a("li",[t._v("8 -> Associate Professor")]),t._v(" "),a("li",[t._v("9 -> Assistant Professor")])]),t._v(" "),a("p",[t._v("As you can see, undergraduate and graduate students are now distinguished.")]),t._v(" "),a("h4",{attrs:{id:"uni2-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni2-course"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni2.course")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni2.course")]),t._v(" contains information\nabout courses, their topic, their lecturer and their lab teacher.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("cid")]),t._v(" "),a("th",[t._v("lecturer")]),t._v(" "),a("th",[t._v("lab_teacher")]),t._v(" "),a("th",[t._v("topic")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("3")]),t._v(" "),a("td",[t._v("Information security")])])])]),t._v(" "),a("p",[a("code",[t._v("cid")]),t._v(" is a primary key.\nNote that in this data source, there are at most two teachers per course. Lecturers and lab teachers are now distinguished.")]),t._v(" "),a("h4",{attrs:{id:"uni2-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni2-registration"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni2.registration")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni2.registration")]),t._v(" contains the n-n relation\nbetween courses and attendees.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("pid")]),t._v(" "),a("th",[t._v("cid")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("1")])])])]),t._v(" "),a("p",[t._v("There is no primary key, but two foreign keys to the tables "),a("em",[t._v("uni2.course")]),t._v(" and "),a("em",[t._v("uni2.person")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"new-mappings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-mappings"}},[t._v("#")]),t._v(" New mappings")]),t._v(" "),a("p",[t._v("Let us add the following mapping assertions together with the previous one.")]),t._v(" "),a("h4",{attrs:{id:"mapping-uni2-person"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-person"}},[t._v("#")]),t._v(" Mapping uni2.person")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Person")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("fname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("lname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-course"}},[t._v("#")]),t._v(" Mapping uni2-course")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Course")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("title")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("topic"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isGivenAt")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/university "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-lecturer"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-lecturer"}},[t._v("#")]),t._v(" Mapping uni2-lecturer")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("lecturer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("givesLecture")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-lab-teacher"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-lab-teacher"}},[t._v("#")]),t._v(" Mapping uni2-lab-teacher")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("lab_teacher"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("givesLab")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-registration"}},[t._v("#")]),t._v(" Mapping uni2-registration")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("attends")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"registration"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-undergraduate"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-undergraduate"}},[t._v("#")]),t._v(" Mapping uni2-undergraduate")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("UndergraduateStudent")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"status"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n")])])]),a("p",[t._v("And so on for the graduate students, postdocs, full professors, associate professors and assistant professors.")]),t._v(" "),a("h2",{attrs:{id:"sparql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[t._v("#")]),t._v(" SPARQL")]),t._v(" "),a("p",[t._v("We can now run the previous SPARQL queries and observe that the results combine\nentries from the two datasets.")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[75],{451:function(t,s,a){"use strict";a.r(s);var n=a(51),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"second-data-source-university-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#second-data-source-university-2"}},[t._v("#")]),t._v(" Second data source: university 2")]),t._v(" "),a("p",[t._v("We now consider the database of another university. It has a different schema,\ncomposed of three tables:")]),t._v(" "),a("h4",{attrs:{id:"uni2-person"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni2-person"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni2.person")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni2.person")]),t._v(" describes the students and the academic staff of the university.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("pid")]),t._v(" "),a("th",[t._v("fname")]),t._v(" "),a("th",[t._v("lname")]),t._v(" "),a("th",[t._v("status")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("Zak")]),t._v(" "),a("td",[t._v("Lane")]),t._v(" "),a("td",[t._v("8")])]),t._v(" "),a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("Mattie")]),t._v(" "),a("td",[t._v("Moses")]),t._v(" "),a("td",[t._v("1")])]),t._v(" "),a("tr",[a("td",[t._v("3")]),t._v(" "),a("td",[t._v("Céline")]),t._v(" "),a("td",[t._v("Mendez")]),t._v(" "),a("td",[t._v("2")])])])]),t._v(" "),a("p",[t._v("The column "),a("em",[t._v("status")]),t._v(" is populated with magic numbers (they differ from the ones of the first university):")]),t._v(" "),a("ul",[a("li",[t._v("1 -> Undergraduate Student")]),t._v(" "),a("li",[t._v("2 -> Graduate Student")]),t._v(" "),a("li",[t._v("3 -> PostDoc")]),t._v(" "),a("li",[t._v("7 -> Full Professor")]),t._v(" "),a("li",[t._v("8 -> Associate Professor")]),t._v(" "),a("li",[t._v("9 -> Assistant Professor")])]),t._v(" "),a("p",[t._v("As you can see, undergraduate and graduate students are now distinguished.")]),t._v(" "),a("h4",{attrs:{id:"uni2-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni2-course"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni2.course")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni2.course")]),t._v(" contains information\nabout courses, their topic, their lecturer and their lab teacher.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("cid")]),t._v(" "),a("th",[t._v("lecturer")]),t._v(" "),a("th",[t._v("lab_teacher")]),t._v(" "),a("th",[t._v("topic")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("1")]),t._v(" "),a("td",[t._v("1")]),t._v(" "),a("td",[t._v("3")]),t._v(" "),a("td",[t._v("Information security")])])])]),t._v(" "),a("p",[a("code",[t._v("cid")]),t._v(" is a primary key.\nNote that in this data source, there are at most two teachers per course. Lecturers and lab teachers are now distinguished.")]),t._v(" "),a("h4",{attrs:{id:"uni2-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#uni2-registration"}},[t._v("#")]),t._v(" "),a("em",[t._v("uni2.registration")])]),t._v(" "),a("p",[t._v("The table "),a("em",[t._v("uni2.registration")]),t._v(" contains the n-n relation\nbetween courses and attendees.")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("pid")]),t._v(" "),a("th",[t._v("cid")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("2")]),t._v(" "),a("td",[t._v("1")])])])]),t._v(" "),a("p",[t._v("There is no primary key, but two foreign keys to the tables "),a("em",[t._v("uni2.course")]),t._v(" and "),a("em",[t._v("uni2.person")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"new-mappings"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-mappings"}},[t._v("#")]),t._v(" New mappings")]),t._v(" "),a("p",[t._v("Let us add the following mapping assertions together with the previous one.")]),t._v(" "),a("h4",{attrs:{id:"mapping-uni2-person"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-person"}},[t._v("#")]),t._v(" Mapping uni2.person")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Person")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("fname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("lname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-course"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-course"}},[t._v("#")]),t._v(" Mapping uni2-course")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Course")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("title")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("topic"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("string")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isGivenAt")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/university "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-lecturer"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-lecturer"}},[t._v("#")]),t._v(" Mapping uni2-lecturer")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("lecturer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("givesLecture")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-lab-teacher"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-lab-teacher"}},[t._v("#")]),t._v(" Mapping uni2-lab-teacher")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("lab_teacher"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("givesLab")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"course"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-registration"}},[t._v("#")]),t._v(" Mapping uni2-registration")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("attends")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"registration"')]),t._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-undergraduate"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-undergraduate"}},[t._v("#")]),t._v(" Mapping uni2-undergraduate")]),t._v(" "),a("ul",[a("li",[t._v("Target:")])]),t._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("uni2")])]),t._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("UndergraduateStudent")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])]),a("ul",[a("li",[t._v("Source:")])]),t._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"person"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"status"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n")])])]),a("p",[t._v("And so on for the graduate students, postdocs, full professors, associate professors and assistant professors.")]),t._v(" "),a("h2",{attrs:{id:"sparql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql"}},[t._v("#")]),t._v(" SPARQL")]),t._v(" "),a("p",[t._v("We can now run the previous SPARQL queries and observe that the results combine\nentries from the two datasets.")])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/76.96406f20.js b/assets/js/76.01ab5275.js similarity index 92% rename from assets/js/76.96406f20.js rename to assets/js/76.01ab5275.js index 65a6e7b99..13bc862bb 100644 --- a/assets/js/76.96406f20.js +++ b/assets/js/76.01ab5275.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[76],{453:function(t,e,n){"use strict";n.r(e);var o=n(51),r=Object(o.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"deploying-a-sparql-endpoint"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#deploying-a-sparql-endpoint"}},[t._v("#")]),t._v(" Deploying a SPARQL endpoint")]),t._v(" "),n("p",[t._v("To deploy a SPARQL endpoint, we recommend to use the Ontop endpoint from the")]),t._v(" "),n("ul",[n("li",[n("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-cli.html"}},[t._v("Command Line Interface")]),t._v(" or from the")],1),t._v(" "),n("li",[n("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-docker.html"}},[t._v("Docker image")])],1)])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[76],{454:function(t,e,n){"use strict";n.r(e);var o=n(51),r=Object(o.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"deploying-a-sparql-endpoint"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#deploying-a-sparql-endpoint"}},[t._v("#")]),t._v(" Deploying a SPARQL endpoint")]),t._v(" "),n("p",[t._v("To deploy a SPARQL endpoint, we recommend to use the Ontop endpoint from the")]),t._v(" "),n("ul",[n("li",[n("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-cli.html"}},[t._v("Command Line Interface")]),t._v(" or from the")],1),t._v(" "),n("li",[n("RouterLink",{attrs:{to:"/tutorial/endpoint/endpoint-docker.html"}},[t._v("Docker image")])],1)])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/77.4257ac6f.js b/assets/js/77.af4d3740.js similarity index 97% rename from assets/js/77.4257ac6f.js rename to assets/js/77.af4d3740.js index e5c61ea0a..f098a256c 100644 --- a/assets/js/77.4257ac6f.js +++ b/assets/js/77.af4d3740.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[77],{454:function(t,e,n){"use strict";n.r(e);var o=n(51),i=Object(o.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"setting-up-an-ontop-sparql-endpoint-with-ontop-cli"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-an-ontop-sparql-endpoint-with-ontop-cli"}},[t._v("#")]),t._v(" Setting up an Ontop SPARQL endpoint with Ontop CLI")]),t._v(" "),n("ol",[n("li",[t._v("Download "),n("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Ontop CLI"),n("OutboundLink")],1),t._v(" and unzip it to a directory, which is denoted as "),n("code",[t._v("$ONTOP_CLI_DIR")]),t._v(" below.")]),t._v(" "),n("li",[t._v("Copy the H2 jdbc driver to "),n("code",[t._v("$ONTOP_CLI_DIR/jdbc")]),t._v(" (if not done yet)\n"),n("ul",[n("li",[t._v("Mac/Linux: "),n("code",[t._v("cp jdbc/h2-1.4.196.jar $ONTOP_CLI_IDR/jdbc")])])])]),t._v(" "),n("li",[t._v("Start the h2 database.")]),t._v(" "),n("li",[t._v("Go to the "),n("code",[t._v("endpoint/")]),t._v(" directory. Alternatively, if you don't have already the tutorial files, you can download "),n("a",{attrs:{href:"input/university-complete.ttl"}},[t._v("this OWL ontology file")]),t._v(", "),n("a",{attrs:{href:"input/university-complete.obda"}},[t._v("this mapping file")]),t._v(", "),n("a",{attrs:{href:"input/university-complete.properties"}},[t._v("this properties file")]),t._v(" and paste them in "),n("code",[t._v("input/")]),t._v(".")]),t._v(" "),n("li",[t._v("Start the Ontop endpoint. On Mac/Linux:")])]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("$ONTOP_CLI_DIR/ontop endpoint \\\n --ontology=input/university-complete.ttl \\\n --mapping=input/university-complete.obda \\\n --properties=input/university-complete.properties \\\n --cors-allowed-origins=http://yasgui.org # if needed\n")])])]),n("p",[t._v("On Windows:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("ontop endpoint ^\n --ontology=input/university-complete.ttl ^\n --mapping=input/university-complete.obda ^\n --properties=input/university-complete.properties ^\n --cors-allowed-origins=http://yasgui.org \n")])])]),n("ol",{attrs:{start:"6"}},[n("li",[t._v("Open the web interface of the SPARQL endpoint to try some queries:\n"),n("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),n("OutboundLink")],1)])])])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[77],{453:function(t,e,n){"use strict";n.r(e);var o=n(51),i=Object(o.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"setting-up-an-ontop-sparql-endpoint-with-ontop-cli"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-an-ontop-sparql-endpoint-with-ontop-cli"}},[t._v("#")]),t._v(" Setting up an Ontop SPARQL endpoint with Ontop CLI")]),t._v(" "),n("ol",[n("li",[t._v("Download "),n("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("Ontop CLI"),n("OutboundLink")],1),t._v(" and unzip it to a directory, which is denoted as "),n("code",[t._v("$ONTOP_CLI_DIR")]),t._v(" below.")]),t._v(" "),n("li",[t._v("Copy the H2 jdbc driver to "),n("code",[t._v("$ONTOP_CLI_DIR/jdbc")]),t._v(" (if not done yet)\n"),n("ul",[n("li",[t._v("Mac/Linux: "),n("code",[t._v("cp jdbc/h2-1.4.196.jar $ONTOP_CLI_IDR/jdbc")])])])]),t._v(" "),n("li",[t._v("Start the h2 database.")]),t._v(" "),n("li",[t._v("Go to the "),n("code",[t._v("endpoint/")]),t._v(" directory. Alternatively, if you don't have already the tutorial files, you can download "),n("a",{attrs:{href:"input/university-complete.ttl"}},[t._v("this OWL ontology file")]),t._v(", "),n("a",{attrs:{href:"input/university-complete.obda"}},[t._v("this mapping file")]),t._v(", "),n("a",{attrs:{href:"input/university-complete.properties"}},[t._v("this properties file")]),t._v(" and paste them in "),n("code",[t._v("input/")]),t._v(".")]),t._v(" "),n("li",[t._v("Start the Ontop endpoint. On Mac/Linux:")])]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("$ONTOP_CLI_DIR/ontop endpoint \\\n --ontology=input/university-complete.ttl \\\n --mapping=input/university-complete.obda \\\n --properties=input/university-complete.properties \\\n --cors-allowed-origins=http://yasgui.org # if needed\n")])])]),n("p",[t._v("On Windows:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("ontop endpoint ^\n --ontology=input/university-complete.ttl ^\n --mapping=input/university-complete.obda ^\n --properties=input/university-complete.properties ^\n --cors-allowed-origins=http://yasgui.org \n")])])]),n("ol",{attrs:{start:"6"}},[n("li",[t._v("Open the web interface of the SPARQL endpoint to try some queries:\n"),n("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),n("OutboundLink")],1)])])])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/78.8c0cdac5.js b/assets/js/78.6102aa0a.js similarity index 99% rename from assets/js/78.8c0cdac5.js rename to assets/js/78.6102aa0a.js index d93d69437..8eb247eb2 100644 --- a/assets/js/78.8c0cdac5.js +++ b/assets/js/78.6102aa0a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[78],{455:function(t,e,n){"use strict";n.r(e);var s=n(51),a=Object(s.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"setting-up-an-ontop-sparql-endpoint-with-docker"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-an-ontop-sparql-endpoint-with-docker"}},[t._v("#")]),t._v(" Setting up an Ontop SPARQL endpoint with Docker")]),t._v(" "),n("h2",{attrs:{id:"how-to-use-this-image"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use-this-image"}},[t._v("#")]),t._v(" How to use this image")]),t._v(" "),n("p",[t._v("The Docker image "),n("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("ontop/ontop"),n("OutboundLink")],1),t._v(" is for fast setting up an Ontop SPARQL endpoint.\nOne can either use this image directly, or create a dedicated image based on this image.")]),t._v(" "),n("ol",[n("li",[t._v("Go to the "),n("code",[t._v("endpoint/")]),t._v(" directory. Alternatively, if you don't have already the tutorial files, you can download "),n("a",{attrs:{href:"input/university-complete.ttl"}},[t._v("this OWL ontology file")]),t._v(", "),n("a",{attrs:{href:"input/university-complete.obda"}},[t._v("this mapping file")]),t._v(", "),n("a",{attrs:{href:"input/university-complete.properties"}},[t._v("this properties file")]),t._v(" and paste them in "),n("code",[t._v("input/")]),t._v(".")]),t._v(" "),n("li",[t._v("Make sure to have the "),n("code",[t._v("jdbc/")]),t._v(" directory and the JDBC driver inside.")])]),t._v(" "),n("p",[t._v("In addition, we need the "),n("a",{attrs:{href:"../h2.zip"}},[t._v("h2 database")]),t._v(" as usual. Assume the h2 database is already running.")]),t._v(" "),n("p",[n("strong",[t._v("NB")]),t._v(": Linux users have to modify the property "),n("code",[t._v("jdbc.url")]),t._v(" in "),n("a",{attrs:{href:"input/university-complete.docker.properties"}},[n("code",[t._v("input/university-complete.docker.properties")])]),t._v(". Replace "),n("code",[t._v("host.docker.internal")]),t._v(" with the IP address of your machine (you can see it running the "),n("code",[t._v("ifconfig")]),t._v(" command).")]),t._v(" "),n("h3",{attrs:{id:"use-ontop-ontop-directly"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#use-ontop-ontop-directly"}},[t._v("#")]),t._v(" Use "),n("code",[t._v("ontop/ontop")]),t._v(" directly")]),t._v(" "),n("p",[t._v("We can start an Ontop SPARQL endpoint by using the "),n("code",[t._v("ontop/ontop")]),t._v(" image directly.\nOn Linux/Mac:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("docker run --rm \\\n -v $PWD/input:/opt/ontop/input \\\n -v $PWD/jdbc:/opt/ontop/jdbc \\\n -e ONTOP_ONTOLOGY_FILE=/opt/ontop/input/university-complete.ttl \\\n -e ONTOP_MAPPING_FILE=/opt/ontop/input/university-complete.obda \\\n -e ONTOP_PROPERTIES_FILE=/opt/ontop/input/university-complete.docker.properties \\\n -p 8080:8080 \\\n ontop/ontop\n")])])]),n("p",[t._v("On Windows:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("docker run --rm ^\n -v %CD%/input:/opt/ontop/input ^\n -v %CD%/jdbc:/opt/ontop/jdbc ^\n -e ONTOP_ONTOLOGY_FILE=/opt/ontop/input/university-complete.ttl ^\n -e ONTOP_MAPPING_FILE=/opt/ontop/input/university-complete.obda ^\n -e ONTOP_PROPERTIES_FILE=/opt/ontop/input/university-complete.docker.properties ^\n -p 8080:8080 ^\n ontop/ontop\n")])])]),n("p",[t._v("Now we can open "),n("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),n("OutboundLink")],1),t._v(" to test SPARQL queries.")]),t._v(" "),n("h3",{attrs:{id:"create-a-dedicated-image"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#create-a-dedicated-image"}},[t._v("#")]),t._v(" Create a dedicated image")]),t._v(" "),n("p",[t._v("In case we want to deploy a self-contained image, we can write a complete "),n("a",{attrs:{href:"Dockerfile"}},[n("code",[t._v("Dockerfile")])]),t._v(":")]),t._v(" "),n("div",{staticClass:"language-dockerfile extra-class"},[n("pre",{pre:!0,attrs:{class:"language-dockerfile"}},[n("code",[n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" ontop/ontop")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WORKDIR")]),t._v(" /opt/ontop")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("COPY")]),t._v(" input/university-complete.ttl input/university-complete.obda input/university-complete.docker.properties input/ ")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("COPY")]),t._v(" jdbc/h2-1.4.196.jar jdbc/")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("EXPOSE")]),t._v(" 8080")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ENTRYPOINT")]),t._v(" java -cp ./lib/*:./jdbc/* -Dlogback.configurationFile=file:./log/logback.xml "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n it.unibz.inf.ontop.cli.Ontop endpoint "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --ontology=input/university-complete.ttl "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --mapping=input/university-complete.obda "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --properties=input/university-complete.docker.properties "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --cors-allowed-origins=http://yasgui.org "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --lazy # if needed")]),t._v("\n")])])]),n("p",[t._v("Then, run the commands to build and run the Docker image:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("$ docker build -t my-ontop-endpoint .\n$ docker run -it --rm --name my-running-ontop-endpoint -p 8080:8080 my-ontop-endpoint\n")])])]),n("h3",{attrs:{id:"use-docker-compose"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#use-docker-compose"}},[t._v("#")]),t._v(" Use Docker-compose")]),t._v(" "),n("p",[t._v("Docker-compose allows setting up a number of containers together.\nFor example, the following "),n("a",{attrs:{href:"docker-compose.yml"}},[n("code",[t._v("docker-compose.yml")])]),t._v(" file creates a cluster consisting of an H2 database ("),n("code",[t._v("db")]),t._v(") and an Ontop SPARQL endpoint ("),n("code",[t._v("ontop")]),t._v(").")]),t._v(" "),n("div",{staticClass:"language-yaml extra-class"},[n("pre",{pre:!0,attrs:{class:"language-yaml"}},[n("code",[n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("version")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v("'3.4'")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("services")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("db")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("image")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" openjdk"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("8"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("jdk"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("alpine\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("volumes")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" ./h2"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("/opt/h2\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("command")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"java"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-cp"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/opt/h2/bin/h2-1.4.196.jar"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"org.h2.tools.Server"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-tcpAllowOthers"')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ports")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"8082:8082"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"9082:9082"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ontop")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("image")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" ontop/ontop\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("environment")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_ONTOLOGY_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.ttl\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_MAPPING_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.obda\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_PROPERTIES_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.compose.properties\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_PORTAL_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.portal.toml\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_CORS_ALLOWED_ORIGINS")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_DEV_MODE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"true"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_LAZY_INIT")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"true"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("volumes")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" ./input"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("/opt/ontop/input\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" ./jdbc"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("/opt/ontop/jdbc\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ports")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"8080:8080"')]),t._v("\n")])])]),n("p",[t._v("Now we can simply start it:")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("$ docker-compose up\n")])])]),n("p",[t._v("It exposes the following two ports for the browser:")]),t._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"http://localhost:8082",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8082"),n("OutboundLink")],1),t._v(" H2 Web Console")]),t._v(" "),n("li",[n("a",{attrs:{href:"http://localhost:8080",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080"),n("OutboundLink")],1),t._v(" Ontop SPARQL endpoint")])])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[78],{456:function(t,e,n){"use strict";n.r(e);var s=n(51),a=Object(s.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"setting-up-an-ontop-sparql-endpoint-with-docker"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-an-ontop-sparql-endpoint-with-docker"}},[t._v("#")]),t._v(" Setting up an Ontop SPARQL endpoint with Docker")]),t._v(" "),n("h2",{attrs:{id:"how-to-use-this-image"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use-this-image"}},[t._v("#")]),t._v(" How to use this image")]),t._v(" "),n("p",[t._v("The Docker image "),n("a",{attrs:{href:"https://hub.docker.com/r/ontop/ontop",target:"_blank",rel:"noopener"}},[t._v("ontop/ontop"),n("OutboundLink")],1),t._v(" is for fast setting up an Ontop SPARQL endpoint.\nOne can either use this image directly, or create a dedicated image based on this image.")]),t._v(" "),n("ol",[n("li",[t._v("Go to the "),n("code",[t._v("endpoint/")]),t._v(" directory. Alternatively, if you don't have already the tutorial files, you can download "),n("a",{attrs:{href:"input/university-complete.ttl"}},[t._v("this OWL ontology file")]),t._v(", "),n("a",{attrs:{href:"input/university-complete.obda"}},[t._v("this mapping file")]),t._v(", "),n("a",{attrs:{href:"input/university-complete.properties"}},[t._v("this properties file")]),t._v(" and paste them in "),n("code",[t._v("input/")]),t._v(".")]),t._v(" "),n("li",[t._v("Make sure to have the "),n("code",[t._v("jdbc/")]),t._v(" directory and the JDBC driver inside.")])]),t._v(" "),n("p",[t._v("In addition, we need the "),n("a",{attrs:{href:"../h2.zip"}},[t._v("h2 database")]),t._v(" as usual. Assume the h2 database is already running.")]),t._v(" "),n("p",[n("strong",[t._v("NB")]),t._v(": Linux users have to modify the property "),n("code",[t._v("jdbc.url")]),t._v(" in "),n("a",{attrs:{href:"input/university-complete.docker.properties"}},[n("code",[t._v("input/university-complete.docker.properties")])]),t._v(". Replace "),n("code",[t._v("host.docker.internal")]),t._v(" with the IP address of your machine (you can see it running the "),n("code",[t._v("ifconfig")]),t._v(" command).")]),t._v(" "),n("h3",{attrs:{id:"use-ontop-ontop-directly"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#use-ontop-ontop-directly"}},[t._v("#")]),t._v(" Use "),n("code",[t._v("ontop/ontop")]),t._v(" directly")]),t._v(" "),n("p",[t._v("We can start an Ontop SPARQL endpoint by using the "),n("code",[t._v("ontop/ontop")]),t._v(" image directly.\nOn Linux/Mac:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("docker run --rm \\\n -v $PWD/input:/opt/ontop/input \\\n -v $PWD/jdbc:/opt/ontop/jdbc \\\n -e ONTOP_ONTOLOGY_FILE=/opt/ontop/input/university-complete.ttl \\\n -e ONTOP_MAPPING_FILE=/opt/ontop/input/university-complete.obda \\\n -e ONTOP_PROPERTIES_FILE=/opt/ontop/input/university-complete.docker.properties \\\n -p 8080:8080 \\\n ontop/ontop\n")])])]),n("p",[t._v("On Windows:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("docker run --rm ^\n -v %CD%/input:/opt/ontop/input ^\n -v %CD%/jdbc:/opt/ontop/jdbc ^\n -e ONTOP_ONTOLOGY_FILE=/opt/ontop/input/university-complete.ttl ^\n -e ONTOP_MAPPING_FILE=/opt/ontop/input/university-complete.obda ^\n -e ONTOP_PROPERTIES_FILE=/opt/ontop/input/university-complete.docker.properties ^\n -p 8080:8080 ^\n ontop/ontop\n")])])]),n("p",[t._v("Now we can open "),n("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),n("OutboundLink")],1),t._v(" to test SPARQL queries.")]),t._v(" "),n("h3",{attrs:{id:"create-a-dedicated-image"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#create-a-dedicated-image"}},[t._v("#")]),t._v(" Create a dedicated image")]),t._v(" "),n("p",[t._v("In case we want to deploy a self-contained image, we can write a complete "),n("a",{attrs:{href:"Dockerfile"}},[n("code",[t._v("Dockerfile")])]),t._v(":")]),t._v(" "),n("div",{staticClass:"language-dockerfile extra-class"},[n("pre",{pre:!0,attrs:{class:"language-dockerfile"}},[n("code",[n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" ontop/ontop")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WORKDIR")]),t._v(" /opt/ontop")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("COPY")]),t._v(" input/university-complete.ttl input/university-complete.obda input/university-complete.docker.properties input/ ")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("COPY")]),t._v(" jdbc/h2-1.4.196.jar jdbc/")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("EXPOSE")]),t._v(" 8080")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token instruction"}},[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ENTRYPOINT")]),t._v(" java -cp ./lib/*:./jdbc/* -Dlogback.configurationFile=file:./log/logback.xml "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n it.unibz.inf.ontop.cli.Ontop endpoint "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --ontology=input/university-complete.ttl "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --mapping=input/university-complete.obda "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --properties=input/university-complete.docker.properties "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --cors-allowed-origins=http://yasgui.org "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("\\")]),t._v("\n --lazy # if needed")]),t._v("\n")])])]),n("p",[t._v("Then, run the commands to build and run the Docker image:")]),t._v(" "),n("div",{staticClass:"language-console extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("$ docker build -t my-ontop-endpoint .\n$ docker run -it --rm --name my-running-ontop-endpoint -p 8080:8080 my-ontop-endpoint\n")])])]),n("h3",{attrs:{id:"use-docker-compose"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#use-docker-compose"}},[t._v("#")]),t._v(" Use Docker-compose")]),t._v(" "),n("p",[t._v("Docker-compose allows setting up a number of containers together.\nFor example, the following "),n("a",{attrs:{href:"docker-compose.yml"}},[n("code",[t._v("docker-compose.yml")])]),t._v(" file creates a cluster consisting of an H2 database ("),n("code",[t._v("db")]),t._v(") and an Ontop SPARQL endpoint ("),n("code",[t._v("ontop")]),t._v(").")]),t._v(" "),n("div",{staticClass:"language-yaml extra-class"},[n("pre",{pre:!0,attrs:{class:"language-yaml"}},[n("code",[n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("version")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v("'3.4'")]),t._v("\n\n"),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("services")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("db")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("image")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" openjdk"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("8"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("jdk"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("alpine\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("volumes")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" ./h2"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("/opt/h2\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("command")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"java"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-cp"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/opt/h2/bin/h2-1.4.196.jar"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"org.h2.tools.Server"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-tcpAllowOthers"')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ports")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"8082:8082"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"9082:9082"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ontop")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("image")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" ontop/ontop\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("environment")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_ONTOLOGY_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.ttl\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_MAPPING_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.obda\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_PROPERTIES_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.compose.properties\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_PORTAL_FILE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /opt/ontop/input/university"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("complete.portal.toml\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_CORS_ALLOWED_ORIGINS")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"*"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_DEV_MODE")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"true"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ONTOP_LAZY_INIT")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"true"')]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("volumes")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" ./input"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("/opt/ontop/input\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" ./jdbc"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("/opt/ontop/jdbc\n "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ports")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"8080:8080"')]),t._v("\n")])])]),n("p",[t._v("Now we can simply start it:")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v("$ docker-compose up\n")])])]),n("p",[t._v("It exposes the following two ports for the browser:")]),t._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"http://localhost:8082",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8082"),n("OutboundLink")],1),t._v(" H2 Web Console")]),t._v(" "),n("li",[n("a",{attrs:{href:"http://localhost:8080",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080"),n("OutboundLink")],1),t._v(" Ontop SPARQL endpoint")])])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/79.28837695.js b/assets/js/79.367b0f4a.js similarity index 99% rename from assets/js/79.28837695.js rename to assets/js/79.367b0f4a.js index 344572e61..592d586f5 100644 --- a/assets/js/79.28837695.js +++ b/assets/js/79.367b0f4a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[79],{456:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"sparql-endpoint-deployment-using-ontop-tomcat-rdf4j-bundle"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-endpoint-deployment-using-ontop-tomcat-rdf4j-bundle"}},[t._v("#")]),t._v(" SPARQL endpoint deployment using Ontop Tomcat/RDF4J bundle")]),t._v(" "),a("h2",{attrs:{id:"apache-tomcat-setup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#apache-tomcat-setup"}},[t._v("#")]),t._v(" Apache Tomcat setup")]),t._v(" "),a("p",[t._v("Procedure:")]),t._v(" "),a("ol",[a("li",[t._v("Download and unzip the Tomcat bundle "),a("code",[t._v("ontop-tomcat-bundle-[version].zip")]),t._v(" from "),a("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("GitHub"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Copy the driver file of H2 "),a("a",{attrs:{href:"jdbc/h2-1.4.196.jar"}},[a("code",[t._v("jdbc/h2-1.4.196.jar")])]),t._v(" to the "),a("code",[t._v("lib")]),t._v(" directory of tomcat")])]),t._v(" "),a("p",[t._v("Note: environment variable "),a("code",[t._v("JAVA_HOME")]),t._v(" must be set")]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("Start tomcat from the "),a("em",[a("code",[t._v("bin")]),t._v(" folder")]),t._v(" using the commands:\n"),a("ul",[a("li",[t._v("On Mac/Linux: using the terminal run "),a("code",[t._v("sh catalina.sh run")]),t._v(".")]),t._v(" "),a("li",[t._v("On Windows: click on the executable "),a("code",[t._v("startup.bat")]),t._v(".")])])]),t._v(" "),a("li",[t._v("Connect to RDF4J Workbench at http://localhost:8080/rdf4j-workbench/ .")]),t._v(" "),a("li",[t._v("You will be automatically redirected to the repositories view .")])]),t._v(" "),a("h2",{attrs:{id:"setting-up-a-ontop-virtual-rdf-repository-using-the-rdf4j-workbench"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-a-ontop-virtual-rdf-repository-using-the-rdf4j-workbench"}},[t._v("#")]),t._v(" Setting up a Ontop Virtual RDF Repository using the RDF4J Workbench")]),t._v(" "),a("ol",[a("li",[a("p",[t._v("The files needed are under the input directory:")]),t._v(" "),a("ul",[a("li",[t._v("the OWL ontology file "),a("a",{attrs:{href:"input/university-complete.ttl"}},[t._v("input/university-complete.ttl")])]),t._v(" "),a("li",[t._v("the mapping file "),a("a",{attrs:{href:"input/university-complete.obda"}},[t._v("input/university-complete.obda")])]),t._v(" "),a("li",[t._v("the properties file "),a("a",{attrs:{href:"input/university-complete.properties"}},[t._v("input/university-complete.properties")])])])]),t._v(" "),a("li",[a("p",[t._v("Click on "),a("em",[t._v("New repository")])])])]),t._v(" "),a("ul",[a("li",[t._v("Select "),a("em",[t._v("Ontop Virtual RDF Store")]),t._v(" from the list.")]),t._v(" "),a("li",[t._v("Give an ID to your new repository (ex: "),a("code",[t._v("Session1Repo")]),t._v(")")]),t._v(" "),a("li",[t._v("Give optionally also a descriptive title (ex: Universities Repository)")]),t._v(" "),a("li",[t._v("Click on "),a("em",[t._v("Next")]),t._v(".")])]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("On the next page:")])]),t._v(" "),a("ul",[a("li",[t._v("Type in the path of the ontology file "),a("em",[t._v("university-complete.ttl")]),t._v(" using the separator '/' (ex: "),a("code",[t._v("C:/Users/Me/ontop-tutorial/endpoint/input/university-complete.ttl")]),t._v(")")]),t._v(" "),a("li",[t._v("Type in the path of the obda file "),a("em",[t._v("university-complete.obda")]),t._v(" using the separator '/' (ex: "),a("code",[t._v("C:/Users/Me/ontop-v3-tutorial/endpoint/input/university-complete.obda")]),t._v(")")]),t._v(" "),a("li",[t._v("Type in the path of the properties file "),a("em",[t._v("university-complete.properties")]),t._v(" using the separator '/' (ex: "),a("code",[t._v("C:/Users/Me/ontop-v3-tutorial/endpoint/input/university-complete.properties")]),t._v(")")]),t._v(" "),a("li",[t._v("Keep the default options.")]),t._v(" "),a("li",[t._v("Click on "),a("em",[t._v("Create")]),t._v(".")])]),t._v(" "),a("ol",{attrs:{start:"6"}},[a("li",[t._v("The "),a("em",[t._v("Summary")]),t._v(" page contains your newly created repository's SPARQL endpoint URL (as Location).")])]),t._v(" "),a("h2",{attrs:{id:"querying"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#querying"}},[t._v("#")]),t._v(" Querying")]),t._v(" "),a("ol",[a("li",[t._v("We can query the newly created repository by clicking on the "),a("em",[t._v("Query")]),t._v(" submenu .")]),t._v(" "),a("li",[t._v("Run the following query clicking on "),a("em",[t._v("Execute")]),t._v(":")])]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DISTINCT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FullProfessor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"querying-the-sparql-endpoint-with-curl"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#querying-the-sparql-endpoint-with-curl"}},[t._v("#")]),t._v(" Querying the SPARQL endpoint with curl")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("curl -H 'Accept: application/json' \\\n-G http://localhost:8080/rdf4j-server/repositories/Session1Repo \\\n--data-urlencode query='\nPREFIX : \nPREFIX foaf: \n\nSELECT DISTINCT ?prof ?lastName {\n ?prof a :FullProfessor ; foaf:lastName ?lastName .\n}\n'\n")])])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[79],{455:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"sparql-endpoint-deployment-using-ontop-tomcat-rdf4j-bundle"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-endpoint-deployment-using-ontop-tomcat-rdf4j-bundle"}},[t._v("#")]),t._v(" SPARQL endpoint deployment using Ontop Tomcat/RDF4J bundle")]),t._v(" "),a("h2",{attrs:{id:"apache-tomcat-setup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#apache-tomcat-setup"}},[t._v("#")]),t._v(" Apache Tomcat setup")]),t._v(" "),a("p",[t._v("Procedure:")]),t._v(" "),a("ol",[a("li",[t._v("Download and unzip the Tomcat bundle "),a("code",[t._v("ontop-tomcat-bundle-[version].zip")]),t._v(" from "),a("a",{attrs:{href:"https://github.com/ontop/ontop/releases",target:"_blank",rel:"noopener"}},[t._v("GitHub"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Copy the driver file of H2 "),a("a",{attrs:{href:"jdbc/h2-1.4.196.jar"}},[a("code",[t._v("jdbc/h2-1.4.196.jar")])]),t._v(" to the "),a("code",[t._v("lib")]),t._v(" directory of tomcat")])]),t._v(" "),a("p",[t._v("Note: environment variable "),a("code",[t._v("JAVA_HOME")]),t._v(" must be set")]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("Start tomcat from the "),a("em",[a("code",[t._v("bin")]),t._v(" folder")]),t._v(" using the commands:\n"),a("ul",[a("li",[t._v("On Mac/Linux: using the terminal run "),a("code",[t._v("sh catalina.sh run")]),t._v(".")]),t._v(" "),a("li",[t._v("On Windows: click on the executable "),a("code",[t._v("startup.bat")]),t._v(".")])])]),t._v(" "),a("li",[t._v("Connect to RDF4J Workbench at http://localhost:8080/rdf4j-workbench/ .")]),t._v(" "),a("li",[t._v("You will be automatically redirected to the repositories view .")])]),t._v(" "),a("h2",{attrs:{id:"setting-up-a-ontop-virtual-rdf-repository-using-the-rdf4j-workbench"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-a-ontop-virtual-rdf-repository-using-the-rdf4j-workbench"}},[t._v("#")]),t._v(" Setting up a Ontop Virtual RDF Repository using the RDF4J Workbench")]),t._v(" "),a("ol",[a("li",[a("p",[t._v("The files needed are under the input directory:")]),t._v(" "),a("ul",[a("li",[t._v("the OWL ontology file "),a("a",{attrs:{href:"input/university-complete.ttl"}},[t._v("input/university-complete.ttl")])]),t._v(" "),a("li",[t._v("the mapping file "),a("a",{attrs:{href:"input/university-complete.obda"}},[t._v("input/university-complete.obda")])]),t._v(" "),a("li",[t._v("the properties file "),a("a",{attrs:{href:"input/university-complete.properties"}},[t._v("input/university-complete.properties")])])])]),t._v(" "),a("li",[a("p",[t._v("Click on "),a("em",[t._v("New repository")])])])]),t._v(" "),a("ul",[a("li",[t._v("Select "),a("em",[t._v("Ontop Virtual RDF Store")]),t._v(" from the list.")]),t._v(" "),a("li",[t._v("Give an ID to your new repository (ex: "),a("code",[t._v("Session1Repo")]),t._v(")")]),t._v(" "),a("li",[t._v("Give optionally also a descriptive title (ex: Universities Repository)")]),t._v(" "),a("li",[t._v("Click on "),a("em",[t._v("Next")]),t._v(".")])]),t._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[t._v("On the next page:")])]),t._v(" "),a("ul",[a("li",[t._v("Type in the path of the ontology file "),a("em",[t._v("university-complete.ttl")]),t._v(" using the separator '/' (ex: "),a("code",[t._v("C:/Users/Me/ontop-tutorial/endpoint/input/university-complete.ttl")]),t._v(")")]),t._v(" "),a("li",[t._v("Type in the path of the obda file "),a("em",[t._v("university-complete.obda")]),t._v(" using the separator '/' (ex: "),a("code",[t._v("C:/Users/Me/ontop-v3-tutorial/endpoint/input/university-complete.obda")]),t._v(")")]),t._v(" "),a("li",[t._v("Type in the path of the properties file "),a("em",[t._v("university-complete.properties")]),t._v(" using the separator '/' (ex: "),a("code",[t._v("C:/Users/Me/ontop-v3-tutorial/endpoint/input/university-complete.properties")]),t._v(")")]),t._v(" "),a("li",[t._v("Keep the default options.")]),t._v(" "),a("li",[t._v("Click on "),a("em",[t._v("Create")]),t._v(".")])]),t._v(" "),a("ol",{attrs:{start:"6"}},[a("li",[t._v("The "),a("em",[t._v("Summary")]),t._v(" page contains your newly created repository's SPARQL endpoint URL (as Location).")])]),t._v(" "),a("h2",{attrs:{id:"querying"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#querying"}},[t._v("#")]),t._v(" Querying")]),t._v(" "),a("ol",[a("li",[t._v("We can query the newly created repository by clicking on the "),a("em",[t._v("Query")]),t._v(" submenu .")]),t._v(" "),a("li",[t._v("Run the following query clicking on "),a("em",[t._v("Execute")]),t._v(":")])]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DISTINCT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?prof")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("FullProfessor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"querying-the-sparql-endpoint-with-curl"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#querying-the-sparql-endpoint-with-curl"}},[t._v("#")]),t._v(" Querying the SPARQL endpoint with curl")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("curl -H 'Accept: application/json' \\\n-G http://localhost:8080/rdf4j-server/repositories/Session1Repo \\\n--data-urlencode query='\nPREFIX : \nPREFIX foaf: \n\nSELECT DISTINCT ?prof ?lastName {\n ?prof a :FullProfessor ; foaf:lastName ?lastName .\n}\n'\n")])])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/81.6698c80e.js b/assets/js/81.0b6c0419.js similarity index 92% rename from assets/js/81.6698c80e.js rename to assets/js/81.0b6c0419.js index 1d559b99c..bfe2bd45c 100644 --- a/assets/js/81.6698c80e.js +++ b/assets/js/81.0b6c0419.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[81],{458:function(t,e,a){"use strict";a.r(e);var i=a(51),o=Object(i.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"federating-multiple-databases"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#federating-multiple-databases"}},[t._v("#")]),t._v(" Federating multiple databases")]),t._v(" "),a("ul",[a("li",[a("RouterLink",{attrs:{to:"/tutorial/federation/dremio/"}},[t._v("Ontop with Dremio")])],1),t._v(" "),a("li",[a("RouterLink",{attrs:{to:"/tutorial/federation/denodo/"}},[t._v("Ontop with Denodo")])],1),t._v(" "),a("li",[a("RouterLink",{attrs:{to:"/tutorial/federation/teiid/"}},[t._v("Ontop with Teiid")])],1)])])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[81],{460:function(t,e,a){"use strict";a.r(e);var i=a(51),o=Object(i.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"federating-multiple-databases"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#federating-multiple-databases"}},[t._v("#")]),t._v(" Federating multiple databases")]),t._v(" "),a("ul",[a("li",[a("RouterLink",{attrs:{to:"/tutorial/federation/dremio/"}},[t._v("Ontop with Dremio")])],1),t._v(" "),a("li",[a("RouterLink",{attrs:{to:"/tutorial/federation/denodo/"}},[t._v("Ontop with Denodo")])],1),t._v(" "),a("li",[a("RouterLink",{attrs:{to:"/tutorial/federation/teiid/"}},[t._v("Ontop with Teiid")])],1)])])}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/82.110d224d.js b/assets/js/82.73bb5cad.js similarity index 99% rename from assets/js/82.110d224d.js rename to assets/js/82.73bb5cad.js index 547756a67..1c0ec3191 100644 --- a/assets/js/82.110d224d.js +++ b/assets/js/82.73bb5cad.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[82],{459:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"ontop-with-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontop-with-denodo"}},[t._v("#")]),t._v(" Ontop with Denodo")]),t._v(" "),a("p",[t._v("NB: You might also consult the following presentation, which shows screenshots for\nsome of the steps described below:"),a("br"),t._v(" "),a("a",{attrs:{href:"https://github.com/ontop/ontop-examples/blob/master/cikm-2018-tutorial/4-obdi-demo.pdf",target:"_blank",rel:"noopener"}},[t._v("https://github.com/ontop/ontop-examples/blob/master/cikm-2018-tutorial/4-obdi-demo.pdf"),a("OutboundLink")],1)]),t._v(" "),a("h3",{attrs:{id:"_1-set-up-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-set-up-denodo"}},[t._v("#")]),t._v(" 1. Set up Denodo.")]),t._v(" "),a("h4",{attrs:{id:"download-denodo-express"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#download-denodo-express"}},[t._v("#")]),t._v(" Download Denodo Express")]),t._v(" "),a("p",[t._v("Download it from "),a("a",{attrs:{href:"https://www.denodo.com/en/denodo-platform/denodo-express",target:"_blank",rel:"noopener"}},[t._v("https://www.denodo.com/en/denodo-platform/denodo-express"),a("OutboundLink")],1),a("br"),t._v("\n(register, download the platform and the licence file)")]),t._v(" "),a("p",[t._v("Unzip the file and run the installer.")]),t._v(" "),a("p",[t._v("Note: environment variable "),a("code",[t._v("JAVA_HOME")]),t._v(" must be set")]),t._v(" "),a("h4",{attrs:{id:"running-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#running-denodo"}},[t._v("#")]),t._v(" Running Denodo")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("/bin/denodoPlatform.sh\n")])])]),a("ul",[a("li",[t._v("Select the 'Virtual DataPort' tab")]),t._v(" "),a("li",[t._v("Start 'Virtual DataPort Server'")]),t._v(" "),a("li",[t._v("Press the 'Launch' button")]),t._v(" "),a("li",[t._v("Login with:"),a("br"),t._v("\n. Login: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Password: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Server: "),a("code",[t._v("//localhost:9999/admin")])])]),t._v(" "),a("h3",{attrs:{id:"_2-configure-datasets-with-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-configure-datasets-with-denodo"}},[t._v("#")]),t._v(" 2. Configure datasets with Denodo")]),t._v(" "),a("p",[t._v("NB: instead of doing the following step by step, you can also load "),a("a",{attrs:{href:"bzopendata.sql"}},[t._v("this SQL script")]),t._v(" directly within Denodo.")]),t._v(" "),a("h4",{attrs:{id:"create-a-database"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#create-a-database"}},[t._v("#")]),t._v(" Create a database")]),t._v(" "),a("p",[t._v("We will create two data sources based on web APIs."),a("br"),t._v("\nFirst, a Web API with weather data.")]),t._v(" "),a("ul",[a("li",[t._v("Administration -> Database Management -> New")]),t._v(" "),a("li",[t._v("Name the database "),a("code",[t._v("bzopendata")]),t._v(" for instance (leave the rest to default values), and click on the 'OK' button")]),t._v(" "),a("li",[t._v("In the left window, right-clik on the bzopendata database -> New -> Data Source -> JSON")]),t._v(" "),a("li",[t._v("In the field 'Name', enter "),a("code",[t._v("stations")])]),t._v(" "),a("li",[t._v("In the field 'Data route', select 'HTTP Client'")]),t._v(" "),a("li",[t._v("Click on the 'Configure' button to enter the URL of the source:"),a("br"),t._v(" "),a("a",{attrs:{href:"http://daten.buergernetz.bz.it/services/meteo/v1/stations",target:"_blank",rel:"noopener"}},[t._v("http://daten.buergernetz.bz.it/services/meteo/v1/stations"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Click on 'OK', and then press the 'Save' button to save the data source")])]),t._v(" "),a("p",[t._v("Then add a second data source for sensor data, repeating all the operations above, but:")]),t._v(" "),a("ul",[a("li",[t._v("in the field 'Name', enter "),a("code",[t._v("sensors")]),t._v(",")]),t._v(" "),a("li",[t._v("use the URL:\n"),a("a",{attrs:{href:"http://daten.buergernetz.bz.it/services/meteo/v1/sensors",target:"_blank",rel:"noopener"}},[t._v("http://daten.buergernetz.bz.it/services/meteo/v1/sensors"),a("OutboundLink")],1)])]),t._v(" "),a("h3",{attrs:{id:"_3-configure-the-datasources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-configure-the-datasources"}},[t._v("#")]),t._v(" 3. Configure the datasources")]),t._v(" "),a("p",[t._v("Select a data source, and click on 'Create base view'")]),t._v(" "),a("ul",[a("li",[t._v('for stations: use the default "tuple root" ('),a("code",[t._v("/JSONFile")]),t._v(")")]),t._v(" "),a("li",[t._v('for sensors: use the "tuple root": '),a("code",[t._v("/JSONFile/JSONArray")]),t._v(" (uncheck the checkbox 'JSON root')")])]),t._v(" "),a("p",[t._v("Click on 'Save'.")]),t._v(" "),a("p",[t._v("For stations, click on the 'Execution panel' button, and then the button 'Execute'")]),t._v(" "),a("p",[t._v("We get only one result --\x3e We need to flatten the data:")]),t._v(" "),a("ul",[a("li",[t._v("In the left window, right-click on {}stations -> New -> Flatten\n(to display the data sources, you may need to right-click on 'bzopendata' -> 'Refresh')")]),t._v(" "),a("li",[t._v("Right click on the row 'features' in the table -> 'Flatten array features'")])]),t._v(" "),a("p",[t._v("In addition, we want to project the subfields of the JSON object 'properties':")]),t._v(" "),a("ul",[a("li",[t._v("Select the 'Output' tab")]),t._v(" "),a("li",[t._v("Right-click on the row 'properties' in the table -> 'Project subfields of properties'")])]),t._v(" "),a("p",[t._v("Click on 'Save': this creates a new view 'f_stations'")]),t._v(" "),a("h3",{attrs:{id:"_4-configure-ontop-protege-to-use-a-denodo-datasource"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-configure-ontop-protege-to-use-a-denodo-datasource"}},[t._v("#")]),t._v(" 4. Configure Ontop-protege to use a Denodo datasource")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("Install the Denodo JDBC driver:\nWithin Protege: File -> Preferences -> 'JDBC Drivers' tab -> Add"),a("br"),t._v("\n. Description: "),a("code",[t._v("Denodo")]),a("br"),t._v("\n. Class name: "),a("code",[t._v("com.denodo.vdp.jdbc.Driver")]),a("br"),t._v("\n. Driver File (jar): browse to "),a("code",[t._v("/tools/client-drivers/jdbc/denodo-vdp-jdbcdriver.jar")])])]),t._v(" "),a("li",[a("p",[t._v("For the connection, in your Datasource manager, use:"),a("br"),t._v("\n. Connection url: "),a("code",[t._v("jdbc:vdb://localhost:9999/bzopendata")]),a("br"),t._v("\n. Database Username: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Database Password: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Driver class: "),a("code",[t._v("com.denodo.vdp.jdbc.Driver")])])])]),t._v(" "),a("h3",{attrs:{id:"_5-create-the-ontology-and-mapping-and-and-try-some-sparql-queries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-create-the-ontology-and-mapping-and-and-try-some-sparql-queries"}},[t._v("#")]),t._v(" 5. Create the ontology and mapping and and try some SPARQL queries")]),t._v(" "),a("p",[t._v("You can use directly the files we have prepared:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"bzweather.obda"}},[t._v("bzweather.obda")])]),t._v(" "),a("li",[a("a",{attrs:{href:"bzweather.owl"}},[t._v("bzweather.owl")])]),t._v(" "),a("li",[a("a",{attrs:{href:"bzweather.properties"}},[t._v("bzweather.properties")])]),t._v(" "),a("li",[a("a",{attrs:{href:"bzweather.q"}},[t._v("bzweather.q")])])]),t._v(" "),a("h3",{attrs:{id:"_6-setup-a-sparql-endpoint-with-command-line-interface"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_6-setup-a-sparql-endpoint-with-command-line-interface"}},[t._v("#")]),t._v(" 6. Setup a SPARQL endpoint with Command Line Interface")]),t._v(" "),a("h4",{attrs:{id:"configure-ontop-cli"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configure-ontop-cli"}},[t._v("#")]),t._v(" Configure Ontop CLI")]),t._v(" "),a("p",[t._v("Add the JDBC denodo driver for the Ontop CLI:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("cp /tools/client-drivers/jdbc/denodo-vdp-jdbcdriver.jar\n/jdbc\n")])])]),a("p",[t._v("Run the Ontop CLI:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("ontop endpoint -t bzweather.owl -m bzweather.obda -p bzweather.properties --cors-allowed-origins='*'\n")])])]),a("h4",{attrs:{id:"access-the-sparql-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#access-the-sparql-endpoint"}},[t._v("#")]),t._v(" Access the SPARQL endpoint")]),t._v(" "),a("p",[t._v("Open "),a("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),a("OutboundLink")],1)]),t._v(" "),a("p",[t._v("Run an example SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("geo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://www.opengis.net/ont/geosparql#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://www.w3.org/ns/sosa/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/weather#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" *\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?station")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("WeatherStation")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("geo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("asWKT")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?wkt")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("hasSensor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?sensor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("longitude")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lon")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("latitude")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lat")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?sensor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("madeObservation")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?o")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?o")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("hasSimpleResult")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?wktLabel")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?o")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("resultTime")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?t")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("LIMIT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),t._v("\n")])])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[82],{458:function(t,e,a){"use strict";a.r(e);var s=a(51),n=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"ontop-with-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#ontop-with-denodo"}},[t._v("#")]),t._v(" Ontop with Denodo")]),t._v(" "),a("p",[t._v("NB: You might also consult the following presentation, which shows screenshots for\nsome of the steps described below:"),a("br"),t._v(" "),a("a",{attrs:{href:"https://github.com/ontop/ontop-examples/blob/master/cikm-2018-tutorial/4-obdi-demo.pdf",target:"_blank",rel:"noopener"}},[t._v("https://github.com/ontop/ontop-examples/blob/master/cikm-2018-tutorial/4-obdi-demo.pdf"),a("OutboundLink")],1)]),t._v(" "),a("h3",{attrs:{id:"_1-set-up-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-set-up-denodo"}},[t._v("#")]),t._v(" 1. Set up Denodo.")]),t._v(" "),a("h4",{attrs:{id:"download-denodo-express"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#download-denodo-express"}},[t._v("#")]),t._v(" Download Denodo Express")]),t._v(" "),a("p",[t._v("Download it from "),a("a",{attrs:{href:"https://www.denodo.com/en/denodo-platform/denodo-express",target:"_blank",rel:"noopener"}},[t._v("https://www.denodo.com/en/denodo-platform/denodo-express"),a("OutboundLink")],1),a("br"),t._v("\n(register, download the platform and the licence file)")]),t._v(" "),a("p",[t._v("Unzip the file and run the installer.")]),t._v(" "),a("p",[t._v("Note: environment variable "),a("code",[t._v("JAVA_HOME")]),t._v(" must be set")]),t._v(" "),a("h4",{attrs:{id:"running-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#running-denodo"}},[t._v("#")]),t._v(" Running Denodo")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("/bin/denodoPlatform.sh\n")])])]),a("ul",[a("li",[t._v("Select the 'Virtual DataPort' tab")]),t._v(" "),a("li",[t._v("Start 'Virtual DataPort Server'")]),t._v(" "),a("li",[t._v("Press the 'Launch' button")]),t._v(" "),a("li",[t._v("Login with:"),a("br"),t._v("\n. Login: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Password: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Server: "),a("code",[t._v("//localhost:9999/admin")])])]),t._v(" "),a("h3",{attrs:{id:"_2-configure-datasets-with-denodo"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-configure-datasets-with-denodo"}},[t._v("#")]),t._v(" 2. Configure datasets with Denodo")]),t._v(" "),a("p",[t._v("NB: instead of doing the following step by step, you can also load "),a("a",{attrs:{href:"bzopendata.sql"}},[t._v("this SQL script")]),t._v(" directly within Denodo.")]),t._v(" "),a("h4",{attrs:{id:"create-a-database"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#create-a-database"}},[t._v("#")]),t._v(" Create a database")]),t._v(" "),a("p",[t._v("We will create two data sources based on web APIs."),a("br"),t._v("\nFirst, a Web API with weather data.")]),t._v(" "),a("ul",[a("li",[t._v("Administration -> Database Management -> New")]),t._v(" "),a("li",[t._v("Name the database "),a("code",[t._v("bzopendata")]),t._v(" for instance (leave the rest to default values), and click on the 'OK' button")]),t._v(" "),a("li",[t._v("In the left window, right-clik on the bzopendata database -> New -> Data Source -> JSON")]),t._v(" "),a("li",[t._v("In the field 'Name', enter "),a("code",[t._v("stations")])]),t._v(" "),a("li",[t._v("In the field 'Data route', select 'HTTP Client'")]),t._v(" "),a("li",[t._v("Click on the 'Configure' button to enter the URL of the source:"),a("br"),t._v(" "),a("a",{attrs:{href:"http://daten.buergernetz.bz.it/services/meteo/v1/stations",target:"_blank",rel:"noopener"}},[t._v("http://daten.buergernetz.bz.it/services/meteo/v1/stations"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Click on 'OK', and then press the 'Save' button to save the data source")])]),t._v(" "),a("p",[t._v("Then add a second data source for sensor data, repeating all the operations above, but:")]),t._v(" "),a("ul",[a("li",[t._v("in the field 'Name', enter "),a("code",[t._v("sensors")]),t._v(",")]),t._v(" "),a("li",[t._v("use the URL:\n"),a("a",{attrs:{href:"http://daten.buergernetz.bz.it/services/meteo/v1/sensors",target:"_blank",rel:"noopener"}},[t._v("http://daten.buergernetz.bz.it/services/meteo/v1/sensors"),a("OutboundLink")],1)])]),t._v(" "),a("h3",{attrs:{id:"_3-configure-the-datasources"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-configure-the-datasources"}},[t._v("#")]),t._v(" 3. Configure the datasources")]),t._v(" "),a("p",[t._v("Select a data source, and click on 'Create base view'")]),t._v(" "),a("ul",[a("li",[t._v('for stations: use the default "tuple root" ('),a("code",[t._v("/JSONFile")]),t._v(")")]),t._v(" "),a("li",[t._v('for sensors: use the "tuple root": '),a("code",[t._v("/JSONFile/JSONArray")]),t._v(" (uncheck the checkbox 'JSON root')")])]),t._v(" "),a("p",[t._v("Click on 'Save'.")]),t._v(" "),a("p",[t._v("For stations, click on the 'Execution panel' button, and then the button 'Execute'")]),t._v(" "),a("p",[t._v("We get only one result --\x3e We need to flatten the data:")]),t._v(" "),a("ul",[a("li",[t._v("In the left window, right-click on {}stations -> New -> Flatten\n(to display the data sources, you may need to right-click on 'bzopendata' -> 'Refresh')")]),t._v(" "),a("li",[t._v("Right click on the row 'features' in the table -> 'Flatten array features'")])]),t._v(" "),a("p",[t._v("In addition, we want to project the subfields of the JSON object 'properties':")]),t._v(" "),a("ul",[a("li",[t._v("Select the 'Output' tab")]),t._v(" "),a("li",[t._v("Right-click on the row 'properties' in the table -> 'Project subfields of properties'")])]),t._v(" "),a("p",[t._v("Click on 'Save': this creates a new view 'f_stations'")]),t._v(" "),a("h3",{attrs:{id:"_4-configure-ontop-protege-to-use-a-denodo-datasource"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-configure-ontop-protege-to-use-a-denodo-datasource"}},[t._v("#")]),t._v(" 4. Configure Ontop-protege to use a Denodo datasource")]),t._v(" "),a("ul",[a("li",[a("p",[t._v("Install the Denodo JDBC driver:\nWithin Protege: File -> Preferences -> 'JDBC Drivers' tab -> Add"),a("br"),t._v("\n. Description: "),a("code",[t._v("Denodo")]),a("br"),t._v("\n. Class name: "),a("code",[t._v("com.denodo.vdp.jdbc.Driver")]),a("br"),t._v("\n. Driver File (jar): browse to "),a("code",[t._v("/tools/client-drivers/jdbc/denodo-vdp-jdbcdriver.jar")])])]),t._v(" "),a("li",[a("p",[t._v("For the connection, in your Datasource manager, use:"),a("br"),t._v("\n. Connection url: "),a("code",[t._v("jdbc:vdb://localhost:9999/bzopendata")]),a("br"),t._v("\n. Database Username: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Database Password: "),a("code",[t._v("admin")]),a("br"),t._v("\n. Driver class: "),a("code",[t._v("com.denodo.vdp.jdbc.Driver")])])])]),t._v(" "),a("h3",{attrs:{id:"_5-create-the-ontology-and-mapping-and-and-try-some-sparql-queries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_5-create-the-ontology-and-mapping-and-and-try-some-sparql-queries"}},[t._v("#")]),t._v(" 5. Create the ontology and mapping and and try some SPARQL queries")]),t._v(" "),a("p",[t._v("You can use directly the files we have prepared:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"bzweather.obda"}},[t._v("bzweather.obda")])]),t._v(" "),a("li",[a("a",{attrs:{href:"bzweather.owl"}},[t._v("bzweather.owl")])]),t._v(" "),a("li",[a("a",{attrs:{href:"bzweather.properties"}},[t._v("bzweather.properties")])]),t._v(" "),a("li",[a("a",{attrs:{href:"bzweather.q"}},[t._v("bzweather.q")])])]),t._v(" "),a("h3",{attrs:{id:"_6-setup-a-sparql-endpoint-with-command-line-interface"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_6-setup-a-sparql-endpoint-with-command-line-interface"}},[t._v("#")]),t._v(" 6. Setup a SPARQL endpoint with Command Line Interface")]),t._v(" "),a("h4",{attrs:{id:"configure-ontop-cli"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configure-ontop-cli"}},[t._v("#")]),t._v(" Configure Ontop CLI")]),t._v(" "),a("p",[t._v("Add the JDBC denodo driver for the Ontop CLI:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("cp /tools/client-drivers/jdbc/denodo-vdp-jdbcdriver.jar\n/jdbc\n")])])]),a("p",[t._v("Run the Ontop CLI:")]),t._v(" "),a("div",{staticClass:"language-console extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("ontop endpoint -t bzweather.owl -m bzweather.obda -p bzweather.properties --cors-allowed-origins='*'\n")])])]),a("h4",{attrs:{id:"access-the-sparql-endpoint"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#access-the-sparql-endpoint"}},[t._v("#")]),t._v(" Access the SPARQL endpoint")]),t._v(" "),a("p",[t._v("Open "),a("a",{attrs:{href:"http://localhost:8080/",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/"),a("OutboundLink")],1)]),t._v(" "),a("p",[t._v("Run an example SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("geo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://www.opengis.net/ont/geosparql#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://www.w3.org/ns/sosa/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/weather#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" *\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?station")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("WeatherStation")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("geo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("asWKT")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?wkt")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("hasSensor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?sensor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("longitude")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lon")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("latitude")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lat")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?sensor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("madeObservation")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?o")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?o")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("hasSimpleResult")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?wktLabel")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?o")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("sosa"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("resultTime")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?t")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("LIMIT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),t._v("\n")])])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/83.62e77972.js b/assets/js/83.4fccdf57.js similarity index 99% rename from assets/js/83.62e77972.js rename to assets/js/83.4fccdf57.js index adb62e59b..7b988b757 100644 --- a/assets/js/83.62e77972.js +++ b/assets/js/83.4fccdf57.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[83],{460:function(t,a,s){"use strict";s.r(a);var e=s(51),n=Object(e.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"ontop-with-dremio"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ontop-with-dremio"}},[t._v("#")]),t._v(" Ontop with Dremio")]),t._v(" "),s("p",[t._v("In this tutorial we present step-by-step the way of connecting Dremio to Ontop. We show how to integrate "),s("em",[t._v("uni1")]),t._v(" data saved in the PostgreSQL database and "),s("em",[t._v("uni2")]),t._v(" data saved in plain JSON files into one Dremio data space.")]),t._v(" "),s("p",[t._v("We provide a Docker-compose script, which is both launching Dremio and the PostgreSQL database.\nGo at the root of the "),s("RouterLink",{attrs:{to:"/tutorial/#clone-this-repository"}},[t._v("ontop-tutorial git repository")]),t._v(" and run the following commands:")],1),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" federation/dremio\ndocker-compose pull "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" docker-compose up --build\n")])])]),s("p",[t._v("Once Dremio is initialized, visit "),s("a",{attrs:{href:"http://localhost:9047",target:"_blank",rel:"noopener"}},[t._v("http://localhost:9047"),s("OutboundLink")],1),t._v(". Before you continue, we recommend you to see the following tutorials provided by Dremio:")]),t._v(" "),s("ol",[s("li",[s("a",{attrs:{href:"https://www.dremio.com/tutorials/getting-oriented-to-dremio/",target:"_blank",rel:"noopener"}},[t._v("Getting oriented with Dremio"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://www.dremio.com/tutorials/working-with-your-first-dataset/",target:"_blank",rel:"noopener"}},[t._v("Working with your first dataset"),s("OutboundLink")],1)])]),t._v(" "),s("p",[t._v("By following the instructions in "),s("a",{attrs:{href:"https://www.dremio.com/tutorials/working-with-your-first-dataset/",target:"_blank",rel:"noopener"}},[t._v("Working with your first dataset"),s("OutboundLink")],1),t._v(", we create a "),s("em",[t._v("space")]),t._v(" named "),s("strong",[t._v("university")]),t._v(" as shown below.")]),t._v(" "),s("p",[t._v("Add and save the new data space:")]),t._v(" "),s("img",{attrs:{src:"img/add-space.png",width:"300"}}),t._v(" "),s("p",[t._v("It will be our data space in which we integrate data from various sources.")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("uni1")]),t._v(" data is contained in a PostgreSQL database named "),s("em",[t._v("university-session1")]),t._v(".\nWe are ready to add our database as a new datasource into Dremio:")]),t._v(" "),s("img",{attrs:{src:"img/add-external-source.png",width:"300"}}),t._v(" "),s("p",[t._v("Select PostgreSQL:")]),t._v(" "),s("img",{attrs:{src:"img/add-postgres-external.png",width:"700"}}),t._v(" "),s("p",[t._v("Enter the required JDBC information (password: "),s("em",[t._v("postgres")]),t._v("):")]),t._v(" "),s("img",{attrs:{src:"img/postgres-info.png",width:"700"}}),t._v(" "),s("p",[t._v("Now we see the tables in "),s("em",[t._v("university-session1")]),t._v(":")]),t._v(" "),s("img",{attrs:{src:"img/postgres-tables.png",width:"600"}}),t._v(" "),s("p",[t._v("We add the table "),s("em",[t._v("course-registration")]),t._v(" as dataset into "),s("em",[t._v("university")]),t._v(". We rename it to "),s("em",[t._v("uni1-registration")]),t._v(".")]),t._v(" "),s("img",{attrs:{src:"img/postgres-uni1-registration-dataset.png",width:"600"}}),t._v(" "),s("p",[t._v("Save the other datasets in similar manner.")]),t._v(" "),s("p",[t._v("Now we add the "),s("em",[t._v("uni2")]),t._v(" data from "),s("a",{attrs:{href:"data/uni2.json"}},[t._v("here")]),t._v(" as a JSON data source:")]),t._v(" "),s("img",{attrs:{src:"img/add-json.png",width:"600"}}),t._v(" "),s("p",[t._v("The "),s("em",[t._v("uni2")]),t._v(" JSON data can be seen as follows:")]),t._v(" "),s("img",{attrs:{src:"img/see-json.png",width:"800"}}),t._v(" "),s("p",[t._v("JSON files usually contain nested data. However, Ontop cannot directly query nested data. For this reason, in order to make our JSON data queryable by Ontop, first we need to extract relevant group of elements, and save these groups as datasets.")]),t._v(" "),s("p",[t._v("With the following SQL query we create an "),s("em",[t._v("uni2-registration")]),t._v(" dataset and save it into the data space "),s("em",[t._v("university")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("cid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pid "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" pid \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" cid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" flatten"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" enrollers \n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" T\n")])])]),s("p",[t._v("The following SQL expression flattens the array of enrollers:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[t._v("flatten"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" enrollers\n")])])]),s("p",[s("em",[t._v("Save As")]),t._v(" the data set with the name "),s("em",[t._v("uni2-registration")]),t._v(".")]),t._v(" "),s("img",{attrs:{src:"img/uni2-registration.png",width:"800"}}),t._v(" "),s("p",[t._v("Create a dataset named "),s("em",[t._v("uni2-course")]),t._v(" in a similar manner:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" course"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" cid "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n")])])]),s("p",[t._v("Create a "),s("em",[t._v("uni2-student")]),t._v(" dataset with a bit more involved SQL that flattens the array of students:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pid"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" pid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"fname"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" fname"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lname"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" lname \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" flatten"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" enrollers\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" T\n")])])]),s("p",[t._v("Create "),s("em",[t._v("uni2-teaching")]),t._v(" dataset with the following SQL:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" cid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" uni2"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("lecturer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pid "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" pid\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n")])])]),s("p",[t._v("Now we can list all the datasets we saved in the "),s("em",[t._v("university")]),t._v(" space:")]),t._v(" "),s("img",{attrs:{src:"img/dataset-list-updated.png",width:"600"}}),t._v(" "),s("p",[t._v("Finally we are ready to connect Dremio to Ontop. Dremio can be connected to Ontop through its JDBC interface. By following the instructions provided in "),s("a",{attrs:{href:"https://docs.dremio.com/drivers/dremio-jdbc-driver.html",target:"_blank",rel:"noopener"}},[t._v("here"),s("OutboundLink")],1),t._v(', we provide to Ontop the following JDBC connection information in a ".properties file" for a Dremio instance running on the localhost:')]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("jdbc.url=jdbc\\:dremio\\:direct\\=localhost\\:31010\njdbc.driver=com.dremio.jdbc.Driver\njdbc.user=dremiotest\njdbc.password=dremiotest\n")])])]),s("p",[t._v("Dremio JDBC driver can be downloaded from "),s("a",{attrs:{href:"https://www.dremio.com/drivers/",target:"_blank",rel:"noopener"}},[t._v("here"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("Over an OBDA setting containing the following mapping assertions:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v('[PrefixDeclaration]\n:\t\thttp://example.org/voc#\nex:\t\thttp://example.org/\nowl:\t\thttp://www.w3.org/2002/07/owl#\nrdf:\t\thttp://www.w3.org/1999/02/22-rdf-syntax-ns#\nxml:\t\thttp://www.w3.org/XML/1998/namespace\nxsd:\t\thttp://www.w3.org/2001/XMLSchema#\nfoaf:\t\thttp://xmlns.com/foaf/0.1/\nobda:\t\thttps://w3id.org/obda/vocabulary#\nrdfs:\t\thttp://www.w3.org/2000/01/rdf-schema#\n\n[MappingDeclaration] @collection [[\nmappingId\tuni1-student\ntarget\t\t:uni1/student/{s_id} a :Student ; foaf:firstName {first_name}^^xsd:string ; foaf:lastName {last_name}^^xsd:string . \nsource\t\tSELECT * FROM "university"."uni1-student"\n\nmappingId\tuni1-attends\ntarget\t\t:uni1/student/{s_id} :attends :uni1/course/{c_id}/{title} .\nsource\t\tSELECT "uni1-registration".s_id, "uni1-course".c_id, "uni1-course".title FROM "university"."uni1-registration", "university"."uni1-course" WHERE "uni1-registration".c_id = "uni1-course".c_id\n\nmappingId\tuni2-student\ntarget\t\t:uni2/student/{pid} a :Student ; foaf:firstName {fname}^^xsd:string ; foaf:lastName {lname}^^xsd:string . \nsource\t\tSELECT * FROM "university"."uni2-student"\n\nmappingId\tuni2-attends\ntarget\t\t:uni2/student/{pid} :attends :uni2/course/{cid}/{course} .\nsource\t\tSELECT "uni2-registration".pid, "uni2-course".cid, "uni2-course".course FROM "university"."uni2-registration", "university"."uni2-course" WHERE "uni2-registration".cid = "uni2-course".cid\n]]\n')])])]),s("p",[t._v("Now we can execute the following SPARQL query on Ontop:")]),t._v(" "),s("div",{staticClass:"language-sparql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sparql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token url"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token url"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?course")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?firstName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?student")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),s("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("attends")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?course")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?student")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),s("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?firstName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?student")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),s("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[83],{459:function(t,a,s){"use strict";s.r(a);var e=s(51),n=Object(e.a)({},(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"ontop-with-dremio"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ontop-with-dremio"}},[t._v("#")]),t._v(" Ontop with Dremio")]),t._v(" "),s("p",[t._v("In this tutorial we present step-by-step the way of connecting Dremio to Ontop. We show how to integrate "),s("em",[t._v("uni1")]),t._v(" data saved in the PostgreSQL database and "),s("em",[t._v("uni2")]),t._v(" data saved in plain JSON files into one Dremio data space.")]),t._v(" "),s("p",[t._v("We provide a Docker-compose script, which is both launching Dremio and the PostgreSQL database.\nGo at the root of the "),s("RouterLink",{attrs:{to:"/tutorial/#clone-this-repository"}},[t._v("ontop-tutorial git repository")]),t._v(" and run the following commands:")],1),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" federation/dremio\ndocker-compose pull "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" docker-compose up --build\n")])])]),s("p",[t._v("Once Dremio is initialized, visit "),s("a",{attrs:{href:"http://localhost:9047",target:"_blank",rel:"noopener"}},[t._v("http://localhost:9047"),s("OutboundLink")],1),t._v(". Before you continue, we recommend you to see the following tutorials provided by Dremio:")]),t._v(" "),s("ol",[s("li",[s("a",{attrs:{href:"https://www.dremio.com/tutorials/getting-oriented-to-dremio/",target:"_blank",rel:"noopener"}},[t._v("Getting oriented with Dremio"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://www.dremio.com/tutorials/working-with-your-first-dataset/",target:"_blank",rel:"noopener"}},[t._v("Working with your first dataset"),s("OutboundLink")],1)])]),t._v(" "),s("p",[t._v("By following the instructions in "),s("a",{attrs:{href:"https://www.dremio.com/tutorials/working-with-your-first-dataset/",target:"_blank",rel:"noopener"}},[t._v("Working with your first dataset"),s("OutboundLink")],1),t._v(", we create a "),s("em",[t._v("space")]),t._v(" named "),s("strong",[t._v("university")]),t._v(" as shown below.")]),t._v(" "),s("p",[t._v("Add and save the new data space:")]),t._v(" "),s("img",{attrs:{src:"img/add-space.png",width:"300"}}),t._v(" "),s("p",[t._v("It will be our data space in which we integrate data from various sources.")]),t._v(" "),s("p",[t._v("The "),s("em",[t._v("uni1")]),t._v(" data is contained in a PostgreSQL database named "),s("em",[t._v("university-session1")]),t._v(".\nWe are ready to add our database as a new datasource into Dremio:")]),t._v(" "),s("img",{attrs:{src:"img/add-external-source.png",width:"300"}}),t._v(" "),s("p",[t._v("Select PostgreSQL:")]),t._v(" "),s("img",{attrs:{src:"img/add-postgres-external.png",width:"700"}}),t._v(" "),s("p",[t._v("Enter the required JDBC information (password: "),s("em",[t._v("postgres")]),t._v("):")]),t._v(" "),s("img",{attrs:{src:"img/postgres-info.png",width:"700"}}),t._v(" "),s("p",[t._v("Now we see the tables in "),s("em",[t._v("university-session1")]),t._v(":")]),t._v(" "),s("img",{attrs:{src:"img/postgres-tables.png",width:"600"}}),t._v(" "),s("p",[t._v("We add the table "),s("em",[t._v("course-registration")]),t._v(" as dataset into "),s("em",[t._v("university")]),t._v(". We rename it to "),s("em",[t._v("uni1-registration")]),t._v(".")]),t._v(" "),s("img",{attrs:{src:"img/postgres-uni1-registration-dataset.png",width:"600"}}),t._v(" "),s("p",[t._v("Save the other datasets in similar manner.")]),t._v(" "),s("p",[t._v("Now we add the "),s("em",[t._v("uni2")]),t._v(" data from "),s("a",{attrs:{href:"data/uni2.json"}},[t._v("here")]),t._v(" as a JSON data source:")]),t._v(" "),s("img",{attrs:{src:"img/add-json.png",width:"600"}}),t._v(" "),s("p",[t._v("The "),s("em",[t._v("uni2")]),t._v(" JSON data can be seen as follows:")]),t._v(" "),s("img",{attrs:{src:"img/see-json.png",width:"800"}}),t._v(" "),s("p",[t._v("JSON files usually contain nested data. However, Ontop cannot directly query nested data. For this reason, in order to make our JSON data queryable by Ontop, first we need to extract relevant group of elements, and save these groups as datasets.")]),t._v(" "),s("p",[t._v("With the following SQL query we create an "),s("em",[t._v("uni2-registration")]),t._v(" dataset and save it into the data space "),s("em",[t._v("university")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("cid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pid "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" pid \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" cid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" flatten"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" enrollers \n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" T\n")])])]),s("p",[t._v("The following SQL expression flattens the array of enrollers:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[t._v("flatten"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" enrollers\n")])])]),s("p",[s("em",[t._v("Save As")]),t._v(" the data set with the name "),s("em",[t._v("uni2-registration")]),t._v(".")]),t._v(" "),s("img",{attrs:{src:"img/uni2-registration.png",width:"800"}}),t._v(" "),s("p",[t._v("Create a dataset named "),s("em",[t._v("uni2-course")]),t._v(" in a similar manner:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" course"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" cid "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n")])])]),s("p",[t._v("Create a "),s("em",[t._v("uni2-student")]),t._v(" dataset with a bit more involved SQL that flattens the array of students:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pid"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" pid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"fname"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" fname"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" T"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lname"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" lname \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" flatten"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("enrollers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" enrollers\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" T\n")])])]),s("p",[t._v("Create "),s("em",[t._v("uni2-teaching")]),t._v(" dataset with the following SQL:")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" cid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" uni2"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("lecturer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pid "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("AS")]),t._v(" pid\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("FROM")]),t._v(" uni2\n")])])]),s("p",[t._v("Now we can list all the datasets we saved in the "),s("em",[t._v("university")]),t._v(" space:")]),t._v(" "),s("img",{attrs:{src:"img/dataset-list-updated.png",width:"600"}}),t._v(" "),s("p",[t._v("Finally we are ready to connect Dremio to Ontop. Dremio can be connected to Ontop through its JDBC interface. By following the instructions provided in "),s("a",{attrs:{href:"https://docs.dremio.com/drivers/dremio-jdbc-driver.html",target:"_blank",rel:"noopener"}},[t._v("here"),s("OutboundLink")],1),t._v(', we provide to Ontop the following JDBC connection information in a ".properties file" for a Dremio instance running on the localhost:')]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("jdbc.url=jdbc\\:dremio\\:direct\\=localhost\\:31010\njdbc.driver=com.dremio.jdbc.Driver\njdbc.user=dremiotest\njdbc.password=dremiotest\n")])])]),s("p",[t._v("Dremio JDBC driver can be downloaded from "),s("a",{attrs:{href:"https://www.dremio.com/drivers/",target:"_blank",rel:"noopener"}},[t._v("here"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("Over an OBDA setting containing the following mapping assertions:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v('[PrefixDeclaration]\n:\t\thttp://example.org/voc#\nex:\t\thttp://example.org/\nowl:\t\thttp://www.w3.org/2002/07/owl#\nrdf:\t\thttp://www.w3.org/1999/02/22-rdf-syntax-ns#\nxml:\t\thttp://www.w3.org/XML/1998/namespace\nxsd:\t\thttp://www.w3.org/2001/XMLSchema#\nfoaf:\t\thttp://xmlns.com/foaf/0.1/\nobda:\t\thttps://w3id.org/obda/vocabulary#\nrdfs:\t\thttp://www.w3.org/2000/01/rdf-schema#\n\n[MappingDeclaration] @collection [[\nmappingId\tuni1-student\ntarget\t\t:uni1/student/{s_id} a :Student ; foaf:firstName {first_name}^^xsd:string ; foaf:lastName {last_name}^^xsd:string . \nsource\t\tSELECT * FROM "university"."uni1-student"\n\nmappingId\tuni1-attends\ntarget\t\t:uni1/student/{s_id} :attends :uni1/course/{c_id}/{title} .\nsource\t\tSELECT "uni1-registration".s_id, "uni1-course".c_id, "uni1-course".title FROM "university"."uni1-registration", "university"."uni1-course" WHERE "uni1-registration".c_id = "uni1-course".c_id\n\nmappingId\tuni2-student\ntarget\t\t:uni2/student/{pid} a :Student ; foaf:firstName {fname}^^xsd:string ; foaf:lastName {lname}^^xsd:string . \nsource\t\tSELECT * FROM "university"."uni2-student"\n\nmappingId\tuni2-attends\ntarget\t\t:uni2/student/{pid} :attends :uni2/course/{cid}/{course} .\nsource\t\tSELECT "uni2-registration".pid, "uni2-course".cid, "uni2-course".course FROM "university"."uni2-registration", "university"."uni2-course" WHERE "uni2-registration".cid = "uni2-course".cid\n]]\n')])])]),s("p",[t._v("Now we can execute the following SPARQL query on Ontop:")]),t._v(" "),s("div",{staticClass:"language-sparql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sparql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token url"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token url"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://xmlns.com/foaf/0.1/"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?course")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?firstName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?student")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),s("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("attends")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?course")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?student")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),s("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("firstName")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?firstName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?student")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[s("span",{pre:!0,attrs:{class:"token prefix"}},[t._v("foaf"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),s("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("lastName")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?lastName")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/86.88b669e2.js b/assets/js/86.5aa5781f.js similarity index 99% rename from assets/js/86.88b669e2.js rename to assets/js/86.5aa5781f.js index cb87934e3..3f4e18e57 100644 --- a/assets/js/86.88b669e2.js +++ b/assets/js/86.5aa5781f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[86],{464:function(t,a,e){"use strict";e.r(a);var n=e(51),s=Object(n.a)({},(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"use-jupyter-notebook-with-an-ontop-sparql-endpoint"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#use-jupyter-notebook-with-an-ontop-sparql-endpoint"}},[t._v("#")]),t._v(" Use Jupyter Notebook with an Ontop SPARQL endpoint")]),t._v(" "),e("p",[t._v("This tutorial shows how to use a Python/Jupyter Notebook to interact with an Ontop SPARQL endpoint.")]),t._v(" "),e("p",[t._v("Link to the Jupyter Notebook: "),e("a",{attrs:{href:"ontop-jupyter.ipynb"}},[t._v("ontop-jupyter.ipynb")])]),t._v(" "),e("p",[t._v("Assume that the endpoint is already set up and the URL is "),e("a",{attrs:{href:"http://localhost:8080/sparql",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/sparql"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h2",{attrs:{id:"sparqlwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#sparqlwrapper"}},[t._v("#")]),t._v(" SPARQLWrapper")]),t._v(" "),e("p",[t._v("You can use the "),e("a",{attrs:{href:"https://rdflib.github.io/sparqlwrapper/",target:"_blank",rel:"noopener"}},[t._v("SPARQLWrapper library"),e("OutboundLink")],1),t._v(" to send SPARQL queries and get results.\nThe following code gets the result as JSON documents and convert it to a Python dict object.")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" SPARQLWrapper "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" SPARQLWrapper"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" JSON\n\nq "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token triple-quoted-string string"}},[t._v('"""\n PREFIX : \n PREFIX foaf: \n \n SELECT ?lname ?title \n WHERE {\n ?attendee foaf:lastName ?lname ; :attends ?course .\n ?course :title ?title .\n }\n"""')]),t._v("\n\nsparql "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" SPARQLWrapper"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:8080/sparql"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nsparql"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("setQuery"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("q"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nsparql"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("setReturnFormat"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("JSON"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresults "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sparql"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("query"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("convert"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("print")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("results"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("Running the code above yields the following output (JSON indentation added for clarity):")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v('{\n "head":{\n "vars":[ "lname", "title" ]\n },\n "results":{\n "bindings":[ {\n "lname":{ "type":"literal", "value":"Robards" },\n "title":{ "type":"literal", "value":"Data Mining" }\n }, {\n "lname":{ "type":"literal", "value":"Smith" },\n "title":{ "type":"literal", "value":"Operating Systems" }\n }, {\n "lname":{ "type":"literal", "value":"Doe" },\n "title":{ "type":"literal", "value":"Linear Algebra" }\n }, {\n "lname":{ "type":"literal", "value":"Combs" },\n "title":{ "type":"literal", "value":"Operating Systems" }\n }, {\n "lname":{ "type":"literal", "value":"Doe" },\n "title":{ "type":"literal", "value":"Analysis" }\n }, {\n "lname":{ "type":"literal", "value":"Hinkley" },\n "title":{ "type":"literal", "value":"Data Mining" }\n }, {\n "lname":{ "type":"literal", "value":"Robards" },\n "title":{ "type":"literal", "value":"Research Methods" }\n }, {\n "lname":{ "type":"literal", "value":"Smith" },\n "title":{ "type":"literal", "value":"Analysis" }\n }, {\n "lname":{ "type":"literal", "value":"Smith" },\n "title":{ "type":"literal", "value":"Linear Algebra" }\n }, {\n "lname":{ "type":"literal", "value":"Combs" },\n "title":{ "type":"literal", "value":"Linear Algebra" }\n }, {\n "lname":{ "type":"literal", "value":"Hinkley" },\n "title":{ "type":"literal", "value":"Theory of Computing" }\n }, {\n "lname":{ "type":"literal", "value":"Alfaro" },\n "title":{ "type":"literal", "value":"Introduction to programming" }\n }, {\n "lname":{ "type":"literal", "value":"Hinkley" },\n "title":{ "type":"literal", "value":"Software factory" }\n }, {\n "lname":{ "type":"literal", "value":"Mendez" },\n "title":{ "type":"literal", "value":"Software factory" }\n }, {\n "lname":{ "type":"literal", "value":"Mendez" },\n "title":{ "type":"literal", "value":"Software process management" }\n }, {\n "lname":{ "type":"literal", "value":"Moses" },\n "title":{ "type":"literal", "value":"Information security" }\n }, {\n "lname":{ "type":"literal", "value":"Moses" },\n "title":{ "type":"literal", "value":"Discrete mathematics and logic" }\n } ]\n }\n}\n')])])]),e("h2",{attrs:{id:"pandas-dataframe"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#pandas-dataframe"}},[t._v("#")]),t._v(" Pandas DataFrame")]),t._v(" "),e("p",[t._v("You might want to convert the SPARQL results to a pandas DataFrame for data analysis.\nThe library "),e("a",{attrs:{href:"https://github.com/lawlesst/sparql-dataframe",target:"_blank",rel:"noopener"}},[t._v("sparql-dataframe"),e("OutboundLink")],1),t._v(" is handy for this.")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" sparql_dataframe\n\nendpoint "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:8080/sparql"')]),t._v("\n\nq "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token triple-quoted-string string"}},[t._v('"""\n PREFIX : \n PREFIX foaf: \n \n SELECT ?lname ?course_title \n WHERE {\n \n ?attendee foaf:lastName ?lname ;\n :attends ?course .\n ?course :title ?course_title .\n }\n"""')]),t._v("\n\ndf "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sparql_dataframe"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("endpoint"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" q"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The result "),e("code",[t._v("df")]),t._v(" can be manipulated as any Pandas DataFrame. For instance:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("df"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",[e("style",{attrs:{scoped:""}},[t._v('\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\x3c!--beforebegin--\x3e
\x3c!--afterbegin--\x3e
.dataframe tbody tr th {\n    vertical-align: top;\n}\n\n.dataframe thead th {\n    text-align: right;\n}\n
\n\x3c!--beforeend--\x3e
\x3c!--afterend--\x3e')]),t._v(" "),e("table",{staticClass:"dataframe",attrs:{border:"1"}},[e("thead",[e("tr",{staticStyle:{"text-align":"right"}},[e("th"),t._v(" "),e("th",[t._v("lname")]),t._v(" "),e("th",[t._v("course_title")])])]),t._v(" "),e("tbody",[e("tr",[e("th",[t._v("0")]),t._v(" "),e("td",[t._v("Robards")]),t._v(" "),e("td",[t._v("Data Mining")])]),t._v(" "),e("tr",[e("th",[t._v("1")]),t._v(" "),e("td",[t._v("Smith")]),t._v(" "),e("td",[t._v("Operating Systems")])]),t._v(" "),e("tr",[e("th",[t._v("2")]),t._v(" "),e("td",[t._v("Doe")]),t._v(" "),e("td",[t._v("Linear Algebra")])]),t._v(" "),e("tr",[e("th",[t._v("3")]),t._v(" "),e("td",[t._v("Combs")]),t._v(" "),e("td",[t._v("Operating Systems")])]),t._v(" "),e("tr",[e("th",[t._v("4")]),t._v(" "),e("td",[t._v("Doe")]),t._v(" "),e("td",[t._v("Analysis")])])])])]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("df"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("describe"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",[e("style",{attrs:{scoped:""}},[t._v('\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\x3c!--beforebegin--\x3e
\x3c!--afterbegin--\x3e
.dataframe tbody tr th {\n    vertical-align: top;\n}\n\n.dataframe thead th {\n    text-align: right;\n}\n
\n\x3c!--beforeend--\x3e
\x3c!--afterend--\x3e')]),t._v(" "),e("table",{staticClass:"dataframe",attrs:{border:"1"}},[e("thead",[e("tr",{staticStyle:{"text-align":"right"}},[e("th"),t._v(" "),e("th",[t._v("lname")]),t._v(" "),e("th",[t._v("course_title")])])]),t._v(" "),e("tbody",[e("tr",[e("th",[t._v("count")]),t._v(" "),e("td",[t._v("17")]),t._v(" "),e("td",[t._v("17")])]),t._v(" "),e("tr",[e("th",[t._v("unique")]),t._v(" "),e("td",[t._v("8")]),t._v(" "),e("td",[t._v("11")])]),t._v(" "),e("tr",[e("th",[t._v("top")]),t._v(" "),e("td",[t._v("Smith")]),t._v(" "),e("td",[t._v("Linear Algebra")])]),t._v(" "),e("tr",[e("th",[t._v("freq")]),t._v(" "),e("td",[t._v("3")]),t._v(" "),e("td",[t._v("3")])])])])]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("df"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'course_title'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("value_counts"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plot"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kind"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bar'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",{staticClass:"language- extra-class"},[e("pre",[e("code",[t._v("\n")])])]),e("img",{attrs:{src:"output_6_1.png",width:"446px"}})])}),[],!1,null,null,null);a.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[86],{463:function(t,a,e){"use strict";e.r(a);var n=e(51),s=Object(n.a)({},(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"use-jupyter-notebook-with-an-ontop-sparql-endpoint"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#use-jupyter-notebook-with-an-ontop-sparql-endpoint"}},[t._v("#")]),t._v(" Use Jupyter Notebook with an Ontop SPARQL endpoint")]),t._v(" "),e("p",[t._v("This tutorial shows how to use a Python/Jupyter Notebook to interact with an Ontop SPARQL endpoint.")]),t._v(" "),e("p",[t._v("Link to the Jupyter Notebook: "),e("a",{attrs:{href:"ontop-jupyter.ipynb"}},[t._v("ontop-jupyter.ipynb")])]),t._v(" "),e("p",[t._v("Assume that the endpoint is already set up and the URL is "),e("a",{attrs:{href:"http://localhost:8080/sparql",target:"_blank",rel:"noopener"}},[t._v("http://localhost:8080/sparql"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h2",{attrs:{id:"sparqlwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#sparqlwrapper"}},[t._v("#")]),t._v(" SPARQLWrapper")]),t._v(" "),e("p",[t._v("You can use the "),e("a",{attrs:{href:"https://rdflib.github.io/sparqlwrapper/",target:"_blank",rel:"noopener"}},[t._v("SPARQLWrapper library"),e("OutboundLink")],1),t._v(" to send SPARQL queries and get results.\nThe following code gets the result as JSON documents and convert it to a Python dict object.")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" SPARQLWrapper "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" SPARQLWrapper"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" JSON\n\nq "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token triple-quoted-string string"}},[t._v('"""\n PREFIX : \n PREFIX foaf: \n \n SELECT ?lname ?title \n WHERE {\n ?attendee foaf:lastName ?lname ; :attends ?course .\n ?course :title ?title .\n }\n"""')]),t._v("\n\nsparql "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" SPARQLWrapper"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:8080/sparql"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nsparql"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("setQuery"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("q"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nsparql"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("setReturnFormat"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("JSON"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresults "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sparql"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("query"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("convert"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("print")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("results"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("Running the code above yields the following output (JSON indentation added for clarity):")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v('{\n "head":{\n "vars":[ "lname", "title" ]\n },\n "results":{\n "bindings":[ {\n "lname":{ "type":"literal", "value":"Robards" },\n "title":{ "type":"literal", "value":"Data Mining" }\n }, {\n "lname":{ "type":"literal", "value":"Smith" },\n "title":{ "type":"literal", "value":"Operating Systems" }\n }, {\n "lname":{ "type":"literal", "value":"Doe" },\n "title":{ "type":"literal", "value":"Linear Algebra" }\n }, {\n "lname":{ "type":"literal", "value":"Combs" },\n "title":{ "type":"literal", "value":"Operating Systems" }\n }, {\n "lname":{ "type":"literal", "value":"Doe" },\n "title":{ "type":"literal", "value":"Analysis" }\n }, {\n "lname":{ "type":"literal", "value":"Hinkley" },\n "title":{ "type":"literal", "value":"Data Mining" }\n }, {\n "lname":{ "type":"literal", "value":"Robards" },\n "title":{ "type":"literal", "value":"Research Methods" }\n }, {\n "lname":{ "type":"literal", "value":"Smith" },\n "title":{ "type":"literal", "value":"Analysis" }\n }, {\n "lname":{ "type":"literal", "value":"Smith" },\n "title":{ "type":"literal", "value":"Linear Algebra" }\n }, {\n "lname":{ "type":"literal", "value":"Combs" },\n "title":{ "type":"literal", "value":"Linear Algebra" }\n }, {\n "lname":{ "type":"literal", "value":"Hinkley" },\n "title":{ "type":"literal", "value":"Theory of Computing" }\n }, {\n "lname":{ "type":"literal", "value":"Alfaro" },\n "title":{ "type":"literal", "value":"Introduction to programming" }\n }, {\n "lname":{ "type":"literal", "value":"Hinkley" },\n "title":{ "type":"literal", "value":"Software factory" }\n }, {\n "lname":{ "type":"literal", "value":"Mendez" },\n "title":{ "type":"literal", "value":"Software factory" }\n }, {\n "lname":{ "type":"literal", "value":"Mendez" },\n "title":{ "type":"literal", "value":"Software process management" }\n }, {\n "lname":{ "type":"literal", "value":"Moses" },\n "title":{ "type":"literal", "value":"Information security" }\n }, {\n "lname":{ "type":"literal", "value":"Moses" },\n "title":{ "type":"literal", "value":"Discrete mathematics and logic" }\n } ]\n }\n}\n')])])]),e("h2",{attrs:{id:"pandas-dataframe"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#pandas-dataframe"}},[t._v("#")]),t._v(" Pandas DataFrame")]),t._v(" "),e("p",[t._v("You might want to convert the SPARQL results to a pandas DataFrame for data analysis.\nThe library "),e("a",{attrs:{href:"https://github.com/lawlesst/sparql-dataframe",target:"_blank",rel:"noopener"}},[t._v("sparql-dataframe"),e("OutboundLink")],1),t._v(" is handy for this.")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" sparql_dataframe\n\nendpoint "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:8080/sparql"')]),t._v("\n\nq "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token triple-quoted-string string"}},[t._v('"""\n PREFIX : \n PREFIX foaf: \n \n SELECT ?lname ?course_title \n WHERE {\n \n ?attendee foaf:lastName ?lname ;\n :attends ?course .\n ?course :title ?course_title .\n }\n"""')]),t._v("\n\ndf "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sparql_dataframe"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("endpoint"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" q"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("p",[t._v("The result "),e("code",[t._v("df")]),t._v(" can be manipulated as any Pandas DataFrame. For instance:")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("df"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",[e("style",{attrs:{scoped:""}},[t._v('\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\x3c!--beforebegin--\x3e
\x3c!--afterbegin--\x3e
.dataframe tbody tr th {\n    vertical-align: top;\n}\n\n.dataframe thead th {\n    text-align: right;\n}\n
\n\x3c!--beforeend--\x3e
\x3c!--afterend--\x3e')]),t._v(" "),e("table",{staticClass:"dataframe",attrs:{border:"1"}},[e("thead",[e("tr",{staticStyle:{"text-align":"right"}},[e("th"),t._v(" "),e("th",[t._v("lname")]),t._v(" "),e("th",[t._v("course_title")])])]),t._v(" "),e("tbody",[e("tr",[e("th",[t._v("0")]),t._v(" "),e("td",[t._v("Robards")]),t._v(" "),e("td",[t._v("Data Mining")])]),t._v(" "),e("tr",[e("th",[t._v("1")]),t._v(" "),e("td",[t._v("Smith")]),t._v(" "),e("td",[t._v("Operating Systems")])]),t._v(" "),e("tr",[e("th",[t._v("2")]),t._v(" "),e("td",[t._v("Doe")]),t._v(" "),e("td",[t._v("Linear Algebra")])]),t._v(" "),e("tr",[e("th",[t._v("3")]),t._v(" "),e("td",[t._v("Combs")]),t._v(" "),e("td",[t._v("Operating Systems")])]),t._v(" "),e("tr",[e("th",[t._v("4")]),t._v(" "),e("td",[t._v("Doe")]),t._v(" "),e("td",[t._v("Analysis")])])])])]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("df"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("describe"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",[e("style",{attrs:{scoped:""}},[t._v('\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\x3c!--beforebegin--\x3e
\x3c!--afterbegin--\x3e
.dataframe tbody tr th {\n    vertical-align: top;\n}\n\n.dataframe thead th {\n    text-align: right;\n}\n
\n\x3c!--beforeend--\x3e
\x3c!--afterend--\x3e')]),t._v(" "),e("table",{staticClass:"dataframe",attrs:{border:"1"}},[e("thead",[e("tr",{staticStyle:{"text-align":"right"}},[e("th"),t._v(" "),e("th",[t._v("lname")]),t._v(" "),e("th",[t._v("course_title")])])]),t._v(" "),e("tbody",[e("tr",[e("th",[t._v("count")]),t._v(" "),e("td",[t._v("17")]),t._v(" "),e("td",[t._v("17")])]),t._v(" "),e("tr",[e("th",[t._v("unique")]),t._v(" "),e("td",[t._v("8")]),t._v(" "),e("td",[t._v("11")])]),t._v(" "),e("tr",[e("th",[t._v("top")]),t._v(" "),e("td",[t._v("Smith")]),t._v(" "),e("td",[t._v("Linear Algebra")])]),t._v(" "),e("tr",[e("th",[t._v("freq")]),t._v(" "),e("td",[t._v("3")]),t._v(" "),e("td",[t._v("3")])])])])]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("df"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'course_title'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("value_counts"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plot"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kind"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bar'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("div",{staticClass:"language- extra-class"},[e("pre",[e("code",[t._v("\n")])])]),e("img",{attrs:{src:"output_6_1.png",width:"446px"}})])}),[],!1,null,null,null);a.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/87.0bff43af.js b/assets/js/87.075e04c7.js similarity index 98% rename from assets/js/87.0bff43af.js rename to assets/js/87.075e04c7.js index 10fa8114a..7712209d0 100644 --- a/assets/js/87.0bff43af.js +++ b/assets/js/87.075e04c7.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[87],{463:function(e,t,s){"use strict";s.r(t);var n=s(51),a=Object(n.a)({},(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[s("h1",{attrs:{id:"using-lenses"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#using-lenses"}},[e._v("#")]),e._v(" Using lenses")]),e._v(" "),s("p",[e._v('In this part of the tutorial, we cover the use of lenses with Ontop. Lenses allow us to create "virtual views" of specific operations over the data, that can be referenced\nin our mapping definitions for a more structured access to the database.')]),e._v(" "),s("p",[e._v("We will go over all lenses currently supported by Ontop:")]),e._v(" "),s("ol",[s("li",[s("RouterLink",{attrs:{to:"/tutorial/lenses/basic-lens.html"}},[e._v("Basic Lens")])],1),e._v(" "),s("li",[s("RouterLink",{attrs:{to:"/tutorial/lenses/join-lens.html"}},[e._v("Join Lens")])],1),e._v(" "),s("li",[s("RouterLink",{attrs:{to:"/tutorial/lenses/union-lens.html"}},[e._v("Union Lens")])],1),e._v(" "),s("li",[s("RouterLink",{attrs:{to:"/tutorial/lenses/flatten-lens.html"}},[e._v("Flatten Lens")])],1),e._v(" "),s("li",[s("RouterLink",{attrs:{to:"/tutorial/lenses/sql-lens.html"}},[e._v("SQL Lens")])],1)]),e._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),s("p",[e._v("In this tutorial, we use a different database than in the previous sections. Before running any of the examples, please follow the "),s("a",{attrs:{href:"setup"}},[e._v("setup instructions")]),e._v(".")])]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("Not supported by Ontop-Protégé")]),e._v(" "),s("p",[e._v("Lenses are not supported by the Ontop plugin for Protégé. To follow this tutorial, please use a text editor.")])]),e._v(" "),s("h2",{attrs:{id:"general"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#general"}},[e._v("#")]),e._v(" General")]),e._v(" "),s("p",[e._v("Lenses are provided to Ontop as a JSON file of the following structure:")]),e._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"relations"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("Lens"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),s("p",[e._v("where each "),s("code",[e._v("Lens")]),e._v(" object corresponds to one particular lens, holding a "),s("em",[e._v("name")]),e._v(" through which it can be referenced in the mapping and a "),s("em",[e._v("type")]),e._v(" which indicates the specific type of the lens.\nWe can include any number of lenses in this file, and they can reference database relations as well as each other.")]),e._v(" "),s("p",[e._v("Some more common features of lenses will be discussed in the "),s("RouterLink",{attrs:{to:"/tutorial/lenses/basic-lens.html"}},[e._v("Basic Lens")]),e._v(" section.")],1),e._v(" "),s("p",[e._v("In each of these sections, we will construct one "),s("em",[e._v("mapping")]),e._v(" file and one "),s("em",[e._v("lenses")]),e._v(" file that can be passed to Ontop. To simplify testing, a common template for all mapping files is already included in the tutorial files. You can continue the preparation of the individual mappings from this template.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[87],{464:function(e,t,s){"use strict";s.r(t);var n=s(51),a=Object(n.a)({},(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[s("h1",{attrs:{id:"using-lenses"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#using-lenses"}},[e._v("#")]),e._v(" Using lenses")]),e._v(" "),s("p",[e._v('In this part of the tutorial, we cover the use of lenses with Ontop. Lenses allow us to create "virtual views" of specific operations over the data, that can be referenced\nin our mapping definitions for a more structured access to the database.')]),e._v(" "),s("p",[e._v("We will go over all lenses currently supported by Ontop:")]),e._v(" "),s("ol",[s("li",[s("RouterLink",{attrs:{to:"/tutorial/lenses/basic-lens.html"}},[e._v("Basic Lens")])],1),e._v(" "),s("li",[s("RouterLink",{attrs:{to:"/tutorial/lenses/join-lens.html"}},[e._v("Join Lens")])],1),e._v(" "),s("li",[s("RouterLink",{attrs:{to:"/tutorial/lenses/union-lens.html"}},[e._v("Union Lens")])],1),e._v(" "),s("li",[s("RouterLink",{attrs:{to:"/tutorial/lenses/flatten-lens.html"}},[e._v("Flatten Lens")])],1),e._v(" "),s("li",[s("RouterLink",{attrs:{to:"/tutorial/lenses/sql-lens.html"}},[e._v("SQL Lens")])],1)]),e._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[e._v("NOTE")]),e._v(" "),s("p",[e._v("In this tutorial, we use a different database than in the previous sections. Before running any of the examples, please follow the "),s("a",{attrs:{href:"setup"}},[e._v("setup instructions")]),e._v(".")])]),e._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[e._v("Not supported by Ontop-Protégé")]),e._v(" "),s("p",[e._v("Lenses are not supported by the Ontop plugin for Protégé. To follow this tutorial, please use a text editor.")])]),e._v(" "),s("h2",{attrs:{id:"general"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#general"}},[e._v("#")]),e._v(" General")]),e._v(" "),s("p",[e._v("Lenses are provided to Ontop as a JSON file of the following structure:")]),e._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[e._v('"relations"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("Lens"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),s("p",[e._v("where each "),s("code",[e._v("Lens")]),e._v(" object corresponds to one particular lens, holding a "),s("em",[e._v("name")]),e._v(" through which it can be referenced in the mapping and a "),s("em",[e._v("type")]),e._v(" which indicates the specific type of the lens.\nWe can include any number of lenses in this file, and they can reference database relations as well as each other.")]),e._v(" "),s("p",[e._v("Some more common features of lenses will be discussed in the "),s("RouterLink",{attrs:{to:"/tutorial/lenses/basic-lens.html"}},[e._v("Basic Lens")]),e._v(" section.")],1),e._v(" "),s("p",[e._v("In each of these sections, we will construct one "),s("em",[e._v("mapping")]),e._v(" file and one "),s("em",[e._v("lenses")]),e._v(" file that can be passed to Ontop. To simplify testing, a common template for all mapping files is already included in the tutorial files. You can continue the preparation of the individual mappings from this template.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/92.94a50a19.js b/assets/js/92.f9e01cfa.js similarity index 99% rename from assets/js/92.94a50a19.js rename to assets/js/92.f9e01cfa.js index 3326d63f1..68400e2ca 100644 --- a/assets/js/92.94a50a19.js +++ b/assets/js/92.f9e01cfa.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[92],{469:function(t,s,a){"use strict";a.r(s);var e=a(51),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"sql-lens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sql-lens"}},[t._v("#")]),t._v(" SQL Lens")]),t._v(" "),a("p",[t._v("SQL lenses are a special type of lens that can generate virtual views over any number of base relations through an arbitrary SQL query. While this allows for more flexibility, as any SQL functionalities can be used by this lens, it risks to obfuscate the inner workings towards Ontop as it may not be handled by the Ontop's SQL parser, preventing it from performing any meaningful inference and optimization.")]),t._v(" "),a("p",[t._v("One major use case for SQL lenses is to perform complex operations that are currently not supported by other Ontop lenses. For this example, we will look at the table "),a("code",[t._v("art_exhibits")]),t._v(". This table has the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("exhibit_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("artist_name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("We now want to gather more information on artists. Including how many exhibits they created and in how many museums their works appear. In SQL, this can be achieved easily by running aggregate functions on a "),a("code",[t._v("GROUP BY")]),t._v(" query, but there is no corresponding lens for aggregate functions in Ontop. We, therefore, have to take advantage of the SQL lens.")]),t._v(" "),a("p",[t._v("This lens has the following structure:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"query"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SQLLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Here, the "),a("code",[t._v("query")]),t._v(" field is a single SQL query that projects all attributes that are of interest to us. In our example, we want to group all artists' names and count their number of exhibits and "),a("strong",[t._v("distinct")]),t._v(" museums. A corresponding SQL lens could look like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artists"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"query"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SELECT artist_name, COUNT(exhibit_id) as exhibits, COUNT(DISTINCT museum_id) as museums FROM art_exhibits GROUP BY artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SQLLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("This will now create a virtual relation inside Ontop, that has the columns "),a("code",[t._v("artist_name")]),t._v(", "),a("code",[t._v("exhibits")]),t._v(", and "),a("code",[t._v("museums")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"mapping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("Finally, we just need to create a mapping entry for the artist, extending our mapping template:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-artists\ntarget\t\tdata:artist/{artist_name} a :Artist ; :name {artist_name}^^xsd:string ; :exhibitCount {exhibits}^^xsd:integer ; :museumCount {museums}^^xsd:integer.\nsource\t\tSELECT artist_name, exhibits, museums FROM lenses.artists;\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("In the "),a("code",[t._v("target")]),t._v(" clause of the mapping, our datatype properties have to be marked by their individual types. This is because Ontop can no longer infer the types of the columns we are using, as they are obfuscated by the SQL lens.")])]),t._v(" "),a("p",[t._v("To test our lenses and mapping, let us run the Ontop endpoint, copying the "),a("code",[t._v("lenses.json")]),t._v(" and "),a("code",[t._v("mapping.obda")]),t._v(" files into the endpoint's directory.\nThen, we can run the following SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibits")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?museums")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Artist")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("exhibitCount")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibits")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("museumCount")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?museums")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("If everything was done correctly, you should get a list of three artists with the number of their exhibits and the number of museums they are featured in.")]),t._v(" "),a("h3",{attrs:{id:"adding-unique-constraints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#adding-unique-constraints"}},[t._v("#")]),t._v(" Adding Unique Constraints")]),t._v(" "),a("p",[t._v("Ontop cannot infer unique constraints from the expressions used in SQL lenses. However, as the user, it is clear to us that the field "),a("code",[t._v("artist_name")]),t._v(" will be "),a("em",[t._v("unique")]),t._v(", as it is used by the "),a("code",[t._v("GROUP BY")]),t._v(" clause. In such cases, explicitly adding unique constraints is a useful feature. Similarly to how it was shown in the "),a("RouterLink",{attrs:{to:"/tutorial/lenses/basic-lens.html"}},[t._v("basic lens section")]),t._v(", we can achieve this by adding an additional field to the lens:")],1),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" \n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artists"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"query"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SELECT artist_name, COUNT(exhibit_id) as exhibits, COUNT(DISTINCT museum_id) as museums FROM art_exhibits GROUP BY artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SQLLens"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uniqueConstraints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uc"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"determinants"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("While this will not change the output of the sample query, it may help Ontop optimize its queries in specific instances (see "),a("RouterLink",{attrs:{to:"/tutorial/mapping/primary-keys.html"}},[t._v("primary key")]),t._v(").")],1),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("It is advised to be cautious when using SQL lenses. Generally, they should not refer to other lenses if the SQL expression is complex, and they may not be able to infer integrity constraints. For more information, please visit the "),a("RouterLink",{attrs:{to:"/guide/advanced/lenses.html"}},[t._v("documentation page of lenses")]),t._v(".")],1)])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[92],{470:function(t,s,a){"use strict";a.r(s);var e=a(51),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"sql-lens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sql-lens"}},[t._v("#")]),t._v(" SQL Lens")]),t._v(" "),a("p",[t._v("SQL lenses are a special type of lens that can generate virtual views over any number of base relations through an arbitrary SQL query. While this allows for more flexibility, as any SQL functionalities can be used by this lens, it risks to obfuscate the inner workings towards Ontop as it may not be handled by the Ontop's SQL parser, preventing it from performing any meaningful inference and optimization.")]),t._v(" "),a("p",[t._v("One major use case for SQL lenses is to perform complex operations that are currently not supported by other Ontop lenses. For this example, we will look at the table "),a("code",[t._v("art_exhibits")]),t._v(". This table has the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("exhibit_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("artist_name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("We now want to gather more information on artists. Including how many exhibits they created and in how many museums their works appear. In SQL, this can be achieved easily by running aggregate functions on a "),a("code",[t._v("GROUP BY")]),t._v(" query, but there is no corresponding lens for aggregate functions in Ontop. We, therefore, have to take advantage of the SQL lens.")]),t._v(" "),a("p",[t._v("This lens has the following structure:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"query"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SQLLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Here, the "),a("code",[t._v("query")]),t._v(" field is a single SQL query that projects all attributes that are of interest to us. In our example, we want to group all artists' names and count their number of exhibits and "),a("strong",[t._v("distinct")]),t._v(" museums. A corresponding SQL lens could look like this:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artists"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"query"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SELECT artist_name, COUNT(exhibit_id) as exhibits, COUNT(DISTINCT museum_id) as museums FROM art_exhibits GROUP BY artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SQLLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("This will now create a virtual relation inside Ontop, that has the columns "),a("code",[t._v("artist_name")]),t._v(", "),a("code",[t._v("exhibits")]),t._v(", and "),a("code",[t._v("museums")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"mapping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("Finally, we just need to create a mapping entry for the artist, extending our mapping template:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-artists\ntarget\t\tdata:artist/{artist_name} a :Artist ; :name {artist_name}^^xsd:string ; :exhibitCount {exhibits}^^xsd:integer ; :museumCount {museums}^^xsd:integer.\nsource\t\tSELECT artist_name, exhibits, museums FROM lenses.artists;\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("In the "),a("code",[t._v("target")]),t._v(" clause of the mapping, our datatype properties have to be marked by their individual types. This is because Ontop can no longer infer the types of the columns we are using, as they are obfuscated by the SQL lens.")])]),t._v(" "),a("p",[t._v("To test our lenses and mapping, let us run the Ontop endpoint, copying the "),a("code",[t._v("lenses.json")]),t._v(" and "),a("code",[t._v("mapping.obda")]),t._v(" files into the endpoint's directory.\nThen, we can run the following SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibits")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?museums")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Artist")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("exhibitCount")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibits")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("museumCount")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?museums")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("If everything was done correctly, you should get a list of three artists with the number of their exhibits and the number of museums they are featured in.")]),t._v(" "),a("h3",{attrs:{id:"adding-unique-constraints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#adding-unique-constraints"}},[t._v("#")]),t._v(" Adding Unique Constraints")]),t._v(" "),a("p",[t._v("Ontop cannot infer unique constraints from the expressions used in SQL lenses. However, as the user, it is clear to us that the field "),a("code",[t._v("artist_name")]),t._v(" will be "),a("em",[t._v("unique")]),t._v(", as it is used by the "),a("code",[t._v("GROUP BY")]),t._v(" clause. In such cases, explicitly adding unique constraints is a useful feature. Similarly to how it was shown in the "),a("RouterLink",{attrs:{to:"/tutorial/lenses/basic-lens.html"}},[t._v("basic lens section")]),t._v(", we can achieve this by adding an additional field to the lens:")],1),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" \n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artists"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"query"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SELECT artist_name, COUNT(exhibit_id) as exhibits, COUNT(DISTINCT museum_id) as museums FROM art_exhibits GROUP BY artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SQLLens"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"uniqueConstraints"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"uc"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"determinants"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("While this will not change the output of the sample query, it may help Ontop optimize its queries in specific instances (see "),a("RouterLink",{attrs:{to:"/tutorial/mapping/primary-keys.html"}},[t._v("primary key")]),t._v(").")],1),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("It is advised to be cautious when using SQL lenses. Generally, they should not refer to other lenses if the SQL expression is complex, and they may not be able to infer integrity constraints. For more information, please visit the "),a("RouterLink",{attrs:{to:"/guide/advanced/lenses.html"}},[t._v("documentation page of lenses")]),t._v(".")],1)])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/93.345dfe74.js b/assets/js/93.54e43d53.js similarity index 99% rename from assets/js/93.345dfe74.js rename to assets/js/93.54e43d53.js index 271af381d..2010c6e8a 100644 --- a/assets/js/93.345dfe74.js +++ b/assets/js/93.54e43d53.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[93],{470:function(t,s,a){"use strict";a.r(s);var e=a(51),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"union-lens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#union-lens"}},[t._v("#")]),t._v(" Union Lens")]),t._v(" "),a("p",[a("em",[t._v("Union lenses will be supported starting with version 5.1.0 (beta).")])]),t._v(" "),a("p",[t._v("Union lenses can be used to concatenate multiple relations with the same schema into one. Additionally, a "),a("em",[t._v("provenance")]),t._v(" field can be added to each row, determining the source relation the row originates from.")]),t._v(" "),a("p",[t._v("For this example, we will look at the tables "),a("code",[t._v("nature_exhibits")]),t._v(", "),a("code",[t._v("historical_exhibits")]),t._v(" and "),a("code",[t._v("art_exhibits")]),t._v(" from the DuckDB database. We want to combine them into a single relation containing all exhibits.")]),t._v(" "),a("p",[t._v("The tables "),a("code",[t._v("nature_exhibits")]),t._v(" and "),a("code",[t._v("historical_exhibits")]),t._v(" have the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("exhibit_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("The table "),a("code",[t._v("art_exhibits")]),t._v(" has the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("exhibit_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("artist_name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("For each table, "),a("code",[t._v("exhibit_id")]),t._v(" is a primary key and "),a("code",[t._v("museum_id")]),t._v(" is a foreign key, referencing the table "),a("code",[t._v("museums")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"relations-with-the-same-schema"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#relations-with-the-same-schema"}},[t._v("#")]),t._v(" Relations with the same schema")]),t._v(" "),a("p",[t._v("This concatenation can be achieved using a union lens. However, as all base relations of a union lens must have the exact same columns, we will only be working on the tables "),a("code",[t._v("nature_exhibits")]),t._v(" and "),a("code",[t._v("historical_exhibits")]),t._v(" at first.")]),t._v(" "),a("p",[t._v("The union lens has the following structure:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"makeDistinct"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" boolean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Here, "),a("code",[t._v("unionRelations")]),t._v(" is a list of relations that should be concatenated, "),a("code",[t._v("makeDistinct")]),t._v(" indicates if a distinct constraint should be enforced on the result, and "),a("code",[t._v("provenanceColumn")]),t._v(" is an optional parameter, indicating the name of the provenance column in the result, which tells us what relation each row originated from.")]),t._v(" "),a("p",[t._v("As the tables "),a("code",[t._v("nature_exhibits")]),t._v(" and "),a("code",[t._v("historical_exhibits")]),t._v(" have the same set of columns, we can reference them from a union lens to create a new, concatenated view.")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("The columns of all tables used by a union lens must be "),a("em",[t._v("exactly")]),t._v(" equal. Their columns must have "),a("em",[t._v("the same names")]),t._v(" and the "),a("strong",[t._v("exact")]),t._v(" "),a("em",[t._v("same data types")]),t._v(". The order of the columns does not matter.")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"all_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"makeDistinct"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The remaining fields are "),a("code",[t._v("provenanceColumn")]),t._v(" and "),a("code",[t._v("makeDistinct")]),t._v(". As we do not expect the entries of any of the tables to be equal, we can just neglect the "),a("code",[t._v("makeDistinct")]),t._v(" parameter. To preserve the source of each entry, we want to include a provenance column. We can call it "),a("code",[t._v("exhibit_type")]),t._v(". This results in the following "),a("code",[t._v("lenses.json")]),t._v(" file:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"all_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exhibit_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("If the "),a("code",[t._v("provenanceColumn")]),t._v(" field is not provided, then no information on the source relation will be preserved for the concatenated rows. If the field "),a("code",[t._v("makeDistinct")]),t._v(" is not provided, its default value is assumed to be "),a("code",[t._v("false")]),t._v(".")])]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("Including a "),a("code",[t._v("provenanceColumn")]),t._v(" in a UnionLens where each of the source relations is distinct will render the "),a("code",[t._v("makeDistinct")]),t._v(" field redundant. This is because, under a union, the composite uniqueness constraint "),a("code",[t._v("(provenanceColumns, childUniquenessConstraint)")]),t._v(" will always hold. On the other hand, if no provenance column is included, then uniqueness constraints from the base relations will be lost, as there is no guarantee that a specific value does not appear again in a different table.")])]),t._v(" "),a("h3",{attrs:{id:"mapping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("Now, let us use this lens definition in our mapping. Starting from the mapping template file, add the following mapping entry:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-exhibits\ntarget\t\tdata:exhibit/{exhibit_id} a :Exhibit ; :name {name} ; :displayedIn data:museum/{museum_id} ; :exhibitType {exhibit_type} .\nsource\t\tSELECT exhibit_id, name, museum_id, exhibit_type FROM lenses.all_exhibits;\n")])])]),a("p",[t._v("Starting the Ontop SPARQL endpoint using this mapping and lens file, we can now run the SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Exhibit")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("exhibitType")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("This should result in a set of exhibit names that have the values "),a("code",[t._v("historical_exhibits")]),t._v(" and "),a("code",[t._v("nature_exhibits")]),t._v(" as their exhibit type.")]),t._v(" "),a("h2",{attrs:{id:"relations-with-different-schemas"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#relations-with-different-schemas"}},[t._v("#")]),t._v(" Relations with different schemas")]),t._v(" "),a("p",[t._v("If we further want to include the table "),a("code",[t._v("art_exhibits")]),t._v(" to the union lens, we cannot just add it to the list of "),a("code",[t._v("unionRelations")]),t._v(". This is because it has one additional column, "),a("code",[t._v("artist_name")]),t._v(', that does not appear in the other tables.\nTo work around this issue, we can take advantage of basic lenses, putting them "underneath" the union lens, to ensure the equality of columns.')]),t._v(" "),a("p",[t._v("There are two possibilities to achieve this:")]),t._v(" "),a("ol",[a("li",[t._v("Hide the conflicting column(s) from its/their table(s)")]),t._v(" "),a("li",[t._v("Add the conflicting column(s) to the tables that do not include them.")])]),t._v(" "),a("p",[t._v("To retain a maximum of information, we will choose the second approach for this example. That means, that we have to construct basic lenses to add the column "),a("code",[t._v("artist_name")]),t._v(" to the tables "),a("code",[t._v("historical_exhibits")]),t._v(" and "),a("code",[t._v("nature_exhibits")]),t._v(". One possible way to achieve this is by adding new columns that have "),a("code",[t._v("NULL")]),t._v(" as their expressions.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"'None'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("After doing the same for the "),a("code",[t._v("nature_exhibits")]),t._v(" table, referencing the new extended lenses from the union lens, and adding "),a("code",[t._v("art_exhibits")]),t._v(" as one of its union relations, get the following lens file:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"'None'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"'None'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"all_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"art_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exhibit_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"mapping-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-2"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("We can now extend the mapping file to also include artist names:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-exhibits\ntarget\t\tdata:exhibit/{exhibit_id} a :Exhibit ; :name {name} ; :displayedIn data:museum/{museum_id} ; :exhibitType {exhibit_type} ; :artistName {artist_name} .\nsource\t\tSELECT exhibit_id, name, museum_id, exhibit_type, artist_name FROM lenses.all_exhibits;\n")])])]),a("p",[t._v("Now, running this slightly modified SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Exhibit")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("exhibitType")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("artistName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("we will once again get all earlier results, in addition to all exhibits contained in the "),a("code",[t._v("art_exhibit")]),t._v(" table. While the earlier results will have the value "),a("code",[t._v("None")]),t._v(" as their artist name, the "),a("code",[t._v("art_exhibits")]),t._v(" entries will include the name of their artists.")]),t._v(" "),a("hr"),t._v(" "),a("p",[t._v("As a further exercise, notice how the values of "),a("code",[t._v(":exhibitType")]),t._v(" are rather ugly: "),a("code",[t._v('"art_exhibits"')]),t._v(", "),a("code",[t._v('"lenses.historical_exhibits_extended"')]),t._v(", and "),a("code",[t._v('"lenses.nature_exhibits_extended"')]),t._v(". Try adding a new basic lens over the union lens that transforms these into the values "),a("code",[t._v('"art"')]),t._v(", "),a("code",[t._v('"historical"')]),t._v(", and "),a("code",[t._v('"nature"')]),t._v(" instead.")]),t._v(" "),a("p",[a("em",[t._v("Hint: Look at the SQL function "),a("code",[t._v("REPLACE")]),t._v(". Could it be used in the "),a("code",[t._v("expression")]),t._v(" field of an added column to get rid of the "),a("code",[t._v("_exhibits")]),t._v(", "),a("code",[t._v("_extended")]),t._v(", and "),a("code",[t._v("lenses.")]),t._v(" part?")])]),t._v(" "),a("p",[t._v("Notice how the union lens allowed you to perform this operation on all three of its base relations by just defining it once. Without the union lens, you would have required three such basic lenses, one for each table, with the exact same contents.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[93],{469:function(t,s,a){"use strict";a.r(s);var e=a(51),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"union-lens"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#union-lens"}},[t._v("#")]),t._v(" Union Lens")]),t._v(" "),a("p",[a("em",[t._v("Union lenses will be supported starting with version 5.1.0 (beta).")])]),t._v(" "),a("p",[t._v("Union lenses can be used to concatenate multiple relations with the same schema into one. Additionally, a "),a("em",[t._v("provenance")]),t._v(" field can be added to each row, determining the source relation the row originates from.")]),t._v(" "),a("p",[t._v("For this example, we will look at the tables "),a("code",[t._v("nature_exhibits")]),t._v(", "),a("code",[t._v("historical_exhibits")]),t._v(" and "),a("code",[t._v("art_exhibits")]),t._v(" from the DuckDB database. We want to combine them into a single relation containing all exhibits.")]),t._v(" "),a("p",[t._v("The tables "),a("code",[t._v("nature_exhibits")]),t._v(" and "),a("code",[t._v("historical_exhibits")]),t._v(" have the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("exhibit_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("The table "),a("code",[t._v("art_exhibits")]),t._v(" has the following schema:")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("column")]),t._v(" "),a("th",[t._v("type")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("exhibit_id")]),t._v(" "),a("td",[t._v("integer")])]),t._v(" "),a("tr",[a("td",[t._v("name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("artist_name")]),t._v(" "),a("td",[t._v("string")])]),t._v(" "),a("tr",[a("td",[t._v("museum_id")]),t._v(" "),a("td",[t._v("integer")])])])]),t._v(" "),a("p",[t._v("For each table, "),a("code",[t._v("exhibit_id")]),t._v(" is a primary key and "),a("code",[t._v("museum_id")]),t._v(" is a foreign key, referencing the table "),a("code",[t._v("museums")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"relations-with-the-same-schema"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#relations-with-the-same-schema"}},[t._v("#")]),t._v(" Relations with the same schema")]),t._v(" "),a("p",[t._v("This concatenation can be achieved using a union lens. However, as all base relations of a union lens must have the exact same columns, we will only be working on the tables "),a("code",[t._v("nature_exhibits")]),t._v(" and "),a("code",[t._v("historical_exhibits")]),t._v(" at first.")]),t._v(" "),a("p",[t._v("The union lens has the following structure:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"makeDistinct"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" boolean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" String"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Here, "),a("code",[t._v("unionRelations")]),t._v(" is a list of relations that should be concatenated, "),a("code",[t._v("makeDistinct")]),t._v(" indicates if a distinct constraint should be enforced on the result, and "),a("code",[t._v("provenanceColumn")]),t._v(" is an optional parameter, indicating the name of the provenance column in the result, which tells us what relation each row originated from.")]),t._v(" "),a("p",[t._v("As the tables "),a("code",[t._v("nature_exhibits")]),t._v(" and "),a("code",[t._v("historical_exhibits")]),t._v(" have the same set of columns, we can reference them from a union lens to create a new, concatenated view.")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("The columns of all tables used by a union lens must be "),a("em",[t._v("exactly")]),t._v(" equal. Their columns must have "),a("em",[t._v("the same names")]),t._v(" and the "),a("strong",[t._v("exact")]),t._v(" "),a("em",[t._v("same data types")]),t._v(". The order of the columns does not matter.")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"all_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"makeDistinct"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" ..."),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("The remaining fields are "),a("code",[t._v("provenanceColumn")]),t._v(" and "),a("code",[t._v("makeDistinct")]),t._v(". As we do not expect the entries of any of the tables to be equal, we can just neglect the "),a("code",[t._v("makeDistinct")]),t._v(" parameter. To preserve the source of each entry, we want to include a provenance column. We can call it "),a("code",[t._v("exhibit_type")]),t._v(". This results in the following "),a("code",[t._v("lenses.json")]),t._v(" file:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"all_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exhibit_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("If the "),a("code",[t._v("provenanceColumn")]),t._v(" field is not provided, then no information on the source relation will be preserved for the concatenated rows. If the field "),a("code",[t._v("makeDistinct")]),t._v(" is not provided, its default value is assumed to be "),a("code",[t._v("false")]),t._v(".")])]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("Including a "),a("code",[t._v("provenanceColumn")]),t._v(" in a UnionLens where each of the source relations is distinct will render the "),a("code",[t._v("makeDistinct")]),t._v(" field redundant. This is because, under a union, the composite uniqueness constraint "),a("code",[t._v("(provenanceColumns, childUniquenessConstraint)")]),t._v(" will always hold. On the other hand, if no provenance column is included, then uniqueness constraints from the base relations will be lost, as there is no guarantee that a specific value does not appear again in a different table.")])]),t._v(" "),a("h3",{attrs:{id:"mapping"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("Now, let us use this lens definition in our mapping. Starting from the mapping template file, add the following mapping entry:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-exhibits\ntarget\t\tdata:exhibit/{exhibit_id} a :Exhibit ; :name {name} ; :displayedIn data:museum/{museum_id} ; :exhibitType {exhibit_type} .\nsource\t\tSELECT exhibit_id, name, museum_id, exhibit_type FROM lenses.all_exhibits;\n")])])]),a("p",[t._v("Starting the Ontop SPARQL endpoint using this mapping and lens file, we can now run the SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Exhibit")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("exhibitType")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("This should result in a set of exhibit names that have the values "),a("code",[t._v("historical_exhibits")]),t._v(" and "),a("code",[t._v("nature_exhibits")]),t._v(" as their exhibit type.")]),t._v(" "),a("h2",{attrs:{id:"relations-with-different-schemas"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#relations-with-different-schemas"}},[t._v("#")]),t._v(" Relations with different schemas")]),t._v(" "),a("p",[t._v("If we further want to include the table "),a("code",[t._v("art_exhibits")]),t._v(" to the union lens, we cannot just add it to the list of "),a("code",[t._v("unionRelations")]),t._v(". This is because it has one additional column, "),a("code",[t._v("artist_name")]),t._v(', that does not appear in the other tables.\nTo work around this issue, we can take advantage of basic lenses, putting them "underneath" the union lens, to ensure the equality of columns.')]),t._v(" "),a("p",[t._v("There are two possibilities to achieve this:")]),t._v(" "),a("ol",[a("li",[t._v("Hide the conflicting column(s) from its/their table(s)")]),t._v(" "),a("li",[t._v("Add the conflicting column(s) to the tables that do not include them.")])]),t._v(" "),a("p",[t._v("To retain a maximum of information, we will choose the second approach for this example. That means, that we have to construct basic lenses to add the column "),a("code",[t._v("artist_name")]),t._v(" to the tables "),a("code",[t._v("historical_exhibits")]),t._v(" and "),a("code",[t._v("nature_exhibits")]),t._v(". One possible way to achieve this is by adding new columns that have "),a("code",[t._v("NULL")]),t._v(" as their expressions.")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"'None'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("After doing the same for the "),a("code",[t._v("nature_exhibits")]),t._v(" table, referencing the new extended lenses from the union lens, and adding "),a("code",[t._v("art_exhibits")]),t._v(" as one of its union relations, get the following lens file:")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"relations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"'None'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"baseRelation"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"columns"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"added"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"artist_name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"expression"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"'None'\"")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"hidden"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"BasicLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"all_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"unionRelations"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"historical_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lenses"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nature_exhibits_extended"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"art_exhibits"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"provenanceColumn"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"exhibit_type"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"UnionLens"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"mapping-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-2"}},[t._v("#")]),t._v(" Mapping")]),t._v(" "),a("p",[t._v("We can now extend the mapping file to also include artist names:")]),t._v(" "),a("div",{staticClass:"language-obda extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("mappingId\tMAPID-exhibits\ntarget\t\tdata:exhibit/{exhibit_id} a :Exhibit ; :name {name} ; :displayedIn data:museum/{museum_id} ; :exhibitType {exhibit_type} ; :artistName {artist_name} .\nsource\t\tSELECT exhibit_id, name, museum_id, exhibit_type, artist_name FROM lenses.all_exhibits;\n")])])]),a("p",[t._v("Now, running this slightly modified SPARQL query:")]),t._v(" "),a("div",{staticClass:"language-SPARQL extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/museum_kg/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WHERE")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Exhibit")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("name")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?name")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("exhibitType")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?type")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?exhibit")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("artistName")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?artist")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("we will once again get all earlier results, in addition to all exhibits contained in the "),a("code",[t._v("art_exhibit")]),t._v(" table. While the earlier results will have the value "),a("code",[t._v("None")]),t._v(" as their artist name, the "),a("code",[t._v("art_exhibits")]),t._v(" entries will include the name of their artists.")]),t._v(" "),a("hr"),t._v(" "),a("p",[t._v("As a further exercise, notice how the values of "),a("code",[t._v(":exhibitType")]),t._v(" are rather ugly: "),a("code",[t._v('"art_exhibits"')]),t._v(", "),a("code",[t._v('"lenses.historical_exhibits_extended"')]),t._v(", and "),a("code",[t._v('"lenses.nature_exhibits_extended"')]),t._v(". Try adding a new basic lens over the union lens that transforms these into the values "),a("code",[t._v('"art"')]),t._v(", "),a("code",[t._v('"historical"')]),t._v(", and "),a("code",[t._v('"nature"')]),t._v(" instead.")]),t._v(" "),a("p",[a("em",[t._v("Hint: Look at the SQL function "),a("code",[t._v("REPLACE")]),t._v(". Could it be used in the "),a("code",[t._v("expression")]),t._v(" field of an added column to get rid of the "),a("code",[t._v("_exhibits")]),t._v(", "),a("code",[t._v("_extended")]),t._v(", and "),a("code",[t._v("lenses.")]),t._v(" part?")])]),t._v(" "),a("p",[t._v("Notice how the union lens allowed you to perform this operation on all three of its base relations by just defining it once. Without the union lens, you would have required three such basic lenses, one for each table, with the exact same contents.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/95.e683cb7a.js b/assets/js/95.5ebe6cd9.js similarity index 98% rename from assets/js/95.e683cb7a.js rename to assets/js/95.5ebe6cd9.js index e17069d28..7575888e5 100644 --- a/assets/js/95.e683cb7a.js +++ b/assets/js/95.5ebe6cd9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[95],{472:function(t,s,a){"use strict";a.r(s);var e=a(51),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"bonus-existential-reasoning"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bonus-existential-reasoning"}},[t._v("#")]),t._v(" Bonus: existential reasoning")]),t._v(" "),a("p",[t._v("Ontop includes a "),a("em",[t._v("tree-witness query rewriting algorithm")]),t._v(" implementing "),a("em",[t._v("existential reasoning")]),t._v(".")]),t._v(" "),a("p",[t._v("To enable it, in Protégé go to "),a("em",[t._v("Preferences")]),t._v(" -> "),a("em",[t._v("Ontop reasoner")]),t._v(" tab and enable the option "),a("em",[t._v("reasoning over anonymous individuals")]),t._v(".")]),t._v(" "),a("p",[t._v("Then, restart the reasoner and try the following query that looks for people supervised by some "),a("em",[t._v("Professor")]),t._v(":")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isSupervisedBy")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Professor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Note that there is no mapping assertion for the property "),a("em",[t._v("isSupervisedBy")]),t._v(".\nHowever, the ontology states that for every "),a("em",[t._v("GraduateStudent")]),t._v(" there must exist some "),a("em",[t._v("Professor")]),t._v(" so that the student "),a("em",[t._v("isSupervisedBy")]),t._v(" the professor.\nOntop can thus infer that all "),a("em",[t._v("GraduateStudent")]),t._v(" are answers to the query, which is then rewritten as the following equivalent query prior to evaluation:")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("GraduateStudent")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[95],{473:function(t,s,a){"use strict";a.r(s);var e=a(51),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"bonus-existential-reasoning"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#bonus-existential-reasoning"}},[t._v("#")]),t._v(" Bonus: existential reasoning")]),t._v(" "),a("p",[t._v("Ontop includes a "),a("em",[t._v("tree-witness query rewriting algorithm")]),t._v(" implementing "),a("em",[t._v("existential reasoning")]),t._v(".")]),t._v(" "),a("p",[t._v("To enable it, in Protégé go to "),a("em",[t._v("Preferences")]),t._v(" -> "),a("em",[t._v("Ontop reasoner")]),t._v(" tab and enable the option "),a("em",[t._v("reasoning over anonymous individuals")]),t._v(".")]),t._v(" "),a("p",[t._v("Then, restart the reasoner and try the following query that looks for people supervised by some "),a("em",[t._v("Professor")]),t._v(":")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("isSupervisedBy")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("Professor")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Note that there is no mapping assertion for the property "),a("em",[t._v("isSupervisedBy")]),t._v(".\nHowever, the ontology states that for every "),a("em",[t._v("GraduateStudent")]),t._v(" there must exist some "),a("em",[t._v("Professor")]),t._v(" so that the student "),a("em",[t._v("isSupervisedBy")]),t._v(" the professor.\nOntop can thus infer that all "),a("em",[t._v("GraduateStudent")]),t._v(" are answers to the query, which is then rewritten as the following equivalent query prior to evaluation:")]),t._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PREFIX")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("SELECT")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("?x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("a")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[t._v("GraduateStudent")])]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/96.38400e7b.js b/assets/js/96.399936b5.js similarity index 99% rename from assets/js/96.38400e7b.js rename to assets/js/96.399936b5.js index ace2cb552..68b45643f 100644 --- a/assets/js/96.38400e7b.js +++ b/assets/js/96.399936b5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[96],{473:function(s,t,a){"use strict";a.r(t);var n=a(51),e=Object(n.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"role-of-foreign-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#role-of-foreign-keys"}},[s._v("#")]),s._v(" Role of foreign keys")]),s._v(" "),a("p",[s._v("Foreign keys play a crucial role for optimizing the saturated mapping assertions by doing some query containment checks.")]),s._v(" "),a("p",[s._v("Let us now consider the case where foreign keys are missing.\nPlease download the following files: "),a("a",{attrs:{href:"university-no-fk.ttl"}},[s._v("university-no-fk.ttl")]),s._v(", "),a("a",{attrs:{href:"university-no-fk.obda"}},[s._v("university-no-fk.obda")]),s._v(" and "),a("a",{attrs:{href:"university-no-fk.properties"}},[s._v("university-no-fk.properties")]),s._v(" files.")]),s._v(" "),a("p",[s._v("Let us consider the case of "),a("code",[s._v("foaf:Person")]),s._v(".\nIf you run the following SPARQL query in the absence of foreign keys:")]),s._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("Person")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])])]),a("p",[s._v("you will obtain a SQL query similar to the following one (after some minor reformatting):")]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lab_teacher"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"course"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lab_teacher"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lecturer"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"course"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lecturer"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/academic/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"teaching"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"registration"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/student/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"course-registration"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/student/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"student"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/academic/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n")])])]),a("p",[s._v("This SQL query is the union of eight sub-queries. Basically, it queries\nthe tables "),a("code",[s._v("uni1.student")]),s._v(", "),a("code",[s._v("uni1.academic")]),s._v(", "),a("code",[s._v("uni2.person")]),s._v(" as expected, but also\n"),a("code",[s._v("uni1.teaching")]),s._v(", "),a("code",[s._v("uni1.course-registration")]),s._v(", "),a("code",[s._v("uni2.course")]),s._v(" and "),a("code",[s._v("uni2.registration")]),s._v(".\nRecall that the presence of the four latter tables is due to the fact that, according to the ontology, the respective domains of the properties "),a("code",[s._v(":givesLecture")]),s._v(", "),a("code",[s._v(":givesLab")]),s._v(" and "),a("code",[s._v(":attends")]),s._v(" are subsumed by "),a("code",[s._v("foaf:Person")]),s._v(".")]),s._v(" "),a("p",[s._v("With the setting of the first session which includes foreign keys, the generated SQL query contains only three unions:")]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/student/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"student"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/academic/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n")])])]),a("h3",{attrs:{id:"side-note"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#side-note"}},[s._v("#")]),s._v(" Side note")]),s._v(" "),a("p",[s._v("If we now consider also the first and the last names of persons, foreign keys are not needed to optimize the query.")]),s._v(" "),a("p",[s._v("Try:")]),s._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("Person")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])])]),a("p",[s._v("and observe that the query produces only three unions.")]),s._v(" "),a("p",[s._v("Why? Because the domain of "),a("code",[s._v("foaf:firstName")]),s._v(" and "),a("code",[s._v("foaf:lastName")]),s._v(" is "),a("code",[s._v("foaf:Person")]),s._v(".\nThe SPARQL query can thus be safely rewritten as follow:")]),s._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])])])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[96],{472:function(s,t,a){"use strict";a.r(t);var n=a(51),e=Object(n.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"role-of-foreign-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#role-of-foreign-keys"}},[s._v("#")]),s._v(" Role of foreign keys")]),s._v(" "),a("p",[s._v("Foreign keys play a crucial role for optimizing the saturated mapping assertions by doing some query containment checks.")]),s._v(" "),a("p",[s._v("Let us now consider the case where foreign keys are missing.\nPlease download the following files: "),a("a",{attrs:{href:"university-no-fk.ttl"}},[s._v("university-no-fk.ttl")]),s._v(", "),a("a",{attrs:{href:"university-no-fk.obda"}},[s._v("university-no-fk.obda")]),s._v(" and "),a("a",{attrs:{href:"university-no-fk.properties"}},[s._v("university-no-fk.properties")]),s._v(" files.")]),s._v(" "),a("p",[s._v("Let us consider the case of "),a("code",[s._v("foaf:Person")]),s._v(".\nIf you run the following SPARQL query in the absence of foreign keys:")]),s._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("Person")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])])]),a("p",[s._v("you will obtain a SQL query similar to the following one (after some minor reformatting):")]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lab_teacher"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"course"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lab_teacher"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lecturer"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"course"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lecturer"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/academic/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"teaching"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"registration"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/student/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"course-registration"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/student/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"student"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/academic/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n")])])]),a("p",[s._v("This SQL query is the union of eight sub-queries. Basically, it queries\nthe tables "),a("code",[s._v("uni1.student")]),s._v(", "),a("code",[s._v("uni1.academic")]),s._v(", "),a("code",[s._v("uni2.person")]),s._v(" as expected, but also\n"),a("code",[s._v("uni1.teaching")]),s._v(", "),a("code",[s._v("uni1.course-registration")]),s._v(", "),a("code",[s._v("uni2.course")]),s._v(" and "),a("code",[s._v("uni2.registration")]),s._v(".\nRecall that the presence of the four latter tables is due to the fact that, according to the ontology, the respective domains of the properties "),a("code",[s._v(":givesLecture")]),s._v(", "),a("code",[s._v(":givesLab")]),s._v(" and "),a("code",[s._v(":attends")]),s._v(" are subsumed by "),a("code",[s._v("foaf:Person")]),s._v(".")]),s._v(" "),a("p",[s._v("With the setting of the first session which includes foreign keys, the generated SQL query contains only three unions:")]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/student/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"student"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/academic/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n")])])]),a("h3",{attrs:{id:"side-note"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#side-note"}},[s._v("#")]),s._v(" Side note")]),s._v(" "),a("p",[s._v("If we now consider also the first and the last names of persons, foreign keys are not needed to optimize the query.")]),s._v(" "),a("p",[s._v("Try:")]),s._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("Person")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])])]),a("p",[s._v("and observe that the query produces only three unions.")]),s._v(" "),a("p",[s._v("Why? Because the domain of "),a("code",[s._v("foaf:firstName")]),s._v(" and "),a("code",[s._v("foaf:lastName")]),s._v(" is "),a("code",[s._v("foaf:Person")]),s._v(".\nThe SPARQL query can thus be safely rewritten as follow:")]),s._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])])])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/97.eb71dfa4.js b/assets/js/97.95667eff.js similarity index 99% rename from assets/js/97.eb71dfa4.js rename to assets/js/97.95667eff.js index a82a3ad0a..2b6330dae 100644 --- a/assets/js/97.eb71dfa4.js +++ b/assets/js/97.95667eff.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[97],{474:function(s,t,a){"use strict";a.r(t);var n=a(51),r=Object(n.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"role-of-primary-keys-unique-constraints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#role-of-primary-keys-unique-constraints"}},[s._v("#")]),s._v(" Role of primary keys (unique constraints)")]),s._v(" "),a("p",[s._v("Unique constraints (such as primary keys) are very useful for removing self-joins and thus improving query answering performance.")]),s._v(" "),a("p",[s._v("Let us now consider the following files: "),a("a",{attrs:{href:"university-no-pk.ttl"}},[s._v("university-no-pk.ttl")]),s._v(", "),a("a",{attrs:{href:"university-no-pk.obda"}},[s._v("university-no-pk.obda")]),s._v(" and "),a("a",{attrs:{href:"university-no-pk.properties"}},[s._v("university-no-pk.properties")]),s._v(" files.\nThe mapping assertions are the same as during the first session.\nThe only difference is that primary keys have been removed.")]),s._v(" "),a("p",[s._v("Open the new ontology file in Protégé and run the following SPARQL query:")]),s._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("DISTINCT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?prof")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?prof")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("FullProfessor")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])])]),a("p",[s._v("Due to the absence of primary keys, the generated SQL is, after some minor reformatting, the following:")]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"profQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"profLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"prof"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lname"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastName"')]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" QVIEW2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" QVIEW3\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"status"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" QVIEW2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"fname"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" QVIEW3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lname"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"profQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"profLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/academic/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"prof"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"last_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastName"')]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" QVIEW2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" QVIEW3\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"position"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" QVIEW2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"first_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" QVIEW3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"last_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" SUB_QVIEW\n")])])]),a("p",[s._v("In each sub-query, one can observe two self-joins, between "),a("code",[s._v("QVIEW1")]),s._v(", "),a("code",[s._v("QVIEW2")]),s._v(" and "),a("code",[s._v("QVIEW3")]),s._v(".")]),s._v(" "),a("p",[s._v("If you run the same query with the setting of the first session, you will obtain the following query:")]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lname"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastName"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"fname"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lname"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/academic/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firstNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firstNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"first_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firstName"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"last_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastName"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"first_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"last_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/student/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firstNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firstNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"first_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firstName"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"last_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastName"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"student"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"first_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"last_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n")])])]),a("p",[s._v("As you can see, the self-joins are removed when primary keys are provided and used as joining conditions.")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[97],{475:function(s,t,a){"use strict";a.r(t);var n=a(51),r=Object(n.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"role-of-primary-keys-unique-constraints"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#role-of-primary-keys-unique-constraints"}},[s._v("#")]),s._v(" Role of primary keys (unique constraints)")]),s._v(" "),a("p",[s._v("Unique constraints (such as primary keys) are very useful for removing self-joins and thus improving query answering performance.")]),s._v(" "),a("p",[s._v("Let us now consider the following files: "),a("a",{attrs:{href:"university-no-pk.ttl"}},[s._v("university-no-pk.ttl")]),s._v(", "),a("a",{attrs:{href:"university-no-pk.obda"}},[s._v("university-no-pk.obda")]),s._v(" and "),a("a",{attrs:{href:"university-no-pk.properties"}},[s._v("university-no-pk.properties")]),s._v(" files.\nThe mapping assertions are the same as during the first session.\nThe only difference is that primary keys have been removed.")]),s._v(" "),a("p",[s._v("Open the new ontology file in Protégé and run the following SPARQL query:")]),s._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("DISTINCT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?prof")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?prof")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("FullProfessor")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])])]),a("p",[s._v("Due to the absence of primary keys, the generated SQL is, after some minor reformatting, the following:")]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"profQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"profLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"prof"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lname"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastName"')]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" QVIEW2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" QVIEW3\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"status"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" QVIEW2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"fname"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" QVIEW3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lname"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"profQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"profLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/academic/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"prof"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"last_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastName"')]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" QVIEW2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" QVIEW3\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"position"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" QVIEW2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW2"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"first_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" QVIEW3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"last_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" SUB_QVIEW\n")])])]),a("p",[s._v("In each sub-query, one can observe two self-joins, between "),a("code",[s._v("QVIEW1")]),s._v(", "),a("code",[s._v("QVIEW2")]),s._v(" and "),a("code",[s._v("QVIEW3")]),s._v(".")]),s._v(" "),a("p",[s._v("If you run the same query with the setting of the first session, you will obtain the following query:")]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni2/person/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lname"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastName"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"fname"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lname"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/academic/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firstNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firstNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"first_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firstName"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"last_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastName"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"first_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"last_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("UNION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("ALL")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'http://example.org/uni1/student/'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("||")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"p"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firstNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firstNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"first_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firstName"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("7")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameQuestType"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastNameLang"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"last_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("AS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lastName"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"student"')]),s._v(" QVIEW1\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"first_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("AND")]),s._v("\n QVIEW1"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"last_name"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("IS")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("NOT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("NULL")]),s._v("\n")])])]),a("p",[s._v("As you can see, the self-joins are removed when primary keys are provided and used as joining conditions.")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/98.f5e3d29a.js b/assets/js/98.f718a3ad.js similarity index 99% rename from assets/js/98.f5e3d29a.js rename to assets/js/98.f718a3ad.js index 8f2bedae4..82ee65a66 100644 --- a/assets/js/98.f5e3d29a.js +++ b/assets/js/98.f718a3ad.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[98],{475:function(s,t,a){"use strict";a.r(t);var n=a(51),e=Object(n.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"choice-of-the-iri-templates"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#choice-of-the-iri-templates"}},[s._v("#")]),s._v(" Choice of the IRI templates")]),s._v(" "),a("p",[s._v("The choice of IRI templates may impact query complexity and performance, depending on whether joins have to be introduced to materialize those templates.")]),s._v(" "),a("p",[s._v("Until now, we have been using local identifiers from the data sources to build three different IRI templates for the persons of the two universities:")]),s._v(" "),a("ul",[a("li",[a("code",[s._v("ex:uni1/student/{*}")])]),s._v(" "),a("li",[a("code",[s._v("ex:uni1/academic/{*}")])]),s._v(" "),a("li",[a("code",[s._v("ex:uni2/person/{*}")])])]),s._v(" "),a("p",[s._v("Let us now consider the case where the tables "),a("code",[s._v("uni1.student")]),s._v(", "),a("code",[s._v("uni1.academic")]),s._v(" and "),a("code",[s._v("uni2.person")]),s._v(" have\na new column: "),a("code",[s._v("ssn")]),s._v(". This column corresponds to the social security number of the person.")]),s._v(" "),a("p",[s._v("This new column gives us the opportunity to use a common IRI template for all the persons. Such IRI template would allow us to collect information about a person registered in both universities.")]),s._v(" "),a("p",[s._v("As we will see, there are actually some persons that are teaching or studying in both universities.")]),s._v(" "),a("p",[s._v("Given that we already have the mapping assertions produced during the first session, we will consider\ntwo ways to change the IRI templates: first by doing it manually, then using the notion of "),a("em",[s._v("canonical IRIs")]),s._v(".")]),s._v(" "),a("p",[s._v("We will also see that using this new IRI template has a negative impact on the performance of some queries.")]),s._v(" "),a("h2",{attrs:{id:"manual-approach"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#manual-approach"}},[s._v("#")]),s._v(" Manual approach")]),s._v(" "),a("p",[s._v("Download the following files:")]),s._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"university-manual-ssn.ttl"}},[s._v("university-manual-ssn.ttl")])]),s._v(" "),a("li",[a("a",{attrs:{href:"university-manual-ssn.obda"}},[s._v("university-manual-ssn.obda")])]),s._v(" "),a("li",[a("a",{attrs:{href:"university-manual-ssn.properties"}},[s._v("university-manual-ssn.properties")])])]),s._v(" "),a("p",[s._v("The mapping assertions are currently the same as during the first hands-on session.\nLet us now update them with the new IRI template for persons.")]),s._v(" "),a("h4",{attrs:{id:"mapping-uni1-student"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-student"}},[s._v("#")]),s._v(" Mapping uni1.student")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("Student")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("string")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("string")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"student"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-academic"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-academic"}},[s._v("#")]),s._v(" Mapping uni1-academic")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("FacultyMember")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("string")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("string")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-teaching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-teaching"}},[s._v("#")]),s._v(" Mapping uni1-teaching")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("teaches")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni1")])]),s._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" ac"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"ssn"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" te"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"c_id"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"teaching"')]),s._v(" te"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" ac\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" te"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" ac"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v("\n")])])]),a("p",[s._v("As you can see, a join is needed to get the SSN of the teacher.")]),s._v(" "),a("h4",{attrs:{id:"mapping-uni1-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-registration"}},[s._v("#")]),s._v(" Mapping uni1-registration")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("attends")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni1")])]),s._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" st"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"ssn"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" re"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"c_id"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"course-registration"')]),s._v(" re"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"student"')]),s._v(" st\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" re"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" st"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-fullprofessor"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-fullprofessor"}},[s._v("#")]),s._v(" Mapping uni1-fullProfessor")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("FullProfessor")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"position"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v("\n")])])]),a("p",[s._v("Then proceed in a similar way for the other positions (assistant professor, postdoc, etc.).")]),s._v(" "),a("h4",{attrs:{id:"mapping-uni2-person"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-person"}},[s._v("#")]),s._v(" Mapping uni2.person")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("Person")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("fname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("string")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("lname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("string")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-lecturer"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-lecturer"}},[s._v("#")]),s._v(" Mapping uni2-lecturer")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("givesLecture")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni2")])]),s._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" pe"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"ssn"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" co"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"cid"')]),s._v(" \n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"course"')]),s._v(" co"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" pe\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" co"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lecturer"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" pe"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-lab-teacher"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-lab-teacher"}},[s._v("#")]),s._v(" Mapping uni2-lab-teacher")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("givesLab")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni2")])]),s._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" pe"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"ssn"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" co"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"cid"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"course"')]),s._v(" co"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" pe\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" co"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lab_teacher"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" pe"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-registration"}},[s._v("#")]),s._v(" Mapping uni2-registration")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("attends")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni2")])]),s._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" pe"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"ssn"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" re"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"cid"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"registration"')]),s._v(" re"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" pe\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" re"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" pe"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-undergraduate"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-undergraduate"}},[s._v("#")]),s._v(" Mapping uni2-undergraduate")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("UndergraduateStudent")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"status"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v("\n")])])]),a("p",[s._v("Then proceed in a similar way for the other positions (assistant professor, postdoc, etc.).")]),s._v(" "),a("h3",{attrs:{id:"sparql-queries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-queries"}},[s._v("#")]),s._v(" SPARQL queries")]),s._v(" "),a("p",[s._v("With the new mapping assertions, the following SPARQL query should now return some results:")]),s._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("DISTINCT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("teaches")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isGivenAt")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isGivenAt")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FILTER")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" < "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])])]),a("p",[s._v("However, if you execute another variant, you will see it is now very inefficient:")]),s._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("teaches")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isGivenAt")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("teaches")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isGivenAt")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FILTER")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" < "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])])]),a("p",[s._v("Look at the SQL query, it should be very long as it suffers from a substantial exponential blowup.\nNote that the first query also suffers from an exponential blowup but the latter is less important and thus less sensible on our small dataset.")]),s._v(" "),a("h2",{attrs:{id:"canonical-iris"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#canonical-iris"}},[s._v("#")]),s._v(" Canonical IRIs")]),s._v(" "),a("p",[s._v("Instead of changing the mapping assertions manually, Ontop allows you to declare a canonical IRI template for "),a("code",[s._v("ex:uni1/student/{*}")]),s._v(", "),a("code",[s._v("ex:uni1/academic/{*}")]),s._v(" and "),a("code",[s._v("ex:uni2/person/{*}")]),s._v(".")]),s._v(" "),a("p",[s._v("This takes the form of three additional mapping assertions that can be found in the "),a("a",{attrs:{href:"university-canonical.ttl"}},[s._v("university-canonical.ttl")]),s._v(", "),a("a",{attrs:{href:"university-canonical.obda"}},[s._v("university-canonical.obda")]),s._v(", and "),a("a",{attrs:{href:"university-canonical.properties"}},[s._v("university-canonical.properties")]),s._v(" files.")]),s._v(" "),a("h4",{attrs:{id:"mapping-uni1-academic-canonical"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-academic-canonical"}},[s._v("#")]),s._v(" Mapping uni1-academic-canonical")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("obda"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isCanonicalIRIOf")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni1")])]),s._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v(" \n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-student-canonical"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-student-canonical"}},[s._v("#")]),s._v(" Mapping uni1.student-canonical")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("obda"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isCanonicalIRIOf")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni1")])]),s._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v(" \n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"student"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-person-canonical"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-person-canonical"}},[s._v("#")]),s._v(" Mapping uni2.person-canonical")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("obda"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isCanonicalIRIOf")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni2")])]),s._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v(" \n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v("\n")])])]),a("p",[s._v("With these three mapping assertions and the ones of the first session, Ontop produces the same saturated mapping assertions as in the manual approach.\nQuery evaluation performance is thus the same (and similarly affected to the additional joins needed to build person IRIs), but the use of canonical IRI templates makes simpler for users to define and adapt mappings.")])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[98],{474:function(s,t,a){"use strict";a.r(t);var n=a(51),e=Object(n.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"choice-of-the-iri-templates"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#choice-of-the-iri-templates"}},[s._v("#")]),s._v(" Choice of the IRI templates")]),s._v(" "),a("p",[s._v("The choice of IRI templates may impact query complexity and performance, depending on whether joins have to be introduced to materialize those templates.")]),s._v(" "),a("p",[s._v("Until now, we have been using local identifiers from the data sources to build three different IRI templates for the persons of the two universities:")]),s._v(" "),a("ul",[a("li",[a("code",[s._v("ex:uni1/student/{*}")])]),s._v(" "),a("li",[a("code",[s._v("ex:uni1/academic/{*}")])]),s._v(" "),a("li",[a("code",[s._v("ex:uni2/person/{*}")])])]),s._v(" "),a("p",[s._v("Let us now consider the case where the tables "),a("code",[s._v("uni1.student")]),s._v(", "),a("code",[s._v("uni1.academic")]),s._v(" and "),a("code",[s._v("uni2.person")]),s._v(" have\na new column: "),a("code",[s._v("ssn")]),s._v(". This column corresponds to the social security number of the person.")]),s._v(" "),a("p",[s._v("This new column gives us the opportunity to use a common IRI template for all the persons. Such IRI template would allow us to collect information about a person registered in both universities.")]),s._v(" "),a("p",[s._v("As we will see, there are actually some persons that are teaching or studying in both universities.")]),s._v(" "),a("p",[s._v("Given that we already have the mapping assertions produced during the first session, we will consider\ntwo ways to change the IRI templates: first by doing it manually, then using the notion of "),a("em",[s._v("canonical IRIs")]),s._v(".")]),s._v(" "),a("p",[s._v("We will also see that using this new IRI template has a negative impact on the performance of some queries.")]),s._v(" "),a("h2",{attrs:{id:"manual-approach"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#manual-approach"}},[s._v("#")]),s._v(" Manual approach")]),s._v(" "),a("p",[s._v("Download the following files:")]),s._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"university-manual-ssn.ttl"}},[s._v("university-manual-ssn.ttl")])]),s._v(" "),a("li",[a("a",{attrs:{href:"university-manual-ssn.obda"}},[s._v("university-manual-ssn.obda")])]),s._v(" "),a("li",[a("a",{attrs:{href:"university-manual-ssn.properties"}},[s._v("university-manual-ssn.properties")])])]),s._v(" "),a("p",[s._v("The mapping assertions are currently the same as during the first hands-on session.\nLet us now update them with the new IRI template for persons.")]),s._v(" "),a("h4",{attrs:{id:"mapping-uni1-student"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-student"}},[s._v("#")]),s._v(" Mapping uni1.student")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("Student")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("string")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("string")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"student"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-academic"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-academic"}},[s._v("#")]),s._v(" Mapping uni1-academic")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("FacultyMember")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("first_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("string")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("last_name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("string")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-teaching"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-teaching"}},[s._v("#")]),s._v(" Mapping uni1-teaching")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("teaches")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni1")])]),s._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" ac"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"ssn"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" te"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"c_id"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"teaching"')]),s._v(" te"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v(" ac\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" te"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" ac"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"a_id"')]),s._v("\n")])])]),a("p",[s._v("As you can see, a join is needed to get the SSN of the teacher.")]),s._v(" "),a("h4",{attrs:{id:"mapping-uni1-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-registration"}},[s._v("#")]),s._v(" Mapping uni1-registration")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("attends")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni1")])]),s._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("c_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" st"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"ssn"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" re"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"c_id"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"course-registration"')]),s._v(" re"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"student"')]),s._v(" st\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" re"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" st"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"s_id"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-fullprofessor"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-fullprofessor"}},[s._v("#")]),s._v(" Mapping uni1-fullProfessor")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("FullProfessor")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"position"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v("\n")])])]),a("p",[s._v("Then proceed in a similar way for the other positions (assistant professor, postdoc, etc.).")]),s._v(" "),a("h4",{attrs:{id:"mapping-uni2-person"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-person"}},[s._v("#")]),s._v(" Mapping uni2.person")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("Person")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("fname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("string")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("lname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("^^")]),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("xsd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("string")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-lecturer"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-lecturer"}},[s._v("#")]),s._v(" Mapping uni2-lecturer")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("givesLecture")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni2")])]),s._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" pe"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"ssn"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" co"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"cid"')]),s._v(" \n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"course"')]),s._v(" co"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" pe\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" co"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lecturer"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" pe"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-lab-teacher"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-lab-teacher"}},[s._v("#")]),s._v(" Mapping uni2-lab-teacher")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("givesLab")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni2")])]),s._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" pe"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"ssn"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" co"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"cid"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"course"')]),s._v(" co"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" pe\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" co"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"lab_teacher"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" pe"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-registration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-registration"}},[s._v("#")]),s._v(" Mapping uni2-registration")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("attends")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni2")])]),s._v("/course/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("cid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" pe"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"ssn"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" re"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"cid"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"registration"')]),s._v(" re"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v(" pe\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" re"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" pe"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"pid"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-undergraduate"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-undergraduate"}},[s._v("#")]),s._v(" Mapping uni2-undergraduate")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("ex"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("a")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("UndergraduateStudent")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("WHERE")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"status"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v("\n")])])]),a("p",[s._v("Then proceed in a similar way for the other positions (assistant professor, postdoc, etc.).")]),s._v(" "),a("h3",{attrs:{id:"sparql-queries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sparql-queries"}},[s._v("#")]),s._v(" SPARQL queries")]),s._v(" "),a("p",[s._v("With the new mapping assertions, the following SPARQL query should now return some results:")]),s._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("DISTINCT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("teaches")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isGivenAt")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isGivenAt")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FILTER")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" < "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])])]),a("p",[s._v("However, if you execute another variant, you will see it is now very inefficient:")]),s._v(" "),a("div",{staticClass:"language-sparql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sparql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://example.org/voc#"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("PREFIX")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token url"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("<")]),s._v("http://xmlns.com/foaf/0.1/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(">")])]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("teaches")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isGivenAt")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?p2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("firstName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?firstName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("foaf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("lastName")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?lastName")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("teaches")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isGivenAt")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins2")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FILTER")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" < "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token variable"}},[s._v("?ins2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])])]),a("p",[s._v("Look at the SQL query, it should be very long as it suffers from a substantial exponential blowup.\nNote that the first query also suffers from an exponential blowup but the latter is less important and thus less sensible on our small dataset.")]),s._v(" "),a("h2",{attrs:{id:"canonical-iris"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#canonical-iris"}},[s._v("#")]),s._v(" Canonical IRIs")]),s._v(" "),a("p",[s._v("Instead of changing the mapping assertions manually, Ontop allows you to declare a canonical IRI template for "),a("code",[s._v("ex:uni1/student/{*}")]),s._v(", "),a("code",[s._v("ex:uni1/academic/{*}")]),s._v(" and "),a("code",[s._v("ex:uni2/person/{*}")]),s._v(".")]),s._v(" "),a("p",[s._v("This takes the form of three additional mapping assertions that can be found in the "),a("a",{attrs:{href:"university-canonical.ttl"}},[s._v("university-canonical.ttl")]),s._v(", "),a("a",{attrs:{href:"university-canonical.obda"}},[s._v("university-canonical.obda")]),s._v(", and "),a("a",{attrs:{href:"university-canonical.properties"}},[s._v("university-canonical.properties")]),s._v(" files.")]),s._v(" "),a("h4",{attrs:{id:"mapping-uni1-academic-canonical"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-academic-canonical"}},[s._v("#")]),s._v(" Mapping uni1-academic-canonical")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("obda"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isCanonicalIRIOf")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni1")])]),s._v("/academic/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("a_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v(" \n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"academic"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni1-student-canonical"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni1-student-canonical"}},[s._v("#")]),s._v(" Mapping uni1.student-canonical")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("obda"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isCanonicalIRIOf")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni1")])]),s._v("/student/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("s_id"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v(" \n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"student"')]),s._v("\n")])])]),a("h4",{attrs:{id:"mapping-uni2-person-canonical"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mapping-uni2-person-canonical"}},[s._v("#")]),s._v(" Mapping uni2.person-canonical")]),s._v(" "),a("ul",[a("li",[s._v("Target:")])]),s._v(" "),a("div",{staticClass:"language-turtle extra-class"},[a("pre",{pre:!0,attrs:{class:"language-turtle"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("person")])]),s._v("/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ssn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[s._v("obda"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("isCanonicalIRIOf")])]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[a("span",{pre:!0,attrs:{class:"token prefix"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(":")])]),a("span",{pre:!0,attrs:{class:"token local-name"}},[s._v("uni2")])]),s._v("/person/"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("pid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v(" \n")])])]),a("ul",[a("li",[s._v("Source:")])]),s._v(" "),a("div",{staticClass:"language-sql extra-class"},[a("pre",{pre:!0,attrs:{class:"language-sql"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("SELECT")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("FROM")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"uni2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"person"')]),s._v("\n")])])]),a("p",[s._v("With these three mapping assertions and the ones of the first session, Ontop produces the same saturated mapping assertions as in the manual approach.\nQuery evaluation performance is thus the same (and similarly affected to the additional joins needed to build person IRIs), but the use of canonical IRI templates makes simpler for users to define and adapt mappings.")])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/app.2f6e9b01.js b/assets/js/app.9b715b54.js similarity index 76% rename from assets/js/app.2f6e9b01.js rename to assets/js/app.9b715b54.js index 106b9329a..efe48d563 100644 --- a/assets/js/app.2f6e9b01.js +++ b/assets/js/app.9b715b54.js @@ -1,4 +1,4 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var r,a,l=e[0],s=e[1],u=e[2],f=0,p=[];f=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return i(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||c(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function m(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function x(t,e){return b.call(t,e)}function _(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var w=/-(\w)/g,P=_((function(t){return t.replace(w,(function(t,e){return e?e.toUpperCase():""}))})),k=_((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),O=/\B([A-Z])/g,S=_((function(t){return t.replace(O,"-$1").toLowerCase()}));var E=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function j(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function A(t,e){for(var n in e)t[n]=e[n];return t}function C(t){for(var e={},n=0;n0,Y=G&&G.indexOf("edge/")>0,X=(G&&G.indexOf("android"),G&&/iphone|ipad|ipod|ios/.test(G)||"ios"===Q),Z=(G&&/chrome\/\d+/.test(G),G&&/phantomjs/.test(G),G&&G.match(/firefox\/(\d+)/)),tt={}.watch,et=!1;if(W)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){et=!0}}),window.addEventListener("test-passive",null,nt)}catch(t){}var rt=function(){return void 0===B&&(B=!W&&!H&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),B},ot=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function it(t){return"function"==typeof t&&/native code/.test(t.toString())}var at,lt="undefined"!=typeof Symbol&&it(Symbol)&&"undefined"!=typeof Reflect&&it(Reflect.ownKeys);at="undefined"!=typeof Set&&it(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var st=L,ut=0,ct=function(){this.id=ut++,this.subs=[]};ct.prototype.addSub=function(t){this.subs.push(t)},ct.prototype.removeSub=function(t){y(this.subs,t)},ct.prototype.depend=function(){ct.target&&ct.target.addDep(this)},ct.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!x(o,"default"))a=!1;else if(""===a||a===S(t)){var s=zt(String,o.type);(s<0||l0&&(fe((s=t(s,(n||"")+"_"+r))[0])&&fe(c)&&(f[u]=gt(c.text+s[0].text),s.shift()),f.push.apply(f,s)):l(s)?fe(c)?f[u]=gt(c.text+s):""!==s&&f.push(gt(s)):fe(s)&&fe(c)?f[u]=gt(c.text+s.text):(a(e._isVList)&&i(s.tag)&&o(s.key)&&i(n)&&(s.key="__vlist"+n+"_"+r+"__"),f.push(s)));return f}(t):void 0}function fe(t){return i(t)&&i(t.text)&&!1===t.isComment}function pe(t,e){if(t){for(var n=Object.create(null),r=lt?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=t?!!t.$stable:!i,l=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&n&&n!==r&&l===n.$key&&!i&&!n.$hasNormal)return n;for(var s in o={},t)t[s]&&"$"!==s[0]&&(o[s]=ge(e,s,t[s]))}else o={};for(var u in e)u in o||(o[u]=ye(e,u));return t&&Object.isExtensible(t)&&(t._normalized=o),F(o,"$stable",a),F(o,"$key",l),F(o,"$hasNormal",i),o}function ge(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({}),e=(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:ce(t))&&t[0];return t&&(!e||1===t.length&&e.isComment&&!ve(e))?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function ye(t,e){return function(){return t[e]}}function be(t,e){var n,r,o,a,l;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),r=0,o=t.length;rdocument.createEvent("Event").timeStamp&&(un=function(){return cn.now()})}function fn(){var t,e;for(sn=un(),an=!0,en.sort((function(t,e){return t.id-e.id})),ln=0;lnln&&en[n].id>t.id;)n--;en.splice(n+1,0,t)}else en.push(t);on||(on=!0,ne(fn))}}(this)},dn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||s(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'+this.expression+'"';Vt(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},dn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},dn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},dn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var hn={enumerable:!0,configurable:!0,get:L,set:L};function vn(t,e,n){hn.get=function(){return this[e][n]},hn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,hn)}function mn(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[];t.$parent&&Pt(!1);var i=function(i){o.push(i);var a=Ut(i,e,n,t);St(r,i,a),i in t||vn(t,"_props",i)};for(var a in e)i(a);Pt(!0)}(t,e.props),e.methods&&function(t,e){t.$options.props;for(var n in e)t[n]="function"!=typeof e[n]?L:E(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;c(e=t._data="function"==typeof e?function(t,e){pt();try{return t.call(e,e)}catch(t){return Bt(t,e,"data()"),{}}finally{dt()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);for(;o--;){var i=n[o];0,r&&x(r,i)||(a=void 0,36!==(a=(i+"").charCodeAt(0))&&95!==a&&vn(t,"_data",i))}var a;Ot(e,!0)}(t):Ot(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=rt();for(var o in e){var i=e[o],a="function"==typeof i?i:i.get;0,r||(n[o]=new dn(t,a||L,L,gn)),o in t||yn(t,o,i)}}(t,e.computed),e.watch&&e.watch!==tt&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!f(t)&&t.test(e)}function jn(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var l=a.name;l&&!e(l)&&An(n,i,r,o)}}}function An(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,y(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=wn++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Dt(Pn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Je(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,o=n&&n.context;t.$slots=de(e._renderChildren,o),t.$scopedSlots=r,t._c=function(e,n,r,o){return Fe(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return Fe(t,e,n,r,o,!0)};var i=n&&n.data;St(t,"$attrs",i&&i.attrs||r,null,!0),St(t,"$listeners",e._parentListeners||r,null,!0)}(e),tn(e,"beforeCreate"),function(t){var e=pe(t.$options.inject,t);e&&(Pt(!1),Object.keys(e).forEach((function(n){St(t,n,e[n])})),Pt(!0))}(e),mn(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),tn(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(kn),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Et,t.prototype.$delete=jt,t.prototype.$watch=function(t,e,n){if(c(e))return _n(this,t,e,n);(n=n||{}).user=!0;var r=new dn(this,t,e,n);if(n.immediate){var o='callback for immediate watcher "'+r.expression+'"';pt(),Vt(e,this,[r.value],this,o),dt()}return function(){r.teardown()}}}(kn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var o=0,i=t.length;o1?j(n):n;for(var r=j(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;iparseInt(this.max)&&An(t,e[0],e,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)An(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){jn(t,(function(t){return En(e,t)}))})),this.$watch("exclude",(function(e){jn(t,(function(t){return!En(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=We(t),n=e&&e.componentOptions;if(n){var r=Sn(n),o=this.include,i=this.exclude;if(o&&(!r||!En(o,r))||i&&r&&En(i,r))return e;var a=this.cache,l=this.keys,s=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;a[s]?(e.componentInstance=a[s].componentInstance,y(l,s),l.push(s)):(this.vnodeToCache=e,this.keyToCache=s),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return q}};Object.defineProperty(t,"config",e),t.util={warn:st,extend:A,mergeOptions:Dt,defineReactive:St},t.set=Et,t.delete=jt,t.nextTick=ne,t.observable=function(t){return Ot(t),t},t.options=Object.create(null),I.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,A(t.options.components,Ln),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=j(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Dt(this.options,t),this}}(t),On(t),function(t){I.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&c(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(kn),Object.defineProperty(kn.prototype,"$isServer",{get:rt}),Object.defineProperty(kn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(kn,"FunctionalRenderContext",{value:Me}),kn.version="2.6.14";var $n=m("style,class"),Tn=m("input,textarea,option,select,progress"),Mn=m("contenteditable,draggable,spellcheck"),Rn=m("events,caret,typing,plaintext-only"),Dn=m("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),In="http://www.w3.org/1999/xlink",Un=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},qn=function(t){return Un(t)?t.slice(6,t.length):""},Nn=function(t){return null==t||!1===t};function Fn(t){for(var e=t.data,n=t,r=t;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=zn(r.data,e));for(;i(n=n.parent);)n&&n.data&&(e=zn(e,n.data));return function(t,e){if(i(t)||i(e))return Bn(t,Vn(e));return""}(e.staticClass,e.class)}function zn(t,e){return{staticClass:Bn(t.staticClass,e.staticClass),class:i(t.class)?[t.class,e.class]:e.class}}function Bn(t,e){return t?e?t+" "+e:t:e||""}function Vn(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,o=t.length;r-1?dr(t,e,n):Dn(e)?Nn(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Mn(e)?t.setAttribute(e,function(t,e){return Nn(e)||"false"===e?"false":"contenteditable"===t&&Rn(e)?e:"true"}(e,n)):Un(e)?Nn(n)?t.removeAttributeNS(In,qn(e)):t.setAttributeNS(In,e,n):dr(t,e,n)}function dr(t,e,n){if(Nn(n))t.removeAttribute(e);else{if(J&&!K&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var hr={create:fr,update:fr};function vr(t,e){var n=e.elm,r=e.data,a=t.data;if(!(o(r.staticClass)&&o(r.class)&&(o(a)||o(a.staticClass)&&o(a.class)))){var l=Fn(e),s=n._transitionClasses;i(s)&&(l=Bn(l,Vn(s))),l!==n._prevClass&&(n.setAttribute("class",l),n._prevClass=l)}}var mr,gr={create:vr,update:vr};function yr(t,e,n){var r=mr;return function o(){var i=e.apply(null,arguments);null!==i&&_r(t,o,n,r)}}var br=Gt&&!(Z&&Number(Z[1])<=53);function xr(t,e,n,r){if(br){var o=sn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}mr.addEventListener(t,e,et?{capture:n,passive:r}:n)}function _r(t,e,n,r){(r||mr).removeEventListener(t,e._wrapper||e,n)}function wr(t,e){if(!o(t.data.on)||!o(e.data.on)){var n=e.data.on||{},r=t.data.on||{};mr=e.elm,function(t){if(i(t.__r)){var e=J?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}i(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),le(n,r,xr,_r,yr,e.context),mr=void 0}}var Pr,kr={create:wr,update:wr};function Or(t,e){if(!o(t.data.domProps)||!o(e.data.domProps)){var n,r,a=e.elm,l=t.data.domProps||{},s=e.data.domProps||{};for(n in i(s.__ob__)&&(s=e.data.domProps=A({},s)),l)n in s||(a[n]="");for(n in s){if(r=s[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===l[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=r;var u=o(r)?"":String(r);Sr(a,u)&&(a.value=u)}else if("innerHTML"===n&&Qn(a.tagName)&&o(a.innerHTML)){(Pr=Pr||document.createElement("div")).innerHTML=""+r+"";for(var c=Pr.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}else if(r!==l[n])try{a[n]=r}catch(t){}}}}function Sr(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(i(r)){if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Er={create:Or,update:Or},jr=_((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function Ar(t){var e=Cr(t.style);return t.staticStyle?A(t.staticStyle,e):e}function Cr(t){return Array.isArray(t)?C(t):"string"==typeof t?jr(t):t}var Lr,$r=/^--/,Tr=/\s*!important$/,Mr=function(t,e,n){if($r.test(e))t.style.setProperty(e,n);else if(Tr.test(n))t.style.setProperty(S(e),n.replace(Tr,""),"important");else{var r=Dr(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(qr).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Fr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(qr).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function zr(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&A(e,Br(t.name||"v")),A(e,t),e}return"string"==typeof t?Br(t):void 0}}var Br=_((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Vr=W&&!K,Wr="transition",Hr="transitionend",Qr="animation",Gr="animationend";Vr&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Wr="WebkitTransition",Hr="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Qr="WebkitAnimation",Gr="webkitAnimationEnd"));var Jr=W?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Kr(t){Jr((function(){Jr(t)}))}function Yr(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Nr(t,e))}function Xr(t,e){t._transitionClasses&&y(t._transitionClasses,e),Fr(t,e)}function Zr(t,e,n){var r=eo(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var l="transition"===o?Hr:Gr,s=0,u=function(){t.removeEventListener(l,c),n()},c=function(e){e.target===t&&++s>=a&&u()};setTimeout((function(){s0&&(n="transition",c=a,f=i.length):"animation"===e?u>0&&(n="animation",c=u,f=s.length):f=(n=(c=Math.max(a,u))>0?a>u?"transition":"animation":null)?"transition"===n?i.length:s.length:0,{type:n,timeout:c,propCount:f,hasTransform:"transition"===n&&to.test(r[Wr+"Property"])}}function no(t,e){for(;t.length1}function so(t,e){!0!==e.data.show&&oo(e)}var uo=function(t){var e,n,r={},s=t.modules,u=t.nodeOps;for(e=0;eh?b(t,o(n[g+1])?null:n[g+1].elm,n,d,g,r):d>g&&_(e,p,h)}(p,m,g,n,c):i(g)?(i(t.text)&&u.setTextContent(p,""),b(p,null,g,0,g.length-1,n)):i(m)?_(m,0,m.length-1):i(t.text)&&u.setTextContent(p,""):t.text!==e.text&&u.setTextContent(p,e.text),i(h)&&i(d=h.hook)&&i(d=d.postpatch)&&d(t,e)}}}function O(t,e,n){if(a(n)&&i(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==i&&(a.selected=i);else if(M(vo(a),r))return void(t.selectedIndex!==l&&(t.selectedIndex=l));o||(t.selectedIndex=-1)}}function ho(t,e){return e.every((function(e){return!M(e,t)}))}function vo(t){return"_value"in t?t._value:t.value}function mo(t){t.target.composing=!0}function go(t){t.target.composing&&(t.target.composing=!1,yo(t.target,"input"))}function yo(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function bo(t){return!t.componentInstance||t.data&&t.data.transition?t:bo(t.componentInstance._vnode)}var xo={model:co,show:{bind:function(t,e,n){var r=e.value,o=(n=bo(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,oo(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=bo(n)).data&&n.data.transition?(n.data.show=!0,r?oo(n,(function(){t.style.display=t.__vOriginalDisplay})):io(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},_o={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function wo(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?wo(We(e.children)):t}function Po(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[P(i)]=o[i];return e}function ko(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Oo=function(t){return t.tag||ve(t)},So=function(t){return"show"===t.name},Eo={name:"transition",props:_o,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Oo)).length){0;var r=this.mode;0;var o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var i=wo(o);if(!i)return o;if(this._leaving)return ko(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:l(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var s=(i.data||(i.data={})).transition=Po(this),u=this._vnode,c=wo(u);if(i.data.directives&&i.data.directives.some(So)&&(i.data.show=!0),c&&c.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(i,c)&&!ve(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var f=c.data.transition=A({},s);if("out-in"===r)return this._leaving=!0,se(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),ko(t,o);if("in-out"===r){if(ve(i))return u;var p,d=function(){p()};se(s,"afterEnter",d),se(s,"enterCancelled",d),se(f,"delayLeave",(function(t){p=t}))}}return o}}},jo=A({tag:String,moveClass:String},_o);function Ao(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Co(t){t.data.newPos=t.elm.getBoundingClientRect()}function Lo(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+o+"px)",i.transitionDuration="0s"}}delete jo.mode;var $o={Transition:Eo,TransitionGroup:{props:jo,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Ye(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Po(this),l=0;l-1?Jn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Jn[t]=/HTMLUnknownElement/.test(e.toString())},A(kn.options.directives,xo),A(kn.options.components,$o),kn.prototype.__patch__=W?uo:L,kn.prototype.$mount=function(t,e){return function(t,e,n){var r;return t.$el=e,t.$options.render||(t.$options.render=mt),tn(t,"beforeMount"),r=function(){t._update(t._render(),n)},new dn(t,r,L,{before:function(){t._isMounted&&!t._isDestroyed&&tn(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,tn(t,"mounted")),t}(this,t=t&&W?function(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}(t):void 0,e)},W&&setTimeout((function(){q.devtools&&ot&&ot.emit("init",kn)}),0),e.default=kn},function(t,e,n){var r=n(3),o=n(28).f,i=n(17),a=n(14),l=n(81),s=n(125),u=n(105);t.exports=function(t,e){var n,c,f,p,d,h=t.target,v=t.global,m=t.stat;if(n=v?r:m?r[h]||l(h,{}):(r[h]||{}).prototype)for(c in e){if(p=e[c],f=t.noTargetGet?(d=o(n,c))&&d.value:n[c],!u(v?c:h+(m?".":"#")+c,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;s(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),a(n,c,p,t)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||function(){return this}()||Function("return this")()},function(t,e,n){var r=n(3),o=n(55),i=n(8),a=n(56),l=n(82),s=n(119),u=o("wks"),c=r.Symbol,f=s?c:c&&c.withoutSetter||a;t.exports=function(t){return i(u,t)&&(l||"string"==typeof u[t])||(l&&i(c,t)?u[t]=c[t]:u[t]=f("Symbol."+t)),u[t]}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(5);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var r=n(90),o=n(14),i=n(209);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,n){var r=n(12),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(r(t),e)}},function(t,e,n){var r=n(2);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(9),o=n(120),i=n(6),a=n(57),l=Object.defineProperty;e.f=r?l:function(t,e,n){if(i(t),e=a(e),i(n),o)try{return l(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";var r=n(139).charAt,o=n(16),i=n(27),a=n(124),l=i.set,s=i.getterFor("String Iterator");a(String,"String",(function(t){l(this,{type:"String Iterator",string:o(t),index:0})}),(function(){var t,e=s(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(22);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(60),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(3),o=n(17),i=n(8),a=n(81),l=n(86),s=n(27),u=s.get,c=s.enforce,f=String(String).split("String");(t.exports=function(t,e,n,l){var s,u=!!l&&!!l.unsafe,p=!!l&&!!l.enumerable,d=!!l&&!!l.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),(s=c(n)).source||(s.source=f.join("string"==typeof e?e:""))),t!==r?(u?!d&&t[e]&&(p=!0):delete t[e],p?t[e]=n:o(t,e,n)):p?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||l(this)}))},function(t,e,n){var r=n(3),o=n(140),i=n(118),a=n(17),l=n(4),s=l("iterator"),u=l("toStringTag"),c=i.values;for(var f in o){var p=r[f],d=p&&p.prototype;if(d){if(d[s]!==c)try{a(d,s,c)}catch(t){d[s]=c}if(d[u]||a(d,u,f),o[f])for(var h in i)if(d[h]!==i[h])try{a(d,h,i[h])}catch(t){d[h]=i[h]}}}},function(t,e,n){var r=n(58);t.exports=function(t){if(r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},function(t,e,n){var r=n(9),o=n(10),i=n(44);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(39),o=n(22);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(3),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(152),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!1},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,n){var r=n(63),o=n(39),i=n(12),a=n(13),l=n(141),s=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,c=4==t,f=6==t,p=7==t,d=5==t||f;return function(h,v,m,g){for(var y,b,x=i(h),_=o(x),w=r(v,m,3),P=a(_.length),k=0,O=g||l,S=e?O(h,P):n||p?O(h,0):void 0;P>k;k++)if((d||k in _)&&(b=w(y=_[k],k,x),t))if(e)S[k]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return k;case 2:s.call(S,y)}else switch(t){case 4:return!1;case 7:s.call(S,y)}return f?-1:u||c?c:S}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},function(t,e,n){var r=n(238),o=n(241);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){var r,o,i,a=n(193),l=n(3),s=n(5),u=n(17),c=n(8),f=n(80),p=n(61),d=n(42),h=l.WeakMap;if(a||f.state){var v=f.state||(f.state=new h),m=v.get,g=v.has,y=v.set;r=function(t,e){if(g.call(v,t))throw new TypeError("Object already initialized");return e.facade=t,y.call(v,t,e),e},o=function(t){return m.call(v,t)||{}},i=function(t){return g.call(v,t)}}else{var b=p("state");d[b]=!0,r=function(t,e){if(c(t,b))throw new TypeError("Object already initialized");return e.facade=t,u(t,b,e),e},o=function(t){return c(t,b)?t[b]:{}},i=function(t){return c(t,b)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!s(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(9),o=n(87),i=n(44),a=n(19),l=n(57),s=n(8),u=n(120),c=Object.getOwnPropertyDescriptor;e.f=r?c:function(t,e){if(t=a(t),e=l(e),u)try{return c(t,e)}catch(t){}if(s(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r,o=n(6),i=n(190),a=n(85),l=n(42),s=n(123),u=n(83),c=n(61),f=c("IE_PROTO"),p=function(){},d=function(t){return" + diff --git a/community/contributing/documentation.html b/community/contributing/documentation.html index 7064ec94f..6d9e8ac6e 100644 --- a/community/contributing/documentation.html +++ b/community/contributing/documentation.html @@ -6,8 +6,8 @@ Documentation | Ontop - - + +
- + diff --git a/community/contributing/index.html b/community/contributing/index.html index 426de3293..7a701b2d3 100644 --- a/community/contributing/index.html +++ b/community/contributing/index.html @@ -6,8 +6,8 @@ How to contribute | Ontop - - + +
- + diff --git a/guide/databases/dremio.html b/guide/databases/dremio.html index f083caace..f7e5331f1 100644 --- a/guide/databases/dremio.html +++ b/guide/databases/dremio.html @@ -6,8 +6,8 @@ Dremio | Ontop - - + +
- + diff --git a/guide/databases/duckdb.html b/guide/databases/duckdb.html index 1fb3dfc92..7775e6c13 100644 --- a/guide/databases/duckdb.html +++ b/guide/databases/duckdb.html @@ -6,8 +6,8 @@ DuckDB | Ontop - - + +
- + diff --git a/guide/databases/dynamodb.html b/guide/databases/dynamodb.html index 1885d984d..bbe73d4f0 100644 --- a/guide/databases/dynamodb.html +++ b/guide/databases/dynamodb.html @@ -6,8 +6,8 @@ AWS DynamoDB | Ontop - - + +
- + diff --git a/guide/databases/generic.html b/guide/databases/generic.html index 5b38cebc6..82657db45 100644 --- a/guide/databases/generic.html +++ b/guide/databases/generic.html @@ -6,8 +6,8 @@ Generic JDBC (not recommended) | Ontop - - + +
- + diff --git a/guide/databases/mariadb.html b/guide/databases/mariadb.html index d5c9587af..135aee136 100644 --- a/guide/databases/mariadb.html +++ b/guide/databases/mariadb.html @@ -6,8 +6,8 @@ MariaDB | Ontop - - + +
- + diff --git a/guide/databases/mssql.html b/guide/databases/mssql.html index ed9da0781..b54db8109 100644 --- a/guide/databases/mssql.html +++ b/guide/databases/mssql.html @@ -6,8 +6,8 @@ MS SQL Server | Ontop - - + +
- + diff --git a/guide/databases/mysql.html b/guide/databases/mysql.html index 49bffa8a3..50dc39c3c 100644 --- a/guide/databases/mysql.html +++ b/guide/databases/mysql.html @@ -6,8 +6,8 @@ MySQL | Ontop - - + +
- + diff --git a/guide/databases/oracle.html b/guide/databases/oracle.html index ce8a17431..ce60aa7c0 100644 --- a/guide/databases/oracle.html +++ b/guide/databases/oracle.html @@ -6,8 +6,8 @@ Oracle | Ontop - - + +
- + diff --git a/guide/databases/postgres.html b/guide/databases/postgres.html index 2f5acd935..b609673f9 100644 --- a/guide/databases/postgres.html +++ b/guide/databases/postgres.html @@ -6,8 +6,8 @@ PostgreSQL | Ontop - - + +
- + diff --git a/guide/databases/presto.html b/guide/databases/presto.html index ce1f38608..dc69acf78 100644 --- a/guide/databases/presto.html +++ b/guide/databases/presto.html @@ -6,8 +6,8 @@ Presto | Ontop - - + +
- + diff --git a/guide/databases/redshift.html b/guide/databases/redshift.html index 7754484e8..273d32fb2 100644 --- a/guide/databases/redshift.html +++ b/guide/databases/redshift.html @@ -6,8 +6,8 @@ AWS Redshift | Ontop - - + +
- + diff --git a/guide/databases/snowflake.html b/guide/databases/snowflake.html index c0da9385d..8e85d09c9 100644 --- a/guide/databases/snowflake.html +++ b/guide/databases/snowflake.html @@ -6,8 +6,8 @@ Snowflake | Ontop - - + +
- + diff --git a/guide/databases/spark.html b/guide/databases/spark.html index de534aa69..f3d59d84e 100644 --- a/guide/databases/spark.html +++ b/guide/databases/spark.html @@ -6,8 +6,8 @@ SparkSQL | Ontop - - + +
- + diff --git a/guide/databases/trino.html b/guide/databases/trino.html index 539b838d1..b26cb87fa 100644 --- a/guide/databases/trino.html +++ b/guide/databases/trino.html @@ -6,8 +6,8 @@ Trino | Ontop - - + +
- + diff --git a/guide/db.html b/guide/db.html index 96510ede7..c87a60b29 100644 --- a/guide/db.html +++ b/guide/db.html @@ -6,8 +6,8 @@ Data sources | Ontop - - + +
- + (opens new window)

# Data sources

# PostgreSQL

DOUBLE-CHECK restrictions

SIMILAR TO (not parsed by JSQLParser)

+ diff --git a/guide/getting-started.html b/guide/getting-started.html index 6068e6ed2..56653dc5f 100644 --- a/guide/getting-started.html +++ b/guide/getting-started.html @@ -6,8 +6,8 @@ Getting started | Ontop - - + +
+ diff --git a/tutorial/basic/setup.html b/tutorial/basic/setup.html index 70ce42a65..64a204db4 100644 --- a/tutorial/basic/setup.html +++ b/tutorial/basic/setup.html @@ -6,8 +6,8 @@ Database and Ontop Setup | Ontop - - + +
- + diff --git a/tutorial/basic/university-1.html b/tutorial/basic/university-1.html index 9c09a048f..ca9a30aa9 100644 --- a/tutorial/basic/university-1.html +++ b/tutorial/basic/university-1.html @@ -6,8 +6,8 @@ First data source: university 1 | Ontop - - + + - + diff --git a/tutorial/basic/university-2.html b/tutorial/basic/university-2.html index a3e81fea7..192843f01 100644 --- a/tutorial/basic/university-2.html +++ b/tutorial/basic/university-2.html @@ -6,8 +6,8 @@ Second data source: university 2 | Ontop - - + +
- + diff --git a/tutorial/endpoint/endpoint-cli.html b/tutorial/endpoint/endpoint-cli.html index 0e1d4109c..cc4e00fa6 100644 --- a/tutorial/endpoint/endpoint-cli.html +++ b/tutorial/endpoint/endpoint-cli.html @@ -6,8 +6,8 @@ Setting up an Ontop SPARQL endpoint with Ontop CLI | Ontop - - + + - + diff --git a/tutorial/endpoint/endpoint-docker.html b/tutorial/endpoint/endpoint-docker.html index ebdd88a77..7b24dc317 100644 --- a/tutorial/endpoint/endpoint-docker.html +++ b/tutorial/endpoint/endpoint-docker.html @@ -6,8 +6,8 @@ Setting up an Ontop SPARQL endpoint with Docker | Ontop - - + +
- + diff --git a/tutorial/endpoint/endpoint-tomcat.html b/tutorial/endpoint/endpoint-tomcat.html index 4f906159d..ed9f11cb4 100644 --- a/tutorial/endpoint/endpoint-tomcat.html +++ b/tutorial/endpoint/endpoint-tomcat.html @@ -6,8 +6,8 @@ SPARQL endpoint deployment using Ontop Tomcat/RDF4J bundle | Ontop - - + + - +
+ diff --git a/tutorial/endpoint/index.html b/tutorial/endpoint/index.html index dd38dfa8f..6f0d876d3 100644 --- a/tutorial/endpoint/index.html +++ b/tutorial/endpoint/index.html @@ -6,8 +6,8 @@ Deploying a SPARQL endpoint | Ontop - - + +
- + diff --git a/tutorial/federation/index.html b/tutorial/federation/index.html index a813d8377..0550d6f43 100644 --- a/tutorial/federation/index.html +++ b/tutorial/federation/index.html @@ -6,8 +6,8 @@ Federating multiple databases | Ontop - - + +
- + diff --git a/tutorial/index.html b/tutorial/index.html index cf2c07ff2..2166be43d 100644 --- a/tutorial/index.html +++ b/tutorial/index.html @@ -6,8 +6,8 @@ Presentation | Ontop - - + +
- + diff --git a/tutorial/interact/cli.html b/tutorial/interact/cli.html index 00bb44ffb..c6c5357cb 100644 --- a/tutorial/interact/cli.html +++ b/tutorial/interact/cli.html @@ -6,8 +6,8 @@ Interact with an Ontop SPARQL Endpoint | Ontop - - + +
- + diff --git a/tutorial/interact/jupyter.html b/tutorial/interact/jupyter.html index 04f41ad55..b9c0351da 100644 --- a/tutorial/interact/jupyter.html +++ b/tutorial/interact/jupyter.html @@ -6,8 +6,8 @@ Use Jupyter Notebook with an Ontop SPARQL endpoint | Ontop - - + +
- + diff --git a/tutorial/lenses/basic-lens.html b/tutorial/lenses/basic-lens.html index 2c9424a20..0fb6f7bec 100644 --- a/tutorial/lenses/basic-lens.html +++ b/tutorial/lenses/basic-lens.html @@ -6,8 +6,8 @@ Basic Lens | Ontop - - + +
- + diff --git a/tutorial/lenses/flatten-lens.html b/tutorial/lenses/flatten-lens.html index c96b9d142..ee7212317 100644 --- a/tutorial/lenses/flatten-lens.html +++ b/tutorial/lenses/flatten-lens.html @@ -6,8 +6,8 @@ Flatten Lens | Ontop - - + +
- + diff --git a/tutorial/lenses/index.html b/tutorial/lenses/index.html index da8bf8a9c..af18385f3 100644 --- a/tutorial/lenses/index.html +++ b/tutorial/lenses/index.html @@ -6,8 +6,8 @@ Using lenses | Ontop - - + +
- + diff --git a/tutorial/lenses/join-lens.html b/tutorial/lenses/join-lens.html index 3d2529b89..07aa511aa 100644 --- a/tutorial/lenses/join-lens.html +++ b/tutorial/lenses/join-lens.html @@ -6,8 +6,8 @@ Join Lens | Ontop - - + +
- + diff --git a/tutorial/lenses/setup.html b/tutorial/lenses/setup.html index 1fd70a910..75fdeddab 100644 --- a/tutorial/lenses/setup.html +++ b/tutorial/lenses/setup.html @@ -6,8 +6,8 @@ Database and Ontop Setup | Ontop - - + + - + diff --git a/tutorial/lenses/sql-lens.html b/tutorial/lenses/sql-lens.html index aa62b50c6..154a1ae4e 100644 --- a/tutorial/lenses/sql-lens.html +++ b/tutorial/lenses/sql-lens.html @@ -6,8 +6,8 @@ SQL Lens | Ontop - - + +
- + diff --git a/tutorial/lenses/union-lens.html b/tutorial/lenses/union-lens.html index f5622ea58..6bf392183 100644 --- a/tutorial/lenses/union-lens.html +++ b/tutorial/lenses/union-lens.html @@ -6,8 +6,8 @@ Union Lens | Ontop - - + +
- + diff --git a/tutorial/mapping/existential.html b/tutorial/mapping/existential.html index 0abfaa699..c24ebf93b 100644 --- a/tutorial/mapping/existential.html +++ b/tutorial/mapping/existential.html @@ -6,8 +6,8 @@ Bonus: existential reasoning | Ontop - - + +
- + diff --git a/tutorial/mapping/foreign-keys.html b/tutorial/mapping/foreign-keys.html index 88b466a4d..cd75a3ccc 100644 --- a/tutorial/mapping/foreign-keys.html +++ b/tutorial/mapping/foreign-keys.html @@ -6,8 +6,8 @@ Role of foreign keys | Ontop - - + +
- + diff --git a/tutorial/mapping/index.html b/tutorial/mapping/index.html index fbe05b054..3b86446d9 100644 --- a/tutorial/mapping/index.html +++ b/tutorial/mapping/index.html @@ -6,8 +6,8 @@ Second session: Mapping Engineering | Ontop - - + +
- + diff --git a/tutorial/mapping/primary-keys.html b/tutorial/mapping/primary-keys.html index 94bb6ec93..a76981591 100644 --- a/tutorial/mapping/primary-keys.html +++ b/tutorial/mapping/primary-keys.html @@ -6,8 +6,8 @@ Role of primary keys (unique constraints) | Ontop - - + +
- + diff --git a/tutorial/mapping/uri-templates.html b/tutorial/mapping/uri-templates.html index 9cee9c78f..af5bc07fb 100644 --- a/tutorial/mapping/uri-templates.html +++ b/tutorial/mapping/uri-templates.html @@ -6,8 +6,8 @@ Choice of the IRI templates | Ontop - - + +
- + diff --git a/tutorial/materialization/materialization.html b/tutorial/materialization/materialization.html index 788666bb7..2e9402956 100644 --- a/tutorial/materialization/materialization.html +++ b/tutorial/materialization/materialization.html @@ -6,8 +6,8 @@ How to materialize data into a graph database | Ontop - - + +
- +