XML & Mediators

Download Report

Transcript XML & Mediators

XML & Mediators
Thitima Sirikangwalkul
Wai Sum Mong
April 10, 2003
Agenda
Problems and Solutions
Introduction to XML
XML Mediator Overview
XML Mediator Examples
Problems
Problem

Storing and Processing Data Efficiently
Past

Single DBMS
Present


Isolated and heterogeneous database
Integrated view needed
Solutions
Wrapper-Mediator Approach


Wrapper
Mediator
Interface
Virtual Database
eXtensible Markup Language (XML)

Handle data from multiple sources
 Manage, Store, Query, and Present
XML Advantages
Data exchange over Internet
Representation standard
Easy to create with Simple Editor
Extensible, Flexible, and Simple
System and Vendor Independent
Self-Describable
Schemas
DTD Vs XML Schema
XML Document
<album>
<title>TITLE A</title>
<song id =’1’>song 1</song>
<song id =’2’>song 2</song>
</album>
DTD
<!ELEMENT album (title, song+)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT song (#PCDATA)>
<!ATTRLIST song id CDATA #REQUIRED>
XML Schema
<xsd:complexType name= “MyAlbum”>
<xsd:sequence>
<xsd:element name= “title” type= “xsd:string”/>
<xsd:element name= “song” type= “xsd:string”/>
</xsd:sequence>
<xsd:attribute name= “id” type= “xsd:string”/>
</xsd:complexType>
<element name= “album” type= “MyAlbum”>
XML Mediator : Architecture
Application
Application
Application
Mediator
Mediator
Mediator
Wrapper
Wrapper
DB1
DB2
Wrapper
XML Files
XML Mediator : Example
Application
Retrieve
customer names
and id
Find all Chicago
customer names
and their order items
Mediator
Retrieve all cid’s
and
item names of orders
Wrapper
Wrapper
Customer
Database
Order
Database
XML Mediator : Example
Application
Mediator
Wrapper
Wrapper
Customer
Database
Order
Database
XML Mediator : Basic Tasks
Database Selection
Query Translation

Simple Query handled by Wrappers
Result Merging

Ranking algorithm
XML Mediation Systems
E-XML Mediator
EntireX Mediator
E-XML Mediator – System Overview
XML
Documents
XQuery
queries
e-XML Mediator
query
SQL
query
SQL
query
SQL
Wrapper
SQL
Wrapper
RDBMS
RDBMS
XQuery
query
Web site
Wrapper
XDBMS
Web site (HTML pages)
E-XML Mediator
•Administrates
the mediator
•Registers
wrapped data
sources
Administration
Console
WWW
Client
Parser
Recomposer
Evaluator
•Communication
interface
Metadata
Exchanger
•Executes query
•Gives back the
result
•Query processing
HTTP
Applet
Gateways
Translator
Transformer
Wrapper
Data Source
E-XML Mediator
During query processing,



Determines the sources
Determines the amount of sequential or
parallel executions
Determines the amount of query
processing that can be offloaded onto the
data sources
EntireX Mediator
From Software AG
Acts as a central hub of the XML-based
information exchange
Manages XML transactions over Internet


Routes to the receiving application
Converts message to appropriate format
EntireX Mediator Architecture