Your mediators need data conversion sophie cluet claude delobel jerome simeon k smaga
This presentation is the property of its rightful owner.
Sponsored Links
1 / 28

Your Mediators need Data Conversion!* Sophie Cluet, Claude Delobel, Jerome Simeon, K Smaga PowerPoint PPT Presentation


  • 79 Views
  • Uploaded on
  • Presentation posted in: General

Your Mediators need Data Conversion!* Sophie Cluet, Claude Delobel, Jerome Simeon, K Smaga. By Prapulla Bajjuri. Introduction. Converts the data from one format to another

Download Presentation

Your Mediators need Data Conversion!* Sophie Cluet, Claude Delobel, Jerome Simeon, K Smaga

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Your mediators need data conversion sophie cluet claude delobel jerome simeon k smaga

Your Mediators need Data Conversion!*Sophie Cluet, Claude Delobel, Jerome Simeon, K Smaga

By

Prapulla Bajjuri


Introduction

Introduction

  • Converts the data from one format to another

  • It provides tools for the specification and the implementation of data conversions among heterogeneous data sources.

  • YAT model uses graphs for representation

  • YATL is rule-based


Translation scenario

Translation Scenario

RDBMS

OODBMS

YATL translation

rel + sgml ->odmg

YAT/relational

wrapper

YAT/ODMG

wrapper

YATL translation

Odmg -> html

YAT/SGML

wrapper

YAT/HTML

wrapper

HTML files

SGML Files


Yat model

YAT Model

  • Consists of set of patterns and variable domains

  • Two kinds of variables

  • Data Variables

    (ii) Pattern Variables

  • The domain of data variable is the set of all data constants and variable names

  • The domain of pattern variable is the set of all its instance patterns.

  • Ground pattern.


Your mediators need data conversion sophie cluet claude delobel jerome simeon k smaga

Class

Pclass:

Yat:

Class_name

V

& Yat

V

L

*

L

Att

*

Ptype

Yat

Ptype:

Y: int V String..V

Tuple V

Z: (set, list,

bag, array)

V

&Pclass

*

*

Att

Ptype

Ptype

The YAT model

The ODMG model

class

class

Psup:

C1:

S1:

S2:

Pcar:

car

car

&Pcar

name

desc

suppliers

name

desc

suppliers

*

S1:str

S2:str

set

“Golf”

“The 1995 volks

Golf GTI….”

set

&Psup

&s1

&s2

The car schema model

The Golf GTI model


Model instantiation

Model Instantiation

  • It relies on pattern instantiation which itself relies on variable domain inclusion.

  • Each pattern of the instance model must be an instance of some pattern of the source model

  • A variable can be instantiated either by a constant belonging to the variable’s domain or by a variable whose domain is a subset.

Pattern for car objects

Pcar: classcar(names1:string,

descS2:string,

suppliersset&Psup)


The yat language

The YAT Language

  • It is declarative and rule-based

  • Deals with heterogeneity

  • Deals with collections

  • Detects cyclic programs

  • Supports graphical interface

  • Typing in YATL


Rule 1

Rule 1

Pbr :

brochure( number  Num,

 title  T,

 model  Year,

 desc  D,

 suppls  supplier

(  name  SN,

 address Add)),

Year > 1975,

C is city(Add),

Z is zip(Add)

Psup(SN) :

Class  supplier

( name  SN,

 city C,

 zip  Z)

*


Rule 2

Rule 2

Pbr :

brochure( number  Num,

 title  T,

 model  Year,

 desc  D,

 suppls  supplier

(  name  SN,

 address Add)),

Pcar(pbr) :

Class  car

( name  T,

 desc D,

 suppliers

 set &Psup(SN) )

*

{ }


Rule 11

Rule 1’

Pbr :

brochure( number  Num,

 title  T,

 model  Year,

 desc  D,

 suppls  supplier

(  name  SN,

 address Add)),

C is city(Add),

Z is zip(Add)

Psup(SN) :

Class  supplier

( name  SN,

 city C,

 zip  Z,

 sells

 set  &Pcar(Pbr) )

*

{ }


Dealing with heterogeneity

Dealing with heterogeneity

Suppliers Relational Database Schema

suppliers[sid: integer, name: string, city: string, address: string, tel: string]

Cars[cid: integer, broch_num: string]

Sales[sid: integer, cid: integer, year: integer, sold: integer]


Rule 3

Rule 3

Pbr :

brochure(  number  Num,

 title T,

 model  Year,

desc D,

 suppls  supplier

( name  SN,

 address  Add)),

Rsuppliers:

Suppliers row

(sid Sid,

name SN,

city C,

addressAdd2,

tel Tel).

Rcars:

Cars  row

(cid Cid,

broch_num Num),

sameaddress(Add, C, Add2)

*

Psup(SN) :

Class car

(  name T,

desc D,

suppliers

set &Psup(Sid))

*

*

*


Dealing with collections

Dealing with collections

  • YATL handles sets and lists.

  • It provides one primitive for grouping and another for ordering.

  • It allows to grouping on some criteria and ordering on others.

  • Arrays can also be manipulated using YAT language.


Rule 4

Rule 4

Pbr :

brochure(  number  Num,

 title T,

 model  Year,

desc D,

 suppls  supplier

( name  SN,

 address  Add)),

Pallsups( ) :

list  &Psup(SN)

[]SN

*


Your mediators need data conversion sophie cluet claude delobel jerome simeon k smaga

sales

sales

Mat:

Mat:

Polo golf

Paris nice caen

Paris nice caen paris nice caen

Polo golf polo golf polo golf

100 22 300 110 20 330

110

22

20 300 330

100

Input Matrix

Output Transposed Matrix

Rule 5

New (Id) : Id:

Mat  Y  X  A Mat  X  Y  A

[]I

[]J

I

J


Detecting cyclic programs

Detecting cyclic programs

  • Removing the & symbol in Rules 1’ and 2 introduces cycle in the program

  • Statically detecting cycles in a YATL program is undecidable

  • This can be done by constructing dependency graph of dereferenced functions

  • It rejects conversion programs working by recursion on the input tree.

  • Rejects programs that are not safe-recursive.


Typing in yatl

Typing in YATL

  • Input and output models can easily be inferred by considering

    (i) input and output patterns

    (ii) predicate/function signatures

    (iii) variable domains

Rule 1

Psup(SN) :

Class  supplier

( name  SN,

 city C,

 zip  Z)

Pbr :

brochure(……

 suppls  supplier

(  name  SN,

 address Add)),

Year > 1975,

C is city(Add),

Z is zip(Add)

*


Customizing programs

Customizing programs

  • Converts any ODMG data into HTML

  • An object is converted into HTML page

  • An atomic value is converted into a string

  • A collection is converted into a list of HTML items

  • An object reference is converted into an HTML anchor


Your mediators need data conversion sophie cluet claude delobel jerome simeon k smaga

  • An object is converted into an HTML page

Web 1

HtmlPage(Pclass) :

Html(  head title Classname,

 body(h1Classname,

 ul li,

( Att2,

HtmlElement(Ptype))))

Pclass :

class Classname  AttPtype,

Att2 is concat(Att, “ : “)

  • An atomic value converted into a string

Web 2

HtmlElement( Ptype) : S Ptype : Data,

S is data_to_string(Data)


Your mediators need data conversion sophie cluet claude delobel jerome simeon k smaga

  • A tuple is converted into a list of HTML items

Web 3

Ptype :

tuple AttP2:Ptype,

Att2 is concat(Att, “ : “)

HtmlElement(Ptype) :

ul li( Att2,

HtmlElement(P2: Ptype))

*

*

  • A collection is converted into a list of HTML elements.

Web 4

HtmlElement( Ptype) : Ptype :

ul li HtmlElement(P2:Ptype) X:{ set, bag} P2 : Ptype

*

*


Your mediators need data conversion sophie cluet claude delobel jerome simeon k smaga

  • A list or array is converted into a list of HTML elements.

Web 5

HtmlElement(Ptype) :

ol liHtmlElement(P2:Ptype))

Ptype :

X : {list,array}P2:Ptype

I

o(I)

  • A object reference is converted into an HTML anchor.

Web 6

HtmlElement( Ptype) : Ptype : &Ptype,

A( href  & HtmlPage(Pclass),Pclass :

 cont Classname) class Classname  P2:Ptype


Your mediators need data conversion sophie cluet claude delobel jerome simeon k smaga

Example

HtmlPage(Pcar) :

html(  head title car,

 body(h1car,

 ul( li ( ”name:”,

T1),

li( ”age:”,

D1),

li( ”suppliers:”,

ul li a

( href HtmlPage(Psup),

cont Classname)))))

Pcar :

Class car

( nameT,

 desc  D,

 suppliers set &Psup),

Psup:

classClassnameP2:Ptype,

T1 is data_to_string(T),

D1 is data_to_string(D)

*

*


Combining programs

Combining programs

  • YATL interpreter organizes the set of rules of a program hierarchically.

  • For a given input pattern, the more specific rules matching the input are applied first then less specific rules are tried.

  • User may also enforce the rule hierarchy.


Composing programs

Composing programs

  • Using YATL , it is possible to compose two programs and generate a more efficient program.

  • Composition mechanism: It takes two programs and checks whether they are compatible and produces the new program by combining them.

  • Here it takes SGMLODMG and ODMGHTML and produces SGMLHTML


Example

Example

  • Prg1: M1M2

  • Prg2: M2’M3

  • System instantiates prg2 with the patterns of M2.

  • Prg2’: M2M3’


Yat architecture

YAT Architecture

  • It does not provide the ability to query or update external sources.

  • System is composed into three main parts

  • The specification environment

  • The runtime environment

  • A library of programs and formats


Yat architecture1

YAT Architecture

Target 1

Specification Environment

Export

wrapper

Graphical User Interface

Runtime environment

Static

Typing

YATL program

Instantiation

module

YAT Patterns/YATL rules

Management module

Type

checker

YATL

interpreter

YAT pattern/ YATL rules

management module

External Functions &

Predicates evaluation

Import

wrapper

Import

wrapper

Library of programs and models

Source 2

Source 1


Your mediators need data conversion sophie cluet claude delobel jerome simeon k smaga

Questions….?

Thank You


  • Login