Lecture11 - Lecture 11 on Data Conversion This lecture aims...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 01/11/12 Lecture 11 on Data Conversion This lecture aims to describe the methodologies of converting relational database into object-oriented database, and converting relational database into XML document. Basically, the procedures are different due to their various data structures. Each data semantic conversion rule will be discussed in detail. 01/11/12 Data Conversion: CUSTOMIZED PROGRAM APPROACH • A common approach to data conversion is to develop customized programs to transfer data from one environment to another. • However, the customized program approach is very extremely expensive because it requires a different program to be written for each M source files and N target. • Furthermore, these programs are used only once. • As a result, totally depending on customized program for data conversion is unmanageable, too costly and time consuming. 01/11/12 N x M customerized conversion programs : : : : : : : : : : : : : : 1 1 n m Source files Target files Program (s) 01/11/12 Data Conversion: INTERPRETIVE TRANSFORMER APPROACH De fin itions o f source , targe t, and mapp ing In terp re tive trans former sou rce targe t Suppose that the database of a source nonrelational schema Ss is mapped to a target relational schema St. There are three distinct processes in this approach. One process accesses the source data(reading). Another process performs logical transformations on the data to place it into an internal form. A third process creates the target data (writing). Descrip tion o f Source Res tructuring Descrip tion o f Targe t Res truc ture Source Converter Targe t converter Source Form norma l Form norma l form Targe t form Summary view Detail architecture 01/11/12 SDDL statements: Data Structure PERSON <NAME, AGE> Instance CARS <LIC#1, MAKE> N-tuples ACCIDENTS <LIC#2, NAME> Relationship PERSON-CAR <NAME, LIC#1> N-tuples CAR-ACCIDENT <LIC#1, LIC#2> The TDL statements are FORM NAME FROM NAME FORM LIC#1 FROM LIC#1 : FORM PERSON IF PERSON FORM CARS IF CAR AND ACCIDENT PERSON NAME AGE CARS L IC# 1 MAKE ACC IDENT L IC# 2 NAME Leve l 1 2 3 PERSON NAME AGE CARS L IC# 1 MAKE L IC# 2 NAME Leve l 1 2 Example of Interpreter Statements Source database Target database 01/11/12 Data Conversion: TRANSLATOR GENERATOR APPROACH The translator reads the source definition, the target definition, and the mapping definition, and then generates a specialized program that will reformat and map the stored data from source to target as illustrated below: Translator generator De fin itions of source , targe t, and mapp ing Spec ia lized program source targe t Trans la tor genera tor 01/11/12 DEFINE and CONVERT compile phase Reader (S1) Reader (S2) : : DEF INE Comp iler DEF S1 DEF S2 : : DEF INE Source Reader (DEF INE ) comp iler phase PL /1 P rogram Convert ca ta log CONVERT program S tatemen t 1 S tatemen t 2 : : Restructurer (CONVERT) comp iler phase DEF INE Comp iler COP 1 COP 2 : : PL /1 P rocedure CONVERT Ca ta logue Execu tion Schedu le 01/11/12 DEFINE and CONVERT statements...
View Full Document

This note was uploaded on 01/11/2012 for the course CS CS3462 taught by Professor Drlee during the Spring '11 term at City University of Hong Kong.

Page1 / 43

Lecture11 - Lecture 11 on Data Conversion This lecture aims...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online