XGI: A Graphic Interface for XQuery Creation and XML Schema Visualization - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

XGI: A Graphic Interface for XQuery Creation and XML Schema Visualization

Description:

XGI: A Graphic Interface for XQuery Creation and XML Schema ... Biomedical and Health Informatics. Master Thesis Committee: James Brinkley, John Gennari ... – PowerPoint PPT presentation

Number of Views:100
Avg rating:3.0/5.0
Slides: 46
Provided by: xian47
Category:

less

Transcript and Presenter's Notes

Title: XGI: A Graphic Interface for XQuery Creation and XML Schema Visualization


1
XGI A Graphic Interface for XQuery Creation and
XML Schema Visualization
  • Xiang Li
  • University of Washington
  • Biomedical and Health Informatics
  • Master Thesis Committee
  • James Brinkley, John Gennari

2
Outline
  • Needs for graphically querying XML
  • Existing graphical query solutions
  • Requirements for a successful system
  • My approach and XQuery Graphic Interface (XGI)
    system overview
  • Using XGI to build a XQuery
  • System validation and evaluation
  • Discussion and conclusions

3
Outline
  • Needs for graphically querying XML
  • Existing graphical query solutions
  • Requirements for a successful system
  • My approach and the XQuery Graphic Interface
    (XGI) system overview
  • Using XGI to build a XQuery
  • System validation and evaluation
  • Discussion and conclusions

4
XML and XQuery
  • XML
  • De facto standard language for data exchange and
    representation in biomedical research
  • Semistructured data model
  • Wide-spread adoption and many data sources in XML
    format
  • XQuery
  • W3C-candidate, textual XML querying language
  • Turing-complete and well-supported
  • Required programmatic skill similar to SQL

5
Examples
ltrootgt ltpatientgt ltyear_of_birthgt lt/year_of_birthgt ltwada_commentsgt lt/wada_commentsgt ltwada_memorygt lt/wada_memorygt ltwada_languagegt lt/wada_languagegt lthandednessgt lt/handednessgt ltsexgt lt/sexgt lttypegt lt/typegt ltgao_research_numgt lt/gao_research_numgt ltdescriptiongt lt/descriptiongt ltpregt lt/pregt ltsizegt lt/sizegt ltpnumgt lt/pnumgt ltviqgt lt/viqgt ltage_at_registrationgt lt/age_at_registrationgt .. . lt/patientgt lt/rootgt
ltresultgt for pa in root/patient where pa/surgery/csmstudy/trial/stimulated/text() 'Y' return ltpatientgt pa/pnum pa/viq pa/age_at_registrationgt lt/patientgt lt/resultgt
XQuery expression
XML source document
6
Motivations for a graphic query system
  • Creating XQuery is difficult
  • Unfamiliar XQuery syntax and semantics
  • Need explicit knowledge of the source data schema
  • Goals
  • Implement the Query-By-Example (QBE) paradigm
  • Simplify query construction for novice users
  • Expedite query generation process for expert
    users
  • Balance between usability and expressivity

7
Outline
  • Needs for graphically querying XML
  • Existing graphical query solutions
  • Requirements for a successful system
  • My approach and the XQuery Graphic Interface
    (XGI) system overview
  • Using XGI to build a XQuery
  • System validation and evaluation
  • Discussion and conclusions

8
Design approaches
  • Structured query approach
  • Graphical interface is simple
  • Query process is quick and uncomplicated
  • Output format is pre-determined
  • Users are not exposed to the underlying querying
    language
  • Unstructured query approach
  • Arbitrarily construct the output format
  • Able to generate more expressive XQuery
    statements
  • Complex query interface

9
Existing systems
  • Structured query approach
  • QSByE
  • QURSED
  • XBrain
  • Unstructured query approach
  • BBQ
  • XQBE
  • Stylus Studio

10
Existing systems
  • Structured query approach
  • QSByE
  • QURSED
  • XBrain
  • Unstructured query approach
  • BBQ
  • XQBE
  • Stylus Studio

11
QURSED
  • Query and Reporting Semistructured Data
  • Developers create XML-querying forms for
    end-users

Displays source schema in a tree
Web-based query forms
Uses output template to define structure
End-users cannot modify the query form, the
output template, and the generated query
Developers have to create the query form and the
output template for every single query
12
XBrain
  • Distributed query system
  • Developers create saved queries for end-users to
    execute

Allows users to modify and save custom queries
Very simple query interface
Novice users need developers to create more
complex queries
Output format is pre-determined
13
XQBE
  • XQuery By Example
  • Users use the interface define the source and the
    construct tree

Able to generate fairly complex queries
Free and still is being supported
Accepts multiple source schema formats
Requires users to have explicit knowledge of the
source data schema
Elaborate syntax and semantics
14
Stylus Studio
  • Comprehensive XML editing, publishing, and
    querying tool
  • Novel query interface design by explicitly
    constructing XQuery expression

Able to create very expressive XQuery statements
Displays the source schema as a tree
Expensive
Not open source or web-based
15
Outline
  • Needs for graphically querying XML
  • Existing graphical query solutions
  • Requirements for a successful system
  • My approach and the XQuery Graphic Interface
    (XGI) system overview
  • Using XGI to build a XQuery
  • System validation and evaluation
  • Discussion and conclusions

16
System requirements
  • Reduced cost of implementation
  • Support for multiple schema formats
  • Navigable source tree
  • Powerful XQuery creation
  • Easy integration with other applications
  • Support collaboration

17
Outline
  • Needs for graphically querying XML
  • Existing graphical query solutions
  • Requirements for a successful system
  • My approach and the XQuery Graphic Interface
    (XGI) system overview
  • Using XGI to build a XQuery
  • System validation and evaluation
  • Discussion and conclusions

18
My approach
  • Reduced cost of implementation
  • Web-based using Asynchronous JavaScript and XML
    (AJAX) technology
  • Shared installation and resources
  • Support for multiple schema formats
  • XML Schema, Document Type Data (DTD), and
    auto-extract schema from XML document
  • Navigable source tree
  • Uses hierarchical tree to represent the nested
    XML source schema

19
My approach (cont.)
  • Powerful XQuery creation
  • Implements a subset of XQuery
  • Easy integration with other applications
  • Uses open source toolkits
  • Implements modular design
  • Support collaboration
  • Allows users to save queries with
    self-explanatory names

20
System architecture
Client
Web Browser
Local Filesystem
Graphic interface scripts
Data Model
Translation Engine
Schemas File Management
Schema Preprocessor
Schemas
Server Filesystem
XQuery Generation Engine
Data Model Controller
Server
21
XQuery generation engine
ltquerygt ltflwor_expgt ltstartTaggt ltquerygt ltendTaggt ltflwor_expgt ltforgt ltwheregt? ltreturngt ltforgt for ltsome_vargt ( , ltsome_vargt ) ltsome_vargt ltvar_namegt in ltpath_expgt ltwheregt where ltconstraintgt? ltconstraintgt ltpredicategt ( and ltpredicategt ) ltpredicategt exists( ltpath_expgt ) lt pred_expgt ltpred_expgt ltexpressiongt ltoperatorgt ltexpressiongt ltexpressiongt ltconstgt ltvariablegt ltoperatorgt lt gt lt gt ! ltreturngt return ( ltemptyTaggt ltpath_expgt ) return ltquerygt ltstartTaggt ltltnamegt ltattrgt? gt ltendTaggt lt/ ltnamegt gt ltemptyTaggt lt ltnamegt ltattrgt? /gt ltattrgt (ltnamegt ltpath_expgt ) ltnamegt valid name of schema elements ltpath_expgt XPath expression ltvariablegt any variable that has been bound to an outer schema element ltconstgt a constant value of the schema element ltvar_namegt an automatically generated, non-duplicative name for a variable
  • Uses an Extended Backus-Naur Form grammar
  • Retrieve the query schema from the data model
    controller
  • Preprocess the schema to fit the grammar
  • Return the generated query to the query interface

22
Outline
  • Needs for graphically querying XML
  • Existing graphical query solutions
  • Requirements for a successful system
  • My approach and XQuery Graphic Interface (XGI)
    system overview
  • Using XGI to build a XQuery
  • System validation and evaluation
  • Discussion and conclusions

23
Interface layout
Document name panel
Toolbar panel
Search box
Query panel
Source panel
Saved predicate panel
Information panel
24
Example query 1
ltresultsgt for pa in root/patient return ltpatient id"pa/pnum/text()"gt pa/sex pa/viq lt/patientgt lt/resultsgt
ltrootgt ltpatientgt ltyear_of_birthgt lt/year_of_birthgt ltwada_commentsgt lt/wada_commentsgt ltwada_memorygt lt/wada_memorygt ltwada_languagegt lt/wada_languagegt lthandednessgt lt/handednessgt ltsexgt lt/sexgt lttypegt lt/typegt ltgao_research_numgt lt/gao_research_numgt ltdescriptiongt lt/descriptiongt ltpregt lt/pregt ltsizegt lt/sizegt ltpnumgt lt/pnumgt ltviqgt lt/viqgt ltage_at_registrationgt lt/age_at_registrationgt .. . lt/patientgt lt/rootgt
CSM database schema
25
Load a source schema
26
Insert the root node
27
Add nodes to the query schema
28
Add an attribute
29
Create XQuery
30
Example query 2
ltresultsgt for pa in root/patient where exists(pa/is_public) and pa/surgery/csmstudy/trial/stimulated/text() 'Y' return ltpatient id"pa/pnum/text()"gt pa/sex pa/viq ltagegt pa/age_at_registration/text() lt/agegt for tr in pa/surgery/csmstudy/trial return lttrialsgt tr/trial_num lt/trialsgt lt/patientgt lt/resultsgt
31
Add a user-defined node
32
Change node relation
33
Add existential quantification
34
Add a predicate
35
Change node name
36
Create XQuery
37
Outline
  • Needs for graphically querying XML
  • Existing graphical query solutions
  • Requirements for a successful system
  • My approach and XQuery Graphic Interface (XGI)
    system overview
  • Using XGI to build a XQuery
  • System validation and evaluation
  • Discussion and conclusions

38
Validation
  • XGI vs. XQBE
  • Compare features
  • Compare capable queries
  • Recreate queries from XBrain
  • Language-error queries
  • Custom saved queries

39
Compare features with XQBE
Feature XQuery XQBE XGI
Existential Quantification Yes Yes Yes
Conjunction Yes Yes Yes
Breadth Projection Yes Yes Yes
Depth Projection Yes Yes Yes
Renaming Yes Yes Yes
New Element Yes Yes Yes
Join Yes Yes Partial
Cartesian Product Yes Yes Partial
Flattening Yes Yes Yes
Nesting Yes Partial No
Filtering Yes Yes No
Negation Yes Partial No
Aggregates Yes Yes No
Arithmetic Computations Yes Yes No
Sorting Yes Yes No
40
Recreate queries
  • Able to generate 13/23 queries capable by XQBE
  • Generate all language error queries from XBrain
  • Expert users created custom queries in XBrain
  • Fully or partially recreate 22/43
  • Cannot recreate 21/43

41
User Evaluation
  • Only one expert user used the system informally
  • Installation
  • Require multiple packages that should be bundled
    into a deployable archive file
  • Need to change a few system settings
  • Certain features could be more easily accessible
  • Need to support more features
  • More feedbacks on the limitations of the interface

42
Discussion
  • XGI is capable of generating a large subset of
    XQuery
  • Limitations
  • Does not support functions and some query
    constructs
  • Saved queries are constrained by the query schema

43
Future work
  • Support more extensive collaboration
  • Implement more XQuery features
  • Let, Order by, etc
  • XQuery functions and user-defined functions
  • Improve UI and enable browser compatibility

44
Conclusion
  • XGI is a simple and effective graphical query
    tool for assisting both novice and expert users
    to create complex XQuery statements quickly and
    accurately.

45
Thank You!
Write a Comment
User Comments (0)
About PowerShow.com