XML & Mediators

16
XML & Mediators Thitima Sirikangwalkul Wai Sum Mong April 10, 2003

description

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 - PowerPoint PPT Presentation

Transcript of XML & Mediators

Page 1: XML & Mediators

XML & Mediators

Thitima SirikangwalkulWai Sum Mong

April 10, 2003

Page 2: XML & Mediators

Agenda

Problems and Solutions Introduction to XML XML Mediator Overview XML Mediator Examples

Page 3: XML & Mediators

Problems

Problem Storing and Processing Data

Efficiently

Past Single DBMS

Present Isolated and heterogeneous database Integrated view needed

Page 4: XML & Mediators

Solutions

Wrapper-Mediator Approach Wrapper Interface Mediator Virtual Database

eXtensible Markup Language (XML) Handle data from multiple sources

Manage, Store, Query, and Present

Page 5: XML & Mediators

XML Advantages

Data exchange over Internet Representation standard Easy to create with Simple Editor Extensible, Flexible, and Simple System and Vendor Independent Self-Describable

Page 6: XML & Mediators

Schemas

DTD Vs XML Schema

<album><title>TITLE A</title><song id =’1’>song 1</song><song id =’2’>song 2</song></album>

<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 Schema

<!ELEMENT album (title, song+)><!ELEMENT title (#PCDATA)><!ELEMENT song (#PCDATA)><!ATTRLIST song id CDATA #REQUIRED>

DTD

XML Document

Page 7: XML & Mediators

XML Mediator : Architecture

Mediator

Application

ApplicationApplication

Mediator

Mediator

DB1 DB2 XML Files

Wrapper Wrapper Wrapper

Page 8: XML & Mediators

XML Mediator : Example

Application

Mediator

OrderDatabase

Wrapper Wrapper

Customer Database

Find all Chicago customer names

and their order items

Retrieve all cid’s and

item names of orders

Retrievecustomer names

and id

Page 9: XML & Mediators

XML Mediator : Example

Application

Mediator

OrderDatabase

Wrapper Wrapper

Customer Database

Page 10: XML & Mediators

XML Mediator : Basic Tasks

Database Selection Query Translation Simple Query handled by Wrappers

Result Merging Ranking algorithm

Page 11: XML & Mediators

XML Mediation Systems

E-XML Mediator

EntireX Mediator

Page 12: XML & Mediators

E-XML Mediator – System Overview

XQuery queries

Web siteWrapper

Web site (HTML pages)

SQL Wrapper

SQLWrapper

XQueryquery

SQLquery

SQLquery

XMLDocuments

e-XML Mediator

query

RDBMS RDBMS XDBMS

Page 13: XML & Mediators

E-XML Mediator Administration

Console

Evaluator

Parser Recomposer

Exchanger

Metadata

Gateways

Translator Transformer

Wrapper

WWW Client

HTTP

Data Source

Applet

•Administrates the mediator

•Registers wrapped data sources

•Query processing

•Communication interface

•Executes query

•Gives back the result

Page 14: XML & Mediators

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

Page 15: XML & Mediators

EntireX Mediator

From Software AGActs as a central hub of the XML-based information exchangeManages XML transactions over Internet Routes to the receiving application Converts message to appropriate

format

Page 16: XML & Mediators

EntireX Mediator Architecture