1 / 23

BBQ : B lended B rowsing and Q uerying of XML in a Lazy Mediator System

BBQ : B lended B rowsing and Q uerying of XML in a Lazy Mediator System. Kevin D. Munroe Bertram Ludäscher Yannis Papakonstantinou University of California, San Diego. Overview. Introduction: BBQ and MIXm BBQ: The Interface Browsing and Querying with BBQ The BBQ API Discussion.

rossa
Download Presentation

BBQ : B lended B rowsing and Q uerying of XML in a Lazy Mediator System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BBQ: Blended Browsing and Querying of XML in a Lazy Mediator System Kevin D. Munroe Bertram Ludäscher Yannis Papakonstantinou University of California, San Diego

  2. Overview • Introduction: BBQ and MIXm • BBQ: The Interface • Browsing and Querying with BBQ • The BBQ API • Discussion

  3. Introduction (preaching to the choir) • XML as a universal data exchange format and model • MIX (Mediation of Information using XML) project at UCSD/SDSC • MIX mediator (MIXm) • integrated views of XML data sources • XMAS query language • lazy query evaluation with DOM-VXD (EDBT 2000) • Features of a MIXm client • simplify query construction • intuitive XML browsing • flexible interface

  4. BBQ 2.0 • BBQ = User Interface + API package • BBQ Interface features • Schema-driven browsing of XML • Intuitive drag-and-drop query formulation • Iterative Query refinement • History • BBQ API • cross-platform (Java) • based on well-known Java 2 APIs

  5. BBQ and MIXm XML Data Source XML Data Source BBQ Interface Interface X BBQ API BBQ API XML Document XMAS Query DOM-VXD Interface Source DTD MIX Mediator Source DTD

  6. The BBQ Interface • DTDs are represented by trees • non leaf nodes= elements • leaf nodes = character content • Nodes are rendered based on type • Wildcards are also displayed

  7. BBQ Interface, cont’d • Example BBQ Tree <!DOCTYPE Interns [ <!ELEMENT Interns (Intern)*> <!ELEMENT Intern (name, supervisor, sponsor)> <!ELEMENT name (#PCDATA) > <!ELEMENT supervisor (#PCDATA) > <!ELEMENT sponsor (CAIDA | NPACI |UCSD)> <!ELEMENT CAIDA (ANY)> <!ELEMENT NPACI (ANY)> <!ELEMENT UCSD (ANY)> ]>

  8. BBQ Interface, cont’d • Query Body Panel • contains multiple data sources • Query Head Panel • has a “hook” for building up projected elements Query Body Panel Query Head Panel

  9. BBQ Interface, cont’d • Can browse data as DTD-driven list or XML tree DTD-Driven List XML Tree

  10. A BBQ Query Session • Query Sessions consist of one or more query cycles • A query cycle is delineated by executing a query • BBQ maintains history across query cycles • XMAS queries • syntax: CONSTRUCT head WHERE body

  11. BBQ Query Session, cont’d • Begin by opening XML data source • Select data source from list • BBQ application can open arbitrary data sources • Browse data source by DTD or XML tree • If document has no DTD, BBQ derives one • DDbE from IBM AlphaWorks • XML data source is sample data

  12. BBQ Query Session, cont’d • Setting Conditions • “Set-Required”- requires existence • Binary operations • applied to leaf nodes • operators are in pulldown list; set one or more conditions • Setting Joins • Copy/Paste one leaf node onto the other • Join format • equality • other binary operators (theta-join)

  13. BBQ Query Session, cont’d • Constructing the Head • Use Data Source Elements • Drag/Drop elements from Query Body Panel to Query Head Panel • XMAS semantics requires at most one top-level element • Set a group-by • Simple Group-by - group by the selected node • Complex Group-by - group by other nodes in the body Created in Query Head Panel Paste from Query Body Panel

  14. BBQ Session, cont’d • Executing Query and browsing result • Preview Query... • UI => XMAS query string • “Power Users” can modify the string • ...Then Execute • Result view displayed in Query Body Pane • Answer tree => result view DTD • If error occurs • BBQ reverts to state prior to Execute • No results? • BBQ saves XMAS query string so users can debug

  15. BBQ Query Session- Complete • Browse the result view • BBQ Derives text DTD for view • View contents materialized using DOM-VXD interface • Views can be constructed on top of result view

  16. The BBQ API • BBQ API = package of Java classes • BBQ Interface is a client of BBQ API • API client is handed the same data structures that BBQ manipulates internally • XML/DTD data structures based on TreeNode class. • Clients keep local copies of data structures

  17. BBQ API, cont’d • A Select-From-Where query using BBQ API • The DTD: <!ELEMENT employees (employee+)> <!ELEMENT employee (name, salary)> • The Query: CONSTRUCT <overpaid> [ $N ] </> WHERE <employees><employee> $N:<name/> <salary> $OP </> </> </> AND $OP > 30000

  18. BBQ API, cont’d function simpleBBQClient() { boolean required = true; bbqSession <- new BBQSession(); bbqSession.connect(); String []list = bbqSession.getListOfDataSources(); src = bbqSession.openDataSource(list[employees]); bbqSession.setSourceConstraint(salary,’>’, “30000”); ans = bbqSession.getAnswerTree(); bbqSession.addNewAnswerTreeNode(ans, BBQSession.kNodeTypeElement, null, “overpaid”); bbqSession.addAnswerTreeNode(ans.child(0), name, required); bbqSession.setGroupBySimple(ans.child(0),required); answer = bbqSession.executeXMASQuery( bbqSession.createXMASQuery()) }

  19. BBQ API, cont’d function simpleBBQClient() { boolean required = true; bbqSession <- new BBQSession(); bbqSession.connect(); String []list = bbqSession.getListOfDataSources(); src = bbqSession.openDataSource(list[employees]); bbqSession.setSourceConstraint(salary,’>’, “30000”); ans = bbqSession.getAnswerTree(); bbqSession.addNewAnswerTreeNode(ans, BBQSession.kNodeTypeElement, null, “overpaid”); bbqSession.addAnswerTreeNode(ans.child(0), name, required); bbqSession.setGroupBySimple(ans.child(0),required); answer = bbqSession.executeXMASQuery( bbqSession.createXMASQuery()) }

  20. BBQ API, cont’d function simpleBBQClient() { boolean required = true; bbqSession <- new BBQSession(); bbqSession.connect(); String []list = bbqSession.getListOfDataSources(); src = bbqSession.openDataSource(list[employees]); bbqSession.setSourceConstraint(salary,’>’, “30000”); ans = bbqSession.getAnswerTree(); bbqSession.addNewAnswerTreeNode(ans, BBQSession.kNodeTypeElement, null, “overpaid”); bbqSession.addAnswerTreeNode(ans.child(0), name, required); bbqSession.setGroupBySimple(ans.child(0),required); answer = bbqSession.executeXMASQuery( bbqSession.createXMASQuery()) }

  21. BBQ API, cont’d function simpleBBQClient() { boolean required = true; bbqSession <- new BBQSession(); bbqSession.connect(); String []list = bbqSession.getListOfDataSources(); src = bbqSession.openDataSource(list[employees]); bbqSession.setSourceConstraint(salary,’>’, “30000”); ans = bbqSession.getAnswerTree(); bbqSession.addNewAnswerTreeNode(ans, BBQSession.kNodeTypeElement, null, “overpaid”); bbqSession.addAnswerTreeNode(ans.child(0), name, required); bbqSession.setGroupBySimple(ans.child(0),required); answer = bbqSession.executeXMASQuery( bbqSession.createXMASQuery()) }

  22. BBQ API, cont’d function simpleBBQClient() { boolean required = true; bbqSession <- new BBQSession(); bbqSession.connect(); String []list = bbqSession.getListOfDataSources(); src = bbqSession.openDataSource(list[employees]); bbqSession.setSourceConstraint(salary,’>’, “30000”); ans = bbqSession.getAnswerTree(); bbqSession.addNewAnswerTreeNode(ans, BBQSession.kNodeTypeElement, null, “overpaid”); bbqSession.addAnswerTreeNode(ans.child(0), name, required); bbqSession.setGroupBySimple(ans.child(0),required); answer = bbqSession.executeXMASQuery( bbqSession.createXMASQuery()) }

  23. Further Information • MIX project • http://www.npaci.edu/DICE/MIX/ • BBQ • http://www.npaci.edu/DICE/MIX/BBQ

More Related