diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..813d4558cafb6dbf247d2135e437e1d17b3c8049 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +projects/het2onto-benchmark/.tmp-conf.txt \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index bf3c1af8da326e41877c389bc87629422dcaa2cc..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# org - - - -## Getting started - -To make it easy for you to get started with GitLab, here's a list of recommended next steps. - -Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! - -## Add your files - -- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files -- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: - -``` -cd existing_repo -git remote add origin https://gitlab.limos.fr/maburon/org.git -git branch -M master -git push -uf origin master -``` - -## Integrate with your tools - -- [ ] [Set up project integrations](https://gitlab.limos.fr/maburon/org/-/settings/integrations) - -## Collaborate with your team - -- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/) -- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) -- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) -- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/) -- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) - -## Test and Deploy - -Use the built-in continuous integration in GitLab. - -- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html) -- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/) -- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html) -- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/) -- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html) - -*** - -# Editing this README - -When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. - -## Suggestions for a good README -Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. - -## Name -Choose a self-explaining name for your project. - -## Description -Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors. - -## Badges -On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge. - -## Visuals -Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method. - -## Installation -Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. - -## Usage -Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. - -## Support -Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. - -## Roadmap -If you have ideas for releases in the future, it is a good idea to list them in the README. - -## Contributing -State if you are open to contributions and what your requirements are for accepting them. - -For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. - -You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. - -## Authors and acknowledgment -Show your appreciation to those who have contributed to the project. - -## License -For open source projects, say how it is licensed. - -## Project status -If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers. diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000000000000000000000000000000000000..8ee75f6018e80af81665cf2fe228505fd44b14a8 --- /dev/null +++ b/css/style.css @@ -0,0 +1,281 @@ +body { + font-family: 'Linux Libertine', 'Helvetica Neue', Arial, sans-serif; + line-height: 1.2; + font-size: 18px; + background: #fff; + color: #666; + margin: 0; + border-top: 3px solid #f33130; +} +@media (max-width: 799px) { + body { + padding: 15px; + } +} +body h1, +body h2, +body h3, +body h4 { + font-weight: bold; + margin: 0; + padding: 0; + color: #444; +} + +body h1.title { + font-size: 3em; + margin-top: .8em; + margin-bottom: .8em; +} + +body h2 { + margin-top: .7em; + position: relative; + font-size: 2em; +} +body h3 { + font-size: 1.6em; + margin-top: .6em; +} +body h4, body .org-ref-bib-h1 { + font-size: 1.4em; + margin-top: .5em; + +} + +body p { + text-align: justify; +} +body a { + text-decoration: none; + color: #f33130; +} +body a:hover { + color: #91351c; + text-decoration: underline; +} +body pre { + font-size: .85em; + background: white; +} +body pre.src { + overflow-y: auto !important; +} + +body code { + background: #eee; + border: 1px solid #ccc; + padding: 0px 4px; + color: #666; + overflow-x: auto; + font-size: 0.9em; +} +body li { + margin-bottom: 1em; +} +body img { + border: 1px solid #ccc; + height: auto; + max-width: 100%; +} + +body img.no-border { + border: none; +} +body .tag { + background: transparent; + font-size: 0.6em; +} +body .tag span { + background: #1692cc; + color: white; + padding: 2px 5px; + border-radius: 4px; +} +body .pubdate { + color: #aaa; + margin-bottom: 20px; + margin-top: -16px; + text-align: right; + border-bottom: 1px solid #e2e2e2; +} +body .pubdate p { + display: inline; + margin-right: 10px; +} +@media (max-width: 800px) { + body .pubdate { + margin-top: 0; + text-align: left; + } +} +body .nav-blog { + text-align: right; +} +body .org-info-js_info-navigation { + background: #bbb; +} +@media (min-width: 800px) { + body #content, + body #postamble { + margin: 0 auto; + max-width: 900px; + max-width: 56.25rem; + } +} +body #content { + margin-top: 10px; +} +body #postamble { + font-size: 0.8em; + line-height: 1.8em; + margin-top: 50px; + text-align: center; + color: #aaa; + padding: 15px 0; + border-top: 1px solid #e2e2e2; +} +body #postamble a { + color: #e9a390; +} +@media (min-width: 800px) { + body #preamble { + width: 700px; + margin: 0px auto; + position: relative; + } +} +body .intro { + padding-top: 20px; + color: #BBB; + text-align: center; +} +body .intro h1 { + font-size: 42px; + font-weight: bold; + line-height: 1em; + margin: 0.3em; + padding: 0; +} +body .intro p { + color: #aaa; + font-size: 14px !important; + text-align: center; +} +body .intro img { + border-radius: 100%; + width: 100px; +} + +/* Navigation */ + +body .nav { + text-align: center; + margin-top: 1em; + border-bottom: 1px solid #e2e2e2; + font-size: .8em; + text-transform: uppercase; +} + +body .nav ul { + list-style: none; + padding: 0; +} + +body .nav ul li { + color: #999; + display: inline-block; + margin: 0; +} + +body .nav ul li a { + display: inline-block; + padding-right: 6px; + border-radius: 0; + font-weight: normal; + color: #6a6a6a; +} + +body .clearfix { + clear: both; +} +@media (min-width: 800px) { + body .contact { + -moz-column-count: 2; + -webkit-column-count: 2; + -moz-column-gap: 3em; + -webkit-column-gap: 3em; + column-count: 2; + column-gap: 3em; + } +} +.photo { + text-align: center; +} +.photo p { + text-align: center; +} +.photo .still { + margin-top: 100px; + padding: 60px 10px; + border: 1px solid #ccc; +} +.photo .still.portrait { + padding: 10px; +} +.photo label { + display: block; +} + +video { + width: 100%; + margin: auto; +} + + +/* + * Math block style + */ + +.DEFINITION p::before, +.definition p::before { + content: "Definition:"; + font-weight: bold; + font-style: normal; +} + +.LEMMA p::before, +.lemma p::before { + content: "Lemma:"; + font-weight: bold; + font-style: normal; +} + +.PROP p::before, +.prop p::before { + content: "Property:"; + font-weight: bold; + font-style: normal; +} + +.DEFINITION p, +.definition p, +.PROP p, +.prop p, +.LEMMA p, +.lemma p { + display: inline; + font-style: italic; +} + +.definition p i, +.DEFINITION p i{ + font-style: normal; +} + +/* Time Stamps */ + +h2 .timestamp-wrapper, +h3 .timestamp-wrapper { + font-size: .8em; +} diff --git a/img/favicon-old.ico b/img/favicon-old.ico new file mode 100755 index 0000000000000000000000000000000000000000..7fa5ea4f6490829e5a95a9e11fb92527eb858d78 Binary files /dev/null and b/img/favicon-old.ico differ diff --git a/img/favicon.ico b/img/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..18ffcdc3cd347dd4f1bbdb5093e0f4d953b73f82 Binary files /dev/null and b/img/favicon.ico differ diff --git a/img/logo.png b/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..6c2eb43ece24810ae43ca3caabb2777739a330b1 Binary files /dev/null and b/img/logo.png differ diff --git a/img/logo.svg b/img/logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..e69cb64802e1221dca5fa6f3f3c4e4c6f986b3b5 --- /dev/null +++ b/img/logo.svg @@ -0,0 +1,172 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="150mm" + height="150mm" + viewBox="0 0 531.49607 531.49606" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="logo.svg" + inkscape:export-filename="/home/mburon/inria/org/img/logo.png" + inkscape:export-xdpi="103.64764" + inkscape:export-ydpi="103.64764"> + <defs + id="defs4"> + <linearGradient + id="linearGradient5748" + inkscape:collect="always"> + <stop + id="stop5750" + offset="0" + style="stop-color:#d8defd;stop-opacity:1" /> + <stop + id="stop5752" + offset="1" + style="stop-color:#fde0e0;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient4200"> + <stop + style="stop-color:#2849f2;stop-opacity:1" + offset="0" + id="stop4202" /> + <stop + style="stop-color:#f23e3d;stop-opacity:1" + offset="1" + id="stop4204" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4200" + id="linearGradient4206" + x1="196.73315" + y1="340.4137" + x2="545.13489" + y2="343.81177" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(48.666434,-95.427015)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient5748" + id="linearGradient4196" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(48.666763,-61.171894)" + x1="162.49997" + y1="181.32137" + x2="593.21423" + y2="181.32137" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.98994949" + inkscape:cx="294.65847" + inkscape:cy="166.35507" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1280" + inkscape:window-height="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="0" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Calque 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-160.77547,56.276734)"> + <path + style="fill:url(#linearGradient4206);fill-opacity:1;stroke:none;stroke-width:1.54900002;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 213.66645,119.79174 0,213 0.18555,0 c -0.0833,0.83294 -0.14512,1.66633 -0.18555,2.5 -0.002,56.21529 95.29842,101.78718 212.85742,101.78711 117.559,7e-5 212.85903,-45.57182 212.85742,-101.78711 -0.0658,-0.83381 -0.15305,-1.66721 -0.26172,-2.5 l 0.26172,0 0,-213 z" + id="ellipse4153" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccsccccc" /> + <rect + style="fill:#000000;fill-opacity:0;stroke:none;stroke-width:1.54900002;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="rect4136" + width="228.57143" + height="191.42857" + x="220.09499" + y="188.36375" /> + <ellipse + style="fill:url(#linearGradient4196);fill-opacity:1;stroke:none;stroke-width:5.00000048;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path4140" + cx="426.52386" + cy="120.14947" + rx="212.85715" + ry="101.78572" + clip-path="none" /> + <path + style="display:inline;fill:none;fill-rule:evenodd;stroke:#eb3e44;stroke-width:15;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 437.81667,173.06987 538.26362,82.781319" + id="path4157" + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#8e4397;stroke-width:15;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 291.63696,87.877114 241.6759,-7.559152" + id="path4176" + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#5d46c3;stroke-width:15;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 431.96312,174.21208 287.19325,90.361413" + id="path4174" + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" /> + <ellipse + style="fill:#a64281;fill-opacity:1;stroke:#eddfed;stroke-width:5.44900084;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path4155" + cx="433.80679" + cy="173.61032" + ry="38.696709" + rx="50.899006" /> + <ellipse + rx="50.899006" + ry="38.696709" + cy="-52.572319" + cx="-539.48578" + id="ellipse4163" + style="fill:#f23e3d;fill-opacity:1;stroke:#eddfed;stroke-width:5.44900084;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(-0.99827949,-0.058635,0.058635,-0.99827949,0,0)" /> + <ellipse + style="fill:#2949f1;fill-opacity:1;stroke:#eddfed;stroke-width:5.44900063;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="ellipse4174" + cx="287.16089" + cy="134.31599" + ry="38.696709" + rx="50.899006" + transform="matrix(0.98668801,-0.16262465,0.16262465,0.98668801,0,0)" /> + </g> +</svg> diff --git a/img/maxime.jpg b/img/maxime.jpg new file mode 100644 index 0000000000000000000000000000000000000000..837fd48958d08d30c1450cb6cb319bd2ca7b016c Binary files /dev/null and b/img/maxime.jpg differ diff --git a/img/me.jpg b/img/me.jpg new file mode 100644 index 0000000000000000000000000000000000000000..313156d9ae216fc9657c14d3801c2aee706b0a13 Binary files /dev/null and b/img/me.jpg differ diff --git a/index.org b/index.org new file mode 100644 index 0000000000000000000000000000000000000000..ba5e95e6ace315ec65751981bd6fce95f62e2b54 --- /dev/null +++ b/index.org @@ -0,0 +1,51 @@ +#+TITLE: Maxime Buron + +[[file:img/me.jpg]] + + +I am an associate professor of Computer Science at [[https://www.isima.fr/][ISIMA]] and at [[https://limos.fr/][LIMOS lab]] from 2022. +I completed my PhD at Inria Saclay in 2020 supervised by [[https://people.irisa.fr/Francois.Goasdoue/][François Goasdoué]], [[https://pages.saclay.inria.fr/ioana.manolescu/][Ioana Monalescu]] and [[https://www.lirmm.fr/~mugnier/][Marie-Laure Mugnier]], then I did two postdocs: one year with [[https://www.cs.ox.ac.uk/people/michael.benedikt/][Michael Benedikt]] at the University of Oxford and six months in the GraphIK team at LIRMM lab in Montpellier. + +My research work relies on automated reasoning, databases and knowledge representation in particular in the context of Ontology-Based Data Access. + +*** Email + +firstname.lastname@uca.fr + +*** Office + +D107 \\ +ISIMA, 1 rue de la Chebarde \\ +63178 Aubière + +*** Software +- [[file:projects/obi-wan/][Obi-Wan]] + +*** Publications + +More details on [[https://dblp.org/pid/241/5780.html][DBLP]]. + +- *Datalog Rewriting for Guarded TGDs.* \\ + Michael Benedikt, Maxime Buron, Stefano Germano, Kevin Kappelmann, Boris Motik.\\ + VLDB 2022, Sidney, Australia. +- *Towards Faster Reformulation-based Query Answering on RDF graphs with RDFS ontologies.* \\ + Maxime Buron, Cheikh Brahim El Vaigh, François Goasdoué.\\ + ISWC 2021 [[http://ceur-ws.org/Vol-2980/paper394.pdf][pdf]] +- *Parallelisable Existential Rules: a Story of Pieces.* \\ + Maxime Buron, Marie-Laure Mugnier, Michaël Thomazo. \\ + KR 2021, Rome, Italy. [[https://proceedings.kr.org/2021/16/kr2021-0016-buron-et-al.pdf][pdf]] +- *Revisiting RDF storage layouts for efficient query answering.* \\ + Maxime Buron, François Goasdoué, Ioana Manolescu, Tayeb Merabti, Marie-Laure Mugnier. \\ + SSWS 2020, Athens, Greece. [[file:material/ssws20/main.pdf][pdf]] +- *Obi-Wan: Ontology-Based RDF Integration of Heterogeneous Data.* \\ + Maxime Buron, François Goasdoué, Ioana Manolescu, Marie-Laure Mugnier. \\ + VLDB 2020, Tokyo, Japan. [[https://hal.inria.fr/hal-02921434/document][pdf]] [[file:material/vldb20/video.mp4][video]] [[file:material/vldb20/slides/index.html][slides]] +- *Ontology-Based RDF Integration of Heterogeneous Data.* \\ + Maxime Buron, François Goasdoué, Ioana Manolescu, Marie-Laure Mugnier. \\ + EDBT/ICDT 2020, Copenhagen, Denmark. [[https://hal.inria.fr/hal-02446427/document][pdf]] [[file:material/edbt20/slides.pdf][slides]] +- *Reformulation-based query answering for RDF graphs with RDFS ontologies.* \\ + Maxime Buron, François Goasdoué, Ioana Manolescu, Marie-Laure Mugnier. \\ + ESWC 2019, Portoroz, Slovenia. [[https://hal.inria.fr/hal-02051413][pdf]] +- *Rewriting-Based Query Answering for Semantic Data Integration Systems.* \\ + Maxime Buron, François Goasdoué, Ioana Manolescu, Marie-Laure Mugnier. \\ + BDA 2018, Bucarest, Romania. [[https://hal.inria.fr/hal-01927282][pdf]] diff --git a/macros.tex b/macros.tex new file mode 100644 index 0000000000000000000000000000000000000000..ae8657e1dd9515d2c11a1dcd6e72ca9c52616856 --- /dev/null +++ b/macros.tex @@ -0,0 +1,162 @@ +%% examples +\newcommand{\exGraph}{\graph_{\mathrm{ex}}} +\newcommand{\exOnto}{\onto_{\mathrm{ex}}} +\newcommand{\exMappings}{\mappings_{\mathrm{ex}}} +\newcommand{\exExtensions}{\extensions_{\mathrm{ex}}} +\newcommand{\exRule}{r_{\mathrm{ex}}} +\newcommand{\RDFSrules}{\rules_{\mathrm{RDFS}}} + +%% RDF +\newcommand{\triple}[3]{(#1, #2, #3)} +\newcommand{\tuple}[1]{\langle #1 \rangle} + +\newcommand{\subject}{\mathtt{s}} +\newcommand{\prop}{\mathtt{p}} +\newcommand{\object}{\mathtt{o}} +\newcommand{\blank}{\_{:}b} +\newcommand{\blankn}[1]{\_{:}#1} +\newcommand{\irin}[1]{{:}\mathrm{#1}} +\newcommand{\class}{\mathtt{c}} + +\newcommand{\nsrdf}{\mathrm{rdf{:}}} +\newcommand{\nsrdfs}{\mathrm{rdfs{:}}} + +\newcommand{\rdftype}{\mathrm{rdf{:}type}} +\newcommand{\rdfLiteral}{\mathrm{rdf{:}Literal}} +\newcommand{\rdfssubClassOf}{\mathrm{rdfs{:}subClassOf}} +\newcommand{\rdfssubPropertyOf}{\mathrm{rdfs{:}subPropertyOf}} +\newcommand{\rdfsdomain}{\mathrm{rdfs{:}domain}} +\newcommand{\rdfsrange}{\mathrm{rdfs{:}range}} +\newcommand{\rdfsClass}{\mathrm{rdfs{:}Class}} +\newcommand{\rdfProperty}{\mathrm{rdf{:}Property}} +\newcommand{\xsdint}{\mathrm{xsd{:}int}} +%% +\newcommand{\type}{\tau} +\newcommand{\subclass}{\prec_{sc}} +\newcommand{\subproperty}{\prec_{sp}} +\newcommand{\domain}{\hookleftarrow_{d}} +\newcommand{\range}{\hookrightarrow_{r}} +\newcommand{\rdfentailment}{\vdash_{^\mathrm{RDF}}} + +\newcommand{\RDFS}[1]{\mathrm{RDFS}(#1)} + +\newcommand{\aka}{a.k.a.~} +\newcommand{\etc}{etc} +\newcommand{\wrt}{w.r.t.~} +\newcommand{\st}{s.t.~} +\newcommand{\ie}{i.e.,~} +\newcommand{\eg}{e.g.,~} + +\newcommand{\graph}{G} +\newcommand{\rules}{\mathcal{R}} +\newcommand{\sources}{\mathcal{S}} +\newcommand{\views}{\mathcal{V}} +\newcommand{\extensions}{\mathcal{E}} +\newcommand{\onto}{\mathcal{O}} +\newcommand{\mappings}{\mathcal{M}} +\newcommand{\modelsrdf}{\models_\rules} +\newcommand{\bgp}{P} + + + +\newcommand{\Bl}[1]{\mathrm{Bl}(#1)} +\newcommand{\Val}[1]{\mathrm{Val}(#1)} +\newcommand{\Var}[1]{\mathrm{Var(#1)}} + + +\newcommand{\ext}[1]{\mathrm{ext}(#1)} +\newcommand{\cert}{\mathrm{cert}} +\newcommand{\ans}{\mathrm{ans}} + +\newcommand{\query}{\leftarrow} +\newcommand{\body}[1]{\textrm{body}(#1)} +\newcommand{\head}[1]{\textrm{head}(#1)} + +\newcommand{\cs}{\mathrm{cs}} +\newcommand{\lcs}{\mathrm{lcs}} + +\newcommand{\cl}{\mathrm{cl}} + +\newcommand{\lua}{\mathrm{lua}} +\newcommand{\lur}{\mathrm{lur}} + +\newtheorem{lemma}{Lemma} +\newtheorem{definition}{Definition} +\newtheorem{problem}{Problem} +\newtheorem{property}{Property} +\newtheorem{corollary}{Corollary} +\newtheorem{example}{Example} +\newtheorem{theorem}{Theorem} + +\newcommand{\URIs}{\mathscr U} +\newcommand{\IRIs}{\mathscr I} +\newcommand{\BNodes}{\mathscr B} +\newcommand{\Literals}{\mathscr L} +\newcommand{\Variables}{\mathscr V} + +% DB +\newcommand{\CQ}{\ensuremath{\mathtt{CQ}}\xspace} +\newcommand{\UCQ}{\ensuremath{\mathtt{UCQ}}\xspace} +\newcommand{\SQL}{\ensuremath{\mathtt{SQL}}\xspace} +\newcommand{\rel}[1]{\mathsf{#1}} + + +% Cost model +\newcommand{\cans}[1]{|#1|_t} +\newcommand{\cref}[1]{|#1|_r} +\newcommand{\db}{\mathtt{db}} + +% DL +\newcommand{\cn}{\ensuremath{N_{C}}\xspace} +\newcommand{\rn}{\ensuremath{N_{R}}\xspace} +\newcommand{\inds}{\ensuremath{N_{I}}\xspace} +\newcommand{\ainds}{\ensuremath{\mathrm{Ind}}\xspace} +\newcommand{\funct}{\mathit{funct} \ } +\newcommand{\KB}{\mathcal{K}\xspace} +\newcommand{\dlr}{DL-Lite$_{\mathcal{R}}$\xspace} + +% Logics +\newcommand{\FOL}{\ensuremath{\mathtt{FOL}}\xspace} +\newcommand{\datalog}{\ensuremath{\mathtt{Datalog}}\xspace} +\newcommand{\dllite}{DL-Lite\xspace} +\newcommand{\true}{\mathrm{true}} +\newcommand{\false}{\mathrm{false}} +\newcommand{\dis}{\mathtt{dis}} + +\newcommand{\vars}[1]{\ensuremath{\mathrm{vars}(#1)}} +%\newcommand{\terms}[1]{\ensuremath{\mathrm{terms}(#1)}} + +%math +\renewcommand{\phi}{\varphi} +\newcommand\eqdef{\stackrel{\mathclap{\normalfont\mbox{def}}}{=}} +\newcommand\restr[2]{#1_{|#2}} + +\newcommand{\ontoBody}[1]{\mathrm{body}_\onto(#1)} + +%proof of the rewriting theorem +\newcommand{\rdfGraph}{\graph^{\mappings}_{\extensions}} +\newcommand\systemGraph{\graph^{\mappings \cup \mappings^{\text{STD}}_\onto}_{\extensions \cup \extensions_\onto}} +\newcommand\viewsGraph{\graph^{\mappings^{\rules,\onto} \cup \mappings^{\text{STD}}_\onto}_{\extensions \cup \extensions_\onto}} +\newcommand{\standMappings}{\mappings^{\text{STD}}_\onto} + + +\newcommand{\reminder}[1]{[\vadjust{\vbox to0pt{\vss\hbox to0pt{\hss{\Large $\Longrightarrow$}}}}{{\textsf{\small #1}}}]} +%\newcommand{\FG}[1]{\textcolor{blue}{\reminder{FG:~#1}}} + +\newcommand{\extVersion}{false} +\newcommand{\printIfExtVersion}[2] +{ + \ifthenelse{\equal{\extVersion}{true}}{#1}{} + \ifthenelse{\equal{\extVersion}{false}}{#2}{} +} + +\newcommand{\bda}{\true} +\newcommand{\ifBDA}[2]% +{% + \ifthenelse{\equal{\bda}{true}}{#1}{}% + \ifthenelse{\equal{\bda}{false}}{#2}{}% +} + +%%% Local Variables: +%%% TeX-master: "paper" +%%% End: diff --git a/material/Makefile b/material/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..379ac70c03d39eba8efb59b7a96209f36120f497 --- /dev/null +++ b/material/Makefile @@ -0,0 +1,3 @@ +deploy: + ssh nfs.saclay.inria.fr "mkdir -p ~/public_html/material" + rsync -avr . nfs.saclay.inria.fr:~/public_html/material/ diff --git a/material/edbt20/paper.pdf b/material/edbt20/paper.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ca6a69be38ecb45418441a92adb0fa869e78880d Binary files /dev/null and b/material/edbt20/paper.pdf differ diff --git a/material/edbt20/slides.pdf b/material/edbt20/slides.pdf new file mode 100644 index 0000000000000000000000000000000000000000..782bb27d5c1291ee2ae3c7b3bc8347e4d2a40dc4 Binary files /dev/null and b/material/edbt20/slides.pdf differ diff --git a/material/ssws20/main.pdf b/material/ssws20/main.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ff84b854c13a0a6f0f5d496f04cbca15cc87a76a Binary files /dev/null and b/material/ssws20/main.pdf differ diff --git a/material/vldb20/paper.pdf b/material/vldb20/paper.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e736ae2317e167bde2b58067de2c3936a0a04e0c Binary files /dev/null and b/material/vldb20/paper.pdf differ diff --git a/material/vldb20/recording.mp4 b/material/vldb20/recording.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..091eaf523c0ad5d8d7c54a592cd12490f5bcabdc Binary files /dev/null and b/material/vldb20/recording.mp4 differ diff --git a/material/vldb20/slides/img/integration.png b/material/vldb20/slides/img/integration.png new file mode 100644 index 0000000000000000000000000000000000000000..c3cb81c2e49a21c3d683d4ed2c3bbc64fd6ae9b1 Binary files /dev/null and b/material/vldb20/slides/img/integration.png differ diff --git a/material/vldb20/slides/img/mapping.png b/material/vldb20/slides/img/mapping.png new file mode 100644 index 0000000000000000000000000000000000000000..82751322131f5bae08601b88e34e3d9007eabd1d Binary files /dev/null and b/material/vldb20/slides/img/mapping.png differ diff --git a/material/vldb20/slides/img/qa.png b/material/vldb20/slides/img/qa.png new file mode 100644 index 0000000000000000000000000000000000000000..7a6faf424534c2c0321da911f52f81c02e095ea2 Binary files /dev/null and b/material/vldb20/slides/img/qa.png differ diff --git a/material/vldb20/slides/img/rew-c-map.png b/material/vldb20/slides/img/rew-c-map.png new file mode 100644 index 0000000000000000000000000000000000000000..521406e6ee697547104aec0beb5108444e5dd431 Binary files /dev/null and b/material/vldb20/slides/img/rew-c-map.png differ diff --git a/material/vldb20/slides/img/rew-c.png b/material/vldb20/slides/img/rew-c.png new file mode 100644 index 0000000000000000000000000000000000000000..390e1f9e0586897a702c0bd58a7041e6b401e6db Binary files /dev/null and b/material/vldb20/slides/img/rew-c.png differ diff --git a/material/vldb20/slides/img/rew-ca.png b/material/vldb20/slides/img/rew-ca.png new file mode 100644 index 0000000000000000000000000000000000000000..68420ae963fa5ab3cb910c9fd6abc17f4d605eab Binary files /dev/null and b/material/vldb20/slides/img/rew-ca.png differ diff --git a/material/vldb20/slides/img/rew-map.png b/material/vldb20/slides/img/rew-map.png new file mode 100644 index 0000000000000000000000000000000000000000..914043d0d9504927318124ad63a7e5c4cf65b2fa Binary files /dev/null and b/material/vldb20/slides/img/rew-map.png differ diff --git a/material/vldb20/slides/img/rew.png b/material/vldb20/slides/img/rew.png new file mode 100644 index 0000000000000000000000000000000000000000..4ebc24c5459b1e8765776b405831fed6652da5e8 Binary files /dev/null and b/material/vldb20/slides/img/rew.png differ diff --git a/material/vldb20/slides/img/ris-rc.png b/material/vldb20/slides/img/ris-rc.png new file mode 100644 index 0000000000000000000000000000000000000000..84408e5e1ed1e48fffb827976479dd67df1391c7 Binary files /dev/null and b/material/vldb20/slides/img/ris-rc.png differ diff --git a/material/vldb20/slides/img/starwars-api.png b/material/vldb20/slides/img/starwars-api.png new file mode 100644 index 0000000000000000000000000000000000000000..a62fa3f514e329e0f5609dbf542e90a99755fa1e Binary files /dev/null and b/material/vldb20/slides/img/starwars-api.png differ diff --git a/material/vldb20/slides/img/wikidata.mp4 b/material/vldb20/slides/img/wikidata.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..d6229dd1bfb7cfe7c14bef1043e86d250e476e5a Binary files /dev/null and b/material/vldb20/slides/img/wikidata.mp4 differ diff --git a/material/vldb20/slides/index.html b/material/vldb20/slides/index.html new file mode 100644 index 0000000000000000000000000000000000000000..562becc5f19e8407aa84551c40bff8a67e166c98 --- /dev/null +++ b/material/vldb20/slides/index.html @@ -0,0 +1,270 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +<meta charset="utf-8"/> +<title>Obi-Wan: Ontology-Based RDF Integration of Heterogeneous Data</title> +<meta name="author" content="(Maxime Buron, François Goasdoué, Ioana Manolescu, Marie-Laure Mugnier)"/> +<style type="text/css"> +.underline { text-decoration: underline; } +</style> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reveal.js/dist/reveal.css"/> + +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reveal.js/dist/theme/serif.css" id="theme"/> + +<link rel="stylesheet" href="style.css"/> + +<!-- If the query includes 'print-pdf', include the PDF print sheet --> +<script> + if( window.location.search.match( /print-pdf/gi ) ) { + var link = document.createElement( 'link' ); + link.rel = 'stylesheet'; + link.type = 'text/css'; + link.href = 'https://cdn.jsdelivr.net/npm/reveal.js/css/print/pdf.css'; + document.getElementsByTagName( 'head' )[0].appendChild( link ); + } +</script> +</head> +<body> +<div class="reveal"> +<div class="slides"> +<section id="sec-title-slide"><h1 class="title">Obi-Wan: Ontology-Based RDF Integration of Heterogeneous Data</h1><h2 class="author">Maxime Buron, François Goasdoué, Ioana Manolescu, Marie-Laure Mugnier</h2><h2 class="date">VLDB 2020</h2><p class="date">Created: 2020-08-17 lun. 10:30</p> +</section> + + +<section> +<section id="slide-org273994d"> +<h2 id="org273994d">Context: Ontology-Based Data Access</h2> + +<div class="figure"> +<p><img src="img/integration.png" alt="integration.png" /> +</p> +</div> + +</section> +</section> +<section> +<section id="slide-org5ce2325"> +<h2 id="org5ce2325">Star Wars Scenario</h2> +<p> +We integrate three data sources: +</p> + +<ol> +<li><b>relational data</b> from IMDB</li> +<li><b>RDF triples</b> from Wikidata</li> +<li><b>JSON documents</b> from <a href="https://swapi.dev/about">swapi.dev</a></li> + +</ol> + +</section> +<section id="slide-orge90a436"> +<h3 id="orge90a436">IMDB</h3> +<p> +The IMDB relational database contains information about <b>movie directors, writers, producers and actors</b>. +</p> +</section> +<section id="slide-org856151f"> +<h3 id="org856151f">Wikidata</h3> +<p> +The wikidata fragment contains <b>characters</b> data such as actor IMDB ID, organisation membership (Jedi, Sith). +</p> +</section> +<section id="slide-org2b05f8c" data-background-iframe="https://www.wikidata.org/wiki/Q51740" data-background-interactive> +<div style="background: rgb(0,0,256); opacity: 0; "> +<h3 id="org2b05f8c">Wikidata</h3> +</div> + +</section> +<section id="slide-orgfe57273" data-background="img/starwars-api.png" data-background-size="contain" data-background-opacity="0"> +<h3 id="orgfe57273">Star Wars API</h3> +<p> +The SWAPI contains information about the <b>vehicles</b> and their pilots. +</p> + +<div class="org-src-container"> + +<pre class="src src-json"><code trim>{ + <span style="color: #F92672;">"name"</span>: <span style="color: #E6DB74;">"Millennium Falcon"</span>, + <span style="color: #F92672;">"model"</span>: <span style="color: #E6DB74;">"YT-1300 light freighter"</span>, + <span style="color: #F92672;">"manufacturer"</span>: <span style="color: #E6DB74;">"Corellian Engineering Corporation"</span>, + <span style="color: #F92672;">"cost_in_credits"</span>: <span style="color: #E6DB74;">"100000"</span>, + <span style="color: #F92672;">"length"</span>: <span style="color: #E6DB74;">"34.37"</span>, + <span style="color: #F92672;">"max_atmosphering_speed"</span>: <span style="color: #E6DB74;">"1050"</span>, + <span style="color: #F92672;">"crew"</span>: <span style="color: #E6DB74;">"4"</span>, + <span style="color: #F92672;">"passengers"</span>: <span style="color: #E6DB74;">"6"</span>, + <span style="color: #F92672;">"cargo_capacity"</span>: <span style="color: #E6DB74;">"100000"</span>, + <span style="color: #F92672;">"consumables"</span>: <span style="color: #E6DB74;">"2 months"</span>, + <span style="color: #F92672;">"hyperdrive_rating"</span>: <span style="color: #E6DB74;">"0.5"</span>, + <span style="color: #F92672;">"MGLT"</span>: <span style="color: #E6DB74;">"75"</span>, + <span style="color: #F92672;">"starship_class"</span>: <span style="color: #E6DB74;">"Light freighter"</span>, + <span style="color: #F92672;">"pilots"</span>: [ + <span style="color: #E6DB74;">"http://swapi.dev/api/people/13/"</span>, + <span style="color: #E6DB74;">"http://swapi.dev/api/people/14/"</span>, + <span style="color: #E6DB74;">"http://swapi.dev/api/people/25/"</span>, + <span style="color: #E6DB74;">"http://swapi.dev/api/people/31/"</span> + ], + <span style="color: #F92672;">"films"</span>: [ + <span style="color: #E6DB74;">"http://swapi.dev/api/films/1/"</span>, + <span style="color: #E6DB74;">"http://swapi.dev/api/films/2/"</span>, + <span style="color: #E6DB74;">"http://swapi.dev/api/films/3/"</span> + ], + <span style="color: #F92672;">"created"</span>: <span style="color: #E6DB74;">"2014-12-10T16:59:45.094000Z"</span>, + <span style="color: #F92672;">"edited"</span>: <span style="color: #E6DB74;">"2014-12-20T21:23:49.880000Z"</span>, + <span style="color: #F92672;">"url"</span>: <span style="color: #E6DB74;">"http://swapi.dev/api/starships/10/"</span> +} +</code></pre> +</div> + + +<p> +<a href="https://swapi.dev/api/starships/10/">https://swapi.dev/api/starships/10/</a> +</p> + +</section> +</section> +<section> +<section id="slide-org2e0a2c3" data-background-iframe="https://pages.saclay.inria.fr/maxime.buron/projects/obi-wan/app/ris/star-wars/index.html" data-background-interactive> +<div style="background: rgb(0,0,0); opacity: 0; "> +<h2 id="org2e0a2c3">RIS Exploration</h2> +</div> + +</section> +</section> +<section> +<section id="slide-org93f8ae5"> +<h2 id="org93f8ae5">Global-Local As View mapping</h2> + +<div class="figure"> +<p><img src="img/mapping.png" alt="mapping.png" /> +</p> +</div> +</section> +<section id="slide-org4c9d36a"> +<h3 id="org4c9d36a">RDFS entailment of data and ontological triples</h3> + +<div class="figure"> +<p><img src="img/ris-rc.png" alt="ris-rc.png" /> +</p> +</div> +</section> +<section id="slide-orgdbffadf"> +<h3 id="orgdbffadf">Query answering problem</h3> + +<div class="figure"> +<p><img src="img/qa.png" alt="qa.png" /> +</p> +</div> +</section> +</section> +<section> +<section id="slide-org8ca37ca"> +<h2 id="org8ca37ca">Query answering strategy: some reasoning at query time</h2> + +<div class="figure"> +<p><img src="img/rew-c-map.png" alt="rew-c-map.png" /> +</p> +</div> +</section> +<section id="slide-org9e7daff"> +<h3 id="org9e7daff">Query Answering strategy: some reasoning at query time</h3> + +<div class="figure"> +<p><img src="img/rew-c.png" alt="rew-c.png" /> +</p> +</div> +</section> +<section id="slide-org63e7fe5" data-background-iframe="https://pages.saclay.inria.fr/maxime.buron/projects/obi-wan/app/ris/star-wars/sessions/2020-09-02-15-30-04_REW_C/queries/Q09/index.html" data-background-interactive> +<div style="background: rgb(0,0,0); opacity: 0; "> +<h3 id="org63e7fe5">Demo</h3> +</div> + +</section> +</section> +<section> +<section id="slide-org6e1f4b3"> +<h2 id="org6e1f4b3">Query answering strategy: all reasoning at query time</h2> + +<div class="figure"> +<p><img src="img/rew-ca.png" alt="rew-ca.png" /> +</p> +</div> +</section> +<section id="slide-org57bc064" data-background-iframe="https://pages.saclay.inria.fr/maxime.buron/projects/obi-wan/app/ris/star-wars/sessions/2020-09-02-15-30-33_REW_CA/queries/Q09/index.html" data-background-interactive> +<div style="background: rgb(0,0,0); opacity: 0; "> +<h3 id="org57bc064">Demo</h3> +</div> + +</section> +</section> +<section> +<section id="slide-org2232fe9"> +<h2 id="org2232fe9">Query answering strategy: no reasoning at query time</h2> + +<div class="figure"> +<p><img src="img/rew-map.png" alt="rew-map.png" /> +</p> +</div> +</section> +<section id="slide-orga08b5b6"> +<h3 id="orga08b5b6">Query Answering strategy: no reasoning at query time</h3> + +<div class="figure"> +<p><img src="img/rew.png" alt="rew.png" /> +</p> +</div> +</section> +<section id="slide-org031075c" data-background-iframe="https://pages.saclay.inria.fr/maxime.buron/projects/obi-wan/app/ris/star-wars/sessions/2020-09-02-15-27-12_REW_HASHJOIN/queries/Q09/index.html" data-background-interactive> +<div style="background: rgb(0,0,0); opacity: 0; "> +<h3 id="org031075c">Demo</h3> +</div> + + +</section> +</section> +<section> +<section id="slide-org95b6411"> +<h2 id="org95b6411">Conclusion</h2> +<p> +See also: +</p> +<ul> +<li>two others query answering strategies,</li> +<li>experiments based on BSBM.</li> + +</ul> + +<p> +Details at <a href="https://obi-wan.saclay.inria.fr">https://obi-wan.saclay.inria.fr</a> +</p> + +<p> +Thank you for our attention. +</p> +</section> +</section> +</div> +</div> +<script src="https://cdn.jsdelivr.net/npm/reveal.js/dist/reveal.js"></script> + +<script> +// Full list of configuration options available here: +// https://github.com/hakimel/reveal.js#configuration +Reveal.initialize({ +slideNumber:"c", center:false, +multiplex: { + secret: '', // null if client + id: '', // id, obtained from socket.io server + url: '' // Location of socket.io server +}, + +// Optional libraries used to extend on reveal.js +dependencies: [ + { src: 'https://cdn.jsdelivr.net/npm/reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } }, + { src: 'https://cdn.jsdelivr.net/npm/reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, + { src: 'https://cdn.jsdelivr.net/npm/reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, + { src: 'https://cdn.jsdelivr.net/npm/reveal.js/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } }, + { src: 'https://cdn.jsdelivr.net/npm/reveal.js/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }] +}); +</script> +</body> +</html> diff --git a/material/vldb20/slides/style.css b/material/vldb20/slides/style.css new file mode 100644 index 0000000000000000000000000000000000000000..8237cd22b0346ff4d1dc655c2f6deccd8662b150 --- /dev/null +++ b/material/vldb20/slides/style.css @@ -0,0 +1,45 @@ +img { + max-width: 100%; + display: block; + margin: auto !important; + max-height: 500px !important; +} + +.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { + text-transform: none !important; + color: black; + font-size: 1.2em !important; + /* font-size: inherit !important; */ +} + +.reveal p { + text-align: left; +} +.reveal ul { + display: block; +} +.reveal ol { + display: block; +} + +.reveal-viewport { + background-color: white !important; + background: white !important; +} + +p.date{ + display:none; +} + +.reveal h1.title { + font-size: 1.7em !important; +} + +.reveal .author, .reveal .date { + padding-top: 1em; + font-size: 1em !important; +} + +code { + max-height: 500px !important; +} diff --git a/material/vldb20/video.mp4 b/material/vldb20/video.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..5b1688e3e249c78b144aa75f49f53a3bf012e007 Binary files /dev/null and b/material/vldb20/video.mp4 differ diff --git a/posts.org b/posts.org new file mode 100644 index 0000000000000000000000000000000000000000..2030889a2323b4d5338c4684769264237bf28e6c --- /dev/null +++ b/posts.org @@ -0,0 +1,17 @@ +#+TITLE: Posts + +- [[file:posts/defense.org][Soutenance]] +- [[file:posts/checking-postgres-statistics.org][Checking Posgresql Statistics]] +- [[file:posts/starwars-demo.org][Star Wars RDF Integration Demo]] +- [[file:posts/virtuoso.org][Virtuoso]] +- [[file:posts/obda-subproblems.org][OBDA Sub-Problems]] +- [[file:posts/binding-pattern-and-mapping.org][Binding Pattern and Mapping]] +- [[file:posts/generate-classes-using-mapping.org][Generate Classes using Mapping]] +- [[file:posts/query-answering-methods-in-ris.org][Query Answering Methods in RIS]] +- [[file:posts/mongodb-join/index.org][MongoDB Join Benchmark]] +- [[file:posts/st-rewriting-optimizations.org][Source Target Rewritings Optimizations]] +- [[file:posts/tatooine-cq-plan-optimization/index.org][Tatooine Conjunctive Plan Optimization]] +- [[file:posts/schema-implementation.org][Schema Implementation]] +- [[file:posts/reproducibility.org][Reproducibility]] +- [[file:posts/extended-rules.org][Extended Rules]] +- [[file:posts/full-saturation.org][Full RDFS Saturation]] diff --git a/posts/binding-pattern-and-mapping.org b/posts/binding-pattern-and-mapping.org new file mode 100644 index 0000000000000000000000000000000000000000..dd0f2c5466a2a077303221f765a83bb34a5a85d0 --- /dev/null +++ b/posts/binding-pattern-and-mapping.org @@ -0,0 +1,12 @@ +#+TITLE: Binding Pattern And Mapping + +* Introduction + +Sometimes, we want to integrate sources enabling keywords search on documents using a mapping like: +$$\mathrm{K}(doc, keyword) \leadsto \triple{doc}{\irin{hasKeyword}}{keyword}$$ + +where $\mathrm{K}$ is a relation symbol with binding on the second column. + +So, we can not materialize this integration system, because we can not get the list the pair of document and keyword. We can only ask for the documents having a certain keyword. We can find more information in cite:florescuQueryOptimizationPresence. + +bibliography:../../all.bib diff --git a/posts/checking-postgres-statistics.org b/posts/checking-postgres-statistics.org new file mode 100644 index 0000000000000000000000000000000000000000..e11d24a653f8a64ba818524c286b09291eea62c5 --- /dev/null +++ b/posts/checking-postgres-statistics.org @@ -0,0 +1,108 @@ +#+TITLE: Checking Postgres Statistics + +* Checking the histogram + +Consider a table ~tab~ and a column ~col~, we get its histogram using: +#+BEGIN_src sql +SELECT histogram_bounds FROM pg_stats +WHERE tablename='tab' AND attname='col'; +#+END_src + +We can check the histogram quality by counting the real number of rows between each bounds of the histogram: +#+BEGIN_src sql +WITH histogram AS +(SELECT unnest(histogram_bounds::text::int[]) AS bound +FROM pg_stats +WHERE tablename='tab' AND attname='col') , + +intervals AS +(select (ROW_NUMBER() OVER (ORDER BY histogram.bound)) - 1 AS index, + lag(bound) over (order by bound) AS min, + bound AS max + FROM histogram OFFSET 1), + +real_histogram AS ( +select index, min, max, count(col) AS count +FROM tab AS tab, intervals AS i +WHERE tab.col >= i.min AND tab.col < i.max +GROUP BY index, min, max +ORDER BY index) + +select index AS bucket, min, max , count , repeat('■', + ( count::float + / max(count) over() + * 30 + )::int + ) as bar +from real_histogram; +#+END_src + +We obtain a result of this form: + +| index | min | max | count | bar | +|-------+----------+----------+-------+--------------------------------| +| 1 | 3818 | 379263 | 1009 | ■■■■■■■■■■■■■■■■■■| +| 2 | 379263 | 796818 | 1294 | ■■■■■■■■■■■■■■■■■■■■■■■| +| 3 | 796818 | 1244509 | 1021 | ■■■■■■■■■■■■■■■■■■| +| 4 | 1244509 | 1704733 | 1179 | ■■■■■■■■■■■■■■■■■■■■■| +| 5 | 1704733 | 2097371 | 1111 | ■■■■■■■■■■■■■■■■■■■■| +| 6 | 2097371 | 2371027 | 916 | ■■■■■■■■■■■■■■■■| +| 7 | 2371027 | 2761796 | 1260 | ■■■■■■■■■■■■■■■■■■■■■■| +| 8 | 2761796 | 3100446 | 1043 | ■■■■■■■■■■■■■■■■■■| +| 9 | 3100446 | 3509108 | 1103 | ■■■■■■■■■■■■■■■■■■■| +| 10 | 3509108 | 3808976 | 1034 | ■■■■■■■■■■■■■■■■■■| + + +* Checking the Most Common Values + +Consider a table ~tab~ and a column ~col~, we get the most common values with their frequencies using: +#+BEGIN_src sql +SELECT most_common_vals, most_common_freqs FROM pg_stats +WHERE tablename='tab' AND attname='col'; +#+END_src + +We can display the estimated rows and the actual with their normalized difference using bars (one square each 5%) as follow: +#+BEGIN_src sql + WITH n_rows AS ( + SELECT count(*) AS n_rows FROM tab), + + T AS + (SELECT n_rows, + unnest(most_common_vals::text::int[]) AS mcv, + unnest(most_common_freqs::text::float[]) AS mcf + FROM pg_stats, n_rows + WHERE tablename='tab' AND attname='col'), + + mcv_check AS ( + SELECT mcv, (mcf * n_rows)::int AS estimated_n_rows, count(*) AS n_rows + FROM T, tab AS tab WHERE tab.col = mcv + GROUP BY mcv, mcf, n_rows) + + SELECT mcv, estimated_n_rows, n_rows, + repeat('■', + ((abs(n_rows - estimated_n_rows)::float / n_rows::float)* 20)::int) as deviation + FROM mcv_check + ORDER BY mcv; +#+END_src + +| mcv | estimated_n_rows | n_rows | deviation +|----------+------------------+--------+------------ +| 95759 | 10008 | 9018 | ■■■+| 142005 | 6255 | 6119 | ■+| 438087 | 12197 | 11849 | ■+| 799888 | 32087 | 31076 | ■+| 827510 | 18014 | 17767 | +| 1519231 | 8882 | 8746 | +| 2826276 | 17451 | 16572 | ■+| 3240017 | 3002 | 3076 | ■+| 3549370 | 3002 | 3571 | ■■■■+| 3646595 | 7631 | 6922 | ■■+| 3656433 | 3127 | 2150 | ■■■■■■■■■+| 3693069 | 2877 | 2482 | ■■■■+| 4525288 | 8444 | 6986 | ■■■■■+| 4540224 | 3628 | 4128 | ■■■+| 4868255 | 10758 | 9889 | ■■+| 5430681 | 4003 | 4855 | ■■■■■+| 5566825 | 5317 | 4729 | ■■■+| 6285203 | 7568 | 8474 | ■■■+ diff --git a/posts/defense.org b/posts/defense.org new file mode 100644 index 0000000000000000000000000000000000000000..b9ff14e4429e0072c148e9af10b6527d592e260c --- /dev/null +++ b/posts/defense.org @@ -0,0 +1,53 @@ +#+TITLE: Soutenance / Defense + +* Français + +Si vous êtes curieux, vous pouvez aller regarder les [[file:index.org][travaux]], qui ont été réalisés au cours de ma thèse, ainsi que le [[file:thesis.pdf][manuscrit]]. + +** Jury +Les membres du jury sont : + - *Marie-Christine Rousset* - professeur, université de Grenoble (rapporteuse) + - *Maurizio Lenzerini* - professeur, université de Rome (rapporteur) + - *Alin Deutsch* - professeur, université de Californie, San Diego (examinateur) + - *Meghyn Bienvenu* - chargé de recherche, CNRS (examinatrice) + - *Ioana Manolescu* - directeur de recherche, Inria et Institut Polytechnique de Paris (directrice de thèse) + - *Marie-Laure Mugnier* - professeur, université de Montpellier (co-directrice de thèse) + +*François Goasdoué* est co-directeur de thèse (professeur à l'université de Rennes 1), il sera présent en tant qu'invité pour des raisons administratives. + +** Sur place +La soutenance se aura lieu le *7 octobre à 14h* dans la salle Gilles Kahn du bâtiment Turing ([[https://www.openstreetmap.org/way/548438043#map=18/48.71487/2.20573][carte]]) à l'adresse: + +Centre Saclay - Île-de-France \\ +Bâtiment Alan Turing 1 rue Honoré d'Estienne d'Orves \\ +91120 \\ +Palaiseau + +Le nombre de place est limité à 40, donc assurez-vous d'avoir "réservé" votre place. + +* English + +If you are curious, you can visit the [[file:index.org][works]] done during my thesis and see the [[file:thesis.pdf][manuscript]]. + +** Jury + The jury members are: + - *Marie-Christine Rousset* - professor, University of Grenoble (reporter) + - *Maurizio Lenzerini* - professor, University of Rome (reporter) + - *Alin Deutsch* - professor, University of California San Diego (examiner) + - *Meghyn Bienvenu* - full-time CNRS researcher (examiner) + - *Ioana Manolescu* - senior researcher, Inria and Institut Polytechnique de Paris, (supervisor) + - *Marie-Laure Mugnier* - professor, University of Montpellier (co-supervisor) + +*François Goasdoué* is co-supervisor (professor at University of Rennes 1), he is invited as a guest for administrative reasons. + +** On site +The defense will take place *October 7th at 2pm* in the Gilles Kahn room of the Turing building ([[https://www.openstreetmap.org/way/548438043#map=18/48.71487/2.20573][map]]) at: + +Centre Saclay - Île-de-France \\ +Bâtiment Alan Turing 1 rue Honoré d'Estienne d'Orves \\ +91120 \\ +Palaiseau + +The place are limited to 40, so be sure that you have reserved your seat. + + diff --git a/posts/extended-rules.bbl b/posts/extended-rules.bbl new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/posts/extended-rules.org b/posts/extended-rules.org new file mode 100644 index 0000000000000000000000000000000000000000..6860b9a5dde75f885dad03965ff72011757c6464 --- /dev/null +++ b/posts/extended-rules.org @@ -0,0 +1,90 @@ +#+TITLE: Extended Reasoning Rules Support in GLAV Integration + +#+LATEX_HEADER: \input{../macros} + +The aim of this paper is to extend the reasoning capability in GLAV Integration in the following general context where: + +- $\mappings$ is a set of relational GLAV mappings on source schema $S$ and on global schema $G$ +- $\rules$ is a set of existential rules using the schema $G$ + +We want to find some minimal restrictions on $\rules$, such that we can find $\mappings^{\rules}$ an equivalent set of GLAV mappings on source schema $S$ and on global schema $G$ i.e. for each $I$ instance of $S$, $U$ is an instance of $G$ such that $I, \mappings, \rules \models U$ if and only if $I, \mappings^{\rules} \models U$. + +* Examples + +A series of examples to show how we can go further than mappings head saturation. + +** Examples of Extensions + +*** Saturation on Several Mappings + +$$\mappings = \{ V_{1}(x) \leadsto A(x), V_{2}(x) \leadsto B(x) \}$$ + +$$\rules = \{ A(x) \wedge B(x) \rightarrow C(x) \}$$ + +Here, we need to use two mappings at the same time to fully reason with $r$. In order to handle it, we can define $\mappings^{\rules}$ as the set of GLAV mappings containing mappings of $\mappings$ and the following mapping: + +$$V_{1}(x) \wedge V_{2}(x) \leadsto C(x)$$ + +*** Mismatch with Constant in Rule + +$$\mappings = \{m: V(x,y) \leadsto T(x,y) \}$$ + +$$\rules = \{ r: T(x, C_{1}) \rightarrow T(x, C_{2}) \}$$ + +We can not apply $r$ on the head of $m$ in a saturation of conjunctive query on context like in cite:HassadLearningCommonalitiesSPARQL2017. To solve this issue, we should handle the case, where $y$ is $m$ is equals to $C_{1}$. We can do it by defining a new mappings: + +$$m^{r}: V(x, C_{1}) \leadsto T(x, C_{2})$$ + +and by defining $\mappings^{\rules}$ as $\{m, m^{r}\}$. + +This situation doesn't appear in cite:BuronRewritingBasedQueryAnswering2018a, because mapping heads and rules are build such that variables and constant are in the same position in triple. + +** Examples of Limits + +*** Rule for Transitivity + +$$\mappings = \{ m: V(x,y) \leadsto C(x,y) \}$$ + +$$\rules = \{ r: C(x, y) \wedge C(y, z) \rightarrow C(x, z) \}$$ + +In this case, we can wrap two mappings $m$ with rule $r$ given the following mapping: + +$$m': V(x,y) \wedge V(y,z) \leadsto C(x,z)$$ + +Then, we can continue to wrap this mapping and $m$ with $r$ etc. + +*** Simple RDFS Entailment Rule + +$$\mappings = \{m_{t}: V_{t}(x,y) \leadsto T(x,y), m_{c}: V_{c}(x,y) \leadsto C(y_{1}, y_{2}) \}$$ + +$$\rules = \{ r: T(x, y_{1}) \wedge C(y_{1}, y_{2}) \rightarrow T(x, y_{2}) \}$$ + +We can view above definitions as an RDFS integration system, where $m_{t}$ (resp. $m_{c}$) populates the global schema with triples form $\triple{x}{\type}{y}$ (resp. $\triple{y_{1}}{\subclass}{y_{2}}$). And the rule $r$ can be viewed as $\triple{x}{\type}{y_{1}} \wedge \triple{y_{1}}{\subclass}{y_{2}} \rightarrow \triple{x}{\type}{y_{2}}$. + +Wrapping together $m_{t}$ and $m_{c}$ using $r$ will produce the following mapping: + +$$V_{t}(x,y_{1}) \wedge V_{c}(y_{1}, y_{2}) \leadsto T(x,y_{2})$$ + +We can wrap this mappings with $m_{c}$ using $r$, by continuing we will produce mappings of the form: + +$$V_{t}(x,y_{1}) \wedge V_{c}(y_{1}, y_{2}) \dots \wedge V_{c}(y_{n-1}, y_{n}) \leadsto T(x, y_{n})$$ + +This case doesn't appear in the setting of cite:BuronRewritingBasedQueryAnswering2018a, because we demand that mapping heads contain IRIs in class position. +* Definitions + +We now want to formalize the definition of /wrapping a mapping set with a rule/. As defined in cite:MugnierIntroductionOntologyBasedQuery2014a, we will use the definition piece unifier of a query with a rule. We will use this definition to find piece unifier of rule body in $\rules$ with mapping from $\mappings$ (considering as existential rules). We can illustrate $u$ a piece unifier of the body of the rule $B(\bar v_{1}, \bar v_{2}) \rightarrow H(\bar v_{2}, \bar v_{3})$ with the head of mapping $q_{1}(\bar x) \leadsto q_{2}(\bar x)$ by: + +$$q_{1}(\bar x) \leadsto q_{2}(\bar x) \stackrel{u}{\leftrightarrow} B(\bar v_{1}, \bar v_{2}) \rightarrow H(\bar v_{2}, \bar v_{3})$$ +such that $u(q_{2}(\bar x)) \subseteq u(B(\bar v_{1}, \bar v_{2}))$. + +Given one rule $r\in \rules$ and mappings $m_{1}, m_{2}, \dots, m_{n}$ such that: + +1. there exists for $1 \leq i \leq n, u_{i}$ a piece unifier of the head of $r$ with $m_{i}$. +2. piece unifiers $u_{1}, u_{2}, \dots u_{n}$ are compatible and $\{u_{1}(\head{m_{1}}), \dots, u_{n}(\head{m_{n}})\}$ forms a partition of $u_{1}(u_{2}( \dots u_{n}(\body{r}))\dots)$ +The mapping resulting of /wrapping mappings $m_{1}, \dots, m_{n}$ together with the rule $r$/ is defined by: + +$$\bigwedge_{1 \leq i \leq n} u_{i}(\body{m_{i}}) \leadsto u_{1}(u_{2}( \dots u_{n}(\head{r}))\dots)$$ + + +bibliographystyle:acs-nano +bibliography:../../all.bib diff --git a/posts/extended-rules.pdf b/posts/extended-rules.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2ce76d6cea902ffc670c2a32891fdfc40c2b44e1 Binary files /dev/null and b/posts/extended-rules.pdf differ diff --git a/posts/extended-rules.tex b/posts/extended-rules.tex new file mode 100644 index 0000000000000000000000000000000000000000..e11c8cdcdfd3da1d4448290a8227d051d53c5e11 --- /dev/null +++ b/posts/extended-rules.tex @@ -0,0 +1,131 @@ +% Created 2019-02-01 ven. 15:19 +% Intended LaTeX compiler: pdflatex +\documentclass[11pt]{article} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{graphicx} +\usepackage{grffile} +\usepackage{longtable} +\usepackage{wrapfig} +\usepackage{rotating} +\usepackage[normalem]{ulem} +\usepackage{amsmath} +\usepackage{textcomp} +\usepackage{amssymb} +\usepackage{capt-of} +\usepackage{hyperref} +\input{../macros} +\author{Maxime Buron} +\date{\today} +\title{Extended Reasoning Rules Support in GLAV Integration} +\hypersetup{ + pdfauthor={Maxime Buron}, + pdftitle={Extended Reasoning Rules Support in GLAV Integration}, + pdfkeywords={}, + pdfsubject={}, + pdfcreator={Emacs 25.3.50.2 (Org mode 9.2)}, + pdflang={English}} +\begin{document} + +\maketitle +\tableofcontents + +The aim of this paper is to extend the reasoning capability in GLAV Integration in the following general context where: + +\begin{itemize} +\item \(\mappings\) is a set of relational GLAV mappings on source schema \(S\) and on global schema \(G\) +\item \(\rules\) is a set of existential rules using the schema \(G\) +\end{itemize} + +We want to find some minimal restrictions on \(\rules\), such that we can find \(\mappings^{\rules}\) an equivalent set of GLAV mappings on source schema \(S\) and on global schema \(G\) i.e. for each \(I\) instance of \(S\), \(U\) is an instance of \(G\) such that \(I, \mappings, \rules \models U\) if and only if \(I, \mappings^{\rules} \models U\). + +\section{Examples} +\label{sec:orgc6f6053} + +A series of examples to show how we can go further than mappings head saturation. + +\subsection{Examples of Extensions} +\label{sec:orgf6d7f5b} + +\subsubsection{Saturation on Several Mappings} +\label{sec:org63b19a5} + +$$\mappings = \{ V_{1}(x) \leadsto A(x), V_{2}(x) \leadsto B(x) \}$$ + +$$\rules = \{ A(x) \wedge B(x) \rightarrow C(x) \}$$ + +Here, we need to use two mappings at the same time to fully reason with \(r\). In order to handle it, we can define \(\mappings^{\rules}\) as the set of GLAV mappings containing mappings of \(\mappings\) and the following mapping: + +$$V_{1}(x) \wedge V_{2}(x) \leadsto C(x)$$ + +\subsubsection{Mismatch with Constant in Rule} +\label{sec:orgbfb1b49} + +$$\mappings = \{m: V(x,y) \leadsto T(x,y) \}$$ + +$$\rules = \{ r: T(x, C_{1}) \rightarrow T(x, C_{2}) \}$$ + +We can not apply \(r\) on the head of \(m\) in a saturation of conjunctive query on context like in \cite{HassadLearningCommonalitiesSPARQL2017}. To solve this issue, we should handle the case, where \(y\) is \(m\) is equals to \(C_{1}\). We can do it by defining a new mappings: + +$$m^{r}: V(x, C_{1}) \leadsto T(x, C_{2})$$ + +and by defining \(\mappings^{\rules}\) as \(\{m, m^{r}\}\). + +This situation doesn't appear in \cite{BuronRewritingBasedQueryAnswering2018a}, because mapping heads and rules are build such that variables and constant are in the same position in triple. + +\subsection{Examples of Limits} +\label{sec:orge0fbf48} + +\subsubsection{Rule for Transitivity} +\label{sec:orgad984bf} + +$$\mappings = \{ m: V(x,y) \leadsto C(x,y) \}$$ + +$$\rules = \{ r: C(x, y) \wedge C(y, z) \rightarrow C(x, z) \}$$ + +In this case, we can wrap two mappings \(m\) with rule \(r\) given the following mapping: + +$$m': V(x,y) \wedge V(y,z) \leadsto C(x,z)$$ + +Then, we can continue to wrap this mapping and \(m\) with \(r\) etc. + +\subsubsection{Simple RDFS Entailment Rule} +\label{sec:orga758f0f} + +$$\mappings = \{m_{t}: V_{t}(x,y) \leadsto T(x,y), m_{c}: V_{c}(x,y) \leadsto C(y_{1}, y_{2}) \}$$ + +$$\rules = \{ r: T(x, y_{1}) \wedge C(y_{1}, y_{2}) \rightarrow T(x, y_{2}) \}$$ + +We can view above definitions as an RDFS integration system, where \(m_{t}\) (resp. \(m_{c}\)) populates the global schema with triples form \(\triple{x}{\type}{y}\) (resp. \(\triple{y_{1}}{\subclass}{y_{2}}\)). And the rule \(r\) can be viewed as \(\triple{x}{\type}{y_{1}} \wedge \triple{y_{1}}{\subclass}{y_{2}} \rightarrow \triple{x}{\type}{y_{2}}\). + +Wrapping together \(m_{t}\) and \(m_{c}\) using \(r\) will produce the following mapping: + +$$V_{t}(x,y_{1}) \wedge V_{c}(y_{1}, y_{2}) \leadsto T(x,y_{2})$$ + +We can wrap this mappings with \(m_{c}\) using \(r\), by continuing we will produce mappings of the form: + +$$V_{t}(x,y_{1}) \wedge V_{c}(y_{1}, y_{2}) \dots \wedge V_{c}(y_{n-1}, y_{n}) \leadsto T(x, y_{n})$$ + +This case doesn't appear in the setting of \cite{BuronRewritingBasedQueryAnswering2018a}, because we demand that mapping heads contain IRIs in class position. +\section{Definitions} +\label{sec:org193e210} + +We now want to formalize the definition of \emph{wrapping a mapping set with a rule}. As defined in \cite{MugnierIntroductionOntologyBasedQuery2014a}, we will use the definition piece unifier of a query with a rule. We will use this definition to find piece unifier of rule body in \(\rules\) with mapping from \(\mappings\) (considering as existential rules). We can illustrate \(u\) a piece unifier of the body of the rule \(B(\bar v_{1}, \bar v_{2}) \rightarrow H(\bar v_{2}, \bar v_{3})\) with the head of mapping \(q_{1}(\bar x) \leadsto q_{2}(\bar x)\) by: + +$$q_{1}(\bar x) \leadsto q_{2}(\bar x) \stackrel{u}{\leftrightarrow} B(\bar v_{1}, \bar v_{2}) \rightarrow H(\bar v_{2}, \bar v_{3})$$ +such that \(u(q_{2}(\bar x)) \subseteq u(B(\bar v_{1}, \bar v_{2}))\). + +Given one rule \(r\in \rules\) and mappings \(m_{1}, m_{2}, \dots, m_{n}\) such that: + +\begin{enumerate} +\item there exists for \(1 \leq i \leq n, u_{i}\) a piece unifier of the head of \(r\) with \(m_{i}\). +\item piece unifiers \(u_{1}, u_{2}, \dots u_{n}\) are compatible and \(\{u_{1}(\head{m_{1}}), \dots, u_{n}(\head{m_{n}})\}\) forms a partition of \(u_{1}(u_{2}( \dots u_{n}(\body{r}))\dots)\) +\end{enumerate} +The mapping resulting of \emph{wrapping mappings \(m_{1}, \dots, m_{n}\) together with the rule \(r\)} is defined by: + +$$\bigwedge_{1 \leq i \leq n} u_{i}(\body{m_{i}}) \leadsto u_{1}(u_{2}( \dots u_{n}(\head{r}))\dots)$$ + + +\bibliographystyle{acs-nano} +\bibliography{../../blog/source/all} +\end{document} \ No newline at end of file diff --git a/posts/full-saturation.org b/posts/full-saturation.org new file mode 100644 index 0000000000000000000000000000000000000000..a7a1a7a40737190513081c1edc18a09804511f52 --- /dev/null +++ b/posts/full-saturation.org @@ -0,0 +1,79 @@ +#+TITLE: Full RDFS Saturation + +* Example on QA test + +We load the [[file:../projects/qa-test/qa-test.org][QA test graph]] with saturation: +#+BEGIN_SRC shell :results none +java -jar ~/inria/code/ontosql/rdf-db/target/RDFDBDirectory/ontosql-rdfdb-1.0.7-SNAPSHOT-with-dependencies.jar -input ../projects/qa-test/qa-test.nt -pf ../projects/qa-test/qa-test.properties +#+END_SRC + +We execute the following queries to get the saturation of the graph. +#+BEGIN_SRC sql +-- We need to insert the missing line about type in dictinary table + INSERT INTO dictionary + VALUES (21, '<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>'); + + SELECT d1.value as s, d2.value as p, d3.value as o + FROM encoded_sat, dictionary as d1, dictionary as d2, dictionary as d3 + WHERE encoded_sat.s = d1.key AND encoded_sat.p = d2.key AND encoded_sat.o = d3.key; +#+END_SRC + +There are 27 triples in the full saturation computed by rdf-db: +#+BEGIN_SRC shell :results output :exports both +psql -d qatest -c "INSERT INTO dictionary + VALUES (21, '<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>');" +psql -d qatest -c "SELECT d1.value as s, d2.value as p, d3.value as o + FROM encoded_sat, dictionary as d1, dictionary as d2, dictionary as d3 + WHERE encoded_sat.s = d1.key AND encoded_sat.p = d2.key AND encoded_sat.o = d3.key;" + +#+END_SRC + +#+RESULTS: +#+begin_example + s | p | o +---------------+------------------------------------------------------+--------------- + <Orsay> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Thing> + <Montpellier> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Place> + <Maxime> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Thing> + <Palaiseau> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Place> + <Ioana> | <livesIn> | <Palaiseau> + <Montpellier> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Thing> + <Orsay> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Place> + <Palaiseau> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Thing> + <Orsay> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <City> + <Maxime> | <contact> | "245470000" + <Place> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <Thing> + <livesIn> | <http://www.w3.org/2000/01/rdf-schema#range> | <City> + <Person> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <Thing> + <Montpellier> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <City> + <Maxime> | <livesIn> | <Orsay> + <Palaiseau> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <City> + <François> | <livesIn> | <Lannion> + <Thing> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <Thing> + <phoneNumber> | <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> | <contact> + <contact> | <http://www.w3.org/2000/01/rdf-schema#domain> | <Person> + <City> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <Place> + <Lannion> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <City> + <Maxime> | <phoneNumber> | "245470000" + <Lannion> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Place> + <Marie-Laure> | <livesIn> | <Montpellier> + <Lannion> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Thing> + <Maxime> | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | <Person> +(27 rows) + +#+end_example + +The following 5 schema triples are not generated during the saturation: + +#+BEGIN_EXAMPLE +<City> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . + +<phoneNumber> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> . +<phoneNumber> <http://www.w3.org/2000/01/rdf-schema#domain> <Thing> . +<contact> <http://www.w3.org/2000/01/rdf-schema#domain> <Thing> . + +<livesIn> <http://www.w3.org/2000/01/rdf-schema#range> <Place> . +<livesIn> <http://www.w3.org/2000/01/rdf-schema#range> <Thing> . +#+END_EXAMPLE + +* TODO Implementation diff --git a/posts/generate-classes-using-mapping.org b/posts/generate-classes-using-mapping.org new file mode 100644 index 0000000000000000000000000000000000000000..40e0c451b1d5fcdadcd97af3bf0a569f14f96f80 --- /dev/null +++ b/posts/generate-classes-using-mapping.org @@ -0,0 +1,16 @@ +#+TITLE: Generate Classes Using Mapping + +The aim of the post is to show how we can generate/induced new classes using GAV mapping. Specially, we will see how GAV mappings, having the following form, can be supported in the different Query Answering approaches: + +$$q(x,y) \leftarrow \triple{x}{\type}{y}$$ +$$q(y) \leftarrow \triple{y}{\subclass}{C}$$ +$$q(y) \leftarrow \triple{C}{\subclass}{y}$$ + +We are not able to handle to generate *properties* using mapping of the following form: +$$q(x,y,z) \leftarrow \triple{x}{y}{z}.$$ + +In fact, using this mappings will allow us to generated triples such as $\triple{\subclass}{\subclass}{\subclass}$, which is an RDFS triple and is not allowed in FO Ontology. Such triple breaks the results proven using RIS. + +This work cite:pintoMappingDataHigherOrder is about enabling mappings in OBDA that allow to generate classes from data in the source. + +bibliography:../../all.bib diff --git a/posts/mongodb-join/index.org b/posts/mongodb-join/index.org new file mode 100644 index 0000000000000000000000000000000000000000..c9fbbae7a249cb46fc6852d19d813ef6cca4fba7 --- /dev/null +++ b/posts/mongodb-join/index.org @@ -0,0 +1,317 @@ +#+TITLE: MongoDB Join Benchmark + +We produce a benchmark for join in MongoDB and we want to compare the performance of join evaluate inside MongoDB with join done outside using Tatooine plan. + +** Description of the benchmark + +For this benchmark, we will generate collections of JSON documents of the form: + +#+BEGIN_example +{ + _id: "ID", + k: "value" +} +#+END_example + +where the id is unique and the key k can have two kind of values: no joinable and joinable values. The generator have the following parameters: + +- ~card~ is the number of documents in the collection +- ~rangeNJ~ is the number of different no joinable values +- ~rangeJ~ is the number of different joinable values +- ~ratioNJJ~ is the ratio of no joinable values over joinable values + +The javascript generator function: +#+NAME: generator +#+BEGIN_src js + function generateCollection(file, card, rangeNJ, rangeJ, symbolNJ, symbolJ, ratioNJJ) { + // empty file + if (fs.existsSync(file)) + fs.truncateSync(file, 0) + + for (let c = 0; c < card; c++) { + let obj = {} + // we choose between NJ and J + if (ratioNJJ * Math.random() > 1) { + // we choose one NJ in its range + obj.k = symbolNJ + Math.floor(rangeNJ * Math.random()) + } else { + // we choose one J in its range + obj.k = symbolJ + Math.floor(rangeJ * Math.random()) + } + + fs.appendFileSync(file, JSON.stringify(obj) + '\n') + } + } +#+END_src + +** Small Intersection of values + +We generate two collections of 100M documents with few intersection in joinable values with the following parameters: + +- ~card = 100M~ +- ~rangeNJ = 1M~ +- ~rangeJ = 1000~ +- ~ratioNJJ = 100 000~ + +The number of pair of joinable document should be around 1000. + +#+BEGIN_src js :noweb yes :exports none + const fs = require('fs') + + const SFile = 'collectionS.json' + const RFile = 'collectionR.json' + + const card = 100000000 //100M + const rangeNJ = 1000000 // 1M + const rangeJ = 1000 + const ratioNJJ = 100000 + + generateCollection(SFile, card, rangeNJ, rangeJ, 'A', 'J', ratioNJJ) + generateCollection(RFile, card, rangeNJ, rangeJ, 'B', 'J', ratioNJJ) + + <<generator>> +#+END_src + +#+RESULTS: +: undefined + +We load the two collection into mongoDB +#+BEGIN_src shell +mongoimport --drop -d join -c S --file collectionS.json +mongoimport --drop -d join -c R --file collectionR.json +#+END_src + +We create an index for the two collections: +#+BEGIN_example +db.S.createIndex({k: 1}) +db.R.createIndex({k: 1}) +#+END_example + +We query the join of the two collections which takes 1h1min30s: +#+BEGIN_example +db.S.explain("executionStats").aggregate([{$lookup: {from: "R", localField: "k", foreignField: "k", as: "kr"}}, {$unwind: "$kr"}]) + +{ + "stages" : [ + { + "$cursor" : { + "query" : { + + }, + "queryPlanner" : { + "plannerVersion" : 1, + "namespace" : "join.S", + "indexFilterSet" : false, + "parsedQuery" : { + + }, + "winningPlan" : { + "stage" : "COLLSCAN", + "direction" : "forward" + }, + "rejectedPlans" : [ ] + }, + "executionStats" : { + "executionSuccess" : true, + "nReturned" : 100000000, + "executionTimeMillis" : 3691177, + "totalKeysExamined" : 0, + "totalDocsExamined" : 100000000, + "executionStages" : { + "stage" : "COLLSCAN", + "nReturned" : 100000000, + "executionTimeMillisEstimate" : 16530, + "works" : 100000002, + "advanced" : 100000000, + "needTime" : 1, + "needYield" : 0, + "saveState" : 787888, + "restoreState" : 787888, + "isEOF" : 1, + "invalidates" : 0, + "direction" : "forward", + "docsExamined" : 100000000 + } + } + } + }, + { + "$lookup" : { + "from" : "R", + "as" : "kr", + "localField" : "k", + "foreignField" : "k", + "unwinding" : { + "preserveNullAndEmptyArrays" : false + } + } + } + ], + "ok" : 1 +} +#+END_example + +** Large Intersection of Values + +We generate two collections of 100M documents with a lot intersection in joinable values with the following parameters: + +- ~card = 100M~ +- ~rangeNJ = 1M~ +- ~rangeJ = 1000~ +- ~ratioNJJ = 10 000~ + +The number of pair of joinable document should be around 100 000. + +#+BEGIN_src js :noweb yes :tangle "script.js" :exports none + const fs = require('fs') + + const SFile = 'collectionS.json' + const RFile = 'collectionR.json' + + const card = 100000000 //100M + const rangeNJ = 1000000 // 1M + const rangeJ = 1000 + const ratioNJJ = 10000 + + generateCollection(SFile, SCard, SRangeA, rangeJ, 'A', 'B', SRatioAB) + generateCollection(RFile, RCard, RRangeC, rangeJ, 'C', 'B', RRatioCB) + + <<generator>> +#+END_src + +#+RESULTS: +: undefined + +#+BEGIN_example +> db.S.explain("executionStats").aggregate([{$lookup: {from: "R", localField: "k", foreignField: "k", as: "kr"}}, {$unwind: "$kr"}]) +{ + "stages" : [ + { + "$cursor" : { + "query" : { + + }, + "queryPlanner" : { + "plannerVersion" : 1, + "namespace" : "join.S", + "indexFilterSet" : false, + "parsedQuery" : { + + }, + "winningPlan" : { + "stage" : "COLLSCAN", + "direction" : "forward" + }, + "rejectedPlans" : [ ] + }, + "executionStats" : { + "executionSuccess" : true, + "nReturned" : 100000000, + "executionTimeMillis" : 3070369, + "totalKeysExamined" : 0, + "totalDocsExamined" : 100000000, + "executionStages" : { + "stage" : "COLLSCAN", + "nReturned" : 100000000, + "executionTimeMillisEstimate" : 19450, + "works" : 100000002, + "advanced" : 100000000, + "needTime" : 1, + "needYield" : 0, + "saveState" : 787888, + "restoreState" : 787888, + "isEOF" : 1, + "invalidates" : 0, + "direction" : "forward", + "docsExamined" : 100000000 + } + } + } + }, + { + "$lookup" : { + "from" : "R", + "as" : "kr", + "localField" : "k", + "foreignField" : "k", + "unwinding" : { + "preserveNullAndEmptyArrays" : false + } + } + } + ], + "ok" : 1 +} + +#+END_example +** Postgres Comparison + +We build a similar CSV generator + +#+BEGIN_src shell :tangle "gen" + function generator_csv () { + FILE=$1 + CARD=$2 + RANGENJ=$3 + RANGEJ=$4 + SYMBOLNJ=$5 + SYMBOLJ=$6 + RATIONJJ=$7 + + # empty the file + > $FILE + + id=0 + while [ $id -lt $CARD ] + do + if [ $((RANDOM % (RATIONJJ + 1))) -gt 0 ] + then + echo -e "$id\t$SYMBOLNJ$(( ( RANDOM % RANGENJ ) + 1 ))" >> $FILE + else + echo -e "$id\t$SYMBOLJ$(( ( RANDOM % RANGEJ ) + 1 ))" >> $FILE + fi + ((id++)) + done + + } + + generator_csv "tableR.csv" 100000000 1000000 1000 "A" "J" 100000 + generator_csv "tableS.csv" 100000000 1000000 1000 "B" "J" 100000 +#+END_src + +#+RESULTS: + +#+BEGIN_src sql +CREATE TABLE R ( +id integer primary key, +k varchar); + +CREATE INDEX on R (k); + +CREATE TABLE S ( +id integer primary key, +k varchar); + +CREATE INDEX on S (k); +#+END_src + + +For small intersection tables, Postgres computes the result in 241809,116 ms, with the following execution plan: +#+BEGIN_example +mongo_join=# explain select * from s AS S, r AS R where S.k = R.k; + + QUERY PLAN +------------------------------------------------------------------------------------- + Merge Join (cost=755377247.21..3937606397.52 rows=302921560607 width=20) + Merge Cond: ((s.k)::text = (r.k)::text) + -> Index Scan using s_k_idx on s (cost=0.57..5066424.21 rows=99997608 width=10) + -> Index Scan using r_k_idx on r (cost=0.57..5065805.49 rows=99997960 width=10) +(4 lignes) + + +mongo_join=# select count(*) from s AS S, r AS R where S.k = R.k; + count +------- + 9017 +(1 ligne) +#+END_example diff --git a/posts/obda-subproblems.org b/posts/obda-subproblems.org new file mode 100644 index 0000000000000000000000000000000000000000..beae80442d1f1505cf1992f16b8e6fa952c15c82 --- /dev/null +++ b/posts/obda-subproblems.org @@ -0,0 +1,78 @@ +#+TITLE: OBDA Sub-Problems + +In this posts, we will explore the objects appearing in query answering in OBDA system. We have introduce what we call an RDF integration system denoted $\langle \onto, \rules, \mappings, \extensions \rangle$, where $\onto$ is an ontology, $\rules$ is reasoning rules set, $\mappings$ is a mappings set and $\extensions$ is a set of RDF extensions. + +* Mappings + +To define a OBDA system, it is easy to define each mapping as GLAV mapping of the form: + +$$m: q_{1}(\bar x) \leadsto q_{2}(\bar x)$$ + +We will see in the following how we can benefit from a intermediate view $V_{m}$, defining a new extension set, to split the mapping $m$ into one LAV and one GAV mapping as follow: + +- a GAV mapping between the source query and the view $q_{1}(\bar x) \leadsto V_{m}(\bar x)$; +- a LAV mapping between the view and the query on the global schema, $V_{m}(\bar x) \leadsto q_{2}(\bar x)$ + +In this section, we will redefine previous GLAV mapping to common GLAV mappings on heterogeneous sources using the splitting GAV-LAV. Then, we will see how we can minimize mappings set using this new definition. + +** Definitions of View based GLAV Mappings + +Traditionally in a GLAV mapping $m$, $q_{1}$ is a query in *one* data source, hence if we have two sources as follow: +1. $\mathrm{Collection}(user, doc)$ containing the collection of documents of each user; +2. $\mathrm{Topic}(doc, topic)$ containing the topic of each document. + +It is not possible to define a GLAV mapping exposing the user documents topics of the users, without revealing the users collections. Such mapping would be the following: +$$\mathrm{Collection}(user, doc) \wedge \mathrm{Topic}(doc, topic) \leadsto \triple{user}{\irin{haveDocumentOn}}{topic}$$ + +We notice that this mapping have a body joining two different sources, which is not supported by the GLAV mapping definition. + +#+BEGIN_definition +An /view based GLAV mappings collection/ is a pair of mappings sets $\mappings = (\mappings_{V}, \mappings_{G})$, where $\mappings_{V}$ is a set of GAV mappings whose bodies are conjunctive queries on one sources, called the views definitions of $\mappings$ and $\mappings_{G}$ is a set of GLAV mappings whose bodies are conjunctive queries using predicates from mappings heads of $\mappings_{V}$, it is called GLAV mappings set of $\mappings$. +#+END_definition + +We can define $\mappings = (\mappings_{V}, \mappings_{G})$ a view based GLAV mappings collection for defining the previous mapping example. We start by defining $\mappings_V$ the views definitions containing the two following mappings: +1. for a view of the $\mathrm{Collection}$ relation $$\mathrm{Collection}(user, doc) \leadsto V_{C}(user, doc)$$ +2. for a view of the $\mathrm{Topic}$ relation $$\mathrm{Topic}(doc, topic) \leadsto V_{T}(doc, topic)$$ +Then, we definite $\mappings_{G}$ the GLAV mappings set containing one mapping: +$$V_{C}(user, doc) \wedge V_{T}(doc, topic) \leadsto \triple{user}{\irin{haveDocumentOn}}{topic}$$ + +** Minimization of View based GLAV Mappings + +Inspired from cite:dipintoOptimizingQueryRewriting2013, we can take advantage of the view based GLAV mapping representation to optimized the mapping set, by minimizing it. + +** Mapping Creating Schema +- cite:pintoMappingDataHigherOrder +- cite:dipintoAcquiringOntologyAxioms2019a + In this article, the authors present the /mapping-based knowledge base/ which extends the OBDA formalisation by allowing the T-box (DL-Lite_R) to be induced from data sources by GAV mapping. +- cite:giacomoHigherOrderDescriptionLogics describes the higher order DL language. + +** Mappings Generation +- look at the problem of generating mapping from spreadsheet (Question that comes up during Duc's defense) +- look at the thesis of [[https://perso.liris.cnrs.fr/ugo.comignani/][Ugo Camignani]] who investigate the problem of repairing mappings and rewriting mapppings in order that they respect some privacy constraints. +* Query +** Higher Order Query +- cite:lenzeriniPracticalHigherorderQuery +- cite:dipintoAcquiringOntologyAxioms2019a +** Non Positive Query +- cite:cimaQueriesInequalitiesDLLite +** Regular Path Query +- cite:bagetAnsweringConjunctiveRegular2017a +- cite:bienvenuRegularPathQueries2015 +** OPTIONAL in SPARQL + +SPARQL queries build with BGP and OPTIONAL operator are not positive queries, in the sense that we need the negation operator to express such queries. But OPTIONAL SPARQL queries are monotonous, which in OWA assumptions, means that the more the KB contains positive atoms, the more the query have answers and the number of its answers is independent of the number of negative atoms in the KB. + +** Update Query + +The update query have been studied in: +- cite:degiacomoPracticalUpdateManagement2017 +* Reasoning +** Equality Dependency +* Mediation +** Optimization +*** Join ordering +- cite:leisHowGoodAre2015 +- https://cs.ulb.ac.be/public/_media/teaching/infoh417/slides-lect7.pdf +- https://db.in.tum.de/teaching/ws1415/queryopt/ + +bibliography:../../all.bib diff --git a/posts/query-answering-methods-in-ris.org b/posts/query-answering-methods-in-ris.org new file mode 100644 index 0000000000000000000000000000000000000000..af2546a2cea7e83feae9302294b5f02622b743a7 --- /dev/null +++ b/posts/query-answering-methods-in-ris.org @@ -0,0 +1,70 @@ +#+TITLE: Query Answering Methods in RDF Integration Systems + + +An /RDF integration system/ is of the form $S=\langle \onto, \rules, \mappings, \extensions \rangle$, +where $\onto$ is a first order RDFS ontology (without blank nodes), $\rules$ is the set of RDFS entailment rules +composed of two disjoint rule sets $\rules_{a}$ and $\rules_{c}$, +finally $\mappings$ and $\extensions$ are RIS mappings with their extensions. + +The /certain answer set/ of a BGP query $q$ on $S$ is: +$$\cert(q, S) = \{\phi(\bar x) \mid (\rdfGraph \cup \onto) \models_{\rules}^{\phi} q(\bar x)\}$$ +where $\phi(\bar x)$ is made of values from $\extensions$. + +* Classifying Query Answering Methods by Kind of Reasoning + +** Two Kinds of Reasoning + +Since $\rules = \rules_{a} \cup \rules_{c}$, we can split the reasoning w.r.t. $\rules$ in two: +- reasoning w.r.t. $\rules_{a}$, to entail new assertion triples, +- reasoning w.r.t. $\rules_{c}$, to entail new constraint (ontological) triples. + +Moreover, we have proven that the saturation w.r.t. $\rules$ of RDF graph can be obtained by saturating +w.r.t. $\rules_{a}$ then $\rules_{c}$ or in the inverse order: + +#+BEGIN_prop +For $\graph$ an RDF graph whose ontology is FO RDFS ontology, it holds: +$$\graph^{\rules} = \left (\graph^{\rules_{a}} \right )^{\rules_{c}} = \left (\graph^{\rules_{c}} \right )^{\rules_{a}}$$ +#+END_prop + +** Methods for reasoning w.r.t. $\rules_{a}$ + +We define methods to handle the reasoning w.r.t. $\rules_{a}$ in $S$ during the computation of the certain answer of a BGPQ $q$: + +- *saturate w.r.t. $\rules_{a}$*. This method is only applicable when the graph has been saturated, i.e., in a materialization +context. It consists of saturating the materialization of the induced graph $\rdfGraph$ with the ontology $\onto$ w.r.t. +$\rules_{a}$ before evaluating the query. This can be done in pre-processing (prior to any query being answered). +- *reformulate w.r.t. $\rules_{a}$*. This methods consists of reformulating the query $q$ w.r.t. $\rules_{a}$ and $\onto$ +as $\mathcal{Q_{a}} = \mathrm{Ref}_{a}(q, \onto)$. +- *saturate mappings*. This method consists of replacing the mappings $\mappings$ with the saturated mappings +$\mappings^{\rules_{a}, \onto}$. This can be done in pre-processing. + +** Methods for reasoning w.r.t. $\rules_{c}$ + +We define methods to handle the reasoning w.r.t. $\rules_{c}$ in $S$ during the computation of certain answer of a BGPQ $q$: + +- *saturate w.r.t. $\rules_{c}$*. This method is only applicable in materialization scenarios. It consists of +saturating the materialization of the ontology $\onto$ w.r.t. $\rules_{c}$ before evaluating the query. +This can be done in pre-processing. +- *reformulate w.r.t. $\rules_{c}$*. This method consists of reformulating the query $q$ w.r.t. $\rules_{c}$ +and $\onto$ as $\mathcal{Q_{c}} = \mathrm{Ref}_{c}(q, \onto)$. +- *mappings for $\onto^{\rules_{c}}$*. This method consists of adding the mappings $\mappings_{\onto^{\rules_{c}}}$ +and their extensions $\extensions_{\onto^{\rules_{c}}}$ to $S$ in order to populate +$\onto^{\rules_{c}}$ (the saturated ontology) in the induced graph. This method can be applied in pre-processing. + +** Combinations of methods for reasoning w.r.t. $\rules$ + +We can combine one method for reasoning w.r.t. $\rules_{a}$ with one other w.r.t. $\rules_{c}$ in order to compute $\cert(q, S)$ certain answers of $q$ on $S$. The following table contains an expression of $\cert(q, S)$ for each combination. Each of this expression will lead to a computation according we choose a materialization or mediator approach. + +When we use a *materialization approach* all combinations in the following table are available. And we compute $\cert(q, S)$ by evaluating a UBGPQ on a materialized graph as follow: +- expressions in first line or first column have the form $Q(\graph^{\rules})$. Its computation is done by (i) materializing the graph $\graph$, (ii) saturating it using $\rules$ and (iii) evaluating $Q$ in the saturation. (i) and (ii) can be done in pre-processing. +- other expressions have the form $\cert(Q, \langle \emptyset, \emptyset, \mappings, \extensions \rangle)$. Its computation is done by (i) materializing the induced graph $\graph^{\mappings}_{\extensions}$, (ii) evaluating $Q$ on the materialization. (i) can be done in pre-processing. + +When we use a *mediator approach*, combinations of the first line and first column are not available. So, all expressions have the form $\cert(Q, \langle \emptyset, \emptyset, \mappings, \extensions \rangle)$. We compute the certain answers by (i) getting a rewriting of $Q$ using $\mappings$ (ii) evaluating the rewriting on $\extensions$ using the mediator. + +Finally, we have 13 methods for query answering in RIS, 9 methods by materialization and 4 methods by mediation. + +| | saturate w.r.t. $\rules_{a}$ | reformulate w.r.t. $\rules_{a}$ | saturate mappings | +|-------------------------------------+---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| *saturate w.r.t. $\rules_{c}$* | $q((\rdfGraph \cup \onto)^{\rules_{a} \cup \rules_{c}})$ | $\mathcal{Q_{a}}(\rdfGraph \cup \onto^{\rules_{c}})$ | $q(\graph^{\mappings^{\rules_{a}, \onto}}_{\extensions} \cup \onto^{\rules_{c}})$ | +| *reformulate w.r.t. $\rules_{c}$* | $\mathcal{Q_{c}}((\rdfGraph \cup \onto)^{\rules_{a}})$ | $\cert(\mathcal{Q_{c,a}}, \langle \emptyset, \emptyset, \mappings, \extensions \rangle)$ | $\cert(\mathcal{Q_{c}}, \langle \emptyset, \emptyset, \mappings^{\rules_{a}, \onto}, \extensions \rangle)$ | +| *mappings for $\onto_{\rules_{c}}$* | $q((\rdfGraph \cup \graph^{\mappings_{\onto^{\rules_{c}}}}_{\extensions_{\onto^{\rules_{c}}}})^{\rules_{a}})$ | $\cert(\mathcal{Q_{a}}, \langle \emptyset, \emptyset, \mappings \cup \mappings_{\onto^{\rules_{c}}}, \extensions \cup \extensions_{\onto^{\rules_{c}}} \rangle)$ | $\cert(q, \langle \emptyset, \emptyset, \mappings^{\rules_{a}, \onto} \cup \mappings_{\onto^{\rules_{c}}}, \extensions \cup \extensions_{\onto^{\rules_{c}}} \rangle)$ | diff --git a/posts/reproducibility.org b/posts/reproducibility.org new file mode 100644 index 0000000000000000000000000000000000000000..8445f3dd676aa05187fce7d64068231afef81ff4 --- /dev/null +++ b/posts/reproducibility.org @@ -0,0 +1,36 @@ +#+TITLE: Reproducibility + +[[https://vgc.poly.edu/~juliana][Juliana Freire]] has done a presentation about reproducibility: /Using Provenance to Support Computational Reproducibility/. She explains the main topics in reproducibility in data science. + + +* Open Source + +The first thing to ensure to done reproducible experiment is to be abled to share all resources need for doing the experiment. You need at least that your code and each of its dependencies are under licences allowing share. + +* Code + +Code depositories are the key for publishing source code (git) or binairies (maven). + +* Environment + +Environment also has to be reproducible and sharable. To do so, we need to: + +1. identify the environment parts that involve into the experiment +2. make it reproducible + +Most of the time, environment reproducibility comes with a *virtual machine*: + +- Docker container +- [[https://www.reprozip.org/][ReproZip]] allows to pack your research project by selecting depencies and rerun the experiment in a virtual machine that contains the same environement. + +* Workflows + +** Workflow Trails + +- [[https://www.vistrails.org][Vistrails]] is a graphical development tools for visualisation machine learning tasks, that keeps a trace of modification you have done of your workflow. + +** Literal Programming + +- org mode using [[https://orgmode.org/worg/org-contrib/babel/index.html][Babel]] in Emacs +- jupiter notebook for python +- [[https://beta.observablehq.com/][Observable]] for javascript diff --git a/posts/schema-implementation.org b/posts/schema-implementation.org new file mode 100644 index 0000000000000000000000000000000000000000..d266f1b114c12ef9d883beeb2c0f92c9b127fe4f --- /dev/null +++ b/posts/schema-implementation.org @@ -0,0 +1,135 @@ +#+TITLE: Schema Implementation + +* Schema Implementation Definition + +The schema implementation stores RDF triples about the schema of an RDF graph using text encoding for RDF terms: + +- a set of classes +- a set of properties +- a map linking c class to the set of all subclasses of c +- a map linking each p property to the set of all subproperty of p +- a map linking each c class to properties having the given class as domain +- a map linking each c class to properties having the given class as range + +and it implements methods allowing any request on the RDFS schema as it is stored. We don't want that the schema implements any kind of reasoning. + +Information stored in a schema are equivalent to a set of RDF triples containing exactly the following triples: + +- $\triple{c}{\type}{\rdfsClass}$ for $c$ into the set of classes +- $\triple{p}{\type}{\rdfProperty}$ for $p$ into the set of properties +- $\triple{c_{1}}{\subclass}{c}$ for each $c_{1}$ subclass of $c$ +- $\triple{p_{1}}{\subclass}{p}$ for each $p_{1}$ subproperty of $p$ +- $\triple{p}{\domain}{c}$ for each $c$ domain of $p$ +- $\triple{p}{\range}{c}$ for each $c$ range of $p$ + +Defining the semantic of schema object as a set of triples allows us to talk about its saturation according to RDF entailment rules. +We also expect that every methods on schema implements the evaluation of simple conjunctive query on the set of triples that it contains. + +* Schema Extractor + +A schema extractor extracts the schema from a triples store, containing the RDF graph $\graph$. Each extractor takes as input: +- an access to $G$, +- a Boolean ~RDFSTriplesOnly~. + +The /extracted schema of $\graph$/ denoted $\mathrm{ES}(\graph)$ is build as follow: + +1. if ~RDFSTriplesOnly~ is false (default), then it contains triples of form $\triple{\subject}{\type}{\rdfProperty}$ and $\triple{\subject}{\type}{\rdfsClass}$ of $\graph$. +2. it contains all triples with an RDFS property of $\graph$. + +* Saturations + +In this section, we describe some RDF entailment rule set to saturated the schema of an RDF graph. + +** RDFS Schema Entailment Rules + +The /RDFS schema entailement rules/ are: + +| Rule | Entailment Rule | +|----------+---------------------------------------------------------------------------------------------------------------------------------------| +| ~rdfs5~ | $\triple{\prop_1}{\subproperty}{\prop_2},\triple{\prop_2}{\subproperty}{\prop_3} \rightarrow \triple{\prop_1}{\subproperty}{\prop_3}$ | +| ~rdfs11~ | $\triple{\subject}{\subclass}{\object},\triple{\object}{\subclass}{\object_1} \rightarrow \triple{\subject}{\subclass}{\object_1}$ | +| ~ext1~ | $\triple{\prop}{\domain}{\object},\triple{\object}{\subclass}{\object_1} \rightarrow \triple{\prop}{\domain}{\object_1}$ | +| ~ext2~ | $\triple{\prop}{\range}{\object},\triple{\object}{\subclass}{\object_1} \rightarrow \triple{\prop}{\range}{\object_1}$ | +| ~ext3~ | $\triple{\prop}{\subproperty}{\prop_1},\triple{\prop_1}{\domain}{\object} \rightarrow \triple{\prop}{\domain}{\object}$ | +| ~ext4~ | $\triple{\prop}{\subproperty}{\prop_1},\triple{\prop_1}{\range}{\object} \rightarrow \triple{\prop}{\range}{\object}$ | + +** Class and Property Definitions Entailment Rules + +The /class and property definitions entailment rules/ are: + +| Entailment Rule For Class Definition | +|----------------------------------------------------------------------| +| $\triple{p}{\subclass}{q} \rightarrow \triple{p}{\type}{\rdfsClass}$ | +| $\triple{p}{\subclass}{q} \rightarrow \triple{q}{\type}{\rdfsClass}$ | +| $\triple{p}{\domain}{c} \rightarrow \triple{c}{\type}{\rdfsClass}$ | +| $\triple{p}{\range}{c} \rightarrow \triple{c}{\type}{\rdfsClass}$ | + + +| Entailment Rule For Property Definition | +|---------------------------------------------------------------------------| +| $\triple{p}{\subproperty}{q} \rightarrow \triple{p}{\type}{\rdfProperty}$ | +| $\triple{p}{\subproperty}{q} \rightarrow \triple{q}{\type}{\rdfProperty}$ | +| $\triple{p}{\domain}{c} \rightarrow \triple{p}{\type}{\rdfProperty}$ | +| $\triple{p}{\range}{c} \rightarrow \triple{p}{\type}{\rdfProperty}$ | + + +** Reflexive Relation Schema Entailment Rules + +The /reflexive relation schema entailment rules/ are: + +| Rule | Entailment Rule | +|----------+---------------------------------------------------------------------------------------| +| ~rdfs6~ | $\triple{\prop}{\type}{\rdfProperty} \rightarrow \triple{\prop}{\subproperty}{\prop}$ | +| ~rdfs10~ | $\triple{\class}{\type}{\rdfsClass} \rightarrow \triple{\class}{\subclass}{\class}$ | + +Alternatively, Alexandra have proposed some entailment rules to handle the reflexivity of sub class and sub property relations in cite:GoasdoueBGPQueryAnswering2012 Figure 6 and 7. Their rules don't use $\rdfProperty$ and $\rdfsClass$, but [[file:extended-rules.org][wrap]] the Class and Property definition entailment rules with two above rules. In the paper, a "schema-level of a graph" is only triples that an RDFS property. Figure 6 presents reflexivity entailment from schema-level, this entailment is also supported by the rules we previously introduce. But, we have to add some entailment rules to allow entailment from instance-level triple to schema-level triple presented in Figure 7. + +I want to introduce here a new definition for specific schema. We first define /reserved IRIs/ as: $\subclass, \subproperty, \domain, \range, \type, \rdfProperty,\rdfsClass$. + +#+BEGIN_definition +A /FO schema/ is a RDF graph where triples have the one of following form : +- $\triple{\subject}{\prop}{\object}$ where $\prop$ is a RDFS property, and also $\subject$ and $\object$ are not reserved IRIs. +- $\triple{\subject}{\type}{\rdfProperty}$ where $\subject$ is not a reserved IRI. +- $\triple{\subject}{\type}{\rdfsClass}$ where $\subject$ is not a reserved IRI. +#+END_definition + +A property of the union of reflexive relation schema, class and property definition and RDFS schema entailment rule set is that *saturation of FO schema is still an FO schema*. + +** Generic Class and Property Definitions Entailment Rules + +The two following entailment rules will be used to entail new schema triples from instance and schema triples. + +| Rule | Entailment Rule | +|---------+-------------------------------------------------------------------------------------| +| ~rdfD2~ | $\triple{\subject}{\prop}{\object} \rightarrow \triple{\prop}{\type}{\rdfProperty}$ | +| | $\triple{\subject}{\type}{\class} \rightarrow \triple{\class}{\type}{\rdfsClass}$ | + +Funny entailments will appear, since we use all introduced rules together: $\triple{\subject}{\type}{\class}$ entails $\triple{\type}{\type}{\rdfProperty}$ entails $\triple{\type}{\subproperty}{\type}$ entails $\triple{\subproperty}{\type}{\rdfProperty}$ entails $\triple{\subproperty}{\subproperty}{\subproperty}$. But none of this entailments seem to raise a problem, because it seems not possible to use one of this no FO triple with an instance (assertions) entailment rule to generate a schema triple that is not already entailed by some of the previous schema entailment rules. In other words, the following lemma, adapted from extended version of ESWC paper, holds: + +#+BEGIN_lemma +For all RDF graph $\graph$ with a FO schema, it holds that: +$$\graph^{\rules_a \cup \rules_s} = \left ( \graph^{\rules_a} \right ) ^{\rules_s}$$ +where $\rules_{a}$ is the standard RDF entailment rule for assertions triples and $\rules_{s}$ is a set of RDF entailment rules for schema triple (defined above). +#+END_lemma + +* TODO Schema and Query Answering Scenarios :noexport: + +** 3 Query Answering Scenarios + +Given $\graph$ an RDF graph such that it has an FO schema, $q$ an generic BGP query (querying for both schema and instance triples). We consider the three following query answering scenarios where $\rules_{a}$ is the set of assertions/instance entailment rules and $\rules_{c}$ is the set of constraint entailment rules as defined in ESWC paper: + +1. *query evaluation*: we want to evaluate the answers of $q$ in $\graph$ (without reasoning) +2. *query answering with assertions reasoning*: we want to evaluate the answers of $q$ in $\graph^{\rules_{a}}$ +3. *query answering with full reasoning*: we want to evaluate the answers of $q$ in $\graph^{\rules_{a} \cup \rules_{c}}$ + +** Query Evaluation and Translation + +When the graph $\graph$ is stored in relational source, query evaluation comes down to translating $q$ into an SQL query. We have to be aware that extracted schema from $\graph$ doesn't contain all the properties and classes of $\graph$: it requires to compute the *saturation of schema from generic triples*. + +** Saturation approaches + +For query answering with full reasoning, we can compute the saturation using: + +$$\graph^{\rules_{a} \cup \rules_{c}} = \graph^{\rules_{a}} \cup S^{\infty}$$ + +where $S^{\infty}$ is the RDFS saturation of $(\mathrm{ES}(\graph) \setminus \mathrm{CPD}(\mathrm{ES}(\graph)))$. diff --git a/posts/st-rewriting-optimizations.org b/posts/st-rewriting-optimizations.org new file mode 100644 index 0000000000000000000000000000000000000000..dbe628929e0199f921c6258589ecae6d15ded37c --- /dev/null +++ b/posts/st-rewriting-optimizations.org @@ -0,0 +1,84 @@ +#+TITLE: Source Target Rewriting Optimizations + +During source target rewriting, many optimizations can be done using source constraints and Skolem functions + +* Skolem Function Encoding + +We will assume that Skolem functions have *disjoint range* and are *bijective*. + +** Example +Assume the following mappings where $f$ and $g$ are Skolem functions: +1. $\textrm{Product}(id, l, c) \rightarrow \triple{f(id)}{\textrm{ex:label}}{l}, \triple{f(id)}{\textrm{ex:comment}}{c}$. +2. $\textrm{Vendor}(id, l) \rightarrow \triple{g(id)}{\textrm{ex:label}}{l}$. + +Consider the following query: +$$q(x, y, z) \leftarrow \triple{x}{\textrm{ex:label}}{y}, \triple{x}{\textrm{ex:comment}}{z}$$ + +** Current Rewriting + +We have encoded functions in a two layers integration: +1. $\textrm{Product}(id, l, c) \rightarrow \textrm{V}_{1}(f(id),l,c)$ +2. $V_{1}(p, l, c) \rightarrow \triple{p}{\textrm{ex:label}}{l}, \triple{p}{\textrm{ex:comment}}{c}$ +3. $\textrm{Vendor}(id, l) \rightarrow \textrm{V}_{2}(g(id), l)$ +4. $\textrm{V}_{2}(v, l) \rightarrow \triple{v}{\textrm{ex:label}}{l}$ + + +Currently, we will rewrite $q$ in terms of queries using view $V_{1}$ and $V_{2}$ only and we find: + +1. $Q_{1}(x, y, z) \leftarrow \textrm{V}_{1}(x, y, c), \textrm{V}_{1}(x,l,z)$ +2. $Q_{2}(x, y, z) \leftarrow \textrm{V}_{2}(x, y), \textrm{V}_{1}(x,l,z)$ + +We can see that the rewriting $Q_{2}$ have no answers, because the join on the first position of $V_{1}$ and $V_{2}$ will be translated as $f(id_{1}) = g(id_{2})$ using the definitions of the views. But Skolem functions have disjoint ranges. + +** Skolem Predicates + +We can translate the two layers mappings in an one layer mappings as follow: +1. $\textrm{Product}(id, l, c), F(id, p) \rightarrow \triple{p}{\textrm{ex:label}}{l}, \triple{p}{\textrm{ex:comment}}{c}$. +2. $\textrm{Vendor}(id, l), G(id, v) \rightarrow \triple{v}{\textrm{ex:label}}{l}$. +where $F$ and $G$ Skolem predicates represent respectively Skolem functions $f$ and $g$. The first arguments of predicate are the functions inputs and the second arguments are the outputs. Because this new predicate represent Skolem function, we can define the following constraints on it (here for $F$, the same is true for $G$): +- *function predicate*: $\forall x,y_{1},y_{2}~ F(x, y_{1}), F(x, y_{2}) \rightarrow y_{1} = y_{2}$, +- *injective function*: $\forall x_{1}, x_{2},y~ F(x_{1}, y), F(x_{2}, y) \rightarrow x_{1} = x_{2}$, +- *disjoint ranges*: for two distinct Skolem predicate $F$ and $G$, $\forall x_{1}, x_{2}, y~ F(x_{1}, y), G(x_{2}, y) \rightarrow \perp$. + +If we consider the rewritings of $q$ according to the mappings including Skolem predicates: +1. $Q_{1}(x, y, z) \leftarrow \textrm{Product}(id_{1}, y, c), F(id_{1}, x), \textrm{Product}(id_{2}, l, z), F(id_{2}, x)$ +2. $Q_{2}(x, y, z) \leftarrow \textrm{Vendor}(id_{1}, y), G(id_{1}, x), \textrm{Product}(id_{2}, l, z), F(id_{2}, x)$ + +According to the disjoint range property of Skolem predicate, we can deduce that $Q_{2}$ have no answer. And we can apply the injective function property of $F$ to obtain the following rewriting of $q$: + +$$Q_{r}(x, y, z) \leftarrow \textrm{Product}(id, y, c), \textrm{Product}(id, l, z), F(id, x)$$ + +* Primary Key + +If we add the fact that the first column of $\textrm{Product}$ is a primary key, we have the following constraint: +$$\forall x, y_{1}, y_{2}, z_{1}, z_{2} ~ \textrm{Product}(x, y_{1}, z_{1}), \textrm{Product}(x, y_{2}, z_{2}) \rightarrow y_{1} = y_{2}, z_{1} = z_{2}$$ + +Then the rewriting of $q$ becomes: +$$Q_{r}(x, y, z) \leftarrow \textrm{Product}(id, y, z), F(id, x)$$ + +** Applying a Primary Key Constraint on a CQ + +#+BEGIN_definition +A /primary key constraint/ is a pair $(P, I)$ where: +- $P$ a predicate +- $I$ a set of indexes in $P$. +#+END_definition + +#+BEGIN_definition +Let $F$ be a conjunction of atoms, a primary key constraint $(P, I)$ is /applicable/ on $F$, if there exists two distinct atoms $P(\bar t)$ and $P(\bar u)$ such that $\forall i \in I~ \bar t_{i} = \bar u_{i}$. We say that $(P,I)$ is applicable on $F$ by the atoms $P(\bar t)$ and $P(\bar u)$. + +We define the result of the application of this primary key constraint on $F$ using this two atoms as $h(F)$, where $h$ is homomorphism: +$$\{\bar u_{k} \mapsto \bar t_{k} \mid 1 \leq k \leq \mathrm{arity}(P)\}.$$ +The homomorphism $h$ is not well defined, when there exists $k$ such that $\bar t_{k}$ and $\bar u_{k}$ are distinct constants, we say that there is a /clash/ during the application. +#+END_definition + +Since conjunction of atoms are represented as *set of atoms*, the application of a primary key constraint on a conjunction of atoms using two atoms without clash correspond to: +- remove one of the two atoms +- replace each variable of the removed atom by the corresponding term of the remained one. + +A clash during the application of a primary key constraint means that $F$ the conjunction of atoms violates the primary key constraint. In the case where $F$ is a conjunctive query, we can deduce that $F$ have no answer under the primary key constraint. + + +* Translate SQL View as Conjunctive Query on Tables + +When it is possible, it is worth to translate SQL view definition into conjunctive view on table. It will enables constraints and query core computation. diff --git a/posts/starwars-demo.org b/posts/starwars-demo.org new file mode 100644 index 0000000000000000000000000000000000000000..d709919d391ae413ea510ee5fcb282012bca7de2 --- /dev/null +++ b/posts/starwars-demo.org @@ -0,0 +1,312 @@ +#+TITLE: Star Wars RDF Integration Demo + +This post describes the data loading of the [[http://pages.saclay.inria.fr/maxime.buron/projects/obi-wan/app/ris/star-wars/][RDF Integration System (RIS) about Star Wars]] used in [[http://pages.saclay.inria.fr/maxime.buron/projects/obi-wan][Obi-Wan]]. The RIS is build on top of three complementary data sources in which only Star Wars data are been kept: +1. [[IMDB][IMDB]] partially loads in a relational database (Postgres), +2. [[Wikidata][Wikidata]] partially loads in RDF graph database (Jena TDB), +3. [[Star Wars API][Star Wars API]] documents loads in JSON documents database (MongoDB). + +* IMDB + +We downloaded the IMDB dumps at 12/03/2020 from https://www.imdb.com/interfaces/#plain. The imdb lacks of character identifiers since [[https://getsatisfaction.com/imdb/topics/changes-to-imdb-characters][they decide to remove it from the database]], but they kept the character names. In the demo, we use the IMDB data about Star Wars movies, their writers, directors, producer, actors with their character names. + +** Data Cleaning + +We generate clean data tuple files for the loading: +- we create a new table for the genre +- we denormalized the person table, containing a array of character names for each title and actor identifiers, by introducing a tuple for each character name (the pair title,actor is not a key anymore) + + #+BEGIN_src python :tangle script.py + import csv + + with open('title.basics.tsv', newline='') as tsvin, open('genre.tsv', 'w', newline='') as genreout, open('title.tsv', 'w', newline='') as titleout: + tsvin = csv.reader(tsvin, delimiter='\t', quoting=csv.QUOTE_NONE) + genreout = csv.writer(genreout, delimiter='\t') + titleout = csv.writer(titleout, delimiter='\t') + + iterrow = iter(tsvin) + next(iterrow) + for row in iterrow: + ins = row.copy() + ins.insert(0, ins[0][2:]) + ins = ins[:-1] + titleout.writerow(ins) + if row[8] != '\\N': + title_id = row[0] + genres = row[8].split(',') + for genre in genres: + genreout.writerow([title_id, genre]) + + with open('title.principals.tsv', newline='') as tsvin, open('principals.tsv', 'w', newline='') as csvout: + tsvin = csv.reader(tsvin, delimiter='\t', quoting=csv.QUOTE_NONE) + csvout = csv.writer(csvout, delimiter='\t') + + iterrow = iter(tsvin) + next(iterrow) + for row in iterrow: + if row[5] != '\\N': + names = row[5][1:-1].split(',') + for name in names: + ins = row.copy() + ins[5] = name[1:-1] + csvout.writerow(ins) + else: + csvout.writerow(row) + + with open('name.basics.tsv', newline='') as tsvin, open('name.tsv', 'w', newline='') as csvout: + tsvin = csv.reader(tsvin, delimiter='\t', quoting=csv.QUOTE_NONE) + csvout = csv.writer(csvout, delimiter='\t') + + iterrow = iter(tsvin) + next(iterrow) + for row in iterrow: + csvout.writerow(row[:-2]) + #+END_src + +** Loading + + #+BEGIN_src sql +CREATE DATABASE imdb; + +DROP TABLE IF EXISTS title; +CREATE TABLE title ( +id integer primary key, +tconst varchar(100) default NULL, +titleType varchar(100) default NULL, +primaryTitle varchar(2000) default NULL, +originalTitle varchar(2000) default NULL, +isAdult integer, +startYear integer, +endYear integer, +runtimeMinutes integer); + +COPY title FROM '/home/mburon/téléchargements/data/imdb/title.tsv' WITH DELIMITER E'\t'; + +CREATE INDEX on title (tconst); + +DROP TABLE IF EXISTS genre; +CREATE TABLE genre ( +tconst varchar(100), +genre varchar(100) default NULL); + +COPY genre FROM '/home/mburon/téléchargements/data/imdb/genre.tsv' WITH DELIMITER E'\t'; + +CREATE INDEX on genre (tconst); + +DROP TABLE IF EXISTS casting; +CREATE TABLE casting ( +tconst varchar(100), +ordering integer default NULL, +nconst varchar(100), +category varchar(100) default NULL, +job varchar(2000) default NULL, +character varchar(2000) default NULL); + +COPY casting FROM '/home/mburon/téléchargements/data/imdb/principals.tsv' WITH DELIMITER E'\t'; + +CREATE INDEX on casting (tconst); +CREATE INDEX on casting (nconst); + +DROP TABLE IF EXISTS person; +CREATE TABLE person ( +nconst varchar(100), +primaryName varchar(1000) default NULL, +birthYear integer, +deathYear integer); + +COPY person FROM '/home/mburon/téléchargements/data/imdb/name.tsv' WITH DELIMITER E'\t'; +CREATE INDEX on person (nconst); + + #+END_src + +** Star Wars Tables + +#+BEGIN_src sql :engine postgresql :database imdb :exports both +select * from title where tconst in ('tt0076759', 'tt0080684', 'tt0086190', 'tt0120915', 'tt0121765', 'tt0121766', 'tt2488496', 'tt2527336', 'tt2527338', 'tt3748528'); +#+END_src + +#+RESULTS: +| id | tconst | titletype | primarytitle | originaltitle | isadult | startyear | endyear | runtimeminutes | +|---------+-----------+-----------+------------------------------------------------+------------------------------------------------+---------+-----------+---------+----------------| +| 86190 | tt0086190 | movie | Star Wars: Episode VI - Return of the Jedi | Star Wars: Episode VI - Return of the Jedi | 0 | 1983 | | 131 | +| 76759 | tt0076759 | movie | Star Wars: Episode IV - A New Hope | Star Wars | 0 | 1977 | | 121 | +| 80684 | tt0080684 | movie | Star Wars: Episode V - The Empire Strikes Back | Star Wars: Episode V - The Empire Strikes Back | 0 | 1980 | | 124 | +| 120915 | tt0120915 | movie | Star Wars: Episode I - The Phantom Menace | Star Wars: Episode I - The Phantom Menace | 0 | 1999 | | 136 | +| 121765 | tt0121765 | movie | Star Wars: Episode II - Attack of the Clones | Star Wars: Episode II - Attack of the Clones | 0 | 2002 | | 142 | +| 121766 | tt0121766 | movie | Star Wars: Episode III - Revenge of the Sith | Star Wars: Episode III - Revenge of the Sith | 0 | 2005 | | 140 | +| 2488496 | tt2488496 | movie | Star Wars: Episode VII - The Force Awakens | Star Wars: Episode VII - The Force Awakens | 0 | 2015 | | 138 | +| 2527336 | tt2527336 | movie | Star Wars: Episode VIII - The Last Jedi | Star Wars: Episode VIII - The Last Jedi | 0 | 2017 | | 152 | +| 2527338 | tt2527338 | movie | Star Wars: Episode IX - The Rise of Skywalker | Star Wars: Episode IX - The Rise of Skywalker | 0 | 2019 | | 142 | +| 3748528 | tt3748528 | movie | Rogue One: A Star Wars Story | Rogue One | 0 | 2016 | | 133 | + +#+BEGIN_src sql :engine postgresql :database imdb :exports both +CREATE TABLE swTitle AS +select * from title where tconst in ('tt0076759', 'tt0080684', 'tt0086190', 'tt0120915', 'tt0121765', 'tt0121766', 'tt2488496', 'tt2527336', 'tt2527338', 'tt3748528'); +#+END_src + +#+BEGIN_src sql :engine postgresql :database imdb :exports both +CREATE TABLE swGenre AS +select genre.tconst, genre.genre from genre, swTitle where genre.tconst = swTitle.tconst; +#+END_src + +#+BEGIN_src sql :engine postgresql :database imdb :exports both +DROP TABLE swCasting; +CREATE TABLE swCasting AS +select distinct casting.tconst, casting.ordering, casting.nconst, casting.category, casting.job, casting.character from casting, swTitle where casting.tconst = swTitle.tconst; +#+END_src + +insert missing values in the casting +#+BEGIN_src sql :engine postgresql :database imdb :exports both +INSERT INTO swCasting +VALUES ('tt0086190', 11, 'nm0000469', 'actor', NULL, 'Darth Vader'); +INSERT INTO swCasting +VALUES ('tt0076759', 11, 'nm0000469', 'actor', NULL, 'Darth Vader'); +INSERT INTO swCasting +VALUES ('tt0080684', 11, 'nm0000469', 'actor', NULL, 'Darth Vader'); +INSERT INTO swCasting +VALUES ('tt3748528', 11, 'nm1872855', 'actor', NULL, 'Darth Vader'); +#+END_src + +#+BEGIN_src sql :engine postgresql :database imdb :exports both +Drop table swPerson; +CREATE TABLE swPerson AS +select distinct person.nconst, person.primaryname, person.birthyear, person.deathyear from person, swCasting where swCasting.nconst = person.nconst; +#+END_src + +#+BEGIN_src sql :engine postgresql :database imdb :exports both +select * from swCasting; +#+END_src + +#+RESULTS: + +* Wikidata + +We downloaded some triples from Wikidata about Star Wars characters (e.g. [[https://www.wikidata.org/wiki/Q51740][Obi-Wan Kenobi]]), like their performers, their organisation memberships, their relation with others characters (student of, enemy of, child, spouse). + +#+BEGIN_src shell :tangle wikidata-download.sh + >sw.full.nt + + while read i; do + if [[ -n $i ]] && [[ ${i:0:1} != "#" ]] + then + curl https://www.wikidata.org/wiki/Special:EntityData/${i}.nt >> sw.full.nt + fi + done <wikidata-sw-entity +#+END_src + +We keep only certain interesting properties. + +#+BEGIN_src shell :tangle wikidata-selection.sh + >sw.nt + + #IMDB character/name/title ID + grep " <http://www.wikidata.org/prop/statement/P345> " sw.full.nt >> sw.nt + grep " <http://www.wikidata.org/prop/P345> " sw.full.nt >> sw.nt + + #Star Wars Databank ID + grep " <http://www.wikidata.org/prop/statement/P3798> " sw.full.nt >> sw.nt + grep " <http://www.wikidata.org/prop/P3798> " sw.full.nt >> sw.nt + + # performer property + grep " <http://www.wikidata.org/prop/P175> " sw.full.nt >> sw.nt + grep " <http://www.wikidata.org/prop/statement/P175> " sw.full.nt >> sw.nt + + # memberOf property + grep " <http://www.wikidata.org/prop/P463> " sw.full.nt >> sw.nt + grep " <http://www.wikidata.org/prop/statement/P463> " sw.full.nt >> sw.nt + + # student + grep " <http://www.wikidata.org/prop/P802> " sw.full.nt >> sw.nt + grep " <http://www.wikidata.org/prop/statement/P802> " sw.full.nt >> sw.nt + + # enemy of + grep " <http://www.wikidata.org/prop/P7047> " sw.full.nt >> sw.nt + grep " <http://www.wikidata.org/prop/statement/P7047> " sw.full.nt >> sw.nt + + # child + grep " <http://www.wikidata.org/prop/P40> " sw.full.nt >> sw.nt + grep " <http://www.wikidata.org/prop/statement/P40> " sw.full.nt >> sw.nt + + # spouse + grep " <http://www.wikidata.org/prop/P26> " sw.full.nt >> sw.nt + grep " <http://www.wikidata.org/prop/statement/P26> " sw.full.nt >> sw.nt + + + while read i; do + if [[ -n $i ]] && [[ ${i:0:1} != "#" ]] + then + grep "<http://www.wikidata.org/entity/${i}> <http://www.w3.org/2000/01/rdf-schema#label>" sw.full.nt | grep "@en ." >> sw.nt + fi + done <wikidata-sw-entity +#+END_src + +* Star Wars API + +We downloaded also the JSON documents from a [[https://swapi.co/][Star Wars API]], describing character species, spaceships and their pilots etc. + +** Download +#+BEGIN_src shell +for i in {1..75}; +do +curl https://swapi.co/api/starships/$i/ >> starships.json +done + +for i in {1..75}; +do +curl https://swapi.co/api/vehicles/$i/ >> vehicles.json +done + +for i in {1..87}; +do +curl https://swapi.co/api/people/$i/ >> people.json +done + +for i in {1..37}; +do +curl https://swapi.co/api/species/ >> species.json +done +#+END_src + +#+RESULTS: + +** Insertion of People IRI + +We insert formated name of people to create IRI of the form https://www.starwars.com/databank/luke-skywalker +#+BEGIN_src python :tangle people-iri.py + import json + from json import JSONDecoder, JSONDecodeError + import re + + NOT_WHITESPACE = re.compile(r'[^\s]') + + def decode_stacked(document, pos=0, decoder=JSONDecoder()): + while True: + match = NOT_WHITESPACE.search(document, pos) + if not match: + return + pos = match.start() + + try: + obj, pos = decoder.raw_decode(document, pos) + except JSONDecodeError: + # do something sensible if there's some error + raise + yield obj + + with open('people.json', newline='') as f, open('people-iri.json', 'w', newline='') as out: + for obj in decode_stacked(f.read()): + if 'name' in obj: + formated_name = obj['name'].lower().replace(" ", "-") + obj['formatedName'] = formated_name + json.dump(obj, out) + out.write('\n') +#+END_src + +** Loading in MongoDB + +We insert 37 starships and 86 people +#+BEGIN_src shell +mongoimport --drop -c=people -d=swapi --mode=merge --file=people.json +mongoimport --drop -c=starships -d=swapi --mode=merge --file=starships.json +mongoimport --drop -c=vehicles -d=swapi --mode=merge --file=vehicles.json +mongoimport --drop -c=species -d=swapi --mode=merge --file=species.json +#+END_src diff --git a/posts/tatooine-cq-plan-optimization/index.org b/posts/tatooine-cq-plan-optimization/index.org new file mode 100644 index 0000000000000000000000000000000000000000..ed0b378267556ea76701f2d64d24b159c2f8d5d5 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/index.org @@ -0,0 +1,163 @@ +#+TITLE: Tatooine Conjunctive Plan Optimization + +* Conjunctive Plan + +I propose to see plan optimizations on the following query on 1M triples BSBM dataset: +#+BEGIN_example +Q05<$offer, $vendor, $offerURL, $vendorName, $vendorHomepage> :- + triple($offer, <bsbm:vendor>, $vendor), + triple($offer, <bsbm:offerWebpage>, $offerURL), + triple($vendor, <rdfs:label>, $vendorName), + triple($vendor, <foaf:homepage>, $vendorHomepage); +#+END_example + +Its Tatooine execution plan is (you have to zoom on it): + +#+CAPTION: Query plan without optimization +[[file:runs/REW_2019-03-02-14-08-26-no-optimization/query-plan/Q05.png][file:runs/REW_2019-03-02-14-08-26-no-optimization/query-plan/Q05.png]] + +The query has 10 conjunctive rewritings according to the mappings. The execution plan computes the answers of the union of all rewritings. The query has 56200 answers which are computed in more than *10s* with the above plan. The plan has the following structure: + +1. at the root, there is a distinct block composed of two Uniq operators followed by MemorySort, +2. a Union operator, each of whose subplans computes answers of one rewriting, +3. for optimization, each rewriting plan starts with andistinct block, +4. a Project operator induced by answer variables of the rewriting, +5. HashJoin operators representing the joins in the conjunction of the rewritings, +6. Selection operators induced by constants in query, +7. a Skolem function block composed of a BindAccessEval operator with FunctionCallBindAccess operator, transforming the output of the left input of BindAccessEval, +8. an SQLEval operator evaluating the SQL view on the datasource. + +* Optimizations + +I brought the following optimizations: + +1. Pushing an operator into its SQLEval operator child or their SQLEval operators children. Only Selection, HashJoin and Projection can be pushed +2. Inverting a Skolem function block with its parent. Only Selection, HashJoin and Projection can be inverted in this way. +3. Removing useless operators or blocks appearing during optimization process. + +** Inverting Selection and Skolem function block + +The inversion is done as follows: +#+BEGIN_example +Selection Skolem + + Function + | ===> Block + v + + Skolem | + Function v + Block Selection +#+END_example + +** Inverting HashJoin and Skolem function blocks + +The inversion is done as follow: +#+BEGIN_example + HashJoin Skolem + + function + +-----+-----+ block + | | ===> + + v v | + Skolem Skolem v +function function HashJoin + block block + + +-------+ + | | +#+END_example + +The inversion is not possible, when the join is made on columns having different Skolem functions. In this case, we know that the join will not produce any answer, so replace it sub plan by an empty operator. + +#+CAPTION: Query plan where Selection and HashJoin have been inverted wrt the Skolem function block and pushed in SQLEval. The black boxes represent empty operators due to impossible inversions. The query plan is executed in less than *4s*. +[[file:runs/REW_2019-03-01-17-29-32-with-empty-op/query-plan/Q05.png][file:runs/REW_2019-03-01-17-29-32-with-empty-op/query-plan/Q05.png]] + +** Removing of Empty Sub-plans + +The introduced empty operators (joins over results of different Skolem functions -- these will never match) lead to empty sub-plans that can be removed. + +#+CAPTION: Query plan with its empty sub-plans removed. Its execution takes less than *3s*. +[[file:runs/REW_2019-03-02-15-16-27-rm-empty-op/query-plan/Q05.png][file:runs/REW_2019-03-02-15-16-27-rm-empty-op/query-plan/Q05.png]] + +** Inverting Projection with a Skolem Function Block + +The inversion is done as follows: +#+BEGIN_example +Projection Skolem + + Function + | ===> Block + v + + Skolem | + Function v + Block Projection +#+END_example + +#+CAPTION: Query plan where projection has been inverted with a Skolem function block. Its execution takes less than *2s*. +[[file:runs/REW_2019-03-02-15-19-39-proj-skolem-opt/query-plan/Q05.png][file:runs/REW_2019-03-02-15-19-39-proj-skolem-opt/query-plan/Q05.png]] + +** Removal of Useless Union Operators and Distinct Blocks + +We remove the union having one child and consecutive distinct blocks. + +#+CAPTION: Query plan whitout useless operators and blocks. Its execution takes less than *1,5s*. +[[file:runs/REW_2019-03-01-17-00-01-rm-redundant-distinct/query-plan/Q05.png][file:runs/REW_2019-03-01-17-00-01-rm-redundant-distinct/query-plan/Q05.png]] + +** Pushing Projection in SQLEval + +We change an SQLEval preceded by Projection, in order to push the projection in the SQL query. + +#+CAPTION: Query plan where projections are pushed into SQLEval operators. The execution takes less than *1s*. +[[file:runs/REW_2019-03-01-20-13-41-proj-sql-op/query-plan/Q05.png][file:runs/REW_2019-03-01-20-13-41-proj-sql-op/query-plan/Q05.png]] + +** Replacing Sort-Based Distinct Block by Hash-Based Distinct Operator + +#+CAPTION: Query plan where distinct block is replaced by HashDistinct operator. The execution takes around *300ms*. +[[file:runs/REW_2019-03-02-11-52-51-save-answers/query-plan/Q05.png][file:runs/REW_2019-03-02-11-52-51-save-answers/query-plan/Q05.png]] + +** Inverting Distinct with a Skolem Function Block + +The inversion is done as follows: + +#+BEGIN_example + Distinct Skolem + + Function + | ===> Block + v + + Skolem | + Function v + Block Distinct +#+END_example + +#+CAPTION: Query plan where distinct operator has been inverted with Skolem function block. Its execution takes around *300ms*. +[[file:runs/REW_2019-03-14-23-18-42/query-plan/Q05.png][file:runs/REW_2019-03-14-23-18-42/query-plan/Q05.png]] + +** Pushing Distinct in SQLEval + +#+CAPTION: Query plan where distinct operator has been inverted with Skolem function block. Its execution takes less than *300ms*. +[[file:runs/REW_2019-03-14-23-26-04/query-plan/Q05.png][file:runs/REW_2019-03-14-23-26-04/query-plan/Q05.png]] +** Inverting Union with Skolem Function Blocks + +Inverting Union with Skolem function blocks can be done by: +1. grouping same Skolem function blocks under the union, +2. add a projection to each input operator of Skolem function group to normalized its inputs (reordering and repeating columns), +3. create a union operator for the input of each group of functions +4. create a Skolem function blocks on top of each union of inputs +5. create union of each Skolem function blocks + +I propose to see plan optimizations on the following query on 1M triples BSBM dataset: + +#+BEGIN_example +Qt<$X> :- + triple($X, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductType1>); +#+END_example + +This query have 2810 answers and 96 rewritings, but all of this rewritings have use the same skolem function. + +#+CAPTION: Query plan where union operator has been inverted with Skolem function block. Its execution takes around 500ms. +[[file:runs/REW_2019-03-18-15-44-47/query-plan/Qt.png][file:runs/REW_2019-03-18-15-44-47/query-plan/Qt.png]] + +** Pushing Union In SQLEval + +#+CAPTION: Query plan where union operator has been pushed with SQLEval. Its execution takes less than 200ms. +[[file:runs/REW_2019-03-18-15-46-49/query-plan/Qt.png][file:runs/REW_2019-03-18-15-46-49/query-plan/Qt.png]] + + +** TODO Product +During rewriting product may appear when a join between atoms is "removed" by instantiating a query variable using constant of mappings head. diff --git a/posts/tatooine-cq-plan-optimization/runs/Makefile b/posts/tatooine-cq-plan-optimization/runs/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..6b26db91533829cac99d0b1cdd57791f8f127922 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/Makefile @@ -0,0 +1,13 @@ +dots := $(wildcard */query-plan/*.dot) + +pngs := $(patsubst %.dot, %.png, $(dots)) + +all: png + +png: $(pngs) + +%.png: %.dot + dot -Tpng $< > $@ + +clean: + rm $(pngs) diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-16-22-16-union-opt/query-plan/Q05.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-16-22-16-union-opt/query-plan/Q05.dot new file mode 100644 index 0000000000000000000000000000000000000000..4941029872c79661b109184becb2bbe6410ddac2 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-16-22-16-union-opt/query-plan/Q05.dot @@ -0,0 +1,22 @@ +digraph g{ graph[label = "16:22:41.807"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="Uniq", color = yellow] ; +1 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +0 -> 1 ; +2 [label="Uniq", color = yellow] ; +1 -> 2 ; +3 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +2 -> 3 ; +4 [label="BindAccessEval", color = yellow] ; +3 -> 4 ; +5 [label="Project +[0, 3, 19, 25, 30]", color = yellow] ; +4 -> 5 ; +6 [label="SQLQuery +SELECT tab_225.nr, tab_225.product, tab_225.producer, tab_225.vendor, tab_225.price, tab_225.validFrom, tab_225.validTo, tab_225.deliveryDays, tab_225.offerWebpage, tab_225.publisher, tab_225.publishDate, tab_224.nr, tab_224.product, tab_224.producer, tab_224.vendor, tab_224.price, tab_224.validFrom, tab_224.validTo, tab_224.deliveryDays, tab_224.offerWebpage, tab_224.publisher, tab_224.publishDate, tab_226.nr, tab_226.label, tab_226.comment, tab_226.homepage, tab_226.country, tab_226.publisher, tab_226.publishDate, tab_227.nr, tab_227.label, tab_227.comment, tab_227.homepage, tab_227.country, tab_227.publisher, tab_227.publishDate FROM + Offer AS tab_224, Offer AS tab_225, Vendor AS tab_226, Vendor AS tab_227 WHERE + tab_225.vendor = tab_224.vendor AND tab_225.nr = tab_224.nr AND tab_225.vendor = tab_226.nr AND tab_225.vendor = tab_226.nr AND tab_225.vendor = tab_227.nr AND tab_225.vendor = tab_227.nr", color = yellow] ; +5 -> 6 ; +7 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{1}/Offer{0}>, <bsbm-int:dataFromVendor{1}/Vendor{1}>, <{2}>, \"{4}\", <{3}>)", color = yellow] ; +4 -> 7 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-16-22-16-union-opt/query-plan/Q05.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-16-22-16-union-opt/query-plan/Q05.png new file mode 100644 index 0000000000000000000000000000000000000000..76509a681e80ca4b2ac0d2eecea27d00f3344763 Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-16-22-16-union-opt/query-plan/Q05.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-17-00-01-rm-redundant-distinct/query-plan/Q05.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-17-00-01-rm-redundant-distinct/query-plan/Q05.dot new file mode 100644 index 0000000000000000000000000000000000000000..c017352bec385ab4081451e142016147ed3e2e1f --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-17-00-01-rm-redundant-distinct/query-plan/Q05.dot @@ -0,0 +1,18 @@ +digraph g{ graph[label = "17:0:21.36"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="Uniq", color = yellow] ; +1 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +0 -> 1 ; +2 [label="BindAccessEval", color = yellow] ; +1 -> 2 ; +3 [label="Project +[0, 3, 7, 10, 26, 30]", color = yellow] ; +2 -> 3 ; +4 [label="SQLQuery +SELECT tab_242.nr, tab_242.label, tab_242.comment, tab_242.homepage, tab_242.country, tab_242.publisher, tab_242.publishDate, tab_241.nr, tab_241.product, tab_241.producer, tab_241.vendor, tab_241.price, tab_241.validFrom, tab_241.validTo, tab_241.deliveryDays, tab_241.offerWebpage, tab_241.publisher, tab_241.publishDate, tab_240.nr, tab_240.product, tab_240.producer, tab_240.vendor, tab_240.price, tab_240.validFrom, tab_240.validTo, tab_240.deliveryDays, tab_240.offerWebpage, tab_240.publisher, tab_240.publishDate, tab_243.nr, tab_243.label, tab_243.comment, tab_243.homepage, tab_243.country, tab_243.publisher, tab_243.publishDate FROM + Offer AS tab_240, Offer AS tab_241, Vendor AS tab_242, Vendor AS tab_243 WHERE + tab_242.nr = tab_241.vendor AND tab_242.nr = tab_241.vendor AND tab_241.vendor = tab_240.vendor AND tab_241.nr = tab_240.nr AND tab_242.nr = tab_243.nr AND tab_242.nr = tab_243.nr", color = yellow] ; +3 -> 4 ; +5 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{2}>, <bsbm-int:dataFromVendor{0}/Vendor{0}>, <{4}>, \"{5}\", <{1}>)", color = yellow] ; +2 -> 5 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-17-00-01-rm-redundant-distinct/query-plan/Q05.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-17-00-01-rm-redundant-distinct/query-plan/Q05.png new file mode 100644 index 0000000000000000000000000000000000000000..e9039ac1d0cd5bf26cd5ee131ceb431544e7bcad Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-17-00-01-rm-redundant-distinct/query-plan/Q05.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-17-29-32-with-empty-op/query-plan/Q05.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-17-29-32-with-empty-op/query-plan/Q05.dot new file mode 100644 index 0000000000000000000000000000000000000000..0a88465226270395d3e2b0a84fcb32d312b04a04 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-17-29-32-with-empty-op/query-plan/Q05.dot @@ -0,0 +1,182 @@ +digraph g{ graph[label = "17:30:27.761"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="Uniq", color = yellow] ; +1 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +0 -> 1 ; +2 [label="Union", color = yellow] ; +1 -> 2 ; +3 [label="Uniq", color = yellow] ; +2 -> 3 ; +4 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +3 -> 4 ; +5 [label="Project +[0, 2, 17, 28, 23]", color = yellow] ; +4 -> 5 ; +6 [label="HashJoin", color = yellow] ; +5 -> 6 ; +7 [label="(2113)"] ; +6 -> 7 ; +8 [label="BindAccessEval", color = yellow] ; +6 -> 8 ; +9 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +8 -> 9 ; +10 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +8 -> 10 ; +12 [label="Uniq", color = yellow] ; +2 -> 12 ; +13 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +12 -> 13 ; +14 [label="Project +[0, 2, 17, 21, 28]", color = yellow] ; +13 -> 14 ; +15 [label="HashJoin", color = yellow] ; +14 -> 15 ; +16 [label="(2126)"] ; +15 -> 16 ; +17 [label="BindAccessEval", color = yellow] ; +15 -> 17 ; +18 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +17 -> 18 ; +19 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +17 -> 19 ; +21 [label="Uniq", color = yellow] ; +2 -> 21 ; +22 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +21 -> 22 ; +23 [label="Project +[0, 2, 17, 21, 28]", color = yellow] ; +22 -> 23 ; +24 [label="HashJoin", color = yellow] ; +23 -> 24 ; +25 [label="(2139)"] ; +24 -> 25 ; +26 [label="BindAccessEval", color = yellow] ; +24 -> 26 ; +27 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Vendor", color = yellow] ; +26 -> 27 ; +28 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{0}/Vendor{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromVendor{5}/Vendor{5}>, \"{6}\")", color = yellow] ; +26 -> 28 ; +30 [label="Uniq", color = yellow] ; +2 -> 30 ; +31 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +30 -> 31 ; +32 [label="Project +[0, 12, 7, 28, 23]", color = yellow] ; +31 -> 32 ; +33 [label="(2159)"] ; +32 -> 33 ; +35 [label="Uniq", color = yellow] ; +2 -> 35 ; +36 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +35 -> 36 ; +37 [label="Project +[0, 12, 7, 21, 28]", color = yellow] ; +36 -> 37 ; +38 [label="HashJoin", color = yellow] ; +37 -> 38 ; +39 [label="(2170)"] ; +38 -> 39 ; +40 [label="BindAccessEval", color = yellow] ; +38 -> 40 ; +41 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Vendor", color = yellow] ; +40 -> 41 ; +42 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{0}/Vendor{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromVendor{5}/Vendor{5}>, \"{6}\")", color = yellow] ; +40 -> 42 ; +44 [label="Uniq", color = yellow] ; +2 -> 44 ; +45 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +44 -> 45 ; +46 [label="Project +[0, 12, 7, 21, 30]", color = yellow] ; +45 -> 46 ; +47 [label="(2190)"] ; +46 -> 47 ; +49 [label="Uniq", color = yellow] ; +2 -> 49 ; +50 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +49 -> 50 ; +51 [label="Project +[0, 12, 7, 21, 30]", color = yellow] ; +50 -> 51 ; +52 [label="BindAccessEval", color = yellow] ; +51 -> 52 ; +53 [label="SQLQuery +SELECT tab_236.nr, tab_236.product, tab_236.producer, tab_236.vendor, tab_236.price, tab_236.validFrom, tab_236.validTo, tab_236.deliveryDays, tab_236.offerWebpage, tab_236.publisher, tab_236.publishDate, tab_237.nr, tab_237.product, tab_237.producer, tab_237.vendor, tab_237.price, tab_237.validFrom, tab_237.validTo, tab_237.deliveryDays, tab_237.offerWebpage, tab_237.publisher, tab_237.publishDate, tab_238.nr, tab_238.label, tab_238.comment, tab_238.homepage, tab_238.country, tab_238.publisher, tab_238.publishDate, tab_239.nr, tab_239.label, tab_239.comment, tab_239.homepage, tab_239.country, tab_239.publisher, tab_239.publishDate FROM + Offer AS tab_237, Vendor AS tab_239, Offer AS tab_236, Vendor AS tab_238 WHERE + tab_236.vendor = tab_237.vendor AND tab_236.nr = tab_237.nr AND tab_237.vendor = tab_238.nr AND tab_237.vendor = tab_238.nr AND tab_237.vendor = tab_239.nr AND tab_237.vendor = tab_239.nr", color = yellow] ; +52 -> 53 ; +54 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\", <bsbm-int:dataFromVendor{14}/Offer{11}>, <bsbm-int:dataFromProducer{13}/Product{12}>, <bsbm-int:dataFromVendor{14}/Vendor{14}>, \"{15}\", \"{16}\", \"{17}\", \"{18}\", <{19}>, <bsbm-int:dataFromVendor{20}/Vendor{20}>, \"{21}\", <bsbm-int:dataFromVendor{22}/Vendor{22}>, \"{23}\", \"{24}\", <{25}>, <http://downlode.org/rdf/iso-3166/countries#{26}>, <bsbm-int:dataFromVendor{27}/Vendor{27}>, \"{28}\", <bsbm-int:dataFromVendor{29}/Vendor{29}>, \"{30}\", \"{31}\", <{32}>, <http://downlode.org/rdf/iso-3166/countries#{33}>, <bsbm-int:dataFromVendor{34}/Vendor{34}>, \"{35}\")", color = yellow] ; +52 -> 54 ; +56 [label="Uniq", color = yellow] ; +2 -> 56 ; +57 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +56 -> 57 ; +58 [label="Project +[7, 0, 24, 28, 3]", color = yellow] ; +57 -> 58 ; +59 [label="(2230)"] ; +58 -> 59 ; +61 [label="Uniq", color = yellow] ; +2 -> 61 ; +62 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +61 -> 62 ; +63 [label="Project +[0, 2, 17, 21, 28]", color = yellow] ; +62 -> 63 ; +64 [label="HashJoin", color = yellow] ; +63 -> 64 ; +65 [label="(2241)"] ; +64 -> 65 ; +66 [label="BindAccessEval", color = yellow] ; +64 -> 66 ; +67 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +66 -> 67 ; +68 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +66 -> 68 ; +70 [label="Uniq", color = yellow] ; +2 -> 70 ; +71 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +70 -> 71 ; +72 [label="Project +[7, 0, 24, 28, 3]", color = yellow] ; +71 -> 72 ; +73 [label="HashJoin", color = yellow] ; +72 -> 73 ; +74 [label="HashJoin", color = yellow] ; +73 -> 74 ; +75 [label="(2247)"] ; +74 -> 75 ; +76 [label="BindAccessEval", color = yellow] ; +74 -> 76 ; +77 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +76 -> 77 ; +78 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +76 -> 78 ; +79 [label="BindAccessEval", color = yellow] ; +73 -> 79 ; +80 [label="SQLQuery +SELECT nr, label, comment, producer, propertyNum1, propertyNum2, propertyNum3, propertyNum4, propertyNum5, propertyNum6, propertyTex1, propertyTex2, propertyTex3, propertyTex4, propertyTex5, propertyTex6, publisher, publishDate FROM + Product", color = yellow] ; +79 -> 80 ; +81 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{3}/Product{0}>, \"{1}\", \"{2}\", <bsbm-int:{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", \"{8}\", \"{9}\", \"{10}\", \"{11}\", \"{12}\", \"{13}\", \"{14}\", \"{15}\", \"{16}\", \"{17}\")", color = yellow] ; +79 -> 81 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-17-29-32-with-empty-op/query-plan/Q05.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-17-29-32-with-empty-op/query-plan/Q05.png new file mode 100644 index 0000000000000000000000000000000000000000..48b0b197ebe995bfd33a55249ed61069918f2e51 Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-17-29-32-with-empty-op/query-plan/Q05.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-20-13-41-proj-sql-op/query-plan/Q05.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-20-13-41-proj-sql-op/query-plan/Q05.dot new file mode 100644 index 0000000000000000000000000000000000000000..a8a8794fa788dcbc0c5d71d435c94f79705e4d53 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-20-13-41-proj-sql-op/query-plan/Q05.dot @@ -0,0 +1,15 @@ +digraph g{ graph[label = "20:13:51.985"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="Uniq", color = yellow] ; +1 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +0 -> 1 ; +2 [label="BindAccessEval", color = yellow] ; +1 -> 2 ; +3 [label="SQLQuery +SELECT tab_219.nr, tab_219.vendor, tab_219.offerWebpage, tab_220.vendor, tab_221.homepage, tab_222.label FROM + Offer AS tab_219, Offer AS tab_220, Vendor AS tab_222, Vendor AS tab_221 WHERE + tab_219.vendor = tab_220.vendor AND tab_219.nr = tab_220.nr AND tab_220.vendor = tab_221.nr AND tab_220.vendor = tab_221.nr AND tab_220.vendor = tab_222.nr AND tab_220.vendor = tab_222.nr", color = yellow] ; +2 -> 3 ; +4 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{1}/Offer{0}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, <{2}>, \"{5}\", <{4}>)", color = yellow] ; +2 -> 4 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-20-13-41-proj-sql-op/query-plan/Q05.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-20-13-41-proj-sql-op/query-plan/Q05.png new file mode 100644 index 0000000000000000000000000000000000000000..e44410f4d6ce074657c2ccce28cd771c1f005dba Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-01-20-13-41-proj-sql-op/query-plan/Q05.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-11-52-51-save-answers/query-plan/Q05.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-11-52-51-save-answers/query-plan/Q05.dot new file mode 100644 index 0000000000000000000000000000000000000000..f0783cd42416a35587a7ce60ce14f132dde14fd0 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-11-52-51-save-answers/query-plan/Q05.dot @@ -0,0 +1,13 @@ +digraph g{ graph[label = "11:52:52.725"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="HashDistinct", color = yellow] ; +1 [label="BindAccessEval", color = yellow] ; +0 -> 1 ; +2 [label="SQLQuery +SELECT tab_27.nr, tab_27.vendor, tab_28.offerWebpage, tab_29.homepage, tab_30.label FROM + Vendor AS tab_30, Offer AS tab_27, Offer AS tab_28, Vendor AS tab_29 WHERE + tab_27.vendor = tab_28.vendor AND tab_27.nr = tab_28.nr AND tab_27.vendor = tab_29.nr AND tab_27.vendor = tab_29.nr AND tab_27.vendor = tab_30.nr AND tab_27.vendor = tab_30.nr", color = yellow] ; +1 -> 2 ; +3 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{1}bsbm-int:dataFromVendor{0}/Offer>, <bsbm-int:dataFromVendor{1}bsbm-int:dataFromVendor{1}/Vendor>, <{2}>, \"{4}\", <{3}>)", color = yellow] ; +1 -> 3 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-11-52-51-save-answers/query-plan/Q05.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-11-52-51-save-answers/query-plan/Q05.png new file mode 100644 index 0000000000000000000000000000000000000000..ca3efa6a7fda24d962ab5ee769e0053c54a34c96 Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-11-52-51-save-answers/query-plan/Q05.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-13-42-33-with-empty-op/query-plan/Q05.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-13-42-33-with-empty-op/query-plan/Q05.dot new file mode 100644 index 0000000000000000000000000000000000000000..fb5ae876f5bd03478582b4884aacf683d4982816 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-13-42-33-with-empty-op/query-plan/Q05.dot @@ -0,0 +1,249 @@ +digraph g{ graph[label = "13:42:37.194"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="Uniq", color = yellow] ; +1 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +0 -> 1 ; +2 [label="Union", color = yellow] ; +1 -> 2 ; +3 [label="Uniq", color = yellow] ; +2 -> 3 ; +4 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +3 -> 4 ; +5 [label="Project +[25, 0, 42, 8, 3]", color = yellow] ; +4 -> 5 ; +6 [label="HashJoin + [[25PREDICATE_EQUAL35]]", color = yellow] ; +5 -> 6 ; +7 [label="HashJoin + [[0PREDICATE_EQUAL27]]", color = yellow] ; +6 -> 7 ; +8 [label="(276)"] ; +7 -> 8 ; +9 [label="BindAccessEval", color = yellow] ; +7 -> 9 ; +10 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +9 -> 10 ; +11 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +9 -> 11 ; +12 [label="BindAccessEval", color = yellow] ; +6 -> 12 ; +13 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +12 -> 13 ; +14 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +12 -> 14 ; +16 [label="Uniq", color = yellow] ; +2 -> 16 ; +17 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +16 -> 17 ; +18 [label="Project +[0, 12, 7, 28, 23]", color = yellow] ; +17 -> 18 ; +19 [label="(298)"] ; +18 -> 19 ; +21 [label="Uniq", color = yellow] ; +2 -> 21 ; +22 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +21 -> 22 ; +23 [label="Project +[0, 2, 17, 28, 23]", color = yellow] ; +22 -> 23 ; +24 [label="HashJoin + [[2PREDICATE_EQUAL27]]", color = yellow] ; +23 -> 24 ; +25 [label="(309)"] ; +24 -> 25 ; +26 [label="BindAccessEval", color = yellow] ; +24 -> 26 ; +27 [label="SQLQuery +SELECT nr, label, comment, publisher, publishDate FROM + ProductType", color = yellow] ; +26 -> 27 ; +28 [label="FunctionCallBindAccess +(<bsbm-int:ProductType{0}>, \"{1}\", \"{2}\", <bsbm-int:StandardizationInstitution{3}>, \"{4}\")", color = yellow] ; +26 -> 28 ; +30 [label="Uniq", color = yellow] ; +2 -> 30 ; +31 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +30 -> 31 ; +32 [label="Project +[14, 0, 31, 8, 3]", color = yellow] ; +31 -> 32 ; +33 [label="HashJoin + [[14PREDICATE_EQUAL24]]", color = yellow] ; +32 -> 33 ; +34 [label="HashJoin + [[0PREDICATE_EQUAL16]]", color = yellow] ; +33 -> 34 ; +35 [label="(315)"] ; +34 -> 35 ; +36 [label="BindAccessEval", color = yellow] ; +34 -> 36 ; +37 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +36 -> 37 ; +38 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +36 -> 38 ; +39 [label="BindAccessEval", color = yellow] ; +33 -> 39 ; +40 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +39 -> 40 ; +41 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +39 -> 41 ; +43 [label="Uniq", color = yellow] ; +2 -> 43 ; +44 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +43 -> 44 ; +45 [label="Project +[0, 12, 7, 21, 41]", color = yellow] ; +44 -> 45 ; +46 [label="HashJoin + [[12PREDICATE_EQUAL38]]", color = yellow] ; +45 -> 46 ; +47 [label="(330)"] ; +46 -> 47 ; +48 [label="BindAccessEval", color = yellow] ; +46 -> 48 ; +49 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +48 -> 49 ; +50 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +48 -> 50 ; +52 [label="Uniq", color = yellow] ; +2 -> 52 ; +53 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +52 -> 53 ; +54 [label="Project +[0, 12, 7, 28, 23]", color = yellow] ; +53 -> 54 ; +55 [label="HashJoin + [[12PREDICATE_EQUAL27]]", color = yellow] ; +54 -> 55 ; +56 [label="(343)"] ; +55 -> 56 ; +57 [label="BindAccessEval", color = yellow] ; +55 -> 57 ; +58 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Vendor", color = yellow] ; +57 -> 58 ; +59 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{0}/Vendor{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromVendor{5}/Vendor{5}>, \"{6}\")", color = yellow] ; +57 -> 59 ; +61 [label="Uniq", color = yellow] ; +2 -> 61 ; +62 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +61 -> 62 ; +63 [label="Project +[0, 12, 7, 28, 23]", color = yellow] ; +62 -> 63 ; +64 [label="BindAccessEval", color = yellow] ; +63 -> 64 ; +65 [label="SQLQuery +SELECT tab_33.nr, tab_33.product, tab_33.producer, tab_33.vendor, tab_33.price, tab_33.validFrom, tab_33.validTo, tab_33.deliveryDays, tab_33.offerWebpage, tab_33.publisher, tab_33.publishDate, tab_34.nr, tab_34.product, tab_34.producer, tab_34.vendor, tab_34.price, tab_34.validFrom, tab_34.validTo, tab_34.deliveryDays, tab_34.offerWebpage, tab_34.publisher, tab_34.publishDate, tab_35.nr, tab_35.label, tab_35.comment, tab_35.homepage, tab_35.country, tab_35.publisher, tab_35.publishDate, tab_36.nr, tab_36.label, tab_36.comment, tab_36.homepage, tab_36.country, tab_36.publisher, tab_36.publishDate FROM + Offer AS tab_33, Offer AS tab_34, Vendor AS tab_36, Vendor AS tab_35 WHERE + tab_33.vendor = tab_34.vendor AND tab_33.nr = tab_34.nr AND tab_34.vendor = tab_35.nr AND tab_34.vendor = tab_35.nr AND tab_34.vendor = tab_36.nr AND tab_34.vendor = tab_36.nr", color = yellow] ; +64 -> 65 ; +66 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\", <bsbm-int:dataFromVendor{14}/Offer{11}>, <bsbm-int:dataFromProducer{13}/Product{12}>, <bsbm-int:dataFromVendor{14}/Vendor{14}>, \"{15}\", \"{16}\", \"{17}\", \"{18}\", <{19}>, <bsbm-int:dataFromVendor{20}/Vendor{20}>, \"{21}\", <bsbm-int:dataFromVendor{22}/Vendor{22}>, \"{23}\", \"{24}\", <{25}>, <http://downlode.org/rdf/iso-3166/countries#{26}>, <bsbm-int:dataFromVendor{27}/Vendor{27}>, \"{28}\", <bsbm-int:dataFromVendor{29}/Vendor{29}>, \"{30}\", \"{31}\", <{32}>, <http://downlode.org/rdf/iso-3166/countries#{33}>, <bsbm-int:dataFromVendor{34}/Vendor{34}>, \"{35}\")", color = yellow] ; +64 -> 66 ; +68 [label="Uniq", color = yellow] ; +2 -> 68 ; +69 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +68 -> 69 ; +70 [label="Project +[0, 2, 17, 28, 23]", color = yellow] ; +69 -> 70 ; +71 [label="HashJoin + [[2PREDICATE_EQUAL27]]", color = yellow] ; +70 -> 71 ; +72 [label="(378)"] ; +71 -> 72 ; +73 [label="BindAccessEval", color = yellow] ; +71 -> 73 ; +74 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +73 -> 74 ; +75 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +73 -> 75 ; +77 [label="Uniq", color = yellow] ; +2 -> 77 ; +78 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +77 -> 78 ; +79 [label="Project +[5, 0, 22, 1, 28]", color = yellow] ; +78 -> 79 ; +80 [label="HashJoin + [[0PREDICATE_EQUAL25]]", color = yellow] ; +79 -> 80 ; +81 [label="HashJoin + [[5PREDICATE_EQUAL15]]", color = yellow] ; +80 -> 81 ; +82 [label="(384)"] ; +81 -> 82 ; +83 [label="BindAccessEval", color = yellow] ; +81 -> 83 ; +84 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +83 -> 84 ; +85 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +83 -> 85 ; +86 [label="BindAccessEval", color = yellow] ; +80 -> 86 ; +87 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +86 -> 87 ; +88 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +86 -> 88 ; +90 [label="Uniq", color = yellow] ; +2 -> 90 ; +91 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +90 -> 91 ; +92 [label="Project +[12, 0, 29, 8, 3]", color = yellow] ; +91 -> 92 ; +93 [label="HashJoin + [[12PREDICATE_EQUAL22]]", color = yellow] ; +92 -> 93 ; +94 [label="HashJoin + [[0PREDICATE_EQUAL14]]", color = yellow] ; +93 -> 94 ; +95 [label="(392)"] ; +94 -> 95 ; +96 [label="BindAccessEval", color = yellow] ; +94 -> 96 ; +97 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +96 -> 97 ; +98 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +96 -> 98 ; +99 [label="BindAccessEval", color = yellow] ; +93 -> 99 ; +100 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +99 -> 100 ; +101 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +99 -> 101 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-13-42-33-with-empty-op/query-plan/Q05.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-13-42-33-with-empty-op/query-plan/Q05.png new file mode 100644 index 0000000000000000000000000000000000000000..b353cc6e8f9bb12aee0c82aedeeb314fb2ecdbe4 Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-13-42-33-with-empty-op/query-plan/Q05.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-14-08-26-no-optimization/query-plan/Q05.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-14-08-26-no-optimization/query-plan/Q05.dot new file mode 100644 index 0000000000000000000000000000000000000000..76d6804e31ce66df86f09c0a5ae002b6212f266b --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-14-08-26-no-optimization/query-plan/Q05.dot @@ -0,0 +1,527 @@ +digraph g{ graph[label = "14:8:28.335"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="Uniq", color = yellow] ; +1 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +0 -> 1 ; +2 [label="Union", color = yellow] ; +1 -> 2 ; +3 [label="Uniq", color = yellow] ; +2 -> 3 ; +4 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +3 -> 4 ; +5 [label="Project +[0, 12, 7, 28, 23]", color = yellow] ; +4 -> 5 ; +6 [label="HashJoin + [[12PREDICATE_EQUAL27]]", color = yellow] ; +5 -> 6 ; +7 [label="HashJoin + [[12PREDICATE_EQUAL20]]", color = yellow] ; +6 -> 7 ; +8 [label="HashJoin + [[0PREDICATE_EQUAL10]]", color = yellow] ; +7 -> 8 ; +9 [label="BindAccessEval", color = yellow] ; +8 -> 9 ; +10 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +9 -> 10 ; +11 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +9 -> 11 ; +12 [label="BindAccessEval", color = yellow] ; +8 -> 12 ; +13 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +12 -> 13 ; +14 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +12 -> 14 ; +15 [label="BindAccessEval", color = yellow] ; +7 -> 15 ; +16 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Vendor", color = yellow] ; +15 -> 16 ; +17 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{0}/Vendor{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromVendor{5}/Vendor{5}>, \"{6}\")", color = yellow] ; +15 -> 17 ; +18 [label="BindAccessEval", color = yellow] ; +6 -> 18 ; +19 [label="SQLQuery +SELECT nr, label, comment, publisher, publishDate FROM + ProductFeature", color = yellow] ; +18 -> 19 ; +20 [label="FunctionCallBindAccess +(<bsbm-int:ProductFeature{0}>, \"{1}\", \"{2}\", <bsbm-int:StandardizationInstitution{3}>, \"{4}\")", color = yellow] ; +18 -> 20 ; +22 [label="Uniq", color = yellow] ; +2 -> 22 ; +23 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +22 -> 23 ; +24 [label="Project +[14, 0, 31, 8, 3]", color = yellow] ; +23 -> 24 ; +25 [label="HashJoin + [[14PREDICATE_EQUAL24]]", color = yellow] ; +24 -> 25 ; +26 [label="HashJoin + [[0PREDICATE_EQUAL16]]", color = yellow] ; +25 -> 26 ; +27 [label="HashJoin + [[0PREDICATE_EQUAL7]]", color = yellow] ; +26 -> 27 ; +28 [label="BindAccessEval", color = yellow] ; +27 -> 28 ; +29 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Vendor", color = yellow] ; +28 -> 29 ; +30 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{0}/Vendor{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromVendor{5}/Vendor{5}>, \"{6}\")", color = yellow] ; +28 -> 30 ; +31 [label="BindAccessEval", color = yellow] ; +27 -> 31 ; +32 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +31 -> 32 ; +33 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +31 -> 33 ; +34 [label="BindAccessEval", color = yellow] ; +26 -> 34 ; +35 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +34 -> 35 ; +36 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +34 -> 36 ; +37 [label="BindAccessEval", color = yellow] ; +25 -> 37 ; +38 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +37 -> 38 ; +39 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +37 -> 39 ; +41 [label="Uniq", color = yellow] ; +2 -> 41 ; +42 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +41 -> 42 ; +43 [label="Project +[7, 0, 24, 1, 30]", color = yellow] ; +42 -> 43 ; +44 [label="HashJoin + [[0PREDICATE_EQUAL27]]", color = yellow] ; +43 -> 44 ; +45 [label="HashJoin + [[7PREDICATE_EQUAL17]]", color = yellow] ; +44 -> 45 ; +46 [label="HashJoin + [[0PREDICATE_EQUAL9]]", color = yellow] ; +45 -> 46 ; +47 [label="BindAccessEval", color = yellow] ; +46 -> 47 ; +48 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +47 -> 48 ; +49 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +47 -> 49 ; +50 [label="BindAccessEval", color = yellow] ; +46 -> 50 ; +51 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +50 -> 51 ; +52 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +50 -> 52 ; +53 [label="BindAccessEval", color = yellow] ; +45 -> 53 ; +54 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +53 -> 54 ; +55 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +53 -> 55 ; +56 [label="BindAccessEval", color = yellow] ; +44 -> 56 ; +57 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +56 -> 57 ; +58 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +56 -> 58 ; +60 [label="Uniq", color = yellow] ; +2 -> 60 ; +61 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +60 -> 61 ; +62 [label="Project +[0, 12, 7, 21, 28]", color = yellow] ; +61 -> 62 ; +63 [label="HashJoin + [[12PREDICATE_EQUAL25]]", color = yellow] ; +62 -> 63 ; +64 [label="HashJoin + [[12PREDICATE_EQUAL20]]", color = yellow] ; +63 -> 64 ; +65 [label="HashJoin + [[0PREDICATE_EQUAL10]]", color = yellow] ; +64 -> 65 ; +66 [label="BindAccessEval", color = yellow] ; +65 -> 66 ; +67 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +66 -> 67 ; +68 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +66 -> 68 ; +69 [label="BindAccessEval", color = yellow] ; +65 -> 69 ; +70 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +69 -> 70 ; +71 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +69 -> 71 ; +72 [label="BindAccessEval", color = yellow] ; +64 -> 72 ; +73 [label="SQLQuery +SELECT nr, label, comment, publisher, publishDate FROM + ProductType", color = yellow] ; +72 -> 73 ; +74 [label="FunctionCallBindAccess +(<bsbm-int:ProductType{0}>, \"{1}\", \"{2}\", <bsbm-int:StandardizationInstitution{3}>, \"{4}\")", color = yellow] ; +72 -> 74 ; +75 [label="BindAccessEval", color = yellow] ; +63 -> 75 ; +76 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +75 -> 76 ; +77 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +75 -> 77 ; +79 [label="Uniq", color = yellow] ; +2 -> 79 ; +80 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +79 -> 80 ; +81 [label="Project +[12, 0, 29, 1, 8]", color = yellow] ; +80 -> 81 ; +82 [label="HashJoin + [[12PREDICATE_EQUAL22]]", color = yellow] ; +81 -> 82 ; +83 [label="HashJoin + [[0PREDICATE_EQUAL14]]", color = yellow] ; +82 -> 83 ; +84 [label="HashJoin + [[0PREDICATE_EQUAL5]]", color = yellow] ; +83 -> 84 ; +85 [label="BindAccessEval", color = yellow] ; +84 -> 85 ; +86 [label="SQLQuery +SELECT nr, label, comment, publisher, publishDate FROM + ProductFeature", color = yellow] ; +85 -> 86 ; +87 [label="FunctionCallBindAccess +(<bsbm-int:ProductFeature{0}>, \"{1}\", \"{2}\", <bsbm-int:StandardizationInstitution{3}>, \"{4}\")", color = yellow] ; +85 -> 87 ; +88 [label="BindAccessEval", color = yellow] ; +84 -> 88 ; +89 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +88 -> 89 ; +90 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +88 -> 90 ; +91 [label="BindAccessEval", color = yellow] ; +83 -> 91 ; +92 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +91 -> 92 ; +93 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +91 -> 93 ; +94 [label="BindAccessEval", color = yellow] ; +82 -> 94 ; +95 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +94 -> 95 ; +96 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +94 -> 96 ; +98 [label="Uniq", color = yellow] ; +2 -> 98 ; +99 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +98 -> 99 ; +100 [label="Project +[0, 2, 17, 21, 28]", color = yellow] ; +99 -> 100 ; +101 [label="HashJoin + [[2PREDICATE_EQUAL25]]", color = yellow] ; +100 -> 101 ; +102 [label="HashJoin + [[2PREDICATE_EQUAL20]]", color = yellow] ; +101 -> 102 ; +103 [label="HashJoin + [[0PREDICATE_EQUAL10]]", color = yellow] ; +102 -> 103 ; +104 [label="BindAccessEval", color = yellow] ; +103 -> 104 ; +105 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +104 -> 105 ; +106 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +104 -> 106 ; +107 [label="BindAccessEval", color = yellow] ; +103 -> 107 ; +108 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +107 -> 108 ; +109 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +107 -> 109 ; +110 [label="BindAccessEval", color = yellow] ; +102 -> 110 ; +111 [label="SQLQuery +SELECT nr, label, comment, publisher, publishDate FROM + ProductType", color = yellow] ; +110 -> 111 ; +112 [label="FunctionCallBindAccess +(<bsbm-int:ProductType{0}>, \"{1}\", \"{2}\", <bsbm-int:StandardizationInstitution{3}>, \"{4}\")", color = yellow] ; +110 -> 112 ; +113 [label="BindAccessEval", color = yellow] ; +101 -> 113 ; +114 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Vendor", color = yellow] ; +113 -> 114 ; +115 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{0}/Vendor{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromVendor{5}/Vendor{5}>, \"{6}\")", color = yellow] ; +113 -> 115 ; +117 [label="Uniq", color = yellow] ; +2 -> 117 ; +118 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +117 -> 118 ; +119 [label="Project +[0, 2, 17, 21, 30]", color = yellow] ; +118 -> 119 ; +120 [label="HashJoin + [[2PREDICATE_EQUAL27]]", color = yellow] ; +119 -> 120 ; +121 [label="HashJoin + [[2PREDICATE_EQUAL20]]", color = yellow] ; +120 -> 121 ; +122 [label="HashJoin + [[0PREDICATE_EQUAL10]]", color = yellow] ; +121 -> 122 ; +123 [label="BindAccessEval", color = yellow] ; +122 -> 123 ; +124 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +123 -> 124 ; +125 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +123 -> 125 ; +126 [label="BindAccessEval", color = yellow] ; +122 -> 126 ; +127 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +126 -> 127 ; +128 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +126 -> 128 ; +129 [label="BindAccessEval", color = yellow] ; +121 -> 129 ; +130 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Vendor", color = yellow] ; +129 -> 130 ; +131 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{0}/Vendor{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromVendor{5}/Vendor{5}>, \"{6}\")", color = yellow] ; +129 -> 131 ; +132 [label="BindAccessEval", color = yellow] ; +120 -> 132 ; +133 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Vendor", color = yellow] ; +132 -> 133 ; +134 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{0}/Vendor{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromVendor{5}/Vendor{5}>, \"{6}\")", color = yellow] ; +132 -> 134 ; +136 [label="Uniq", color = yellow] ; +2 -> 136 ; +137 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +136 -> 137 ; +138 [label="Project +[0, 2, 17, 28, 23]", color = yellow] ; +137 -> 138 ; +139 [label="HashJoin + [[2PREDICATE_EQUAL27]]", color = yellow] ; +138 -> 139 ; +140 [label="HashJoin + [[2PREDICATE_EQUAL20]]", color = yellow] ; +139 -> 140 ; +141 [label="HashJoin + [[0PREDICATE_EQUAL10]]", color = yellow] ; +140 -> 141 ; +142 [label="BindAccessEval", color = yellow] ; +141 -> 142 ; +143 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +142 -> 143 ; +144 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +142 -> 144 ; +145 [label="BindAccessEval", color = yellow] ; +141 -> 145 ; +146 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +145 -> 146 ; +147 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +145 -> 147 ; +148 [label="BindAccessEval", color = yellow] ; +140 -> 148 ; +149 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +148 -> 149 ; +150 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +148 -> 150 ; +151 [label="BindAccessEval", color = yellow] ; +139 -> 151 ; +152 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Vendor", color = yellow] ; +151 -> 152 ; +153 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{0}/Vendor{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromVendor{5}/Vendor{5}>, \"{6}\")", color = yellow] ; +151 -> 153 ; +155 [label="Uniq", color = yellow] ; +2 -> 155 ; +156 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +155 -> 156 ; +157 [label="Project +[7, 0, 24, 28, 3]", color = yellow] ; +156 -> 157 ; +158 [label="HashJoin + [[0PREDICATE_EQUAL27]]", color = yellow] ; +157 -> 158 ; +159 [label="HashJoin + [[7PREDICATE_EQUAL17]]", color = yellow] ; +158 -> 159 ; +160 [label="HashJoin + [[0PREDICATE_EQUAL9]]", color = yellow] ; +159 -> 160 ; +161 [label="BindAccessEval", color = yellow] ; +160 -> 161 ; +162 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Producer", color = yellow] ; +161 -> 162 ; +163 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{0}/Producer{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromProducer{5}/Producer{5}>, \"{6}\")", color = yellow] ; +161 -> 163 ; +164 [label="BindAccessEval", color = yellow] ; +160 -> 164 ; +165 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +164 -> 165 ; +166 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +164 -> 166 ; +167 [label="BindAccessEval", color = yellow] ; +159 -> 167 ; +168 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +167 -> 168 ; +169 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +167 -> 169 ; +170 [label="BindAccessEval", color = yellow] ; +158 -> 170 ; +171 [label="SQLQuery +SELECT nr, label, comment, producer, propertyNum1, propertyNum2, propertyNum3, propertyNum4, propertyNum5, propertyNum6, propertyTex1, propertyTex2, propertyTex3, propertyTex4, propertyTex5, propertyTex6, publisher, publishDate FROM + Product", color = yellow] ; +170 -> 171 ; +172 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{3}/Product{0}>, \"{1}\", \"{2}\", <bsbm-int:{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", \"{8}\", \"{9}\", \"{10}\", \"{11}\", \"{12}\", \"{13}\", \"{14}\", \"{15}\", \"{16}\", \"{17}\")", color = yellow] ; +170 -> 172 ; +174 [label="Uniq", color = yellow] ; +2 -> 174 ; +175 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +174 -> 175 ; +176 [label="Project +[0, 2, 17, 28, 23]", color = yellow] ; +175 -> 176 ; +177 [label="HashJoin + [[2PREDICATE_EQUAL27]]", color = yellow] ; +176 -> 177 ; +178 [label="HashJoin + [[2PREDICATE_EQUAL20]]", color = yellow] ; +177 -> 178 ; +179 [label="HashJoin + [[0PREDICATE_EQUAL10]]", color = yellow] ; +178 -> 179 ; +180 [label="BindAccessEval", color = yellow] ; +179 -> 180 ; +181 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +180 -> 181 ; +182 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +180 -> 182 ; +183 [label="BindAccessEval", color = yellow] ; +179 -> 183 ; +184 [label="SQLQuery +SELECT nr, product, producer, vendor, price, validFrom, validTo, deliveryDays, offerWebpage, publisher, publishDate FROM + Offer", color = yellow] ; +183 -> 184 ; +185 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\")", color = yellow] ; +183 -> 185 ; +186 [label="BindAccessEval", color = yellow] ; +178 -> 186 ; +187 [label="SQLQuery +SELECT nr, label, comment, homepage, country, publisher, publishDate FROM + Vendor", color = yellow] ; +186 -> 187 ; +188 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{0}/Vendor{0}>, \"{1}\", \"{2}\", <{3}>, <http://downlode.org/rdf/iso-3166/countries#{4}>, <bsbm-int:dataFromVendor{5}/Vendor{5}>, \"{6}\")", color = yellow] ; +186 -> 188 ; +189 [label="BindAccessEval", color = yellow] ; +177 -> 189 ; +190 [label="SQLQuery +SELECT nr, label, comment, producer, propertyNum1, propertyNum2, propertyNum3, propertyNum4, propertyNum5, propertyNum6, propertyTex1, propertyTex2, propertyTex3, propertyTex4, propertyTex5, propertyTex6, publisher, publishDate FROM + Product", color = yellow] ; +189 -> 190 ; +191 [label="FunctionCallBindAccess +(<bsbm-int:dataFromProducer{3}/Product{0}>, \"{1}\", \"{2}\", <bsbm-int:{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", \"{8}\", \"{9}\", \"{10}\", \"{11}\", \"{12}\", \"{13}\", \"{14}\", \"{15}\", \"{16}\", \"{17}\")", color = yellow] ; +189 -> 191 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-14-08-26-no-optimization/query-plan/Q05.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-14-08-26-no-optimization/query-plan/Q05.png new file mode 100644 index 0000000000000000000000000000000000000000..c8fd35ebc7cb87ea4356ffb225b046b62e36a803 Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-14-08-26-no-optimization/query-plan/Q05.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-15-16-27-rm-empty-op/query-plan/Q05.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-15-16-27-rm-empty-op/query-plan/Q05.dot new file mode 100644 index 0000000000000000000000000000000000000000..91486ec52e54ec4c604fce3ccda918744911f08d --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-15-16-27-rm-empty-op/query-plan/Q05.dot @@ -0,0 +1,24 @@ +digraph g{ graph[label = "15:16:31.253"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="Uniq", color = yellow] ; +1 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +0 -> 1 ; +2 [label="Union", color = yellow] ; +1 -> 2 ; +3 [label="Uniq", color = yellow] ; +2 -> 3 ; +4 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +3 -> 4 ; +5 [label="Project +[0, 2, 17, 21, 30]", color = yellow] ; +4 -> 5 ; +6 [label="BindAccessEval", color = yellow] ; +5 -> 6 ; +7 [label="SQLQuery +SELECT tab_29.nr, tab_29.product, tab_29.producer, tab_29.vendor, tab_29.price, tab_29.validFrom, tab_29.validTo, tab_29.deliveryDays, tab_29.offerWebpage, tab_29.publisher, tab_29.publishDate, tab_30.nr, tab_30.product, tab_30.producer, tab_30.vendor, tab_30.price, tab_30.validFrom, tab_30.validTo, tab_30.deliveryDays, tab_30.offerWebpage, tab_30.publisher, tab_30.publishDate, tab_31.nr, tab_31.label, tab_31.comment, tab_31.homepage, tab_31.country, tab_31.publisher, tab_31.publishDate, tab_32.nr, tab_32.label, tab_32.comment, tab_32.homepage, tab_32.country, tab_32.publisher, tab_32.publishDate FROM + Offer AS tab_30, Vendor AS tab_32, Vendor AS tab_31, Offer AS tab_29 WHERE + tab_29.vendor = tab_30.vendor AND tab_29.nr = tab_30.nr AND tab_29.vendor = tab_31.nr AND tab_29.vendor = tab_31.nr AND tab_29.vendor = tab_32.nr AND tab_29.vendor = tab_32.nr", color = yellow] ; +6 -> 7 ; +8 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{3}/Offer{0}>, <bsbm-int:dataFromProducer{2}/Product{1}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, \"{4}\", \"{5}\", \"{6}\", \"{7}\", <{8}>, <bsbm-int:dataFromVendor{9}/Vendor{9}>, \"{10}\", <bsbm-int:dataFromVendor{14}/Offer{11}>, <bsbm-int:dataFromProducer{13}/Product{12}>, <bsbm-int:dataFromVendor{14}/Vendor{14}>, \"{15}\", \"{16}\", \"{17}\", \"{18}\", <{19}>, <bsbm-int:dataFromVendor{20}/Vendor{20}>, \"{21}\", <bsbm-int:dataFromVendor{22}/Vendor{22}>, \"{23}\", \"{24}\", <{25}>, <http://downlode.org/rdf/iso-3166/countries#{26}>, <bsbm-int:dataFromVendor{27}/Vendor{27}>, \"{28}\", <bsbm-int:dataFromVendor{29}/Vendor{29}>, \"{30}\", \"{31}\", <{32}>, <http://downlode.org/rdf/iso-3166/countries#{33}>, <bsbm-int:dataFromVendor{34}/Vendor{34}>, \"{35}\")", color = yellow] ; +6 -> 8 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-15-16-27-rm-empty-op/query-plan/Q05.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-15-16-27-rm-empty-op/query-plan/Q05.png new file mode 100644 index 0000000000000000000000000000000000000000..19ddf1fd741ef249813a0c45b8afd2c3b6819384 Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-15-16-27-rm-empty-op/query-plan/Q05.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-15-19-39-proj-skolem-opt/query-plan/Q05.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-15-19-39-proj-skolem-opt/query-plan/Q05.dot new file mode 100644 index 0000000000000000000000000000000000000000..4fa0471affb54de840db97b54708f81e72a763c4 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-15-19-39-proj-skolem-opt/query-plan/Q05.dot @@ -0,0 +1,24 @@ +digraph g{ graph[label = "15:19:42.883"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="Uniq", color = yellow] ; +1 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +0 -> 1 ; +2 [label="Union", color = yellow] ; +1 -> 2 ; +3 [label="Uniq", color = yellow] ; +2 -> 3 ; +4 [label="MemSort[0,1,2,3,4]{}", color = yellow] ; +3 -> 4 ; +5 [label="BindAccessEval", color = yellow] ; +4 -> 5 ; +6 [label="Project +[0, 3, 8, 14, 25, 30]", color = yellow] ; +5 -> 6 ; +7 [label="SQLQuery +SELECT tab_33.nr, tab_33.product, tab_33.producer, tab_33.vendor, tab_33.price, tab_33.validFrom, tab_33.validTo, tab_33.deliveryDays, tab_33.offerWebpage, tab_33.publisher, tab_33.publishDate, tab_34.nr, tab_34.product, tab_34.producer, tab_34.vendor, tab_34.price, tab_34.validFrom, tab_34.validTo, tab_34.deliveryDays, tab_34.offerWebpage, tab_34.publisher, tab_34.publishDate, tab_35.nr, tab_35.label, tab_35.comment, tab_35.homepage, tab_35.country, tab_35.publisher, tab_35.publishDate, tab_36.nr, tab_36.label, tab_36.comment, tab_36.homepage, tab_36.country, tab_36.publisher, tab_36.publishDate FROM + Offer AS tab_33, Offer AS tab_34, Vendor AS tab_36, Vendor AS tab_35 WHERE + tab_33.vendor = tab_34.vendor AND tab_33.nr = tab_34.nr AND tab_34.vendor = tab_35.nr AND tab_34.vendor = tab_35.nr AND tab_34.vendor = tab_36.nr AND tab_34.vendor = tab_36.nr", color = yellow] ; +6 -> 7 ; +8 [label="FunctionCallBindAccess +(<bsbm-int:dataFromVendor{1}/Offer{0}>, <bsbm-int:dataFromVendor{3}/Vendor{3}>, <{2}>, \"{5}\", <{4}>)", color = yellow] ; +5 -> 8 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-15-19-39-proj-skolem-opt/query-plan/Q05.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-15-19-39-proj-skolem-opt/query-plan/Q05.png new file mode 100644 index 0000000000000000000000000000000000000000..ab503820e69870efd7b3f1cbb2cd98533d80351b Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-02-15-19-39-proj-skolem-opt/query-plan/Q05.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-14-23-18-42/query-plan/Q05.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-14-23-18-42/query-plan/Q05.dot new file mode 100644 index 0000000000000000000000000000000000000000..f98e1b5649eed79a966dbf1d8d4b95d4047d90b4 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-14-23-18-42/query-plan/Q05.dot @@ -0,0 +1,13 @@ +digraph g{ graph[label = "23:18:44.651"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="BindAccessEval", color = yellow] ; +1 [label="HashDistinct", color = yellow] ; +0 -> 1 ; +2 [label="SQLQuery +SELECT tab_28.nr, tab_28.label, tab_29.homepage, tab_30.nr, tab_30.vendor, tab_31.offerWebpage FROM + Offer AS tab_30, Offer AS tab_31, Vendor AS tab_29, Vendor AS tab_28 WHERE + tab_28.nr = tab_29.nr AND tab_28.nr = tab_29.nr AND tab_28.nr = tab_30.vendor AND tab_28.nr = tab_30.vendor AND tab_30.vendor = tab_31.vendor AND tab_30.nr = tab_31.nr", color = yellow] ; +1 -> 2 ; +3 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor{4}http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor{3}/Offer>, <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor{0}http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor{0}/Vendor>, <{5}>, \"{1}\", <{2}>)", color = yellow] ; +0 -> 3 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-14-23-18-42/query-plan/Q05.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-14-23-18-42/query-plan/Q05.png new file mode 100644 index 0000000000000000000000000000000000000000..18de2d359240d1750183e700f3e08f2461ed8b38 Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-14-23-18-42/query-plan/Q05.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-14-23-26-04/query-plan/Q05.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-14-23-26-04/query-plan/Q05.dot new file mode 100644 index 0000000000000000000000000000000000000000..c44eea0d4523af6e349f25e6750b07edd52f0612 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-14-23-26-04/query-plan/Q05.dot @@ -0,0 +1,11 @@ +digraph g{ graph[label = "23:26:6.923"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="BindAccessEval", color = yellow] ; +1 [label="SQLQuery +SELECT DISTINCT tab_24.nr, tab_24.vendor, tab_23.offerWebpage, tab_25.label, tab_26.homepage FROM + Offer AS tab_23, Offer AS tab_24, Vendor AS tab_25, Vendor AS tab_26 WHERE + tab_24.vendor = tab_23.vendor AND tab_24.nr = tab_23.nr AND tab_24.vendor = tab_25.nr AND tab_24.vendor = tab_25.nr AND tab_24.vendor = tab_26.nr AND tab_24.vendor = tab_26.nr", color = yellow] ; +0 -> 1 ; +2 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor{1}http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor{0}/Offer>, <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor{1}http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor{1}/Vendor>, <{2}>, \"{3}\", <{4}>)", color = yellow] ; +0 -> 2 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-14-23-26-04/query-plan/Q05.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-14-23-26-04/query-plan/Q05.png new file mode 100644 index 0000000000000000000000000000000000000000..6abecfb3f8728e0f65d1ec93f0f0d1409c6d9f24 Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-14-23-26-04/query-plan/Q05.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-43-12/query-plan/Qt.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-43-12/query-plan/Qt.dot new file mode 100644 index 0000000000000000000000000000000000000000..a31a79e0bde40ac7ecf7248e15fd4f461e251ee5 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-43-12/query-plan/Qt.dot @@ -0,0 +1,965 @@ +digraph g{ graph[label = "15:43:13.493"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="HashDistinct", color = yellow] ; +1 [label="Union", color = yellow] ; +0 -> 1 ; +2 [label="BindAccessEval", color = yellow] ; +1 -> 2 ; +3 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 137 AND PT.product = P.nr", color = yellow] ; +2 -> 3 ; +4 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +2 -> 4 ; +6 [label="BindAccessEval", color = yellow] ; +1 -> 6 ; +7 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 98 AND PT.product = P.nr", color = yellow] ; +6 -> 7 ; +8 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +6 -> 8 ; +10 [label="BindAccessEval", color = yellow] ; +1 -> 10 ; +11 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 145 AND PT.product = P.nr", color = yellow] ; +10 -> 11 ; +12 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +10 -> 12 ; +14 [label="BindAccessEval", color = yellow] ; +1 -> 14 ; +15 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 80 AND PT.product = P.nr", color = yellow] ; +14 -> 15 ; +16 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +14 -> 16 ; +18 [label="BindAccessEval", color = yellow] ; +1 -> 18 ; +19 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 77 AND PT.product = P.nr", color = yellow] ; +18 -> 19 ; +20 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +18 -> 20 ; +22 [label="BindAccessEval", color = yellow] ; +1 -> 22 ; +23 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 133 AND PT.product = P.nr", color = yellow] ; +22 -> 23 ; +24 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +22 -> 24 ; +26 [label="BindAccessEval", color = yellow] ; +1 -> 26 ; +27 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 65 AND PT.product = P.nr", color = yellow] ; +26 -> 27 ; +28 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +26 -> 28 ; +30 [label="BindAccessEval", color = yellow] ; +1 -> 30 ; +31 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 110 AND PT.product = P.nr", color = yellow] ; +30 -> 31 ; +32 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +30 -> 32 ; +34 [label="BindAccessEval", color = yellow] ; +1 -> 34 ; +35 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 81 AND PT.product = P.nr", color = yellow] ; +34 -> 35 ; +36 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +34 -> 36 ; +38 [label="BindAccessEval", color = yellow] ; +1 -> 38 ; +39 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 75 AND PT.product = P.nr", color = yellow] ; +38 -> 39 ; +40 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +38 -> 40 ; +42 [label="BindAccessEval", color = yellow] ; +1 -> 42 ; +43 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 62 AND PT.product = P.nr", color = yellow] ; +42 -> 43 ; +44 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +42 -> 44 ; +46 [label="BindAccessEval", color = yellow] ; +1 -> 46 ; +47 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 112 AND PT.product = P.nr", color = yellow] ; +46 -> 47 ; +48 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +46 -> 48 ; +50 [label="BindAccessEval", color = yellow] ; +1 -> 50 ; +51 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 84 AND PT.product = P.nr", color = yellow] ; +50 -> 51 ; +52 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +50 -> 52 ; +54 [label="BindAccessEval", color = yellow] ; +1 -> 54 ; +55 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 147 AND PT.product = P.nr", color = yellow] ; +54 -> 55 ; +56 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +54 -> 56 ; +58 [label="BindAccessEval", color = yellow] ; +1 -> 58 ; +59 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 138 AND PT.product = P.nr", color = yellow] ; +58 -> 59 ; +60 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +58 -> 60 ; +62 [label="BindAccessEval", color = yellow] ; +1 -> 62 ; +63 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 63 AND PT.product = P.nr", color = yellow] ; +62 -> 63 ; +64 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +62 -> 64 ; +66 [label="BindAccessEval", color = yellow] ; +1 -> 66 ; +67 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 128 AND PT.product = P.nr", color = yellow] ; +66 -> 67 ; +68 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +66 -> 68 ; +70 [label="BindAccessEval", color = yellow] ; +1 -> 70 ; +71 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 144 AND PT.product = P.nr", color = yellow] ; +70 -> 71 ; +72 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +70 -> 72 ; +74 [label="BindAccessEval", color = yellow] ; +1 -> 74 ; +75 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 72 AND PT.product = P.nr", color = yellow] ; +74 -> 75 ; +76 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +74 -> 76 ; +78 [label="BindAccessEval", color = yellow] ; +1 -> 78 ; +79 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 94 AND PT.product = P.nr", color = yellow] ; +78 -> 79 ; +80 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +78 -> 80 ; +82 [label="BindAccessEval", color = yellow] ; +1 -> 82 ; +83 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 118 AND PT.product = P.nr", color = yellow] ; +82 -> 83 ; +84 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +82 -> 84 ; +86 [label="BindAccessEval", color = yellow] ; +1 -> 86 ; +87 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 134 AND PT.product = P.nr", color = yellow] ; +86 -> 87 ; +88 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +86 -> 88 ; +90 [label="BindAccessEval", color = yellow] ; +1 -> 90 ; +91 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 119 AND PT.product = P.nr", color = yellow] ; +90 -> 91 ; +92 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +90 -> 92 ; +94 [label="BindAccessEval", color = yellow] ; +1 -> 94 ; +95 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 93 AND PT.product = P.nr", color = yellow] ; +94 -> 95 ; +96 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +94 -> 96 ; +98 [label="BindAccessEval", color = yellow] ; +1 -> 98 ; +99 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 86 AND PT.product = P.nr", color = yellow] ; +98 -> 99 ; +100 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +98 -> 100 ; +102 [label="BindAccessEval", color = yellow] ; +1 -> 102 ; +103 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 102 AND PT.product = P.nr", color = yellow] ; +102 -> 103 ; +104 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +102 -> 104 ; +106 [label="BindAccessEval", color = yellow] ; +1 -> 106 ; +107 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 58 AND PT.product = P.nr", color = yellow] ; +106 -> 107 ; +108 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +106 -> 108 ; +110 [label="BindAccessEval", color = yellow] ; +1 -> 110 ; +111 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 89 AND PT.product = P.nr", color = yellow] ; +110 -> 111 ; +112 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +110 -> 112 ; +114 [label="BindAccessEval", color = yellow] ; +1 -> 114 ; +115 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 113 AND PT.product = P.nr", color = yellow] ; +114 -> 115 ; +116 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +114 -> 116 ; +118 [label="BindAccessEval", color = yellow] ; +1 -> 118 ; +119 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 66 AND PT.product = P.nr", color = yellow] ; +118 -> 119 ; +120 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +118 -> 120 ; +122 [label="BindAccessEval", color = yellow] ; +1 -> 122 ; +123 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 120 AND PT.product = P.nr", color = yellow] ; +122 -> 123 ; +124 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +122 -> 124 ; +126 [label="BindAccessEval", color = yellow] ; +1 -> 126 ; +127 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 78 AND PT.product = P.nr", color = yellow] ; +126 -> 127 ; +128 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +126 -> 128 ; +130 [label="BindAccessEval", color = yellow] ; +1 -> 130 ; +131 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 129 AND PT.product = P.nr", color = yellow] ; +130 -> 131 ; +132 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +130 -> 132 ; +134 [label="BindAccessEval", color = yellow] ; +1 -> 134 ; +135 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 100 AND PT.product = P.nr", color = yellow] ; +134 -> 135 ; +136 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +134 -> 136 ; +138 [label="BindAccessEval", color = yellow] ; +1 -> 138 ; +139 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 71 AND PT.product = P.nr", color = yellow] ; +138 -> 139 ; +140 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +138 -> 140 ; +142 [label="BindAccessEval", color = yellow] ; +1 -> 142 ; +143 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 60 AND PT.product = P.nr", color = yellow] ; +142 -> 143 ; +144 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +142 -> 144 ; +146 [label="BindAccessEval", color = yellow] ; +1 -> 146 ; +147 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 111 AND PT.product = P.nr", color = yellow] ; +146 -> 147 ; +148 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +146 -> 148 ; +150 [label="BindAccessEval", color = yellow] ; +1 -> 150 ; +151 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 143 AND PT.product = P.nr", color = yellow] ; +150 -> 151 ; +152 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +150 -> 152 ; +154 [label="BindAccessEval", color = yellow] ; +1 -> 154 ; +155 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 107 AND PT.product = P.nr", color = yellow] ; +154 -> 155 ; +156 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +154 -> 156 ; +158 [label="BindAccessEval", color = yellow] ; +1 -> 158 ; +159 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 117 AND PT.product = P.nr", color = yellow] ; +158 -> 159 ; +160 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +158 -> 160 ; +162 [label="BindAccessEval", color = yellow] ; +1 -> 162 ; +163 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 85 AND PT.product = P.nr", color = yellow] ; +162 -> 163 ; +164 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +162 -> 164 ; +166 [label="BindAccessEval", color = yellow] ; +1 -> 166 ; +167 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 130 AND PT.product = P.nr", color = yellow] ; +166 -> 167 ; +168 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +166 -> 168 ; +170 [label="BindAccessEval", color = yellow] ; +1 -> 170 ; +171 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 121 AND PT.product = P.nr", color = yellow] ; +170 -> 171 ; +172 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +170 -> 172 ; +174 [label="BindAccessEval", color = yellow] ; +1 -> 174 ; +175 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 141 AND PT.product = P.nr", color = yellow] ; +174 -> 175 ; +176 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +174 -> 176 ; +178 [label="BindAccessEval", color = yellow] ; +1 -> 178 ; +179 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 108 AND PT.product = P.nr", color = yellow] ; +178 -> 179 ; +180 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +178 -> 180 ; +182 [label="BindAccessEval", color = yellow] ; +1 -> 182 ; +183 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 79 AND PT.product = P.nr", color = yellow] ; +182 -> 183 ; +184 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +182 -> 184 ; +186 [label="BindAccessEval", color = yellow] ; +1 -> 186 ; +187 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 91 AND PT.product = P.nr", color = yellow] ; +186 -> 187 ; +188 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +186 -> 188 ; +190 [label="BindAccessEval", color = yellow] ; +1 -> 190 ; +191 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 92 AND PT.product = P.nr", color = yellow] ; +190 -> 191 ; +192 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +190 -> 192 ; +194 [label="BindAccessEval", color = yellow] ; +1 -> 194 ; +195 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 87 AND PT.product = P.nr", color = yellow] ; +194 -> 195 ; +196 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +194 -> 196 ; +198 [label="BindAccessEval", color = yellow] ; +1 -> 198 ; +199 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 95 AND PT.product = P.nr", color = yellow] ; +198 -> 199 ; +200 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +198 -> 200 ; +202 [label="BindAccessEval", color = yellow] ; +1 -> 202 ; +203 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 56 AND PT.product = P.nr", color = yellow] ; +202 -> 203 ; +204 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +202 -> 204 ; +206 [label="BindAccessEval", color = yellow] ; +1 -> 206 ; +207 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 135 AND PT.product = P.nr", color = yellow] ; +206 -> 207 ; +208 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +206 -> 208 ; +210 [label="BindAccessEval", color = yellow] ; +1 -> 210 ; +211 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 131 AND PT.product = P.nr", color = yellow] ; +210 -> 211 ; +212 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +210 -> 212 ; +214 [label="BindAccessEval", color = yellow] ; +1 -> 214 ; +215 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 148 AND PT.product = P.nr", color = yellow] ; +214 -> 215 ; +216 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +214 -> 216 ; +218 [label="BindAccessEval", color = yellow] ; +1 -> 218 ; +219 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 97 AND PT.product = P.nr", color = yellow] ; +218 -> 219 ; +220 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +218 -> 220 ; +222 [label="BindAccessEval", color = yellow] ; +1 -> 222 ; +223 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 109 AND PT.product = P.nr", color = yellow] ; +222 -> 223 ; +224 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +222 -> 224 ; +226 [label="BindAccessEval", color = yellow] ; +1 -> 226 ; +227 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 139 AND PT.product = P.nr", color = yellow] ; +226 -> 227 ; +228 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +226 -> 228 ; +230 [label="BindAccessEval", color = yellow] ; +1 -> 230 ; +231 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 67 AND PT.product = P.nr", color = yellow] ; +230 -> 231 ; +232 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +230 -> 232 ; +234 [label="BindAccessEval", color = yellow] ; +1 -> 234 ; +235 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 61 AND PT.product = P.nr", color = yellow] ; +234 -> 235 ; +236 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +234 -> 236 ; +238 [label="BindAccessEval", color = yellow] ; +1 -> 238 ; +239 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 96 AND PT.product = P.nr", color = yellow] ; +238 -> 239 ; +240 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +238 -> 240 ; +242 [label="BindAccessEval", color = yellow] ; +1 -> 242 ; +243 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 136 AND PT.product = P.nr", color = yellow] ; +242 -> 243 ; +244 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +242 -> 244 ; +246 [label="BindAccessEval", color = yellow] ; +1 -> 246 ; +247 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 140 AND PT.product = P.nr", color = yellow] ; +246 -> 247 ; +248 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +246 -> 248 ; +250 [label="BindAccessEval", color = yellow] ; +1 -> 250 ; +251 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 82 AND PT.product = P.nr", color = yellow] ; +250 -> 251 ; +252 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +250 -> 252 ; +254 [label="BindAccessEval", color = yellow] ; +1 -> 254 ; +255 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 122 AND PT.product = P.nr", color = yellow] ; +254 -> 255 ; +256 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +254 -> 256 ; +258 [label="BindAccessEval", color = yellow] ; +1 -> 258 ; +259 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 150 AND PT.product = P.nr", color = yellow] ; +258 -> 259 ; +260 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +258 -> 260 ; +262 [label="BindAccessEval", color = yellow] ; +1 -> 262 ; +263 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 103 AND PT.product = P.nr", color = yellow] ; +262 -> 263 ; +264 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +262 -> 264 ; +266 [label="BindAccessEval", color = yellow] ; +1 -> 266 ; +267 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 90 AND PT.product = P.nr", color = yellow] ; +266 -> 267 ; +268 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +266 -> 268 ; +270 [label="BindAccessEval", color = yellow] ; +1 -> 270 ; +271 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 124 AND PT.product = P.nr", color = yellow] ; +270 -> 271 ; +272 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +270 -> 272 ; +274 [label="BindAccessEval", color = yellow] ; +1 -> 274 ; +275 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 57 AND PT.product = P.nr", color = yellow] ; +274 -> 275 ; +276 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +274 -> 276 ; +278 [label="BindAccessEval", color = yellow] ; +1 -> 278 ; +279 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 127 AND PT.product = P.nr", color = yellow] ; +278 -> 279 ; +280 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +278 -> 280 ; +282 [label="BindAccessEval", color = yellow] ; +1 -> 282 ; +283 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 126 AND PT.product = P.nr", color = yellow] ; +282 -> 283 ; +284 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +282 -> 284 ; +286 [label="BindAccessEval", color = yellow] ; +1 -> 286 ; +287 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 151 AND PT.product = P.nr", color = yellow] ; +286 -> 287 ; +288 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +286 -> 288 ; +290 [label="BindAccessEval", color = yellow] ; +1 -> 290 ; +291 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 83 AND PT.product = P.nr", color = yellow] ; +290 -> 291 ; +292 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +290 -> 292 ; +294 [label="BindAccessEval", color = yellow] ; +1 -> 294 ; +295 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 116 AND PT.product = P.nr", color = yellow] ; +294 -> 295 ; +296 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +294 -> 296 ; +298 [label="BindAccessEval", color = yellow] ; +1 -> 298 ; +299 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 68 AND PT.product = P.nr", color = yellow] ; +298 -> 299 ; +300 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +298 -> 300 ; +302 [label="BindAccessEval", color = yellow] ; +1 -> 302 ; +303 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 105 AND PT.product = P.nr", color = yellow] ; +302 -> 303 ; +304 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +302 -> 304 ; +306 [label="BindAccessEval", color = yellow] ; +1 -> 306 ; +307 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 149 AND PT.product = P.nr", color = yellow] ; +306 -> 307 ; +308 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +306 -> 308 ; +310 [label="BindAccessEval", color = yellow] ; +1 -> 310 ; +311 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 64 AND PT.product = P.nr", color = yellow] ; +310 -> 311 ; +312 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +310 -> 312 ; +314 [label="BindAccessEval", color = yellow] ; +1 -> 314 ; +315 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 115 AND PT.product = P.nr", color = yellow] ; +314 -> 315 ; +316 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +314 -> 316 ; +318 [label="BindAccessEval", color = yellow] ; +1 -> 318 ; +319 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 70 AND PT.product = P.nr", color = yellow] ; +318 -> 319 ; +320 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +318 -> 320 ; +322 [label="BindAccessEval", color = yellow] ; +1 -> 322 ; +323 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 114 AND PT.product = P.nr", color = yellow] ; +322 -> 323 ; +324 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +322 -> 324 ; +326 [label="BindAccessEval", color = yellow] ; +1 -> 326 ; +327 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 101 AND PT.product = P.nr", color = yellow] ; +326 -> 327 ; +328 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +326 -> 328 ; +330 [label="BindAccessEval", color = yellow] ; +1 -> 330 ; +331 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 125 AND PT.product = P.nr", color = yellow] ; +330 -> 331 ; +332 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +330 -> 332 ; +334 [label="BindAccessEval", color = yellow] ; +1 -> 334 ; +335 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 76 AND PT.product = P.nr", color = yellow] ; +334 -> 335 ; +336 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +334 -> 336 ; +338 [label="BindAccessEval", color = yellow] ; +1 -> 338 ; +339 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 132 AND PT.product = P.nr", color = yellow] ; +338 -> 339 ; +340 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +338 -> 340 ; +342 [label="BindAccessEval", color = yellow] ; +1 -> 342 ; +343 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 142 AND PT.product = P.nr", color = yellow] ; +342 -> 343 ; +344 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +342 -> 344 ; +346 [label="BindAccessEval", color = yellow] ; +1 -> 346 ; +347 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 123 AND PT.product = P.nr", color = yellow] ; +346 -> 347 ; +348 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +346 -> 348 ; +350 [label="BindAccessEval", color = yellow] ; +1 -> 350 ; +351 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 104 AND PT.product = P.nr", color = yellow] ; +350 -> 351 ; +352 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +350 -> 352 ; +354 [label="BindAccessEval", color = yellow] ; +1 -> 354 ; +355 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 69 AND PT.product = P.nr", color = yellow] ; +354 -> 355 ; +356 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +354 -> 356 ; +358 [label="BindAccessEval", color = yellow] ; +1 -> 358 ; +359 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 99 AND PT.product = P.nr", color = yellow] ; +358 -> 359 ; +360 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +358 -> 360 ; +362 [label="BindAccessEval", color = yellow] ; +1 -> 362 ; +363 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 88 AND PT.product = P.nr", color = yellow] ; +362 -> 363 ; +364 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +362 -> 364 ; +366 [label="BindAccessEval", color = yellow] ; +1 -> 366 ; +367 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 106 AND PT.product = P.nr", color = yellow] ; +366 -> 367 ; +368 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +366 -> 368 ; +370 [label="BindAccessEval", color = yellow] ; +1 -> 370 ; +371 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 59 AND PT.product = P.nr", color = yellow] ; +370 -> 371 ; +372 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +370 -> 372 ; +374 [label="BindAccessEval", color = yellow] ; +1 -> 374 ; +375 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 73 AND PT.product = P.nr", color = yellow] ; +374 -> 375 ; +376 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +374 -> 376 ; +378 [label="BindAccessEval", color = yellow] ; +1 -> 378 ; +379 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 74 AND PT.product = P.nr", color = yellow] ; +378 -> 379 ; +380 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +378 -> 380 ; +382 [label="BindAccessEval", color = yellow] ; +1 -> 382 ; +383 [label="SQLQuery +SELECT P.nr, P.producer +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 146 AND PT.product = P.nr", color = yellow] ; +382 -> 383 ; +384 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{1}/Product{0}>)", color = yellow] ; +382 -> 384 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-43-12/query-plan/Qt.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-43-12/query-plan/Qt.png new file mode 100644 index 0000000000000000000000000000000000000000..5f4083962e4664b892600f4eca5b69657a464f74 Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-43-12/query-plan/Qt.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-43-12/stats.csv b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-43-12/stats.csv new file mode 100644 index 0000000000000000000000000000000000000000..adbbf7d806291a4c4ae98abb5fb9828c98924605 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-43-12/stats.csv @@ -0,0 +1,11 @@ +INPUT N_ANS N_EVO N_JOI N_REW N_TRI T_OP T_QEV T_REW T_TOTAL +Qt 2810 192 96 96 1 19 484 130 633 +Qt 2810 192 96 96 1 17 525 101 643 +Qt 2810 192 96 96 1 12 484 134 630 +Qt 2810 192 96 96 1 8 406 60 474 +Qt 2810 192 96 96 1 31 414 70 515 +Qt 2810 192 96 96 1 22 482 56 560 +Qt 2810 192 96 96 1 6 372 90 468 +Qt 2810 192 96 96 1 8 371 47 426 +Qt 2810 192 96 96 1 13 362 85 460 +Qt 2810 192 96 96 1 7 378 58 443 diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-44-47/query-plan/Qt.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-44-47/query-plan/Qt.dot new file mode 100644 index 0000000000000000000000000000000000000000..7c21070bad13bbc261b12421844dc3edf51a0ef6 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-44-47/query-plan/Qt.dot @@ -0,0 +1,490 @@ +digraph g{ graph[label = "15:44:48.155"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="BindAccessEval", color = yellow] ; +1 [label="HashDistinct", color = yellow] ; +0 -> 1 ; +2 [label="Union", color = yellow] ; +1 -> 2 ; +3 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 60 AND PT.product = P.nr", color = yellow] ; +2 -> 3 ; +5 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 133 AND PT.product = P.nr", color = yellow] ; +2 -> 5 ; +7 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 105 AND PT.product = P.nr", color = yellow] ; +2 -> 7 ; +9 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 87 AND PT.product = P.nr", color = yellow] ; +2 -> 9 ; +11 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 150 AND PT.product = P.nr", color = yellow] ; +2 -> 11 ; +13 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 124 AND PT.product = P.nr", color = yellow] ; +2 -> 13 ; +15 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 120 AND PT.product = P.nr", color = yellow] ; +2 -> 15 ; +17 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 127 AND PT.product = P.nr", color = yellow] ; +2 -> 17 ; +19 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 62 AND PT.product = P.nr", color = yellow] ; +2 -> 19 ; +21 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 97 AND PT.product = P.nr", color = yellow] ; +2 -> 21 ; +23 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 143 AND PT.product = P.nr", color = yellow] ; +2 -> 23 ; +25 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 130 AND PT.product = P.nr", color = yellow] ; +2 -> 25 ; +27 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 137 AND PT.product = P.nr", color = yellow] ; +2 -> 27 ; +29 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 73 AND PT.product = P.nr", color = yellow] ; +2 -> 29 ; +31 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 134 AND PT.product = P.nr", color = yellow] ; +2 -> 31 ; +33 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 142 AND PT.product = P.nr", color = yellow] ; +2 -> 33 ; +35 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 85 AND PT.product = P.nr", color = yellow] ; +2 -> 35 ; +37 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 64 AND PT.product = P.nr", color = yellow] ; +2 -> 37 ; +39 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 58 AND PT.product = P.nr", color = yellow] ; +2 -> 39 ; +41 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 81 AND PT.product = P.nr", color = yellow] ; +2 -> 41 ; +43 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 114 AND PT.product = P.nr", color = yellow] ; +2 -> 43 ; +45 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 121 AND PT.product = P.nr", color = yellow] ; +2 -> 45 ; +47 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 84 AND PT.product = P.nr", color = yellow] ; +2 -> 47 ; +49 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 147 AND PT.product = P.nr", color = yellow] ; +2 -> 49 ; +51 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 141 AND PT.product = P.nr", color = yellow] ; +2 -> 51 ; +53 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 126 AND PT.product = P.nr", color = yellow] ; +2 -> 53 ; +55 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 109 AND PT.product = P.nr", color = yellow] ; +2 -> 55 ; +57 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 57 AND PT.product = P.nr", color = yellow] ; +2 -> 57 ; +59 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 63 AND PT.product = P.nr", color = yellow] ; +2 -> 59 ; +61 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 99 AND PT.product = P.nr", color = yellow] ; +2 -> 61 ; +63 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 102 AND PT.product = P.nr", color = yellow] ; +2 -> 63 ; +65 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 79 AND PT.product = P.nr", color = yellow] ; +2 -> 65 ; +67 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 123 AND PT.product = P.nr", color = yellow] ; +2 -> 67 ; +69 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 56 AND PT.product = P.nr", color = yellow] ; +2 -> 69 ; +71 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 74 AND PT.product = P.nr", color = yellow] ; +2 -> 71 ; +73 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 136 AND PT.product = P.nr", color = yellow] ; +2 -> 73 ; +75 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 71 AND PT.product = P.nr", color = yellow] ; +2 -> 75 ; +77 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 148 AND PT.product = P.nr", color = yellow] ; +2 -> 77 ; +79 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 145 AND PT.product = P.nr", color = yellow] ; +2 -> 79 ; +81 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 132 AND PT.product = P.nr", color = yellow] ; +2 -> 81 ; +83 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 59 AND PT.product = P.nr", color = yellow] ; +2 -> 83 ; +85 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 108 AND PT.product = P.nr", color = yellow] ; +2 -> 85 ; +87 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 139 AND PT.product = P.nr", color = yellow] ; +2 -> 87 ; +89 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 68 AND PT.product = P.nr", color = yellow] ; +2 -> 89 ; +91 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 96 AND PT.product = P.nr", color = yellow] ; +2 -> 91 ; +93 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 122 AND PT.product = P.nr", color = yellow] ; +2 -> 93 ; +95 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 80 AND PT.product = P.nr", color = yellow] ; +2 -> 95 ; +97 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 107 AND PT.product = P.nr", color = yellow] ; +2 -> 97 ; +99 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 112 AND PT.product = P.nr", color = yellow] ; +2 -> 99 ; +101 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 91 AND PT.product = P.nr", color = yellow] ; +2 -> 101 ; +103 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 118 AND PT.product = P.nr", color = yellow] ; +2 -> 103 ; +105 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 89 AND PT.product = P.nr", color = yellow] ; +2 -> 105 ; +107 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 67 AND PT.product = P.nr", color = yellow] ; +2 -> 107 ; +109 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 92 AND PT.product = P.nr", color = yellow] ; +2 -> 109 ; +111 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 140 AND PT.product = P.nr", color = yellow] ; +2 -> 111 ; +113 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 90 AND PT.product = P.nr", color = yellow] ; +2 -> 113 ; +115 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 94 AND PT.product = P.nr", color = yellow] ; +2 -> 115 ; +117 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 83 AND PT.product = P.nr", color = yellow] ; +2 -> 117 ; +119 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 115 AND PT.product = P.nr", color = yellow] ; +2 -> 119 ; +121 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 70 AND PT.product = P.nr", color = yellow] ; +2 -> 121 ; +123 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 95 AND PT.product = P.nr", color = yellow] ; +2 -> 123 ; +125 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 76 AND PT.product = P.nr", color = yellow] ; +2 -> 125 ; +127 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 77 AND PT.product = P.nr", color = yellow] ; +2 -> 127 ; +129 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 131 AND PT.product = P.nr", color = yellow] ; +2 -> 129 ; +131 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 61 AND PT.product = P.nr", color = yellow] ; +2 -> 131 ; +133 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 119 AND PT.product = P.nr", color = yellow] ; +2 -> 133 ; +135 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 146 AND PT.product = P.nr", color = yellow] ; +2 -> 135 ; +137 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 98 AND PT.product = P.nr", color = yellow] ; +2 -> 137 ; +139 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 100 AND PT.product = P.nr", color = yellow] ; +2 -> 139 ; +141 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 101 AND PT.product = P.nr", color = yellow] ; +2 -> 141 ; +143 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 93 AND PT.product = P.nr", color = yellow] ; +2 -> 143 ; +145 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 75 AND PT.product = P.nr", color = yellow] ; +2 -> 145 ; +147 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 72 AND PT.product = P.nr", color = yellow] ; +2 -> 147 ; +149 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 104 AND PT.product = P.nr", color = yellow] ; +2 -> 149 ; +151 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 88 AND PT.product = P.nr", color = yellow] ; +2 -> 151 ; +153 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 138 AND PT.product = P.nr", color = yellow] ; +2 -> 153 ; +155 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 151 AND PT.product = P.nr", color = yellow] ; +2 -> 155 ; +157 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 149 AND PT.product = P.nr", color = yellow] ; +2 -> 157 ; +159 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 116 AND PT.product = P.nr", color = yellow] ; +2 -> 159 ; +161 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 125 AND PT.product = P.nr", color = yellow] ; +2 -> 161 ; +163 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 113 AND PT.product = P.nr", color = yellow] ; +2 -> 163 ; +165 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 103 AND PT.product = P.nr", color = yellow] ; +2 -> 165 ; +167 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 65 AND PT.product = P.nr", color = yellow] ; +2 -> 167 ; +169 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 82 AND PT.product = P.nr", color = yellow] ; +2 -> 169 ; +171 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 78 AND PT.product = P.nr", color = yellow] ; +2 -> 171 ; +173 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 66 AND PT.product = P.nr", color = yellow] ; +2 -> 173 ; +175 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 129 AND PT.product = P.nr", color = yellow] ; +2 -> 175 ; +177 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 106 AND PT.product = P.nr", color = yellow] ; +2 -> 177 ; +179 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 69 AND PT.product = P.nr", color = yellow] ; +2 -> 179 ; +181 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 110 AND PT.product = P.nr", color = yellow] ; +2 -> 181 ; +183 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 144 AND PT.product = P.nr", color = yellow] ; +2 -> 183 ; +185 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 111 AND PT.product = P.nr", color = yellow] ; +2 -> 185 ; +187 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 86 AND PT.product = P.nr", color = yellow] ; +2 -> 187 ; +189 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 117 AND PT.product = P.nr", color = yellow] ; +2 -> 189 ; +191 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 128 AND PT.product = P.nr", color = yellow] ; +2 -> 191 ; +193 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 135 AND PT.product = P.nr", color = yellow] ; +2 -> 193 ; +194 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{0}/Product{1}>)", color = yellow] ; +0 -> 194 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-44-47/query-plan/Qt.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-44-47/query-plan/Qt.png new file mode 100644 index 0000000000000000000000000000000000000000..fcece7695e2386df9d55af1348fe7da90f02e1bb Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-44-47/query-plan/Qt.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-44-47/stats.csv b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-44-47/stats.csv new file mode 100644 index 0000000000000000000000000000000000000000..8d49eba6eb749c015a3eda791a2e638ac9bfe2ca --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-44-47/stats.csv @@ -0,0 +1,11 @@ +INPUT N_ANS N_EVO N_JOI N_REW N_TRI T_OP T_QEV T_REW T_TOTAL +Qt 2810 192 96 96 1 39 480 133 652 +Qt 2810 192 96 96 1 17 435 94 546 +Qt 2810 192 96 96 1 14 433 107 554 +Qt 2810 192 96 96 1 19 399 65 483 +Qt 2810 192 96 96 1 15 406 78 499 +Qt 2810 192 96 96 1 23 378 61 462 +Qt 2810 192 96 96 1 13 323 64 400 +Qt 2810 192 96 96 1 9 303 68 380 +Qt 2810 192 96 96 1 14 310 105 429 +Qt 2810 192 96 96 1 11 332 52 395 diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-46-49/query-plan/Qt.dot b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-46-49/query-plan/Qt.dot new file mode 100644 index 0000000000000000000000000000000000000000..ee7a1f05483b95974a3fae909831b138056558e4 --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-46-49/query-plan/Qt.dot @@ -0,0 +1,103 @@ +digraph g{ graph[label = "15:46:50.550"] +node [shape=rectangle, color=black, fontcolor=black, style=bold] edge [color=black] 0 [label="BindAccessEval", color = yellow] ; +1 [label="SQLQuery +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 60 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 133 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 105 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 87 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 150 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 124 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 120 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 127 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 62 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 97 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 143 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 130 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 137 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 73 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 134 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 142 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 85 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 64 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 58 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 81 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 114 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 121 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 84 AND PT.product = P.nr +UNION +SELECT P.producer, P.nr +FROM PRODUCT AS P, PRODUCTTYPEPRODUCT AS PT +WHERE PT.producttype = 147 AND PT.product ...", color = yellow] ; +0 -> 1 ; +2 [label="FunctionCallBindAccess +(<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer{0}/Product{1}>)", color = yellow] ; +0 -> 2 ; +} diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-46-49/query-plan/Qt.png b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-46-49/query-plan/Qt.png new file mode 100644 index 0000000000000000000000000000000000000000..cd5c2c0384ac0aaf21fdcc4fff3325d7a376ad1d Binary files /dev/null and b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-46-49/query-plan/Qt.png differ diff --git a/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-46-49/stats.csv b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-46-49/stats.csv new file mode 100644 index 0000000000000000000000000000000000000000..5b378d9c2233adf84ec165cf49d379b7b61a94ae --- /dev/null +++ b/posts/tatooine-cq-plan-optimization/runs/REW_2019-03-18-15-46-49/stats.csv @@ -0,0 +1,11 @@ +INPUT N_ANS N_EVO N_JOI N_REW N_TRI T_OP T_QEV T_REW T_TOTAL +Qt 2810 192 96 96 1 50 74 155 279 +Qt 2810 192 96 96 1 38 68 95 201 +Qt 2810 192 96 96 1 34 83 70 187 +Qt 2810 192 96 96 1 43 74 64 181 +Qt 2810 192 96 96 1 51 66 78 195 +Qt 2810 192 96 96 1 22 71 55 148 +Qt 2810 192 96 96 1 35 64 60 159 +Qt 2810 192 96 96 1 23 61 101 185 +Qt 2810 192 96 96 1 28 44 67 139 +Qt 2810 192 96 96 1 27 57 74 158 diff --git a/posts/virtuoso.org b/posts/virtuoso.org new file mode 100644 index 0000000000000000000000000000000000000000..68f8b4130c6d842c98d0230a3768491efa1b82af --- /dev/null +++ b/posts/virtuoso.org @@ -0,0 +1,596 @@ +#+TITLE: Virtuoso + +#+PROPERTY: header-args :eval never-export +#+OPTIONS: toc:t num:t +#+LATEX_HEADER: \input{../macros} + +** Installation + +some instructions: http://vos.openlinksw.com/owiki/wiki/VOS/VOSUbuntuNotes + +#+BEGIN_src eshell +sudo apt install virtuoso-opensource +#+END_src + +** Command Lines +*** Starting the server +#+BEGIN_src shell +sudo virtuoso-t -fd +configfile /etc/virtuoso/virtuoso.ini +#+END_src + +*** Data Loading + +- [[http://vos.openlinksw.com/owiki/wiki/VOS/VirtBulkRDFLoader][loading from a file]] +- loading from a url ~SPARQL LOAD <url>~ + +*** List all graph + +#+BEGIN_src shell +isql-vt 1111 dba dba exec="SPARQL SELECT DISTINCT ?g \ + WHERE { GRAPH ?g {?s ?p ?o} } \ +ORDER BY ?g" +#+END_src + +** Reasoning at query time + +The reasoning is done at query time by default. The reasoning is expressed either using an ontology (with default rules) or custom rules. + +*** RDFS (R_a) and OWL + +In the [[http://docs.openlinksw.com/virtuoso/rdfsparqlrule/][official documentation]], we can see that Virtuoso reasoning w.r.t. R_a rules set is limited to: +- ~rdfs7~ $\triple{\prop_a}{\subproperty}{\prop_b},\triple{\mathrm{s}}{\prop_a}{\object} \rightarrow \triple{\mathrm{s}}{\prop_b}{\object}$ +- ~rdfs9~ $\triple{\mathrm{s}}{\subclass}{\object},\triple{\mathrm{s}_1}{\type}{\mathrm{s}} \rightarrow \triple{\mathrm{s}_1}{\type}{\object}$ +The reasoning w.r.t. domain and range is not supported. + +See also: +- http://docs.openlinksw.com/virtuoso/rdfsparqlruleenableinfr/ +- http://vos.openlinksw.com/owiki/wiki/VOS/VirtSPARQLReasoningTutorial + +**** R_a Tests + +I test the reasoning according to subClassOf and subPropertyOf using the [[http://pages.saclay.inria.fr/maxime.buron/projects/qa-test/qa-test.html][query answering test]] developed for OntoSQL. + +1. clear and load the graph: + #+BEGIN_src shell +isql-vt 1111 dba dba exec="SPARQL +CLEAR GRAPH <urn:qa-test-graph>;" + +isql-vt 1111 dba dba exec="SPARQL +LOAD <http://pages.saclay.inria.fr/maxime.buron/projects/qa-test/qa-test.nt> +INTO <urn:qa-test-graph>;" +#+END_src + +2. check the data triples: + #+BEGIN_src shell + isql-vt 1111 dba dba exec="SPARQL + SELECT * + FROM <urn:qa-test-graph> + WHERE + { ?s ?p ?o };" + #+END_src + +3. loading of the ontology + #+BEGIN_src shell +isql-vt 1111 dba dba exec="sparql +clear graph <urn:qa-test-onto>;" + +isql-vt 1111 dba dba exec="SPARQL +LOAD <http://pages.saclay.inria.fr/maxime.buron/projects/qa-test/qa-test-schema.nt> INTO +<urn:qa-test-onto>;" + #+END_src + +4. creation of the rules set from the schema + #+BEGIN_src shell +isql-vt 1111 dba dba exec=" +DELETE FROM sys_rdf_schema WHERE RS_NAME='urn:owl:inference:rules:qa-test';" + +isql-vt 1111 dba dba exec=" +rdfs_rule_set('urn:owl:inference:rules:qa-test', 'urn:qa-test-onto');" + #+END_src + +5. list the sets of inference rules: + #+BEGIN_src shell +isql-vt 1111 dba dba exec="SELECT * FROM sys_rdf_schema;" + #+END_src + +6. query type per subject using the reasoning: + #+BEGIN_src shell :exports both +isql-vt 1111 dba dba exec="SPARQL +DEFINE input:inference 'urn:owl:inference:rules:qa-test' +SELECT * +FROM <urn:qa-test-graph> +WHERE { ?s a ?o} +ORDER BY ?s ?o;" + #+END_src + + #+RESULTS: + | s | o | + |---------------------+-----------------------------------------------------| + | qa-test:François | qa-test:Thing | + | qa-test:Ioana | qa-test:Person | + | qa-test:Ioana | qa-test:Thing | + | qa-test:Marie-Laure | qa-test:Thing | + | qa-test:Place | http://www.w3.org/2000/01/rdf-schema#Class | + | qa-test:contact | http://www.w3.org/1999/02/22-rdf-syntax-ns#Property | + | | | + The answers set is not correct because François, Ioana and Marie-Laure are of type Person and Person is a subclass of Thing, but only Ioana is of type Thing. We notice that Maxime doesn't have a type, even if the domain of phoneNumber is Person, so domain is not used (the same for range, with Orsay for example). + +7. query all the subject of type Thing (it is correct): + #+BEGIN_src shell :exports both +isql-vt 1111 dba dba exec="SPARQL +DEFINE input:inference 'urn:owl:inference:rules:qa-test' +SELECT * +FROM <urn:qa-test-graph> +WHERE { ?s a <qa-test:Thing>} +ORDER BY ?s ;" + #+END_src + + #+RESULTS: + | s | + |---------------------| + | qa-test:François | + | qa-test:Ioana | + | qa-test:Marie-Laure | + | | + +8. query all the types of François (correct also): + #+BEGIN_src shell :exports both +isql-vt 1111 dba dba exec="SPARQL +DEFINE input:inference 'urn:owl:inference:rules:qa-test' +SELECT ?o +FROM <urn:qa-test-graph> +WHERE { <qa-test:François> a ?o } +ORDER BY ?o ;" + #+END_src + + #+RESULTS: + | o | + |----------------| + | qa-test:Person | + | qa-test:Thing | + | | + +**** R_C Test + +1. query all the subclass relations, no reasoning seems activated: + #+BEGIN_src shell :exports both +isql-vt 1111 dba dba exec="SPARQL +DEFINE input:inference 'urn:owl:inference:rules:qa-test' +SELECT * +FROM <urn:qa-test-graph> +WHERE { ?s <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?o } +ORDER BY ?s ?o ;" + #+END_src + + #+RESULTS: + | s | o | + |----------------+---------------| + | | | + | qa-test:City | qa-test:Place | + | qa-test:Person | qa-test:Thing | + | qa-test:Place | qa-test:Thing | + | qa-test:Thing | qa-test:Thing | + | | | + +2. We try again by adding first, a triple that declares ~rdfs:subClassOf~ as a transitive property. It returns a error, because the transitivity of property is not supported in BGP with a variable as subject. + #+BEGIN_src shell :exports both +isql-vt 1111 dba dba exec="SPARQL +INSERT + { + GRAPH <urn:qa-test-onto> { + <http://www.w3.org/2000/01/rdf-schema#subClassOf> a <http://www.w3.org/2002/07/owl#TransitiveProperty> . + } + };" + +isql-vt 1111 dba dba exec=" +rdfs_rule_set('urn:owl:inference:rules:qa-test', 'urn:qa-test-onto');" + +isql-vt 1111 dba dba exec="SPARQL +DEFINE input:inference 'urn:owl:inference:rules:qa-test' +SELECT * +FROM <urn:qa-test-graph> +WHERE { ?s <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?o } +ORDER BY ?s ?o ;" + #+END_src + + #+RESULTS: + #+BEGIN_example + Connected to OpenLink Virtuoso + Driver: 06.01.3127 OpenLink Virtuoso ODBC Driver + OpenLink Interactive SQL (Virtuoso), version 0.9849b. + Type HELP; for help and EXIT; to exit. + + *** Error 37000: [Virtuoso Driver][Virtuoso Server]TR...: transitive start not given + at line 0 of Top-Level: + SPARQL DEFINE input:inference 'urn:owl:inference:rules:qa-test' SELECT * FROM <urn:qa-test-graph> WHERE { ?s <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?o } ORDER BY ?s ?o + #+END_example + +3. Then we query for super classes of City (should be Place and Thing), but instead it returns a out of memory error, + #+BEGIN_src shell :exports both +isql-vt 1111 dba dba exec="SPARQL +DEFINE input:inference 'urn:owl:inference:rules:qa-test' +SELECT DISTINCT * +FROM <urn:qa-test-graph> +WHERE { <qa-test:City> <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?o OPTION (TRANSITIVE)} +ORDER BY ?o ;" + #+END_src + + #+RESULTS: + #+BEGIN_example + Connected to OpenLink Virtuoso + Driver: 06.01.3127 OpenLink Virtuoso ODBC Driver + OpenLink Interactive SQL (Virtuoso), version 0.9849b. + Type HELP; for help and EXIT; to exit. + + *** Error 42000: [Virtuoso Driver][Virtuoso Server]TN...: Exceeded 100000000 bytes in transitive temp memory. use t_distinct, t_max or more T_MAX_memory options to limit the search or increase the pool + at line 0 of Top-Level: + SPARQL DEFINE input:inference 'urn:owl:inference:rules:qa-test' SELECT * FROM <urn:qa-test-graph> WHERE { <qa-test:City> <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?o } ORDER BY ?o + #+END_example + +4. In fact, there are [[http://docs.openlinksw.com/virtuoso/rdfsparqlimplementatiotrans/#rdfsparqlimplementatiotransexamples7][specific settings]] for transitivity, so we have to specify the distinct near the transitive triples in the query. + #+BEGIN_src shell :exports both +isql-vt 1111 dba dba exec="SPARQL +DEFINE input:inference 'urn:owl:inference:rules:qa-test' +SELECT DISTINCT * +FROM <urn:qa-test-graph> +WHERE { <qa-test:City> <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?o OPTION (TRANSITIVE, t_distinct)} +ORDER BY ?o ;" + #+END_src + + #+RESULTS: + | trans-subj-s_3_0 | o | + | | | + | qa-test:City | qa-test:Place | + | qa-test:City | qa-test:Thing | + | | | + +*** Custom Inference Rules + +The custom inference rules are available only in Virtuoso 8.0, which is the commercial version. + +This rules are build using the [[http://spinrdf.org/spin.html#spin-rules][SPIN]] (for SPARQL Inference Notation) language. + +- https://medium.com/virtuoso-blog/magic-sets-and-custom-inference-rules-in-virtuoso-8-x-db783f8d98d2 + +- https://medium.com/virtuoso-blog/virtuoso-8-0-creating-a-custom-inference-rules-using-spin-vocabulary-d7a060f859ef + +- https://stackoverflow.com/questions/51513968/how-virtuoso-do-if-then-rules-inference + +We define the following sql script in order to test the reasoning in Virtuoso. This script has of three input ~$GRAPH~ which the RDF graph that will be loaded, ~$RULES~ defining the SPIN rule and ~$QUERY~ is the query evaluated in the graph. We notice that the SPIN rule is applied on the class ~<#Thing>~, so the variable ~?this~ in rule definition can only be bound to value in the class ~<#Thing>~ (see [[https://spinrdf.org/spin.html#spin-rules-thisUnbound][specification]]). +#+NAME:sql-code +#+BEGIN_src shell + cat > .test.sql << EOF + SPARQL DROP SPIN LIBRARY <urn:rules> ; + SPARQL CLEAR GRAPH <urn:graph> + ; + + SPARQL + prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> + prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#> + WITH <urn:graph> + INSERT + { + $GRAPH + }; + SPARQL SELECT * FROM <urn:graph> WHERE {?s ?p ?o}; + + + SPARQL CLEAR GRAPH <urn:rules> ; + + TTLP (' + ## Collection of Inference Rules that describe + ## various British Royal Family Relationship Types + @prefix sp: <http://spinrdf.org/sp#> . + @prefix spin: <http://spinrdf.org/spin#> . + @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . + @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + @prefix foaf: <http://xmlns.com/foaf/0.1/> . + + <#Thing> + a rdfs:Class ; + rdfs:label "A Royal Person"^^xsd:string ; + rdfs:subClassOf foaf:Person ; + spin:rule + [ a sp:Construct ; + sp:text """ + $RULE + """ + ] . + ', + '', 'urn:rules', 4096) + ; + + SELECT + SPARQL_SPIN_GRAPH_TO_DEFSPIN('urn:rules'); + + EXEC ('SPARQL ' || SPARQL_SPIN_GRAPH_TO_DEFSPIN('urn:rules')); + EOF + + isql-vt 1111 dba dba exec="LOAD .test.sql" > /dev/null + isql-vt 1111 dba dba exec="SPARQL $QUERY" | tail -n +5 +#+END_src + +**** Simple Case + +We will consider the following RDF graph: +#+NAME:graph-1 +#+BEGIN_example +<Maxime> <livesIn> <Orsay> . +<Maxime> a <#Thing> . +#+END_example + +The following SPIN rule says that the object of ~<livesIn>~ is of type ~<Person>~. +#+NAME:rule-1 +#+BEGIN_example +CONSTRUCT { ?this a <Person> } +WHERE { +{ ?this <livesIn> ?y . } +} +#+END_example + +We query for things of type ~<Person>~. +#+NAME: query-1 +#+BEGIN_example +DEFINE input:macro-lib <urn:rules> +WITH <urn:graph> +SELECT ?s +WHERE { ?s a <#Thing> . + ?s a <Person> . }; +#+END_example + +#+BEGIN_src shell :var GRAPH=graph-1 RULE=rule-1 QUERY=query-1 :noweb yes :exports results +<<sql-code>> +#+END_src + +#+RESULTS: +| s | +|--------| +| Maxime | + + +The SPIN rule have been defined on the class ~<Thing>~, so it seems mandatory to specify the type of ~<Thing>~ in the query to activate the reasoning process ... So, the answer ~<Maxime>~ is missing. +#+NAME: query-2 +#+BEGIN_example +DEFINE input:macro-lib <urn:rules> +WITH <urn:graph> +SELECT * +WHERE { ?s a <Person> .}; +#+END_example + +#+BEGIN_src shell :var GRAPH=graph-1 RULE=rule-1 QUERY=query-2 :noweb yes :exports results +<<sql-code>> +#+END_src + +#+RESULTS: +| s | +|---| +| | + +It is not possible neither to generalize the query as: +#+NAME: query-3 +#+BEGIN_example +DEFINE input:macro-lib <urn:rules> +WITH <urn:graph> +SELECT ?s ?c +WHERE { ?s a <#Thing> . + ?s a ?c . }; +#+END_example + +#+BEGIN_src shell :var GRAPH=graph-1 RULE=rule-1 QUERY=query-3 :noweb yes :exports results +<<sql-code>> +#+END_src + +#+RESULTS: +| s | c | +|--------+--------| +| Maxime | #Thing | + +**** Try to reason using domain specification + +We define ~<Person>~ as the domain of ~<livesIn>~. +#+NAME:graph-2 +#+BEGIN_example +<Maxime> <livesIn> <Orsay> . +<Maxime> a <#Thing> . +<livesIn> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> . +#+END_example + +We define the domain reasoning as in the standard: +#+NAME:rule-2 +#+BEGIN_example +CONSTRUCT { ?this a ?c } +WHERE { +{ ?this ?p ?y . + ?p <http://www.w3.org/2000/01/rdf-schema#domain> ?c . } +} +#+END_example + +We query for things of type ~<Person>~. +#+NAME: query-4 +#+BEGIN_example +DEFINE input:macro-lib <urn:rules> +WITH <urn:graph> +SELECT ?s +WHERE { ?s a <#Thing> . + ?s a <Person> . }; +#+END_example + +#+BEGIN_src shell :var GRAPH=graph-2 RULE=rule-2 QUERY=query-4 :noweb yes :exports results +<<sql-code>> +#+END_src + +#+RESULTS: +| s | +|--------| +| Maxime | + +The SPIN rule have been defined on the class ~<Thing>~, so it seems mandatory to specify the type of ~<Thing>~ in the query to activate the reasoning process ... +#+NAME: query-5 +#+BEGIN_example +DEFINE input:macro-lib <urn:rules> +WITH <urn:graph> +SELECT * +WHERE { ?s a <Person> .}; +#+END_example + +#+BEGIN_src shell :var GRAPH=graph-2 RULE=rule-2 QUERY=query-5 :noweb yes :exports results +<<sql-code>> +#+END_src + +#+RESULTS: +| s | +|---| +| | + +In this case, it is possible to generalize the query as: +#+NAME: query-6 +#+BEGIN_example +DEFINE input:macro-lib <urn:rules> +WITH <urn:graph> +SELECT ?s ?c +WHERE { ?s a <#Thing> . + ?s a ?c . }; +#+END_example + +#+BEGIN_src shell :var GRAPH=graph-2 RULE=rule-2 QUERY=query-6 :noweb yes :exports results +<<sql-code>> +#+END_src + +#+RESULTS: +| s | c | +|--------+--------| +| Maxime | Person | +| Maxime | #Thing | + +But, it is not possible to generalize the query as: +#+NAME: query-611 +#+BEGIN_example +DEFINE input:macro-lib <urn:rules> +WITH <urn:graph> +SELECT ?s ?p ?o +WHERE { ?s ?p ?o .}; +#+END_example + +#+BEGIN_src shell :var GRAPH=graph-2 RULE=rule-2 QUERY=query-611 :noweb yes :exports results +<<sql-code>> +#+END_src + +#+RESULTS: +| s | p | o | +|---------+-------------------------------------------------+--------| +| Maxime | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | #Thing | +| livesIn | http://www.w3.org/2000/01/rdf-schema#domain | Person | +| Maxime | livesIn | Orsay | + +But, it is not possible to generalize the query as: +#+NAME: query-610 +#+BEGIN_example +DEFINE input:macro-lib <urn:rules> +WITH <urn:graph> +SELECT ?s ?p ?o +WHERE { ?s a <#Thing> . + ?s ?p ?o . }; +#+END_example + +#+BEGIN_src shell :var GRAPH=graph-2 RULE=rule-2 QUERY=query-610 :noweb yes :exports results +<<sql-code>> +#+END_src + +#+RESULTS: +| s | p | o | +|--------+-------------------------------------------------+--------| +| Maxime | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | #Thing | +| Maxime | livesIn | Orsay | + + +** Customize the rule :noexport: + +We define ~<Person>~ as the domain of ~<livesIn>~. +#+NAME:graph-3 +#+BEGIN_example +<Maxime> <livesIn> <Orsay> . +<Maxime> a <#Thing> . +<livesIn> a <#Thing> . +<livesIn> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> . +#+END_example + +We define the domain reasoning as in the standard: +#+NAME:rule-3 +#+BEGIN_example +CONSTRUCT { ?p a <Prop> } +WHERE { +{ ?p <http://www.w3.org/2000/01/rdf-schema#domain> ?c . + } +} +#+END_example + +We query for things of type ~<Person>~. +#+NAME: query-7 +#+BEGIN_example +DEFINE input:macro-lib <urn:rules> +WITH <urn:graph> +SELECT * +WHERE { ?s ?p ?o . + }; +#+END_example + +#+BEGIN_src shell :var GRAPH=graph-3 RULE=rule-3 QUERY=query-7 :noweb yes :exports results +<<sql-code>> +#+END_src + +#+RESULTS: +| s | p | o | | | | +| LONG | VARCHAR | LONG | VARCHAR | LONG | VARCHAR | +| _______________________________________________________________________________ | | | | | | +| | | | | | | +| Maxime | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | #Thing | | | | +| livesIn | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | #Thing | | | | +| livesIn | http://www.w3.org/2000/01/rdf-schema#domain | Person | | | | +| Maxime | livesIn | Orsay | | | | +| | | | | | | +| 4 | Rows. | -- | 1 | msec. | | + +The SPIN rule have been defined on the class ~<Thing>~, so it seems mandatory to specify the type of ~<Thing>~ in the query to activate the reasoning process ... +#+NAME: query-8 +#+BEGIN_example +DEFINE input:macro-lib <urn:rules> +WITH <urn:graph> +SELECT * +WHERE { ?s a <Person> .}; +#+END_example + +#+BEGIN_src shell :var GRAPH=graph-3 RULE=rule-3 QUERY=query-8 :noweb yes :exports results +<<sql-code>> +#+END_src + +#+RESULTS: +| s | | | | | +| LONG | VARCHAR | | | | +| _______________________________________________________________________________ | | | | | +| | | | | | +| | | | | | +| 0 | Rows. | -- | 0 | msec. | + +In this case, it is possible to generalize the query as: +#+NAME: query-9 +#+BEGIN_example +DEFINE input:macro-lib <urn:rules> +WITH <urn:graph> +SELECT ?s ?c +WHERE { ?s a ?c . }; +#+END_example + +#+BEGIN_src shell :var GRAPH=graph-3 RULE=rule-3 QUERY=query-9 :noweb yes :exports results +<<sql-code>> +#+END_src + +#+RESULTS: +| s | c | | | | +| LONG | VARCHAR | LONG | VARCHAR | | +| _______________________________________________________________________________ | | | | | +| | | | | | +| Maxime | #Thing | | | | +| | | | | | +| 1 | Rows. | -- | 0 | msec. | + + diff --git a/projects/icoda/icoda.org b/projects/icoda/icoda.org new file mode 100644 index 0000000000000000000000000000000000000000..d139a84bae3d92d044cd12f0dfe9b3675824e138 --- /dev/null +++ b/projects/icoda/icoda.org @@ -0,0 +1,300 @@ +#+TITLE: iCODA + +#+PROPERTY: header-args:sqlite :exports both + +* Relations Extraites sur les Démissions + +Le base de données (~sandbox/ouest-france/Politiques locales/corpus_demissions/entity_relations.sqlite~) publiée par Thomas contient deux tables: + +- ~article~ +- ~relation~ contient des relations sujet-predicat-object extraites des articles + +** Table relation + +*** Le nombre des triples extraits complets +#+header: :dir "~/inria/icoda/sandbox/ouest-france/Politiques locales/corpus_demissions" +#+header: :db entity_relations.sqlite +#+begin_src sqlite +SELECT count(*) FROM relation +WHERE subj IS NOT NULL AND pred IS NOT NULL AND obj IS NOT NULL; +#+end_src + +#+RESULTS: +: 1632078 + +*** Un extrait de la table ~relation~ +#+header: :dir "~/inria/icoda/sandbox/ouest-france/Politiques locales/corpus_demissions" +#+header: :results table +#+header: :colnames yes +#+header: :db entity_relations.sqlite +#+begin_src sqlite +SELECT subj,pred,obj FROM relation +WHERE subj IS NOT NULL AND pred IS NOT NULL AND obj IS NOT NULL +LIMIT 10; +#+end_src + +#+RESULTS: +| subj | pred | obj | +|-----------------------------+--------------------------+------------------------------------------| +| fossiles | trouvés | ’ | +| fossiles | trouvés | un des médiateurs scientifiques du musée | +| Qui | veut jouer | au dino | +| Découvrez les fossiles | créant | des jeux de société paléontologique | +| désireux | mettre | bien | +| désireux | devront bientôt demander | un permis de louer à la mairie | +| Mécontents | font circuler | une pétition | +| les propriétaires bailleurs | font circuler | une pétition | +| président | fait circuler | pétition | +| un décret datant de 2002 | fournir | un logement décent | + + +*** Le nombre de propriétés distinctes +#+header: :dir "~/inria/icoda/sandbox/ouest-france/Politiques locales/corpus_demissions" +#+header: :db entity_relations.sqlite +#+begin_src sqlite +SELECT DISTINCT count(pred) FROM relation WHERE pred IS NOT NULL LIMIT 100; +#+end_src + +#+RESULTS: +: 3525204 + +*** Un extrait des 5541 propriétés qui contiennent "élu", il y a plus de 600 variations de propriétés commençant par "a été élu" +#+header: :dir "~/inria/icoda/sandbox/ouest-france/Politiques locales/corpus_demissions" +#+header: :results table +#+header: :colnames yes +#+header: :db entity_relations.sqlite +#+begin_src sqlite +SELECT DISTINCT pred FROM relation +WHERE subj IS NOT NULL AND pred LIKE '%élu%' AND obj IS NOT NULL +LIMIT 20; +#+end_src + +#+RESULTS: +| pred | +|------------------------| +| ne pourront pas éluder | +| a été élu | +| ont été élues | +| est élu | +| avez été réélue | +| élu | +| a élu | +| ont élu | +| ont été élus | +| ont également élu | +| a été élue | +| ont été élus hier | +| être élus | +| sera élu plus tôt | +| être élu | +| suis élu | +| avoir été élu | +| donc été élu | +| être élue | +| était élue | + + +*** Exemples de triples avec propriété commençant par "a été élu" +#+header: :dir "~/inria/icoda/sandbox/ouest-france/Politiques locales/corpus_demissions" +#+header: :results table +#+header: :colnames yes +#+header: :db entity_relations.sqlite +#+begin_src sqlite +SELECT DISTINCT subj,pred,obj FROM relation +WHERE subj IS NOT NULL AND pred LIKE 'a été élu%' AND obj IS NOT NULL +LIMIT 20; +#+end_src + +#+RESULTS: +| subj | pred | obj | +|---------------------------------------------------+----------------+----------------------------------------------------------------| +| Jean-Luc Jaouen | a été élu | représentant | +| Marc-Antoine Driancourt | a été élu | faisant | +| Didier Chartier | a été élu | une équipe motivée | +| Les dossiers qui attendent Didier Chartier | a été élu | une équipe motivée | +| Elle | a été élue | ’ | +| Il | a été élu | 2 e | +| Maxime Meunier | a été élu | huit voix | +| Maxime Meunier | a été élu | président | +| L ' ancien premier adjoint , et maire par intérim | a été élu | équipe | +| se | a été élu | 4 e | +| se | a été élu | adjoint | +| qui | a été élu | e | +| qui | a été élu | adjoint | +| José Pinto | a été élu | une abstention ( la sienne ) 7e adjoint en charge des Finances | +| retraité | a été élu | adjoint | +| Michèle Peyron | a été élue aux | législatives | +| L ' ex-diplomate française Salomé Zourabichvili | a été élue | voix | +| Emmanuel Macron | a été élu | sont déroulées | +| elle | a été élue | commissions | +| Élisabeth Enguehard | a été élue | remplacer | + +*** Triples avec propriété commençant par "a été élu" et l'objet contenant "maire" +#+header: :dir "~/inria/icoda/sandbox/ouest-france/Politiques locales/corpus_demissions" +#+header: :results table +#+header: :colnames yes +#+header: :db entity_relations.sqlite +#+begin_src sqlite +SELECT DISTINCT subj,pred,obj FROM relation +WHERE subj IS NOT NULL AND pred LIKE 'a été élu%' AND obj LIKE '%maire%'; +#+end_src + +#+RESULTS: +| subj | pred | obj | +|------------------------+-----------------+---------------------------------------------------------------------------------------------------------| +| Xavier Bénéat | a été élu | adjoint au maire | +| Jean-Pierre Pellennec | a été élu | maire | +| Catherine Sady | a été élue | maire | +| Martial Tanguy | a été élu | adjoint au maire | +| Jean-Paul Payrastre | a été élu | adjoint au maire | +| qui | a été élue | maire | +| Le nombre d ' adjoints | a été élu | adjoint au maire | +| Mayenne | a été élue | des élections municipales , dimanche , liste conduite par le maire sortant divers gauche , Michel Angot | +| Sébastien Blanchard | a été élu | adjoint au maire | +| gestion | a été élu | adjoint au maire | +| Elle | a été élue | première femme maire de Vihiers | +| maire | a été élu | maire de Plouëc-du-Trieux | +| La députée socialiste | a été élue hier | maire | +| députée | a été élue hier | maire | +| Valérie Chesnel | a été élue | maire | +| elle | a été élue | maire | +| il | a été élu | adjoint au maire | +| Martine Duval | a été élue | maire | + +*** Exemple de triples dont la propriété commence par "a été élu" et l'object contient "conseil" +#+header: :dir "~/inria/icoda/sandbox/ouest-france/Politiques locales/corpus_demissions" +#+header: :results table +#+header: :colnames yes +#+header: :db entity_relations.sqlite +#+begin_src sqlite +SELECT DISTINCT subj,pred,obj FROM relation +WHERE subj IS NOT NULL AND pred LIKE 'a été élu%' AND obj LIKE '%conseil%' +LIMIT 20; +#+end_src + +#+RESULTS: +| subj | pred | obj | +|--------------------------------------------+----------------------------+-------------------------------------------------------------------------| +| maire | a été élu | du conseil municipal | +| Marie-Luce Penchard | a été élue | du conseil de surveillance | +| Il | a été élu | un conseil | +| Philippe Gaudin | a été élu conseiller | du sport - et conseiller général suppléant en 2011 | +| Un nouvel adjoint | a été élu hier | conseillers | +| Rassemblement bleu marine de Saint-Nazaire | a été élu | dernier conseiller municipal et conseiller communautaire à la Carène | +| qui | a été élue majoritairement | conseil | +| loudéacienne | a été élue | au conseil communautaire | +| Odile Jardin | a été élue | conseillère | +| un 9 e conseiller Stéphanie Dumand | a été élue | 9 e conseiller communautaire à la communauté de communes de Brocéliande | +| Il | a été élu | au conseil | +| Alan Bourdet | a été élu aux | dernières élections municipales comme conseiller | +| qui | a été élue | du conseil municipal | +| r | a été élu | conseiller | +| Xavier Charles | a été élu | au conseil général | +| seul Jean-Pierre Roux | a été élu | au conseil municipal | +| conseiller | a été élu | conseiller | + + +*** Les propriétés qui contiennent "démissionne" +#+header: :dir "~/inria/icoda/sandbox/ouest-france/Politiques locales/corpus_demissions" +#+header: :results table +#+header: :colnames yes +#+header: :db entity_relations.sqlite +#+begin_src sqlite +SELECT DISTINCT pred FROM relation +WHERE subj IS NOT NULL AND pred LIKE '%démissionne%' AND obj IS NOT NULL +LIMIT 20; +#+end_src + +#+RESULTS: +| pred | +|----------------------------------| +| va démissionner | +| démissionne | +| démissionnera | +| démissionner | +| avait préféré démissionner | +| ne veulent pas démissionner | +| devraient également démissionner | +| devront démissionner | +| devra démissionner | +| avait dû démissionner | +| ai souhaité démissionner | +| devoir démissionner | +| démissionnerai | +| Saura démissionne | +| démissionnerait | +| annonce démissionner | +| ! démissionne | +| démissionnerai donc | +| préfère démissionner plutôt | +| Démissionner | + +*** Exemple de triples dont le sujet contient "maire" et la propriété contient "démissionne" +#+header: :dir "~/inria/icoda/sandbox/ouest-france/Politiques locales/corpus_demissions" +#+header: :results table +#+header: :colnames yes +#+header: :db entity_relations.sqlite +#+begin_src sqlite +SELECT DISTINCT subj,pred,obj FROM relation +WHERE subj LIKE '%maire%' AND pred LIKE '%démissionne%' AND obj IS NOT NULL +LIMIT 20; +#+end_src + +#+RESULTS: +| subj | pred | obj | +|----------------------------------------------------------+-----------------+--------------------------------------------------------------------| +| Le maire , Daniel Pinto | démissionne | du conseil municipal | +| Le maire | démissionne | Christine Esnault | +| Le maire | démissionne | normes | +| Le maire de Requeil | démissionne | Christine Esnault | +| Le maire de Requeil | démissionne | a décidé | +| Le maire , Christian Couturier | va démissionner | Maire | +| Élu maire à l ' unanimité du nouveau conseil municipal , | démissionne | un an plus tard | +| Le maire de Camlez | démissionne | Pierre-Yves Droumaguet | +| maire | démissionne | poste | +| Le maire Jean-Paul Filatre | démissionne | des élections à venir ] | +| Le maire Johan Labory | démissionne | Johan Labory | +| Marie-Pierre Lemaire | démissionne | ] Adjointe | +| Marie-Pierre Lemaire | démissionne | des affaires culturelles de la Ville de Gournay | +| Marie-Pierre Lemaire | démissionner | de ses fonctions | +| Le maire | démissionne | Maire | +| Le premier adjoint au maire | démissionne | Pierre-Marie Lamellière | +| Le 1er adjoint au maire | démissionne | a annoncé | +| dont certains , maires | démissionner | s | +| Le maire | démissionne | Stéphane Desjardins | +| Le maire | démissionne | son troisième adjoint aux finances et vice-président communautaire | + +*** Exemple de triples dont le sujet contient "conseil" et la propriété contient "démissionne" +#+header: :dir "~/inria/icoda/sandbox/ouest-france/Politiques locales/corpus_demissions" +#+header: :results table +#+header: :colnames yes +#+header: :db entity_relations.sqlite +#+begin_src sqlite +SELECT DISTINCT subj,pred,obj FROM relation +WHERE subj LIKE '%conseil%' AND pred LIKE '%démissionne%' AND obj IS NOT NULL +LIMIT 20; +#+end_src + +#+RESULTS: +| subj | pred | obj | +|-----------------------------------------------------------------------------------------------------+-------------------+------------------------------------| +| La conseillère municipale Noëlle Eyhorn | démissionne | Élue | +| le conseil de quartier | démissionner | de ce conseil | +| Ma mission précise comme conseiller délégué | démissionner | de ce poste | +| au conseil Karine Loyer | démissionner | de son poste | +| Le conseil général | va démissionner | du conseil général | +| Élu maire à l ' unanimité du nouveau conseil municipal , | démissionne | un an plus tard | +| Le conseiller municipal Francis Personne | démissionner | début novembre | +| conseiller | démissionne | poste | +| conseillère | démissionne | fonction | +| conseillère | démissionne | élue | +| Conseiller | démissionne | poste | +| certains conseillers | démissionner | du conseil municipal | +| conseillers | démissionner | du conseil municipal | +| Les quatre conseillères et deux adjointes démissionnaires du conseil municipal | démissionner | nos raisons | +| Les quatre conseillères et deux adjointes démissionnaires du conseil municipal | démissionner | aux habitants de la commune | +| Le conseil municipal | démissionne | P | +| Le conseiller municipal Philippe Thomas | démissionne | Philippe Thomas | +| conseiller | démissionne | du conseil municipal | +| une conseillère municipale ] Nathalie Jean | démissionne | du conseil municipal du Merlerault | +| Conseillère municipale entre 2001 et 2008 , puis première adjointe entre avril 2014 et janvier 2017 | démissionne alors | du conseil | diff --git a/projects/index.org b/projects/index.org new file mode 100644 index 0000000000000000000000000000000000000000..52b2547480254bd10055f45094e51bb94092a5d7 --- /dev/null +++ b/projects/index.org @@ -0,0 +1,6 @@ +#+TITLE: Projects + +- [[file:obi-wan/index.org][Obi-Wan]] +- [[file:het2onto-benchmark/index.org][Obi-Wan Benchmark]] +- [[file:qa-test/qa-test.org][Query Answering Test]] +- [[file:icoda/icoda.org][iCODA]] diff --git a/projects/obi-wan/index.org b/projects/obi-wan/index.org new file mode 100644 index 0000000000000000000000000000000000000000..ac99c7cd90baf07c90d9f0422dddab5dc2ee82f2 --- /dev/null +++ b/projects/obi-wan/index.org @@ -0,0 +1,41 @@ +#+TITLE: Obi-Wan + +*Obi-Wan* is a query answering system for RDF integration following the Ontology-Based Data Access paradigm, where heterogeneous data sources are integrated using Global-Local-As-View mappings into an RDF graph with an RDFS ontology. It supports Basic Graph Pattern Queries on both the data triples generated by the mappings and the triples of ontology. It implements both /mediation/ and /materialization/-based query answering approaches. For both approaches, it proposes several strategies for query answering, which move the ontological reasoning from query time to a preprocessing step. + +** Demonstration + +The complete [[https://perso.isima.fr/~maburon/projects/obi-wan/app/][*online demonstration*]] presents some RDF integration systems among which four are based on BSBM and have been used for [[Experiments][previous experiments]]. + +You can also *try* Obi-Wan, following [[https://gitlab.inria.fr/cedar/obi-wan/-/wikis/Get-started][this tutorial]]. + +We demonstrate Obi-Wan at VLDB 2020 on a scenario based on Star-Wars. You can see the corresponding [[https://perso.limos.fr/~maburon/projects/obi-wan/app/ris/star-wars/index.html][RDF integration system online]] and follows the [[file:../../material/vldb20/slides/index.html][interactive slides]] of the presentation: + +@@html:<video controls width="400" height="300" src="../../material/vldb20/recording.mp4" alt="VLDB 2020 presentation recording"></video>@@ + +** Experiments + +In our [[Publications][paper published at EDBT 2020]], we experimentally evaluate the performances of Obi-Wan query answering strategies on four RDF integration systems based on BSBM. We showed that one novel mediation-based query answering strategies (called ~REW-C~), using saturation of mappings in preprocessing, have better performance than other strategies. A detailed description of these experiments is available [[file:../het2onto-benchmark/bsbm/index.org][online]] and can be visualized. + +** Publications +- *Ontology-Based RDF Integration of Heterogeneous Data.* Maxime Buron, François Goasdoué, Ioana Manolescu, Marie-Laure Mugnier. EDBT/ICDT 2020 - 23rd International Conference on Extending Database Technology, Mar 2020. Copenhagen, Denmark. [[https://hal.inria.fr/hal-02446427/document][pdf]] [[file:../../material/edbt20/slides.pdf][slides]] +- *Obi-Wan: Ontology-Based RDF Integration of Heterogeneous Data.* Maxime Buron, François Goasdoué, Ioana Manolescu, Marie-Laure Mugnier. VLDB 2020 - The Forty-sixth International Conference on Very Large Data Bases, Japan. [[https://hal.inria.fr/hal-02921434/document][pdf]] [[file:../../material/vldb20/video.mp4][video]] [[file:../../material/vldb20/slides/index.html][slides]] + +** Sources + +- [[https://perso.limos.fr/maburon/material/obi-wan/doc/][javadoc]] +- [[https://gitlab.inria.fr/cedar/obi-wan][Obi-Wan]] +- [[https://gitlab.inria.fr/cedar/obiwan-examples][RDF Integration Systems examples]] + +*** Links :noexport: +- [[http://pages.saclay.inria.fr/maxime.buron/projects/het2onto-benchmark/bsbm/][BSBM Experiments]] + + +*** Copyright + [[https://team.inria.fr/cedar][CEDAR]], [[https://team.inria.fr/graphik/][GraphIK]] and [[http://www-shaman.irisa.fr/][SHAMAN]] teams +*** Acknowledgment +Part of this work is supported by the Inria Project Lab grant [[https://project.inria.fr/icoda/][iCoda]], a collaborative project between Inria and several major French media, aiming at building a heterogeneous data integration platform for ontology-driven data journalism. + +*** Credits +For the web visualisation: [[https://js.cytoscape.org/][Cytoscape]], [[https://github.com/cytoscape/cytoscape.js-dagre][dagre]], [[https://svelte.dev/][Svelte]]. + +For the video: [[https://www.openshot.org/][OpenShot]], [[https://github.com/phw/peek][Peek]], [[https://inkscape.org/][Inkscape]]. diff --git a/projects/obi-wan/screenshot.png b/projects/obi-wan/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..ca970dcd558669da1dd93159fcd3880586cecedf Binary files /dev/null and b/projects/obi-wan/screenshot.png differ diff --git a/projects/qa-test/qa-test-full-saturation.dot b/projects/qa-test/qa-test-full-saturation.dot new file mode 100644 index 0000000000000000000000000000000000000000..46e21677339b9f7f3dac3587039683cf2b3a850b --- /dev/null +++ b/projects/qa-test/qa-test-full-saturation.dot @@ -0,0 +1,63 @@ +digraph g { +rankdir=LR; +fontsize=10; +N5afc7e96d6c0549decc692adf60c1b07 -> Ne1205a0b3dd7dc1f35446b8a68e59825 [label="subPropertyOf"]; +N5afc7e96d6c0549decc692adf60c1b07 -> Naa70039cec2196d979145bdd5844279c [label="domain"]; +N5afc7e96d6c0549decc692adf60c1b07 -> Ne005ef0913907e377b6a176bbc5edc00 [label="domain"]; +N7e821ae6f6a1907b3c05ccf463bc2e04 -> Naa70039cec2196d979145bdd5844279c [label="range"]; +N7e821ae6f6a1907b3c05ccf463bc2e04 -> N790f478ad4d8ddae18b141667daba221 [label="range"]; +N7e821ae6f6a1907b3c05ccf463bc2e04 -> Nd79f83dee344b150d5d930253886e866 [label="range"]; +Ne1205a0b3dd7dc1f35446b8a68e59825 -> Naa70039cec2196d979145bdd5844279c [label="domain"]; +Ne1205a0b3dd7dc1f35446b8a68e59825 -> Ne005ef0913907e377b6a176bbc5edc00 [label="domain"]; +Ne1205a0b3dd7dc1f35446b8a68e59825 -> N80029ef2380309dbd92f6d593c9c1f20 [label="type"]; +Naa70039cec2196d979145bdd5844279c -> Naa70039cec2196d979145bdd5844279c [label="subClassOf"]; +N790f478ad4d8ddae18b141667daba221 -> Naa70039cec2196d979145bdd5844279c [label="subClassOf"]; +N790f478ad4d8ddae18b141667daba221 -> Nad808933a855b5113f5840f343578761 [label="type"]; +Ne005ef0913907e377b6a176bbc5edc00 -> Naa70039cec2196d979145bdd5844279c [label="subClassOf"]; +N0484cef031105df6b5d2e80f2bccb6de -> Naa70039cec2196d979145bdd5844279c [label="type"]; +N0484cef031105df6b5d2e80f2bccb6de -> N790f478ad4d8ddae18b141667daba221 [label="type"]; +N0484cef031105df6b5d2e80f2bccb6de -> Nd79f83dee344b150d5d930253886e866 [label="type"]; +N87a0b9ea44c969e2da217c1de85d722d -> Naa70039cec2196d979145bdd5844279c [label="type"]; +N87a0b9ea44c969e2da217c1de85d722d -> N790f478ad4d8ddae18b141667daba221 [label="type"]; +N87a0b9ea44c969e2da217c1de85d722d -> Nd79f83dee344b150d5d930253886e866 [label="type"]; +N285711e5c2ca1d95aea2c9bc605f002f -> Naa70039cec2196d979145bdd5844279c [label="type"]; +N285711e5c2ca1d95aea2c9bc605f002f -> N790f478ad4d8ddae18b141667daba221 [label="type"]; +N285711e5c2ca1d95aea2c9bc605f002f -> Nd79f83dee344b150d5d930253886e866 [label="type"]; +Na009b824d5c8ae959bf5b69be89bc88a -> Naa70039cec2196d979145bdd5844279c [label="type"]; +Na009b824d5c8ae959bf5b69be89bc88a -> Ne005ef0913907e377b6a176bbc5edc00 [label="type"]; +Na009b824d5c8ae959bf5b69be89bc88a -> N462b654effe4b74565ca85536848faa9 [label="phoneNumber"]; +Na009b824d5c8ae959bf5b69be89bc88a -> N87a0b9ea44c969e2da217c1de85d722d [label="livesIn"]; +Na009b824d5c8ae959bf5b69be89bc88a -> N462b654effe4b74565ca85536848faa9 [label="contact"]; +N738fbb7110d924550bf87ed22e377205 -> Naa70039cec2196d979145bdd5844279c [label="type"]; +N738fbb7110d924550bf87ed22e377205 -> Ne005ef0913907e377b6a176bbc5edc00 [label="type"]; +N738fbb7110d924550bf87ed22e377205 -> N285711e5c2ca1d95aea2c9bc605f002f [label="livesIn"]; +N91735393706bf3a20c22f299b66e60ed -> Naa70039cec2196d979145bdd5844279c [label="type"]; +N91735393706bf3a20c22f299b66e60ed -> N790f478ad4d8ddae18b141667daba221 [label="type"]; +N91735393706bf3a20c22f299b66e60ed -> Nd79f83dee344b150d5d930253886e866 [label="type"]; +N98a116b0764a0689d4b3c977cf5b12ef -> Naa70039cec2196d979145bdd5844279c [label="type"]; +N98a116b0764a0689d4b3c977cf5b12ef -> Ne005ef0913907e377b6a176bbc5edc00 [label="type"]; +N98a116b0764a0689d4b3c977cf5b12ef -> N0484cef031105df6b5d2e80f2bccb6de [label="livesIn"]; +N020748849b8b15578609846f6f18f61c -> Naa70039cec2196d979145bdd5844279c [label="type"]; +N020748849b8b15578609846f6f18f61c -> Ne005ef0913907e377b6a176bbc5edc00 [label="type"]; +N020748849b8b15578609846f6f18f61c -> N91735393706bf3a20c22f299b66e60ed [label="livesIn"]; +Nd79f83dee344b150d5d930253886e866 -> Naa70039cec2196d979145bdd5844279c [label="subClassOf"]; +Nd79f83dee344b150d5d930253886e866 -> N790f478ad4d8ddae18b141667daba221 [label="subClassOf"]; +N462b654effe4b74565ca85536848faa9 [ label="245470000" ]; +Nd79f83dee344b150d5d930253886e866 [ label="City" ]; +N020748849b8b15578609846f6f18f61c [ label="François" ]; +N98a116b0764a0689d4b3c977cf5b12ef [ label="Ioana" ]; +N91735393706bf3a20c22f299b66e60ed [ label="Lannion" ]; +N738fbb7110d924550bf87ed22e377205 [ label="Marie-Laure" ]; +Na009b824d5c8ae959bf5b69be89bc88a [ label="Maxime" ]; +N285711e5c2ca1d95aea2c9bc605f002f [ label="Montpellier" ]; +N87a0b9ea44c969e2da217c1de85d722d [ label="Orsay" ]; +N0484cef031105df6b5d2e80f2bccb6de [ label="Palaiseau" ]; +Ne005ef0913907e377b6a176bbc5edc00 [ label="Person" ]; +N790f478ad4d8ddae18b141667daba221 [ label="Place" ]; +Naa70039cec2196d979145bdd5844279c [ label="Thing" ]; +Ne1205a0b3dd7dc1f35446b8a68e59825 [ label="contact" ]; +N7e821ae6f6a1907b3c05ccf463bc2e04 [ label="livesIn" ]; +N5afc7e96d6c0549decc692adf60c1b07 [ label="phoneNumber" ]; +N80029ef2380309dbd92f6d593c9c1f20 [ label="Property" ]; +Nad808933a855b5113f5840f343578761 [ label="Class" ]; +} diff --git a/projects/qa-test/qa-test-full-saturation.nt b/projects/qa-test/qa-test-full-saturation.nt new file mode 100644 index 0000000000000000000000000000000000000000..e1f01341d271839bd3b9fdf88fa35c379ac06469 --- /dev/null +++ b/projects/qa-test/qa-test-full-saturation.nt @@ -0,0 +1,56 @@ +<Maxime> <phoneNumber> "245470000" . +<Maxime> <contact> "245470000" . +<Maxime> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<Maxime> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Thing> . + +<Maxime> <livesIn> <Orsay> . +<Orsay> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <City> . +<Orsay> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Place> . +<Orsay> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Thing> . + +<Ioana> <livesIn> <Palaiseau> . +<Palaiseau> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <City> . +<Palaiseau> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Place> . +<Palaiseau> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Thing> . + +<Ioana> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<Ioana> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Thing> . + +<François> <livesIn> <Lannion> . +<Lannion> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <City> . +<Lannion> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Place> . +<Lannion> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Thing> . + +<François> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<François> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Thing> . + +<Marie-Laure> <livesIn> <Montpellier> . +<Montpellier> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <City> . +<Montpellier> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Place> . +<Montpellier> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Thing> . + +<Marie-Laure> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<Marie-Laure> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Thing> . + +<Thing> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . + +<Person> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . + +<Place> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . + +<City> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Place> . +<City> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . + +<livesIn> <http://www.w3.org/2000/01/rdf-schema#range> <City> . +<livesIn> <http://www.w3.org/2000/01/rdf-schema#range> <Place> . +<livesIn> <http://www.w3.org/2000/01/rdf-schema#range> <Thing> . + +<contact> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> . +<contact> <http://www.w3.org/2000/01/rdf-schema#domain> <Thing> . + +<phoneNumber> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <contact> . +<phoneNumber> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> . +<phoneNumber> <http://www.w3.org/2000/01/rdf-schema#domain> <Thing> . + +<contact> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> . +<Place> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> . diff --git a/projects/qa-test/qa-test-full-saturation.png b/projects/qa-test/qa-test-full-saturation.png new file mode 100644 index 0000000000000000000000000000000000000000..11efdd5c28b50e2513003a74ffb5dd9cc4ecdca2 Binary files /dev/null and b/projects/qa-test/qa-test-full-saturation.png differ diff --git a/projects/qa-test/qa-test-schema.dot b/projects/qa-test/qa-test-schema.dot new file mode 100644 index 0000000000000000000000000000000000000000..1c243f3f30f7a0cc14e05a66f51e34a228ee9172 --- /dev/null +++ b/projects/qa-test/qa-test-schema.dot @@ -0,0 +1,22 @@ +digraph g { +rankdir=LR; +fontsize=10; +N5afc7e96d6c0549decc692adf60c1b07 -> Ne1205a0b3dd7dc1f35446b8a68e59825 [label="subPropertyOf"]; +N7e821ae6f6a1907b3c05ccf463bc2e04 -> Nd79f83dee344b150d5d930253886e866 [label="range"]; +Ne1205a0b3dd7dc1f35446b8a68e59825 -> Ne005ef0913907e377b6a176bbc5edc00 [label="domain"]; +Ne1205a0b3dd7dc1f35446b8a68e59825 -> N80029ef2380309dbd92f6d593c9c1f20 [label="type"]; +Naa70039cec2196d979145bdd5844279c -> Naa70039cec2196d979145bdd5844279c [label="subClassOf"]; +N790f478ad4d8ddae18b141667daba221 -> Naa70039cec2196d979145bdd5844279c [label="subClassOf"]; +N790f478ad4d8ddae18b141667daba221 -> Nad808933a855b5113f5840f343578761 [label="type"]; +Ne005ef0913907e377b6a176bbc5edc00 -> Naa70039cec2196d979145bdd5844279c [label="subClassOf"]; +Nd79f83dee344b150d5d930253886e866 -> N790f478ad4d8ddae18b141667daba221 [label="subClassOf"]; +Nd79f83dee344b150d5d930253886e866 [ label="City" ]; +Ne005ef0913907e377b6a176bbc5edc00 [ label="Person" ]; +N790f478ad4d8ddae18b141667daba221 [ label="Place" ]; +Naa70039cec2196d979145bdd5844279c [ label="Thing" ]; +Ne1205a0b3dd7dc1f35446b8a68e59825 [ label="contact" ]; +N7e821ae6f6a1907b3c05ccf463bc2e04 [ label="livesIn" ]; +N5afc7e96d6c0549decc692adf60c1b07 [ label="phoneNumber" ]; +N80029ef2380309dbd92f6d593c9c1f20 [ label="Property" ]; +Nad808933a855b5113f5840f343578761 [ label="Class" ]; +} diff --git a/projects/qa-test/qa-test-schema.nt b/projects/qa-test/qa-test-schema.nt new file mode 100644 index 0000000000000000000000000000000000000000..cfaacde0c584dad79b6312b8bd6585a6b50fdded --- /dev/null +++ b/projects/qa-test/qa-test-schema.nt @@ -0,0 +1,9 @@ +<Thing> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . +<Person> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . +<Place> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . +<City> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Place> . +<livesIn> <http://www.w3.org/2000/01/rdf-schema#range> <City> . +<contact> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> . +<phoneNumber> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <contact> . +<contact> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> . +<Place> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> . diff --git a/projects/qa-test/qa-test-schema.png b/projects/qa-test/qa-test-schema.png new file mode 100644 index 0000000000000000000000000000000000000000..3c2bab6c6f7613253bed55dfe3a67b800ee03e62 Binary files /dev/null and b/projects/qa-test/qa-test-schema.png differ diff --git a/projects/qa-test/qa-test.dot b/projects/qa-test/qa-test.dot new file mode 100644 index 0000000000000000000000000000000000000000..98d457d5d10f91ec6c0ac0f909123fee0e134a79 --- /dev/null +++ b/projects/qa-test/qa-test.dot @@ -0,0 +1,39 @@ +digraph g { +rankdir=LR; +fontsize=10; +N5afc7e96d6c0549decc692adf60c1b07 -> Ne1205a0b3dd7dc1f35446b8a68e59825 [label="subPropertyOf"]; +N7e821ae6f6a1907b3c05ccf463bc2e04 -> Nd79f83dee344b150d5d930253886e866 [label="range"]; +Ne1205a0b3dd7dc1f35446b8a68e59825 -> Ne005ef0913907e377b6a176bbc5edc00 [label="domain"]; +Ne1205a0b3dd7dc1f35446b8a68e59825 -> N80029ef2380309dbd92f6d593c9c1f20 [label="type"]; +Naa70039cec2196d979145bdd5844279c -> Naa70039cec2196d979145bdd5844279c [label="subClassOf"]; +N790f478ad4d8ddae18b141667daba221 -> Naa70039cec2196d979145bdd5844279c [label="subClassOf"]; +N790f478ad4d8ddae18b141667daba221 -> Nad808933a855b5113f5840f343578761 [label="type"]; +Ne005ef0913907e377b6a176bbc5edc00 -> Naa70039cec2196d979145bdd5844279c [label="subClassOf"]; +Na009b824d5c8ae959bf5b69be89bc88a -> N462b654effe4b74565ca85536848faa9 [label="phoneNumber"]; +Na009b824d5c8ae959bf5b69be89bc88a -> N87a0b9ea44c969e2da217c1de85d722d [label="livesIn"]; +N738fbb7110d924550bf87ed22e377205 -> Ne005ef0913907e377b6a176bbc5edc00 [label="type"]; +N738fbb7110d924550bf87ed22e377205 -> N285711e5c2ca1d95aea2c9bc605f002f [label="livesIn"]; +N98a116b0764a0689d4b3c977cf5b12ef -> Ne005ef0913907e377b6a176bbc5edc00 [label="type"]; +N98a116b0764a0689d4b3c977cf5b12ef -> N0484cef031105df6b5d2e80f2bccb6de [label="livesIn"]; +N020748849b8b15578609846f6f18f61c -> Ne005ef0913907e377b6a176bbc5edc00 [label="type"]; +N020748849b8b15578609846f6f18f61c -> N91735393706bf3a20c22f299b66e60ed [label="livesIn"]; +Nd79f83dee344b150d5d930253886e866 -> N790f478ad4d8ddae18b141667daba221 [label="subClassOf"]; +N462b654effe4b74565ca85536848faa9 [ label="245470000" ]; +Nd79f83dee344b150d5d930253886e866 [ label="City" ]; +N020748849b8b15578609846f6f18f61c [ label="François" ]; +N98a116b0764a0689d4b3c977cf5b12ef [ label="Ioana" ]; +N91735393706bf3a20c22f299b66e60ed [ label="Lannion" ]; +N738fbb7110d924550bf87ed22e377205 [ label="Marie-Laure" ]; +Na009b824d5c8ae959bf5b69be89bc88a [ label="Maxime" ]; +N285711e5c2ca1d95aea2c9bc605f002f [ label="Montpellier" ]; +N87a0b9ea44c969e2da217c1de85d722d [ label="Orsay" ]; +N0484cef031105df6b5d2e80f2bccb6de [ label="Palaiseau" ]; +Ne005ef0913907e377b6a176bbc5edc00 [ label="Person" ]; +N790f478ad4d8ddae18b141667daba221 [ label="Place" ]; +Naa70039cec2196d979145bdd5844279c [ label="Thing" ]; +Ne1205a0b3dd7dc1f35446b8a68e59825 [ label="contact" ]; +N7e821ae6f6a1907b3c05ccf463bc2e04 [ label="livesIn" ]; +N5afc7e96d6c0549decc692adf60c1b07 [ label="phoneNumber" ]; +N80029ef2380309dbd92f6d593c9c1f20 [ label="Property" ]; +Nad808933a855b5113f5840f343578761 [ label="Class" ]; +} diff --git a/projects/qa-test/qa-test.nt b/projects/qa-test/qa-test.nt new file mode 100644 index 0000000000000000000000000000000000000000..99261f103c211b0529e9d40abdb4553013876e7b --- /dev/null +++ b/projects/qa-test/qa-test.nt @@ -0,0 +1,17 @@ +<Maxime> <phoneNumber> "245470000" . +<Maxime> <livesIn> <Orsay> . +<Ioana> <livesIn> <Palaiseau> . +<Ioana> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<François> <livesIn> <Lannion> . +<François> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<Marie-Laure> <livesIn> <Montpellier> . +<Marie-Laure> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<Thing> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . +<Person> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . +<Place> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . +<City> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Place> . +<livesIn> <http://www.w3.org/2000/01/rdf-schema#range> <City> . +<contact> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> . +<phoneNumber> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <contact> . +<contact> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> . +<Place> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> . diff --git a/projects/qa-test/qa-test.org b/projects/qa-test/qa-test.org new file mode 100644 index 0000000000000000000000000000000000000000..8fdbf4f42f0d0e8e623058819be45b98d97d9ad0 --- /dev/null +++ b/projects/qa-test/qa-test.org @@ -0,0 +1,952 @@ +#+TITLE: Query Answering Test + +* Test graph + +There are 12 initial triples in the graph: + +#+BEGIN_SRC shell :results output :exports results +cat qa-test.nt +#+END_SRC + +#+RESULTS: +#+begin_example +<Maxime> <phoneNumber> "245470000" . +<Maxime> <livesIn> <Orsay> . +<Ioana> <livesIn> <Palaiseau> . +<Ioana> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<François> <livesIn> <Lannion> . +<François> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<Marie-Laure> <livesIn> <Montpellier> . +<Marie-Laure> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<Thing> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . +<Person> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . +<Place> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . +<City> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Place> . +<livesIn> <http://www.w3.org/2000/01/rdf-schema#range> <City> . +<contact> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> . +<phoneNumber> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <contact> . +<contact> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> . +<Place> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> . +#+end_example + +#+BEGIN_SRC shell :exports results +rdf_img qa-test.nt qa-test.dot + +sed -i 's/http:\/\/example\.org\///g' qa-test.dot +sed -i 's/rdf://g' qa-test.dot +sed -i 's/http:\/\/www\.w3\.org\/2000\/01\/rdf-schema#//g' qa-test.dot +sed -i 's/%C3%A7/ç/g' qa-test.dot + +dot -Tpng qa-test.dot > qa-test.png +#+END_SRC + +#+RESULTS: + +[[file:qa-test.png]] + +** Schema + +Overview of the schema + +#+BEGIN_SRC shell :results output :exports results +grep "<http://www.w3.org/2000/01/rdf-schema#subClassOf>\|<http://www.w3.org/2000/01/rdf-schema#subPropertyOf>\|<http://www.w3.org/2000/01/rdf-schema#range>\|<http://www.w3.org/2000/01/rdf-schema#domain>\|<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property>\|<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class>" qa-test.nt > qa-test-schema.nt + +rdf_img qa-test-schema.nt qa-test-schema.dot + +sed -i 's/http:\/\/example\.org\///g' qa-test-schema.dot +sed -i 's/rdf://g' qa-test-schema.dot +sed -i 's/http:\/\/www\.w3\.org\/2000\/01\/rdf-schema#//g' qa-test-schema.dot + +dot -Tpng qa-test-schema.dot > qa-test-schema.png + +graph-easy qa-test-schema.dot +#+END_SRC + +#+RESULTS: +#+begin_example + subClassOf + +------------+ + v | ++-------------+ subPropertyOf +----------+ domain +--------+ subClassOf +----------------+ +| phoneNumber | ---------------> | contact | ------------> | Person | ------------> | Thing | ++-------------+ +----------+ +--------+ +----------------+ + | ^ + | type | + v | ++-------------+ +----------+ | +| livesIn | | Property | | ++-------------+ +----------+ | + | | + | range | + v | ++-------------+ subClassOf +----------+ subClassOf | +| City | ---------------> | Place | -----------------------------------------+ ++-------------+ +----------+ + | + | type + v + +----------+ + | Class | + +----------+ +#+end_example + + + +* Scenarios + +** Evaluation +In this scenario, we simply evaluate the query on the graph described above without reasoning. + +*** Tests + +#+BEGIN_SRC java + /** + * 1 answer: + * - <> + */ + @Test + public void shouldAnswerBooleanQuery() throws Exception { + Set<Tuple<Term>> answers = new HashSet<Tuple<Term>>(); + Tuple t = new Tuple(); + answers.add(t); + + String queryString = "Q<> :- triple(<Maxime>, <livesIn>, <Orsay>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 0 answer: + */ + @Test + public void shouldAnswerBooleanQueryWithInvalidType() throws Exception { + Set<Tuple<Term>> answers = new HashSet<Tuple<Term>>(); + + String queryString = "Q<> :- triple($s, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <Orsay>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 0 answer: + */ + @Test + public void shouldAnswerBooleanQueryWithVariableAsSubject() throws Exception { + Set<Tuple<Term>> answers = new HashSet<Tuple<Term>>(); + Tuple t = new Tuple(); + + String queryString = "Q<> :- triple($s, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <City>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 0 answer + */ + @Test + public void shouldAnswerBooleanQueryWithVariableAsProperty() throws Exception { + Set<Tuple<Term>> answers = new HashSet<Tuple<Term>>(); + + String queryString = "Q<> :- triple(<Maxime>, $p, <Montpellier>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 0 answer: + */ + @Test + public void shouldAnswerBooleanQueryWithVariableAsObject() throws Exception { + Set<Tuple<Term>> answers = new HashSet<Tuple<Term>>(); + + String queryString = "Q<> :- triple(<Orsay>, <contact>, $o) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - <Maxime> + */ + @Test + public void shouldSelectSubject() throws Exception { + TupleSet answers = new TupleSet(); + Tuple t = new Tuple(new IRI("Maxime")); + answers.add(t); + + String queryString = "Q<$subject> :- triple($subject, <livesIn>, <Orsay>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - <livesIn> + */ + @Test + public void shouldSelectProperty() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("livesIn"))); + + String queryString = "Q<$prop> :- triple(<Maxime>, $prop, <Orsay>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - <Orsay> + */ + @Test + public void shouldSelectObject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Orsay"))); + + String queryString = "Q<$object> :- triple(<Maxime>, <livesIn>, $object) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - "245470000" + */ + @Test + public void shouldSelectLiteralObject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new Literal("245470000"))); + + String queryString = "Q<$object> :- triple(<Maxime>, <phoneNumber>, $object) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - <Maxime> + */ + @Test + public void shouldSelectSubjectWithExistentialProperty() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Maxime"))); + + String queryString = "Q<$subject> :- triple($subject, $prop, <Orsay>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - <Maxime> + */ + @Test + public void shouldSelectSubjectWithExistentialObject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Maxime"))); + + String queryString = "Q<$subject> :- triple($subject, <phoneNumber>, $object) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - <phoneNumber> + */ + @Test + public void shouldSelectPropertyWithExistentialSubject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("phoneNumber"))); + + String queryString = "Q<$prop> :- triple($subject, $prop, \"245470000\") ;"; + assertAnswer(queryString, answers); + } + + /** + * 3 answers: + * - <phoneNumber> + * - <livesIn> + * - <rdf:type> + */ + @Test + public void shouldSelectPropertyWithExistentialObject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("phoneNumber"))); + answers.add(new Tuple(new IRI("livesIn"))); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))); + + String queryString = "Q<$prop> :- triple(<Maxime>, $prop, $object) ;"; + assertAnswer(queryString, answers); + } + + /** + * 4 answers: + * - <Orsay> + * - <Palaiseau> + * - <Montpellier> + * - <Lannion> + */ + @Test + public void shouldSelectObjectWithExistentialSubject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Orsay"))); + answers.add(new Tuple(new IRI("Palaiseau"))); + answers.add(new Tuple(new IRI("Montpellier"))); + answers.add(new Tuple(new IRI("Lannion"))); + + String queryString = "Q<$object> :- triple($subject, <livesIn>, $object) ;"; + assertAnswer(queryString, answers); + } + + /** + * 2 answers: + * - "245470000" + * - <Orsay> + */ + @Test + public void shouldSelectObjectWithExistentialProperty() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new Literal("245470000"))); + answers.add(new Tuple(new IRI("Orsay"))); + + String queryString = "Q<$object> :- triple(<Maxime>, $prop, $object) ;"; + assertAnswer(queryString, answers); + } + + /** + * no answer + */ + @Test + public void shouldSelectSubjectOfType() throws Exception { + TupleSet answers = new TupleSet(); + + String queryString = "Q<$subject> :- triple($subject, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <Place>);"; + assertAnswer(queryString, answers); + } + + /** + * no answer: + */ + @Test + public void shouldSelectSubjectOfType2() throws Exception { + TupleSet answers = new TupleSet(); + + String queryString = "Q<$subject> :- triple($subject, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <Thing>);"; + assertAnswer(queryString, answers); + } + + /** + * 3 answers: + */ + @Test + public void shouldSelectSubjectOfType3() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Marie-Laure"))); + answers.add(new Tuple(new IRI("Ioana"))); + answers.add(new Tuple(new IRI("François"))); + + String queryString = "Q<$subject> :- triple($subject, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <Person>);"; + assertAnswer(queryString, answers); + } + + /** + * no answer: + */ + @Test + public void shouldSelectTypeOfSubject() throws Exception { + TupleSet answers = new TupleSet(); + + String queryString = "Q<$type> :- triple(<Maxime>, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, $type);"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + */ + @Test + public void shouldSelectTypeOfSubject2() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Person"))); + + String queryString = "Q<$type> :- triple(<Ioana>, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, $type);"; + assertAnswer(queryString, answers); + } + + /** + * 3 answers: + * - <Person> + * - <Class> + * - <Property> + */ + @Test + public void shouldSelectAllTypes() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Person"))); + answers.add(new Tuple(new IRI("http://www.w3.org/2000/01/rdf-schema#Class"))); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"))); + + String queryString = "Q<$type> :- triple($subject, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, $type);"; + assertAnswer(queryString, answers); + } + + /** + * 7 answers: + * - <rdf:type> + * - <phoneNumber> + * - <livesIn> + * - <rdfs:subClassOf> + * - <rdfs:subProperty> + * - <rdfs:domain> + * - <rdfs:range> + */ + @Test + public void shouldSelectAllProperties() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))); + answers.add(new Tuple(new IRI("phoneNumber"))); + answers.add(new Tuple(new IRI("livesIn"))); + answers.add(new Tuple(new IRI("http://www.w3.org/2000/01/rdf-schema#subClassOf"))); + answers.add(new Tuple(new IRI("http://www.w3.org/2000/01/rdf-schema#subPropertyOf"))); + answers.add(new Tuple(new IRI("http://www.w3.org/2000/01/rdf-schema#domain"))); + answers.add(new Tuple(new IRI("http://www.w3.org/2000/01/rdf-schema#range"))); + + String queryString = "Q<$prop> :- triple($subject, $prop, $object);"; + assertAnswer(queryString, answers); + } + + /** + * no answer: + */ + @Test + public void shouldJoin() throws Exception { + TupleSet answers = new TupleSet(); + + String queryString = "Q<$city, $number> :- triple($name, <livesIn>, $city), triple($name, <contact>, $number) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + */ + @Test + public void shouldJoin2() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Orsay"), new Literal("245470000"))); + + String queryString = "Q<$city, $number> :- triple($name, <livesIn>, $city), triple($name, <phoneNumber>, $number) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answers: + * - <Thing>, <subClassOf> + */ + @Test + public void shouldSelectOnVariableEquality() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Thing"), new IRI("http://www.w3.org/2000/01/rdf-schema#subClassOf"))); + + String queryString = "Q<$var, $prop> :- triple($var, $prop, $var);"; + assertAnswer(queryString, answers); + } + + /** + * no answer + * + */ + @Test + public void shouldDoProduct() throws Exception { + TupleSet answers = new TupleSet(); + + String queryString = "Q<$prop, $city> :- triple(<Ioana>, $prop, $object), triple($city,<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <City>);"; + assertAnswer(queryString, answers); + } + + + /** + * 8 answer + * + */ + @Test + public void shouldDoProduct2() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), new IRI("Orsay"))); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), new IRI("Lannion"))); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), new IRI("Palaiseau"))); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), new IRI("Montpellier"))); + answers.add(new Tuple(new IRI("livesIn"), new IRI("Orsay"))); + answers.add(new Tuple(new IRI("livesIn"), new IRI("Lannion"))); + answers.add(new Tuple(new IRI("livesIn"), new IRI("Palaiseau"))); + answers.add(new Tuple(new IRI("livesIn"), new IRI("Montpellier"))); + + String queryString = "Q<$prop, $city> :- triple(<Ioana>, $prop, $object), triple($name ,<livesIn>, $city);"; + assertAnswer(queryString, answers); + } +#+END_SRC + +** Full RDFS Reasoning + +*** Overview + +The fully saturated graph looks like ([[file:qa-test-full-saturation.nt][nt file]]): + +#+BEGIN_SRC shell :exports results +rdf_img qa-test-full-saturation.nt qa-test-full-saturation.dot + +sed -i 's/http:\/\/example\.org\///g' qa-test-full-saturation.dot +sed -i 's/rdf://g' qa-test-full-saturation.dot +sed -i 's/http:\/\/www\.w3\.org\/2000\/01\/rdf-schema#//g' qa-test-full-saturation.dot +sed -i 's/%C3%A7/ç/g' qa-test-full-saturation.dot +dot -Tpng qa-test-full-saturation.dot > qa-test-full-saturation.png + +#echo 'qa-test-full-saturation.png' +#+END_SRC + +#+RESULTS: + + +[[file:qa-test-full-saturation.png]] + +*** Implementations + +It concerns the following settings in ~query-session~: +- ~TranslatedUCQuery~ with ~FULL_REAS~ reasoner +- ~TranslatedJUCQuery~ with ~FULL_REAS~ reasoner +- ~TranslatedSCQuery~ with ~FULL_REAS~ reasoner + +*** Tests + +#+begin_SRC java + /** + * 1 answer: + * - <> + */ + @Test + public void shouldAnswerBooleanQuery() throws Exception { + Set<Tuple<Term>> answers = new HashSet<Tuple<Term>>(); + Tuple t = new Tuple(); + answers.add(t); + + String queryString = "Q<> :- triple(<Maxime>, <livesIn>, <Orsay>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 0 answer: + */ + @Test + public void shouldAnswerBooleanQueryWithInvalidType() throws Exception { + Set<Tuple<Term>> answers = new HashSet<Tuple<Term>>(); + + String queryString = "Q<> :- triple($s, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <Orsay>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - <> + */ + @Test + public void shouldAnswerBooleanQueryWithVariableAsSubject() throws Exception { + Set<Tuple<Term>> answers = new HashSet<Tuple<Term>>(); + Tuple t = new Tuple(); + answers.add(t); + + String queryString = "Q<> :- triple($s, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <City>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 0 answer + */ + @Test + public void shouldAnswerBooleanQueryWithVariableAsProperty() throws Exception { + Set<Tuple<Term>> answers = new HashSet<Tuple<Term>>(); + + String queryString = "Q<> :- triple(<Maxime>, $p, <Montpellier>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 0 answer: + */ + @Test + public void shouldAnswerBooleanQueryWithVariableAsObject() throws Exception { + Set<Tuple<Term>> answers = new HashSet<Tuple<Term>>(); + + String queryString = "Q<> :- triple(<Orsay>, <contact>, $o) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - <Maxime> + */ + @Test + public void shouldSelectSubject() throws Exception { + TupleSet answers = new TupleSet(); + Tuple t = new Tuple(new IRI("Maxime")); + answers.add(t); + + String queryString = "Q<$subject> :- triple($subject, <livesIn>, <Orsay>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - <livesIn> + */ + @Test + public void shouldSelectProperty() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("livesIn"))); + + String queryString = "Q<$prop> :- triple(<Maxime>, $prop, <Orsay>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - <Orsay> + */ + @Test + public void shouldSelectObject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Orsay"))); + + String queryString = "Q<$object> :- triple(<Maxime>, <livesIn>, $object) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - "245470000" + */ + @Test + public void shouldSelectLiteralObject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new Literal("245470000"))); + + String queryString = "Q<$object> :- triple(<Maxime>, <phoneNumber>, $object) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - <Maxime> + */ + @Test + public void shouldSelectSubjectWithExistentialProperty() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Maxime"))); + + String queryString = "Q<$subject> :- triple($subject, $prop, <Orsay>) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answer: + * - <Maxime> + */ + @Test + public void shouldSelectSubjectWithExistentialObject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Maxime"))); + + String queryString = "Q<$subject> :- triple($subject, <phoneNumber>, $object) ;"; + assertAnswer(queryString, answers); + } + + /** + * 2 answers: + * - <contact> + * - <phoneNumber> + */ + @Test + public void shouldSelectPropertyWithExistentialSubject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("contact"))); + answers.add(new Tuple(new IRI("phoneNumber"))); + + String queryString = "Q<$prop> :- triple($subject, $prop, \"245470000\") ;"; + assertAnswer(queryString, answers); + } + + /** + * 4 answers: + * - <contact> + * - <phoneNumber> + * - <livesIn> + * - <rdf:type> + */ + @Test + public void shouldSelectPropertyWithExistentialObject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("contact"))); + answers.add(new Tuple(new IRI("phoneNumber"))); + answers.add(new Tuple(new IRI("livesIn"))); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))); + + String queryString = "Q<$prop> :- triple(<Maxime>, $prop, $object) ;"; + assertAnswer(queryString, answers); + } + + /** + * 4 answers: + * - <Orsay> + * - <Palaiseau> + * - <Montpellier> + * - <Lannion> + */ + @Test + public void shouldSelectObjectWithExistentialSubject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Orsay"))); + answers.add(new Tuple(new IRI("Palaiseau"))); + answers.add(new Tuple(new IRI("Montpellier"))); + answers.add(new Tuple(new IRI("Lannion"))); + + String queryString = "Q<$object> :- triple($subject, <livesIn>, $object) ;"; + assertAnswer(queryString, answers); + } + + /** + * 4 answers: + * - <Thing> + * - <Person> + * - "245470000" + * - <Orsay> + */ + @Test + public void shouldSelectObjectWithExistentialProperty() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Thing"))); + answers.add(new Tuple(new IRI("Person"))); + answers.add(new Tuple(new Literal("245470000"))); + answers.add(new Tuple(new IRI("Orsay"))); + + String queryString = "Q<$object> :- triple(<Maxime>, $prop, $object) ;"; + assertAnswer(queryString, answers); + } + + /** + * 4 answers: + * - <Orsay> + * - <Palaiseau> + * - <Montpellier> + * - <Lannion> + */ + @Test + public void shouldSelectSubjectOfType() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Orsay"))); + answers.add(new Tuple(new IRI("Palaiseau"))); + answers.add(new Tuple(new IRI("Montpellier"))); + answers.add(new Tuple(new IRI("Lannion"))); + + String queryString = "Q<$subject> :- triple($subject, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <Place>);"; + assertAnswer(queryString, answers); + } + + /** + * 8 answers: + * - <Orsay> + * - <Palaiseau> + * - <Montpellier> + * - <Lannion> + * - <Maxime> + * - <Marie-Laure> + * - <Ioana> + * - <François> + */ + @Test + public void shouldSelectSubjectOfType2() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Orsay"))); + answers.add(new Tuple(new IRI("Palaiseau"))); + answers.add(new Tuple(new IRI("Montpellier"))); + answers.add(new Tuple(new IRI("Lannion"))); + answers.add(new Tuple(new IRI("Maxime"))); + answers.add(new Tuple(new IRI("Marie-Laure"))); + answers.add(new Tuple(new IRI("Ioana"))); + answers.add(new Tuple(new IRI("François"))); + + String queryString = "Q<$subject> :- triple($subject, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <Thing>);"; + assertAnswer(queryString, answers); + } + + /** + * 2 answers: + * - <Person> + * - <Thing> + */ + @Test + public void shouldSelectTypeOfSubject() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Person"))); + answers.add(new Tuple(new IRI("Thing"))); + + String queryString = "Q<$type> :- triple(<Maxime>, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, $type);"; + assertAnswer(queryString, answers); + } + + /** + * 6 answers: + * - <Person> + * - <Thing> + * - <Place> + * - <City> + * - <Class> + * - <Property> + */ + @Test + public void shouldSelectAllTypes() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Person"))); + answers.add(new Tuple(new IRI("Thing"))); + answers.add(new Tuple(new IRI("Place"))); + answers.add(new Tuple(new IRI("City"))); + answers.add(new Tuple(new IRI("http://www.w3.org/2000/01/rdf-schema#Class"))); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"))); + + String queryString = "Q<$type> :- triple($subject, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, $type);"; + assertAnswer(queryString, answers); + } + + /** + * 8 answers: + * - <rdf:type> + * - <phoneNumber> + * - <contact> + * - <livesIn> + * - <rdfs:subClassOf> + * - <rdfs:subProperty> + * - <rdfs:domain> + * - <rdfs:range> + */ + @Test + public void shouldSelectAllProperties() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))); + answers.add(new Tuple(new IRI("phoneNumber"))); + answers.add(new Tuple(new IRI("contact"))); + answers.add(new Tuple(new IRI("livesIn"))); + answers.add(new Tuple(new IRI("http://www.w3.org/2000/01/rdf-schema#subClassOf"))); + answers.add(new Tuple(new IRI("http://www.w3.org/2000/01/rdf-schema#subPropertyOf"))); + answers.add(new Tuple(new IRI("http://www.w3.org/2000/01/rdf-schema#domain"))); + answers.add(new Tuple(new IRI("http://www.w3.org/2000/01/rdf-schema#range"))); + + String queryString = "Q<$prop> :- triple($subject, $prop, $object);"; + assertAnswer(queryString, answers); + } + + /** + * 33 answers + * We found 39 triples, because of this issue https://gitlab.inria.fr/cedar/reasoning/issues/2, + * the 6 added triples are the following: + * - | <phoneNumber> | <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> | <phoneNumber> |, + * - | <City> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <City> |, + * - | <Person> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <Person> |, + * - | <Place> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <Place> |, + * - | <contact> | <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> | <contact> |, + * - | <livesIn> | <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> | <livesIn> |, + * + */ + // @Test + // public void shouldSelectEveryTriple() throws Exception { + // String queryString = "Q<$subject, $prop, $object> :- triple($subject, $prop, $object);"; + // assertAnswerNumber(queryString, 33); + // } + + /** + * 1 answers: + * - <Orsay>, "245470000" + */ + @Test + public void shouldJoin() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Orsay"), new Literal("245470000"))); + + String queryString = "Q<$city, $number> :- triple($name, <livesIn>, $city), triple($name, <contact>, $number) ;"; + assertAnswer(queryString, answers); + } + + /** + * 1 answers: + * - <Thing>, <subClassOf> + */ + @Test + public void shouldSelectOnVariableEquality() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Thing"), new IRI("http://www.w3.org/2000/01/rdf-schema#subClassOf"))); + + String queryString = "Q<$var, $prop> :- triple($var, $prop, $var);"; + assertAnswer(queryString, answers); + } + + /** + * 8 answers + * + */ + @Test + public void shouldDoProduct() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), new IRI("Orsay"))); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), new IRI("Lannion"))); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), new IRI("Palaiseau"))); + answers.add(new Tuple(new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), new IRI("Montpellier"))); + answers.add(new Tuple(new IRI("livesIn"), new IRI("Orsay"))); + answers.add(new Tuple(new IRI("livesIn"), new IRI("Lannion"))); + answers.add(new Tuple(new IRI("livesIn"), new IRI("Palaiseau"))); + answers.add(new Tuple(new IRI("livesIn"), new IRI("Montpellier"))); + + String queryString = "Q<$prop, $city> :- triple(<Ioana>, $prop, $object), triple($city,<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <City>);"; + assertAnswer(queryString, answers); + } + + @Test + public void shouldFindAllSubPropertyOf() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("phoneNumber"), new IRI("contact"))); + + String queryString = "Q<$X, $Y> :- triple($X, <http://www.w3.org/2000/01/rdf-schema#subPropertyOf>, $Y);"; + + assertAnswer(queryString, answers); + } + + @Test + public void shouldFindAllSubClassOf() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("Person"), new IRI("Thing"))); + answers.add(new Tuple(new IRI("Thing"), new IRI("Thing"))); + answers.add(new Tuple(new IRI("City"), new IRI("Thing"))); + answers.add(new Tuple(new IRI("City"), new IRI("Place"))); + answers.add(new Tuple(new IRI("Place"), new IRI("Thing"))); + String queryString = "Q<$X, $Y> :- triple($X, <http://www.w3.org/2000/01/rdf-schema#subClassOf>, $Y);"; + + assertAnswer(queryString, answers); + } + + @Test + public void shouldFindAllDomain() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("phoneNumber"), new IRI("Thing"))); + answers.add(new Tuple(new IRI("phoneNumber"), new IRI("Person"))); + answers.add(new Tuple(new IRI("contact"), new IRI("Thing"))); + answers.add(new Tuple(new IRI("contact"), new IRI("Person"))); + String queryString = "Q<$X, $Y> :- triple($X, <http://www.w3.org/2000/01/rdf-schema#domain>, $Y);"; + + assertAnswer(queryString, answers); + } + + @Test + public void shouldFindAllRange() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("livesIn"), new IRI("City"))); + answers.add(new Tuple(new IRI("livesIn"), new IRI("Place"))); + answers.add(new Tuple(new IRI("livesIn"), new IRI("Thing"))); + String queryString = "Q<$X, $Y> :- triple($X, <http://www.w3.org/2000/01/rdf-schema#range>, $Y);"; + + assertAnswer(queryString, answers); + } + + @Test + public void shouldFindAnswersOfQueryWithEmptyBody() throws Exception { + TupleSet answers = new TupleSet(); + answers.add(new Tuple(new IRI("test"))); + + String queryString = "Q<<test>> :- ;"; + + assertAnswer(queryString, answers); + } + +#+END_SRC diff --git a/projects/qa-test/qa-test.png b/projects/qa-test/qa-test.png new file mode 100644 index 0000000000000000000000000000000000000000..40c77bbebb01047504c9eaafdbbc9599109b8441 Binary files /dev/null and b/projects/qa-test/qa-test.png differ diff --git a/projects/qa-test/qa-test.properties b/projects/qa-test/qa-test.properties new file mode 100644 index 0000000000000000000000000000000000000000..acb93412228073d777f9e7d29e01bd94dec9aac1 --- /dev/null +++ b/projects/qa-test/qa-test.properties @@ -0,0 +1,151 @@ +#################################################################################################### +# # +# DO NOT COMMIT LOCAL (TEST) CHANGES # +# # +#################################################################################################### + +#+++++++++++++++++++++++++++++++ UNDERLYING RDBMS ENGINE PROPERTIES +++++++++++++++++++++++++++++++# +# Database engine +#database.engine = MYSQL +database.engine = POSTGRESQL +# Database host +database.host = localhost +# Database port +database.port = 5432 + +# Database user +database.user = mburon + +# Database password +database.password = mburon +#database.password = cedar + +database.name =qatest + +#+++++++++++++++++++++++++++++++ DO NOT CHANGE FOLLOWING VALUES +++++++++++++++++++++++++++++++++++ + +# The RDBMS (input) triples table name +database.triples_table_name = triples + +# The RDBMS (output) encoded triples table name +database.encoded_triples_table_name = encoded + +# Database dictionary table name. +# Use to encode the input query and ontology and decode the results. +database.dictionary_table_name = dictionary + +# Database (physical) storage layout. +# Valid options: TRIPLES_TABLE, TABLE_PER_ROLE_AND_CONCEPT +#database.storage_layout = TRIPLES_TABLE +database.storage_layout = TABLE_PER_ROLE_AND_CONCEPT + +# If this parameter is true and if there already exists a database of the given name, +# then the database is dropped before being rewritten. +database.drop_existing_db = true +# If this parameter is true and if there already exist tables (within the database of the given name) +# having the name of some tables that we want to create, then these tables are dropped before being +# recreated. + +database.fetch_size = 1000000 +#++++++++++++++++++++++++++++++++++++++ DICTIONARY PROPERTIES +++++++++++++++++++++++++++++++++++++# +# Dictionary resultSet fetch size. +dictionary.fetch_size = 1000 +#+++++++++++++++++++++++++++++++++++++ SATURATION PROPERTIES ++++++++++++++++++++++++++++++++++++++# +# Batch size. +saturation.batch_size = 1000 +# enabled saturation will be choosed by the materialization method +saturation.enable = true +# default name: encoded_saturated_triples +database.encoded_saturated_triples_table_name = encoded_sat +#++++++++++++++++++++++++++++++++++++++ STATISTICS PROPERTIES +++++++++++++++++++++++++++++++++++++# +# Flag indicating the statistics tables generation (or not) for the triples table. +statistics.create_tables_flag = false + + +input.ontology_file = +dataset.name = + +#++++++++++++++++++++++++++++++ COVER SELECTION ALGORITHM PROPERTIES ++++++++++++++++++++++++++++++# +# Cover selection algorithm algorithm threads. +# Used for RDFS cover selection algorithm, when reformulating a query. +cover_selection_algorithm.threads = 32 + +# Cover selection algorithm cost function. +# Valid options: TRIPLES_TABLE_COST_MODEL, TABLE_PER_ROLE_AND_CONCEPT_COST_MODEL, POSTGRESQL +cover_selection_algorithm.cost_function = TABLE_PER_ROLE_AND_CONCEPT_COST_MODEL +#------------------------------ COVER SELECTION ALGORITHM PROPERTIES ------------------------------# + +#+++++++++++++++++++++++++++++++ TRIPLES TABLE COST MODEL PROPERTIES ++++++++++++++++++++++++++++++# +# Cost model cost model constants name. +cost_model.constants_name = POSTGRESQL_CONTSTANTS +# Cost model algorithm IO constant. +cost_model.io_constant = 0.00046167385 +# Cost model CPU constant. +cost_model.cpu_constant = 0.00018806125 +# Cost model materialization constant. +cost_model.materialization_constant = 0.00039235885 +# Cost model index 1 constant. +cost_model.index1_constant = 0.001285472726 +# Cost model index 2 constant. +cost_model.index2_constant = 0.00053436378 +# Cost model external disk unique flag +cost_model.external_disk_unique_flag = false +# Cost model larger fragment sub-query intermediate result pipelining flag. +cost_model.pipeline_larger_subquery_flag = true +#------------------------------- TRIPLES TABLE COST MODEL PROPERTIES ------------------------------# + +#+++++++++++++++++++++++++++++++++++ SQL QuerySession PROPERTIES +++++++++++++++++++++++++++++++++++# +# SQL main query distinct flag +translator.main_query_distinct_flag = true +# SQL query syntax. +# Valid options: CTE_JOINED_REFORMULATIONS, JOINED_REFORMULATIONS +translator.sql_syntax = CTE_JOINED_REFORMULATIONS + +# Attributes prefix for attributes renaming in SQL. +translator.attribute_prefix = att_ + +# Relation prefix for relations renaming in SQL. +# Used when the storage schema is TRIPLES_TABLE (see UNDERLYING RDBMS ENGINE PROPERTIES). +translator.relation_prefix = p + +# Database dictionary-encoded (large) triples (s,p,o) table name. +# Used when the storage layout is TRIPLES_TABLE (see UNDERLYING RDBMS ENGINE PROPERTIES). +translator.encoded_triples_table_name = encoded_triples + +# Database prefix for concept/role table names. +# Used when the storage layout is TABLE_PER_ROLE_AND_CONCEPT (see UNDERLYING RDBMS ENGINE PROPERTIES). +translator.table_name_prefix = t_ + +# CQ atom (triple pattern) prefix for relations renaming. +# Used when the storage layout is TABLE_PER_ROLE_AND_CONCEPT (see UNDERLYING RDBMS ENGINE PROPERTIES). +translator.alias_prefix = tt_ +#----------------------------------- SQL TRANSLATION PROPERTIES -----------------------------------# + +#+++++++++++++++ SQL QUERY EXECUTION AGAINST THE UNDERLYING RDBMS ENGINE PROPERTIES +++++++++++++++# +# Query semantics +# Valid options: SET, BAG +query.semantics = SET + +# SQL query max length. +# If set (ie. > 0), covers producing SQL queries larger than the specified +# max length will be avoided. +query.max_length = 0 + +# SQL number of executions against the underlying RDBMS engine (repetitions without warm-up) +query.executions = 3 + +# SQL resultSet fetch size +query.fetch_size = 1000000 + +# SQL query resultSet dictionary-decode flag +query.decode_results = true + +# Input directory. +# Used to retrieve the query execution information (avoid executing against +# the RDBMS engine the same SQL) of known (already executed) query, cover, +# engine, etc. +query.input_directory = +#--------------- SQL QUERY EXECUTION AGAINST THE UNDERLYING RDBMS ENGINE PROPERTIES ---------------# + +#--------------- RDFS REFORMULATION REASONNER -----------------------------------------------------# +reasoner.type = FULL_REAS diff --git a/projects/qa-test/qa-test.tex b/projects/qa-test/qa-test.tex new file mode 100644 index 0000000000000000000000000000000000000000..a7add1a9d002b3d35c17f61d8930199698c8438f --- /dev/null +++ b/projects/qa-test/qa-test.tex @@ -0,0 +1,326 @@ +% Created 2019-02-07 jeu. 08:56 +% Intended LaTeX compiler: pdflatex +\documentclass[11pt]{article} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{graphicx} +\usepackage{grffile} +\usepackage{longtable} +\usepackage{wrapfig} +\usepackage{rotating} +\usepackage[normalem]{ulem} +\usepackage{amsmath} +\usepackage{textcomp} +\usepackage{amssymb} +\usepackage{capt-of} +\usepackage{hyperref} +\author{Maxime Buron} +\date{\today} +\title{Query Answering Test} +\hypersetup{ + pdfauthor={Maxime Buron}, + pdftitle={Query Answering Test}, + pdfkeywords={}, + pdfsubject={}, + pdfcreator={Emacs 25.3.50.2 (Org mode 9.2)}, + pdflang={English}} +\begin{document} + +\maketitle +\tableofcontents + + +\section{Test graph} +\label{sec:org97c66d0} + +There are 12 initial triples in the graph: + +\begin{verbatim} +<Maxime> <phoneNumber> "245470000" . +<Maxime> <livesIn> <Orsay> . +<Ioana> <livesIn> <Palaiseau> . +<Ioana> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<François> <livesIn> <Lannion> . +<François> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<Marie-Laure> <livesIn> <Montpellier> . +<Marie-Laure> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> . +<Thing> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . +<Person> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . +<Place> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Thing> . +<City> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <Place> . +<livesIn> <http://www.w3.org/2000/01/rdf-schema#range> <City> . +<contact> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> . +<phoneNumber> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <contact> . +\end{verbatim} + +\begin{center} +\includegraphics[width=.9\linewidth]{qa-test.png} +\end{center} + + + +\section{Scenarios} +\label{sec:org2250a65} + +\subsection{Full RDFS Reasoning} +\label{sec:orga879003} + +\subsubsection{Overview} +\label{sec:org1f1c12a} + +The fully saturated graph looks like (\href{qa-test-full-saturation.nt}{nt file}): +\begin{center} +\includegraphics[width=.9\linewidth]{qa-test-full-saturation.png} +\end{center} + + +\subsubsection{Implementations} +\label{sec:org0deba0d} + +It concerns the following settings in \texttt{query-session}: +\begin{itemize} +\item \texttt{TranslatedUCQuery} with \texttt{FULL\_REAS} reasoner +\item \texttt{TranslatedJUCQuery} with \texttt{FULL\_REAS} reasoner +\item \texttt{TranslatedSCQuery} with \texttt{FULL\_REAS} reasoner +\end{itemize} + +\subsubsection{Tests} +\label{sec:orga46daad} + +\begin{verbatim} +/** + * 1 answer: + * - <Maxime> + */ +@Test +public void shouldSelectSubject() throws Exception { + String queryString = "Q<$subject> :- triple($subject, <livesIn>, <Orsay>) ;"; + assertAnswerNumber(queryString, 1); +} + +/** + * 1 answer: + * - <livesIn> + */ +@Test +public void shouldSelectProperty() throws Exception { + String queryString = "Q<$prop> :- triple(<Maxime>, $prop, <Orsay>) ;"; + assertAnswerNumber(queryString, 1); +} + +/** + * 1 answer: + * - <Orsay> + */ +@Test +public void shouldSelectObject() throws Exception { + String queryString = "Q<$object> :- triple(<Maxime>, <livesIn>, $object) ;"; + assertAnswerNumber(queryString, 1); +} + +/** + * 1 answer: + * - "24547000" + */ +@Test +public void shouldSelectLiteralObject() throws Exception { + String queryString = "Q<$object> :- triple(<Maxime>, <phoneNumber>, $object) ;"; + assertAnswerNumber(queryString, 1); +} + +/** + * 1 answer: + * - <Maxime> + */ +@Test +public void shouldSelectSubjectWithExistentialProperty() throws Exception { + String queryString = "Q<$subject> :- triple($subject, $prop, <Orsay>) ;"; + assertAnswerNumber(queryString, 1); +} + +/** + * 1 answer: + * - <Maxime> + */ +@Test +public void shouldSelectSubjectWithExistentialObject() throws Exception { + String queryString = "Q<$subject> :- triple($subject, <phoneNumber>, $object) ;"; + assertAnswerNumber(queryString, 1); +} + +/** + * 2 answers: + * - <contact> + * - <phoneNumber> + */ +@Test +public void shouldSelectPropertyWithExistentialSubject() throws Exception { + String queryString = "Q<$prop> :- triple($subject, $prop, \"24547000\") ;"; + assertAnswerNumber(queryString, 2); +} + +/** + * 4 answers: + * - <contact> + * - <phoneNumber> + * - <livesIn> + * - <rdf:type> + */ +@Test +public void shouldSelectPropertyWithExistentialObject() throws Exception { + String queryString = "Q<$prop> :- triple(<Maxime>, $prop, $object) ;"; + assertAnswerNumber(queryString, 4); +} + +/** + * 4 answers: + * - <Orsay> + * - <Palaiseau> + * - <Montpellier> + * - <Lannion> + */ +@Test +public void shouldSelectObjectWithExistentialSubject() throws Exception { + String queryString = "Q<$object> :- triple($subject, <livesIn>, $object) ;"; + assertAnswerNumber(queryString, 4); +} + +/** + * 4 answers: + * - <Thing> + * - <Person> + * - "24547000" + * - <Orsay> + */ +@Test +public void shouldSelectObjectWithExistentialProperty() throws Exception { + String queryString = "Q<$object> :- triple(<Maxime>, $prop, $object) ;"; + assertAnswerNumber(queryString, 4); +} + +/** + * 4 answers: + * - <Orsay> + * - <Palaiseau> + * - <Montpellier> + * - <Lannion> + */ +@Test +public void shouldSelectSubjectOfClass() throws Exception { + String queryString = "Q<$subject> :- triple($subject, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <Place>);"; + assertAnswerNumber(queryString, 4); +} + +/** + * 8 answers: + * - <Orsay> + * - <Palaiseau> + * - <Montpellier> + * - <Lannion> + * - <Maxime> + * - <Ioana> + * - <François> + * - <Marie-Laure> + */ +@Test +public void shouldSelectSubjectOfType2() throws Exception { + String queryString = "Q<$subject> :- triple($subject, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <Thing>);"; + assertAnswerNumber(queryString, 8); +} + +/** + * 2 answers: + * - <Person> + * - <Thing> + */ +@Test +public void shouldSelectTypeOfSubject() throws Exception { + String queryString = "Q<$type> :- triple(<Maxime>, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, $type);"; + assertAnswerNumber(queryString, 2); +} + +/** + * 4 answers: + * - <Person> + * - <Thing> + * - <Place> + * - <City> + */ +@Test +public void shouldSelectAllTypes() throws Exception { + String queryString = "Q<$type> :- triple($subject, <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, $type);"; + assertAnswerNumber(queryString, 4); +} + +/** + * 8 answers: + * - <rdf:type> + * - <phoneNumber> + * - <contact> + * - <livesIn> + * - <rdfs:subClassOf> + * - <rdfs:subProperty> + * - <rdfs:domain> + * - <rdfs:range> + */ +@Test +public void shouldSelectAllProperties() throws Exception { + String queryString = "Q<$prop> :- triple($subject, $prop, $object);"; + assertAnswerNumber(queryString, 8); +} + +/** + * 36 answers + * We found 42 triples, because of this issue https://gitlab.inria.fr/cedar/reasoning/issues/2, + * the 6 added triples are the following: + * - | <phoneNumber> | <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> | <phoneNumber> |, + * - | <City> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <City> |, + * - | <Person> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <Person> |, + * - | <Place> | <http://www.w3.org/2000/01/rdf-schema#subClassOf> | <Place> |, + * - | <contact> | <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> | <contact> |, + * - | <livesIn> | <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> | <livesIn> |, + * + */ +@Test +public void shouldSelectEveryTriple() throws Exception { + String queryString = "Q<$subject, $prop, $object> :- triple($subject, $prop, $object);"; + assertAnswerNumber(queryString, 36); +} + +/** + * 1 answers: + * - <Orsay>, "24547000" + */ +@Test +public void shouldJoin() throws Exception { + String queryString = "Q<$city, $number> :- triple($name, <livesIn>, $city), triple($name, <contact>, $number) ;"; + assertAnswerNumber(queryString, 1); +} + +/** + * 1 answers: + * - <Thing>, <subClassOf> + */ +@Test +public void shouldSelectOnVariableEquality() throws Exception { + String queryString = "Q<$var, $prop> :- triple($var, $prop, $var);"; + assertAnswerNumber(queryString, 1); +} + +/** + * 16 answers + * + */ +@Test +public void shouldDoProduct() throws Exception { + String queryString = "Q<$prop, $city> :- triple(<Maxime>, $prop, $object), triple($city,<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, <City>);"; + assertAnswerNumber(queryString, 16); +} +\end{verbatim} + +\subsection{Evaluation} +\label{sec:org0fbca6e} + +\subsubsection{{\bfseries\sffamily TODO} Tests} +\label{sec:org05032e0} +\end{document} \ No newline at end of file diff --git a/publish.el b/publish.el new file mode 100644 index 0000000000000000000000000000000000000000..db3a2a7f7cae694f858cb4a3ffd22d5b2ee97dbf --- /dev/null +++ b/publish.el @@ -0,0 +1,114 @@ + +;;--- general org configuration --- + +;; disable skiping by flag +(setq org-publish-use-timestamps-flag nil) + +;; customization of time stamp display +;; 17/02/2019 +(setq-default org-display-custom-times t) +(setq org-time-stamp-custom-formats '("<%d/%m/%Y>" . "<%d/%m/%Y %H:%M>")) + +;; remove <> around time stamps + +(add-to-list 'org-export-filter-timestamp-functions + #'uca-website-filter-timestamp) + +(defun uca-website-filter-timestamp (trans back _comm) + "Remove <> around time-stamps." + (pcase back + ((or `jekyll `html) + (replace-regexp-in-string "&[lg]t;" "" trans)) + (`latex + (replace-regexp-in-string "[<>]" "" trans)))) + +(defvar uca-website-TeX-macros-path + "~/uca/org/macros.tex") + +;; head and header links are absolute relatively to the base +;; of the website, so we just need to change the base from dev to prod + +(setq uca-website-url-base "https://perso.isima.fr/~maburon/") + +(defun uca-website-html-head (base) + (concat " <link rel='shortcut icon' href='" base "/img/favicon.ico'/> +<link href='" base "/css/style.css' rel='stylesheet' type='text/css'>")) + +(defun uca-website-html-nav (base) + (concat + "<div class='nav'> +<ul> +<li><a href='" base "/index.html'>Home</a></li> +<li><a href='" base "/teaching.html'>Teaching</a></li> +<li><a href='" base "/posts.html'>Posts</a></li> +<li><a href='" base "/projects/'>Projects</a></li> +</ul> +</div>")) + +(defun get-string-from-file (filePath) + "Return filePath's file content." + (with-temp-buffer + (insert-file-contents filePath) + (buffer-string))) + +(defun get-TeX-macros-string () + "get TeX macro file as string +escape some problematic character" + (replace-regexp-in-string + "%" + "%%" + (replace-regexp-in-string "\\\\" "\\\\" (get-string-from-file uca-website-TeX-macros-path)))) + +(defun get-TeX-macros-html () + "get a HTML tag containing TeX macros" + (concat "<div style='display:none;'> $$" (get-TeX-macros-string) "$$ </div>")) + +(defun get-preambule-html (base) + "get HTML preambule" + (concat (uca-website-html-nav base) (get-TeX-macros-html))) + +(defun uca-website-create-project-configuration (suffix publishing-dir base) + "create a configuration for uca website according to publishing-dir and base" + `((,(concat "uca-website-html-" suffix) + :base-directory "~/uca/org/" + :publishing-directory ,publishing-dir + :publishing-function org-html-publish-to-html + :recursive t + :html-toplevel-hlevel 2 + :section-numbers nil + :with-toc nil + :with-author nil + :html-head ,(uca-website-html-head base) + :html-preamble ,(get-preambule-html base) + :html-postamble nil) + (,(concat "uca-website-static-" suffix) + :base-directory "~/uca/org/" + :base-extension "png\\|css\\|jpg\\|jpeg\\|mp4\\|html" + :publishing-directory ,publishing-dir + :publishing-function org-publish-attachment + :recursive t + :exclude "\.git/.*") + (,(concat "uca-website-" suffix) + :components (,(concat "uca-website-static-" suffix) ,(concat "uca-website-html-" suffix))))) + +(setq org-publish-project-alist nil) +(setq org-publish-project-alist + (append org-publish-project-alist + ;; ` character is very important + ;; replace it by ' and functions inside object will not be executed + ;; function call have to be prefixed with , + `(,@(uca-website-create-project-configuration + "dev" + "~/uca/.public_html" + "") + ,@(uca-website-create-project-configuration + "prod" + "/scp:uca-perso:~/public_html/" + uca-website-url-base) + ("uca-website-latex" + :base-directory "~/uca/org/posts" + :publishing-directory "~/uca/virtual-graphs/notes" + :publishing-function org-latex-publish-to-latex + :recursive t)))) + + diff --git a/reviews.org b/reviews.org new file mode 100644 index 0000000000000000000000000000000000000000..4df0a27376e861738ec4835413c4198b0f2bfa43 --- /dev/null +++ b/reviews.org @@ -0,0 +1,221 @@ +#+OPTIONS: toc:t + +#+TITLE: Reviews + +#+LATEX_HEADER: \input{macros} + +This page contains all the reviews of papers. +** Schema-Agnostic Query Rewriting in SPARQL 1.1 +This paper cite:BischofSchemaAgnosticQueryRewriting2014 introduces a new query rewriting method for OWL QL schema and SPARQL 1.1 query. The particularity of this rewriting method is that the rewriting of a query is not dependant of the OWL ontology/schema, instead the rewritten query is on both the data and the schema part of the graph, and takes into account the schema part at query time. Generating a such rewriting query is allowed by using the entailment rules on a meta-level, which are applied on the data and the schema, instead of the entailment rules build from the schema, which are applied on the data only. For example, in RDFS and in OWL 2, you can find the following meta-level entailment rules: +$$(x, \mathrm{rdf{:}type}, c), (c, \mathrm{rdfs{:}subClassOf}, d) \rightarrow (x, \mathrm{rdf{:}type}, d)$$ + +Knowing that the ontology contains $(\mathrm{C}, \mathrm{rdfs{:}subClassOf}, \mathrm{D})$, we can generate the following entailment rule: +$$(x, \mathrm{rdf{:}type}, \mathrm{C}) \rightarrow (x, \mathrm{rdf{:}type}, \mathrm{D})$$ + +and this later entailment rule only apply on data part of a graph. The principle of transforming an ontology into a set of entailment rules have been explained for an extension of RDFS (RDFS-Plus, containing reasoning entailing data, not schema information) in cite:SequedaOBDAQueryRewriting2014. + +In the paper, the queries can be rewritten the using the meta entailment rule, because SPARQL 1.1: +1. allows to query the schema part of the graph +2. supports property paths +3. supports negation + +They considers Conjunctive Query, which are conjunction of BGP without variable at property and class positions and without schema constant in property position except rdf:type (so one can not query the schema). They defines certain answers using the following restriction: the distinguished variables of the CQ have to be mapped to blank node and IRI of the original graph, but to the blank nodes derived by the reasoning (it recall me the choice done in cite:buronOntologyBasedRDFIntegration2020). + +The important result of this paper is that the size of the rewriting of query they build is polynomial in the size of the query and not exponential as it is usually the case. + +** Integrating and Accessing Heterogeneous Information Sources in TSIMMIS +This paper cite:garcia-molinaIntegratingAccessingHeterogeneous describes a integration system builder *TSIMMIS*. This integration system using object model as global and assumes that each data source comes with some information. TSIMMIS uses mediators based on patterns or rules to transform data from sources, they want to generate these mediators automatically. TSIMMIS have a interactive way of integrate the source, so it requires more user input than a classical integration system, but TSIMMIS do not requires a integration scenario specification like a set of mappings. + +** Answering SPARQL Queries over Databases under OWL 2 QL Entailment Regime +This paper cite:kontchakovAnsweringSPARQLQueries2014 is about an extension of ontop supporting SPARQL queries (union of partially instantiated conjunctive queries with filters and optional patterns), OWL 2 QL ontology, and R2RML mappings with an optimized translation in SQL. + +This citation is interesting, but I can't understand the last parenthesis: +#+BEGIN_QUOTE +SPARQL queries are in many aspects more expressive than conjunctive queries as they offer more complex query constructs and can retrieve not only domain elements but also class and property names using second-order variables. (Note, however, that SPARQL 1.1 does not cover all conjunctive queries.) +#+END_QUOTE + +They assume the set of IRIs is partitioned in three disjoint sets of class IRIs, property IRIs and individual name IRIs, the same is assumed for variables. Using it, they define OWL 2 QL BGP using OWL 2 QL triple template such as ~ObjectPropertyAssertion (p, s, o)~ where ~p~ is either a property IRI or a property variable and ~s~ and ~o~ are individual name IRIs or individual name variables. In their setting, their are not allowing to write a query like $q(x,y,z) \leftarrow (x,y,z)$, because $y$ can not be a generic variable. We can transform the previous query into $q_{DL}(x,y,z) \leftarrow (x,y,z), (y, \tau, \text{owl:ObjectProperty})$, where $y$ is individual name variable and this body query is equivalent to ~ObjectPropertyAssertion (y, x, z)~. We can see in the "SPARQLDL" section of experimentation [[https://github.com/ontop/iswc2014-benchmark/blob/master/Ontop/OntopQueries.txt#L129][queries file]]. To sum up the comparison of this paper with our paper cite:buronReformulationbasedQueryAnswering2019, the first one consider DL pattern queries, the second consider graph pattern queries. Since, properties IRIs are known, graph pattern query can be transformed in DL pattern queries. + + +** A Knowledge Base for Personal Information Management + +This paper cite:montoyaKnowledgeBasePersonal2018 starts with the clear analysis on personal data : Data are stored in hermetic silos. The aim of Thymeflow is to bring back to users the ability to query their data together, in particular : +- email messages +- calendar +- contact +- location history + +Moreover Thymeflow aims to integrate no aligned data, to cluster geographic information to find points of interest and to extract as much as possible information from source data to build knowledge. + +The integration data format is RDF and its schema is an extension of schema.org. The extension concerns email metadata properties. + +The data from the sources are materialized, because on mediation +-based approach will not be sufficiently efficient. This materialization is kept up to date following the sources content. Updates include reasoning on knowledge, which may included some public external sources. + +** On rules with existential variables: Walking the decidability line + +This journal paper cite:Bagetrulesexistentialvariables2011 is about decidability ENTAILMENT problem in knowledge base using existential rules. + +** A Generalized Framework for Ontology-based Data Access + +This paper cite:BotoevaGeneralizedFrameworkOntologybased proposes a generalization of the OBDA framework for solving heterogeneous integration problem (in theory) and for allowing one MongoDB source (in practice). + +*** General Framework + +They uses the following theoretical settings: +- OWL 2 QL as ontology language ; +- R2RML for mapping specification ("R" in R2RML means Relational). They use mappings of the form $\phi(\bar x) \leadsto t(\bar x)$, where $t$ is an DL triple (where the property is an IRI and for type property the class-object is an IRI) and $\phi$ is an SQL query. Mapping semantics make them *sound* ; +- SPARQL queries ; +- supported source formats are JSON (MongoDB), XML, relational ... (they don't mention RDF) + +They propose an approach using a relational schema $[D]$ containing *constraints on sources* (inter-source constraints, also). It is like defining views with constraints. They also define a query language $\mathcal Q$ for directly querying source instances. + +The process translates successively the SPARQL query into: +1. $IQ$ an optimized version of the reformulation, (reformulation step) +2. a set of queries in $\mathcal Q$ (rewriting step) +3. combined answers of each previous query (mediator work) + +The optimization is due to a offline process on mappings, ontology and source schema (constraints) explained in cite:SequedaOBDAQueryRewriting2014. + +*** Ontop/MongoDB + +They build a system Ontop/MongoDB supporting the above framework with one MongoDB source. There is no *need for mediator*, except for creating IRI (Skolem function). + +They /denormalize/ the BDBM benchmark in order to translate it into JSON documents collections. This operation induces some redundancy in the data, speeding up some query and slowing down some others. + +They show the /[[https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/][aggregation framework]]/ (MAQ) of MongoDB which provides a way to query collections with the expressive power of Nested Relational Algebra (Nested is not for the expressive power). Such aggregation are declared using a sequence of operations in a map-reduce style. I noticed that they can push into MongoDB filter and aggregation operation. + +The Ontop/MongoDB system handles SPARQL including BGP, FILTER, JOIN, *OPTIONAL* and UNION. They use a translation from NRA to MAQ to translate the rewritten query into MongoDb query (one to one translation). + +They compare ontoSQL/MongoDB on BSBM benchmarck (1.2 billion triples) with Virtuoso system. They show that the denormalization of the data implies that their system is slower, when it has to access no contiguous disk portions, but faster of one order magnitude otherwise. + +** OBDA: Query Rewriting or Materialization ? In Practice, Both ! + +This paper cite:SequedaOBDAQueryRewriting2014 is about OBDA and mapping set saturation technique in an extension of RDFS ontology setting. They use only one relational source. They reduce the problem of query answering in OBDA to an unfolding problem of query using GAV RDF mappings of the form: + +- $\alpha(x) \leadsto \triple{x}{\type}{\class}$ where $\alpha$ is a FO query on sources and $\class$ is a constant; + +- $\beta(x,y) \leadsto \triple{x}{\prop}{y}$ where $\beta$ is a FO query on sources and $\prop$ is a constant. + +They translate each triple of the ontology (extension of RDFS) into an entailment rule following the list: + +- $\triple{\class_{1}}{\subclass}{\class_{2}}$: $\triple{x}{\type}{\class_{1}} \rightarrow \triple{x}{\type}{\class_{2}}$ ; +- $\triple{\prop_{1}}{\subclass}{\prop_{2}}$: $\triple{x}{\prop_{1}}{y} \rightarrow \triple{x}{\prop_{2}}{y}$ ; +- $\triple{\prop}{\domain}{\class}$: $\triple{x}{\prop}{y} \rightarrow \triple{x}{\type}{\class}$ ; +- $\triple{\prop}{\range}{\class}$: $\triple{x}{\prop}{y} \rightarrow \triple{y}{\type}{\class}$ ; +- $\triple{\prop}{\mathrm{equivProp}}{\prop'}$: $\triple{x}{\prop}{y} \leftrightarrow \triple{x}{\prop'}{y}$ ; +- $\triple{\class}{\mathrm{equivClass}}{\class'}$: $\triple{x}{\type}{\class} \leftrightarrow \triple{x}{\type}{\class'}$ +- $\triple{\prop}{\mathrm{inverse}}{\prop'}$: $\triple{x}{\prop}{y} \leftrightarrow \triple{y}{\prop'}{x}$ ; +- $\triple{\prop}{\type}{\mathrm{symProp}}$: $\triple{x}{\prop}{y} \rightarrow \triple{y}{\prop}{x}$ ; +- $\triple{\prop}{\type}{\mathrm{transProp}}$: $\triple{x}{\prop}{y} \wedge \triple{y}{\prop}{z} \rightarrow \triple{x}{\prop}{z}$. + +The transitivity is handled by allowing recursive query in mapping body. + +They generally define a saturation of a mapping set: +#+BEGIN_DEFINITION +Given $\mappings$ a mapping set over a source schema $R$, $\onto$ an ontology, $\mappings^{\star}$ is a /saturation of $\mappings$/ w.r.t. $\onto$ if for every instance $I$ of $R$: +$$(\graph_{I}^{\mappings})^{\rules_{\onto}} = \graph_{I}^{\mappings^{\star}}$$ +where $\rules_{\onto}$ is the set of generated entailment rules from $\onto$ and $\graph$ represents the induced graph. +#+END_DEFINITION + +They define a set of generation straightforward rules that produce a saturation of a mapping set $\mathrm{SAT}(\mappings, \onto)$ w.r.t. an ontology $\onto$ that doesn't contain transitive constraint on property. They can compute this saturation in $O(|\mappings|. |\onto|)$. + +They wrap together each mapping having the same head by defining a *view as the union of their body query*. Hence, they can translate each wrapped mapping into one SQL query on the relational source. This query produces triples of the same form of the wrapped mapping head using values contenting in its view content. + +** The Berlin SPARQL Benchmark + +The Berlin SPARQL Benchmark cite:BizerBerlinSPARQLBenchmark aims to compare performance of native RDF stores with the performances SPARQL-to-SQL rewriters across architectures. Also BSBM is not designed for complex reasoning but to measure SPARQL query performance against large amounts of RDF data. + +BSBM is built around an e-commerce use case, where a set of product is offered by different vendors and consumers have posted reviews about products. It has a data generator in which the number of product is used as a scale factor. It can generate either relational or RDF representation of the same dataset. + +Queries are using most of the SPARQL possibilities, so none of the proposed queries are BPG. + +View definitions are not mentioned, but paper cite:MontoyaSemLAVLocalAsViewMediation2014 proposes a [[https://sites.google.com/site/semanticlav/home/views][set of views]] based on BSBM. This views seem not to contain existential variables in their definitions. + +** IBench + +IBench creates GLAV integration systems metadata, (with data ?) without query. + +Documentation: +https://github.com/RJMillerLab/ibench/wiki/tutorial + +** Virtual Ontology-Based Access to Heterogeneous and Large Data Sources +*** Strong Points +1. The described system reuses well-known distributed environment wrappers to evaluate a query on heterogeneous sources such as Cassandra, MongoDB, MySQL, etc. Moreover, the only requirement for a source to be supported is the existence of dedicated wrappers in the distributed environment. + +2. Experiments are performed on big dataset (up to 1.75 billion triples) distributed on 5 sources each using different engine. + +3. + +*** Weak Points +1. No ontology is used into the paper, there is not mention of any reasoning or schema constraint. This works is only about joins in integration system that makes sources data available as RDF triples. + +2. The query fragment supported by the introduced system is not well defined in the paper, although such information can be found on the experiments web page: https://github.com/EIS-Bonn/Squerall/tree/master/evaluation. + +3. The query answers seems to be not well defined or not follow the definition commonly used in integration system. (see below) + +4. The evaluation section does not mention crucial information about executed queries. It questions the pertinence of the proposed evaluation of the system. + +*** Detailed Comments + +This paper introduces a novel integration system of heterogeneous sources supporting SPARQL queries. The mediation is done by an intermediate data representation handled by a Big Data distributed system like Spark or Presto. Like in OBDA system, mappings are used to represent source content as RDF triples. The authors presents an algorithm for joining intermediate data representations of source data using a star shape decomposition of the query. They also presents an transformation of mappings and query in order to solve some values mismatch between sources and hence allowing new joins. The evaluation is done on BSBM benchmark distributed across 5 heterogeneous data sources. + +**** Preliminaries + +- typo in Data Entity and Relevant Entity definition: "matcheing" -> "matching" + +- 2.3 (1). Supported queries should be clearly defined. In particular, BPG in the WHERE clauses seems to have only variable as subject, it is necessary to apply the stars decomposition. + +- 2.3 (2). "Relevant Entity Extraction. For every extracted star, entities that have attribute mappings to *each* of the properties of the star are determined. Such entities are relevant to the star" Now, suppose that we have the following star shaped BGP: +#+BEGIN_example +?k bibo:isbn ?i . +?k dc:title ?t. +#+END_example +and the two following mappings: +#+BEGIN_example +<#ISBNMapping> + rml:logicalSource [ + rml:source "bibo"; + ]; + rr:subjectMap [ + rr:template "{iri}"; + rr:class schema:Book + ]; + + rr:predicateObjectMap [ + rr:predicate bibo:isbn; + rr:objectMap [rml:reference "isbn"] + ]; + +<#TitleMaping> + rml:logicalSource [ + rml:source "dc"; + ]; + rr:subjectMap [ + rr:template "{iri}"; + rr:class schema:Book + ]; + + rr:predicateObjectMap [ + rr:predicate dc:title; + rr:objectMap [rml:reference "title"] + ]; +#+END_example +Since none of the entity mapping ~bibo~ and ~dc~ have attributes mappings for both ~bibo:isbn~ and ~dc:title~, then there is no entity relevant for the query star. But, we can imagine that there are possible joins between ~bibo~ and ~dc~ on the column ~iri~. Hence, in this context a SPARQL query with the clauses defined by above BGP could have answers in an such OBDA system. Why proposed answering approach seems to returns always empty answer ? A clear definition of query answers with respect to the data source and mapping seems necessary. + +- 2.3 (3) typo: "Data Like" instead of "Data Lake" ? + +- Figure 2 unnecessary bold font for rdf:type. + +- 2.4 typo in the third sentence: "translates" -> "translate" + +**** Evaluation + +- In the evaluation, the authors say that they stores "the same data (experiments data) in a relational MySQL database". They also say that they record the time in MySQL. It would have been interesting to have the time comparison with Presto and Spark-based Squerall in the paper or the github depository. + +- 5 queries (Q1, Q3, Q4, Q5 and Q8) over 10 use LIMIT keywords and limits answers number to at most 10. This chose is never mentioned in the paper and it really affects the query execution time ! No surprise then that this queries scales. + +- Vertical axis tick number in Figure 3 (a) and (c) should be displayed on one line for readability. + +bibliographystyle:unsrt +bibliography:~/inria/all.bib diff --git a/run-server b/run-server new file mode 100755 index 0000000000000000000000000000000000000000..88604378de357134ededd3e9312e7815a7c1110e --- /dev/null +++ b/run-server @@ -0,0 +1,4 @@ +#!/bin/bash + +cd ~/inria/.public_html/ +budo --dir . --live diff --git a/teaching.org b/teaching.org new file mode 100644 index 0000000000000000000000000000000000000000..75d2d986ca1fdb5d79074813f9dafb3dac0da2c1 --- /dev/null +++ b/teaching.org @@ -0,0 +1 @@ +#+TITLE: Teaching