19
Rule-based Exploration of Structured Data in the Browser Sudhir Agarwal, Abhijeet Mohapatra, Michael Genesereth and Harold Boley DEXTER http://dexter.stanford.edu

RuleML2015: Rule-Based Exploration of Structured Data in the Browser

  • Upload
    ruleml

  • View
    87

  • Download
    0

Embed Size (px)

Citation preview

Page 1: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

Rule-based Exploration ofStructured Data in the Browser

Sudhir Agarwal, Abhijeet Mohapatra,Michael Genesereth and Harold Boley

DEXTERhttp://dexter.stanford.edu

Page 2: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

Ad hoc exploration of structured data is often cumbersome and time-consuming using state-of-art tools

Lots of structured data available on the Web

- Limited or no querying support E.g. http://www.govtrack.us “Which senators are 40 years old?”

Page 3: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

- Ad hoc compilation from multiple sources: “Which U.S. Department Heads attended Stanford University”

- Combining private (local) data with publicly accessible data

Page 4: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

DEXTERBrowser-based

Explorer

for Structured Data

runs exclusively on the client side

supports ad hoc queries

http://dexter.stanford.edu

Page 5: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

DEXTER

Data = Tables

* Extraction and integration of web data by end-users [Agarwal ’13]

*

http://dexter.stanford.edu

Page 6: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

Rules = Dexlog

Extends standard Datalog with negation, aggregates, and built-ins

Reference: http://dexter.stanford.edu/main/dexlog.html

Sets and tuples as first-class citizense.g. {}, {[“a”,“1”],[“b”,“2”]}

DEXTERhttp://dexter.stanford.edu

Page 7: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

Rules = Dexlog

Reference: http://dexter.stanford.edu/main/dexlog.html

Introduces a specialized operator called setof

q(X,S) :- p(X) & setof(Y, r(X,Y), S)

for all X s.t. p(X) evaluates to true,

SX = {Y | r(X,Y)}

DEXTERhttp://dexter.stanford.edu

Page 8: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

DEXTER

Rules = Dexlog

Reference: http://dexter.stanford.edu/main/dexlog.html

Integrity constraints:

2nd arg of p functionally depends on 1st arg of p

illegal :- p(X,Y) & p(X,Z) & distinct(Y,Z)

http://dexter.stanford.edu

Page 9: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

DEXTER

ExamplesHospitals registered with Medicare (hospitals.xml)

http://dexter.stanford.edu

Page 10: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

DEXTER

ExamplesHospitals registered with Medicare

http://dexter.stanford.edu

Page 11: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

ExamplesHospitals registered with Medicare in California

misc.hospitalsInCA(NAME) :- misc.hospitals(NAME,ADDR,CITY,"CA",ZIP,COUNTY,PHONE)

DEXTERhttp://dexter.stanford.edu

Page 12: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

DEXTER

ExamplesWhat is the number of hospitals in each state?

http://dexter.stanford.edu

Page 13: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

EECS Faculty at MITExamples

https://www.eecs.mit.edu/people/faculty-advisors

misc.mitFaculty(A,B,C,D,E,F)

DEXTERhttp://dexter.stanford.edu

Page 14: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

ExamplesTuring Award Winners

https://en.wikipedia.org/wiki/Turing_Award misc.turing(YEAR,NAME)

DEXTERhttp://dexter.stanford.edu

Page 15: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

DEXTER

Examples

misc.mitTuring(NAME) :- misc.turing(YEAR,NAME) & misc.mitFaculty(NAME,B,C,D,E,F)

Faculty at MIT who have won a Turing Award

http://dexter.stanford.edu

Page 16: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

Summary• Dexter is a browser-based, domain-independent, explorer

for structured data (e.g. CSV, XML, JSON Databases, APIs)

• Ad hoc exploration of structured data as tables through Dexlog rules

• Client-side query evaluation

• Support for exporting, visualizing and sharing tables

• Implemented with Javascript — runs entirely inside user’s browser

Project Page: http://dexter.stanford.edu

Page 17: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

Backup Slides

Page 18: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

DEXTER

Client-Side Rule Evaluation• Hybrid-shipping strategy: Evaluate queries directly on

sources whenever possible

• Decompose queries Input: q(X) :- source1.t1(X,Y) & source2.t2(Y,“a”) Output: q(X) :- q1(X, Y) & q2(Y) q1(X, Y) :- t1(X, Y) — evaluated at source1 q2(Y) :- t2(Y,“a”) — evaluated at source2

• Remove irrelevant rules

• Evaluate queries in parallel

http://dexter.stanford.edu

Page 19: RuleML2015: Rule-Based Exploration of Structured Data in the Browser

DEXTER

Additional Features! Visualizing table’s data as charts ! Exporting into

popular formats- CSV - JSON - XML - RuleML/XML

! Sharing tables via Dexter Server

! Filters

http://dexter.stanford.edu