• Keine Ergebnisse gefunden

5.1 Mapping to XML

N/A
N/A
Protected

Academic year: 2021

Aktie "5.1 Mapping to XML"

Copied!
69
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

XML Databases

5. Mapping Relational Data to

Silke Eckstein Andreas Kupfer

Institut für Informationssysteme

Technische Universität Braunschweig http://www.ifis.cs.tu-bs.de

5. Mapping Relational Data to XML Documents, 24.11.08

(2)

5.1 Mapping to XML 5.2 Mapping tables

5.3 Mapping query results

5. Mapping Rel2XML

5.4 Individual mapping 5.5 XSLT

5.6 Overview

(3)

Why map relational database contents to XML?

Interoperability

We may want to use (parts of) our RDB contents in many

different application contexts (XML as data interchange format)

Reconstruction

5.1 Mapping to XML

Reconstruction

We might have stored (parts of) our XML documents in an RDBMS in the first place (RDBMS as XML store)

Dynamic XML contents

We may use RDBMS queries to retrieve dynamic XML contents (cf. dynamic Web sites)

Wrapping

Everybody likes XML …, so why don't we give it to them?

(4)

Why do we look at that mapping?

What we're really interested in is the mapping in the opposite direction:

How to get XML into a database!

Yes, but…

5.1 Mapping to XML

Yes, but…

This one is easier to start with.

We do get some insight for the other mapping.

We can see some of the problems.

We'll see in what respect XML supports semi-structured

(5)

XML vs. SQL

Hierarchical vs. flat

Loose schema vs. fixed schema

Case-sensitive names vs. case-insensitive names

5.1 Mapping to XML

Case-sensitive names vs. case-insensitive names Several type concepts

Strictly unicode based vs. heterogeneous encodings Ordered vs. unordered

(6)

Mapping of SQL database to XML

SQL charset to unicode (depends on implementation) SQL identifiers to XML names

SQL data types to XML schema data types

5.1 Mapping to XML

SQL data types to XML schema data types SQL values to XML values

SQL tables to XML and XML schema documents SQL schemas to XML and XML schema documents SQL catalogues to XML and XML schema documents

(7)

Mapping between SQL identifiers and XML names

Charset

XML is based on unicode, SQL is not

Mapping between a SQL charset and unicode depends on the implementation

Names

Not every SQL name is allowed as XML name (delimited identifier)

5.1 Mapping to XML

Not every SQL name is allowed as XML name (delimited identifier) Certain characters have to be masked (especially ":" and leading

"xml" )

_x03A9_ (the unicode value)

Gehalt:FY2000 Gehalt_x003A_FY2000

Work@home Work_x0040_home

Home_Town Home_x005F_Town

SQL name becomes XML name (in capitals)

Employee <EMPLOYEE>…</EMPLOYEE>

(8)

Mapping data type names

Data type parameters are added to the XML name

Example: DECIMAL_9_2, VARCHAR_10, BLOB_4000

For TIME, TIMESTAMP, INTERVAL parameters are added about accuracy and time zone if applicable

DOMAIN d in schema s in catalogue c is transformed to the XML name c.s.d (fully masked)

5.1 Mapping to XML

XML name c.s.d (fully masked)

DISTINCT TYPE is analogous to domain

ARRAY of the type t with maximal m elements: ARRAY_m.t MULTISET is analogous to ARRAY

ROW types: depends on implementation, but begin with prefix Row

Interval types, structured types and reference types can not be

(9)

Mapping of data types

Using XML schema

Many predefined data types

<xsd:element name="city" type="xsd:string">

<xsd:element name="zip" type="xsd:integer">

5.1 Mapping to XML

<xsd:element name="zip" type="xsd:integer">

Extension of DTDs by reserved attributes

<city xml-sqltype="varchar">Braunschweig</city>

<zip xml-sqltype="integer">38100</zip>

XML processors or applications have to know about and evaluate those information

(10)

... Mapping of data types

Differences between SQL and XML schema

SQL data types are mapped to the best matching XML schema type

Facets limit the range of the XML schema type to the SQL range

5.1 Mapping to XML

length scale maxElements domainName

maxLength minExponent final typeName

characterSet maxExponent catalogName mappedType

Characteristics not mapped (like Collation and character set) are annotated

Cooperation of the namespaces XML schema and SQL/XML

To define the SQL base data types und type constructors in XML

characterSet maxExponent catalogName mappedType

collation userPrecision schemaName mappedElementType precision leadingPrecision

(11)

Mapping of SQL basic data types: Character

CHARACTER(20) CHARACTER SET LATIN1 COLLATION ENGLISH

<xsd:simpleType name="CHAR_20">

<xsd:annotation>

<xsd:appinfo>

<sqlxml:sqltype kind="PREDEFINED"

5.1 Mapping to XML

Exact type description Exact type description

based on the data

<sqlxml:sqltype kind="PREDEFINED"

name="CHAR" length="20"

characterSetName="LATIN1"

collation="ENGLISH"/>

</xsd:appinfo>

</xsd:annotation>

<xsd:restriction base="xsd:string">

<xsd:length value="20"/>

</xsd:restriction>

</xsd:simpleType>

based on the data type or type constructor from

SQLXML

Mapping to data type of XML schema

(12)

Mapping of SQL basic data types: Numeric

NUMERIC(12,2) with an implementation using 13 decimals

5.1 Mapping to XML

<xsd:simpleType name="NUMERIC_12_2">

<xsd:annotation>

<xsd:appinfo>

<sqlxml:sqltype kind="PREDEFINED"

name="NUMERIC"

There are different There are different attributes defined for name="NUMERIC"

precision="12"

scale="2"/>

</xsd:appinfo>

</xsd:annotation>

<xsd:restriction base="xsd:decimal">

<xsd:totalDigits value="13"/>

<xsd:fractionDigits value="2"/>

attributes defined for the various SQL data

types, like precision and fraction digits for

numeric data types

(13)

Mapping of SQL basic data types: DECIMAL(12,2) ARRAY [10]

<xsd:complexType name="ARRAY_10.DECIMAL_12_2">

<xsd:annotation>

<xsd:appinfo>

<sqlxml:sqltype kind="ARRAY"

maxElements="10"

mappedElementType="NUMERIC_12_2"/>

5.1 Mapping to XML

mappedElementType="NUMERIC_12_2"/>

</xsd:appinfo>

</xsd:annotation>

<xsd:sequence>

<xsd:element name="Element"

minOccurs="0"

maxOccurs="10"

type="NUMERIC_12_2">

</xsd:element>

</xsd:sequence>

</xsd:complexType>

Maximum length of the array

(14)

Mapping of SQL basic data types: CHARACTER(20) MULTISET

5.1 Mapping to XML

<xsd:complexType name="MULTISET.CHAR_20">

<xsd:annotation>

<xsd:appinfo>

<sqlxml:sqltype kind="MULTISET"

mappedElementType="CHAR_20"/>

</xsd:appinfo>

</xsd:appinfo>

</xsd:annotation>

<xsd:sequence>

<xsd:element name="Element"

minOccurs="0"

maxOccurs="unbounded"

type="CHAR_20">

</xsd:element>

</xsd:sequence>

Unlimited cardinality

(15)

5.1 Mapping to XML 5.2 Mapping tables

5.3 Mapping query results

5. Mapping Rel2XML

5.4 Individual mapping 5.5 XSLT

5.6 Overview 5.7 References

(16)

Mapping of databases to XML

Standard mapping of tables

Standard mapping of query results Individual mapping instructions

5.2 Mapping tables

(17)

General approach

How to map

Table and column names to element and attribute names

Data types to XML schema data types

Data from the database to content in XML documents

5.2 Mapping tables

Data from the database to content in XML documents

Similar approach for all database system producers SQL/XML (next chapter)

(18)

Standard mapping of tables

Database as a 3-tier hierarchy of

Database

Tables

Columns

5.2 Mapping tables

Database

Table_1

Column_11 Column_12 Column_13

Table_2

Coulmn_21 Column_2o

Table_n

Column_n1 Column_np

Columns

Presentation of database contents and structures in an XML document

As elements

As elements and attributes

Column_11 Column_12 Column_13 Coulmn_21 Column_2o Column_n1 Column_np

(19)

Example: Mapping as elements Pizza Delivery: Address:

5.2 Mapping tables

Pid Name Category Address

1 Super Pizza 4 1

2 Turbo Pizza 3 2

Aid City Street Number

1 Braunschweig Big str. 55 2 Braunschweig Small str. 6

Standard mapping of column names to element names

2 Turbo Pizza 3 2 2 Braunschweig Small str. 6

<PizzaDelivery>

<Pid>1</Pid>

<Name>Super Pizza</Name>

<Category>4</Category>

<Location>1</Location>

</PizzaDelivery>

(20)

Example: Mapping as elements and attributes Pizza Delivery: Address:

5.2 Mapping tables

Pid Name Category Address

1 Super Pizza 4 1

2 Turbo Pizza 3 2

Aid City Street Number

1 Braunschweig Big str. 55 2 Braunschweig Small str. 6

Standard mapping of the column names to attribute names

<PizzaDelivery Pid='1'

Name='Super Pizza' Category='4'

Location='1' />

(21)

Mapping of keys and foreign keys

Goal: Keys and foreign keys shall be represented appropriately in the XML document

Mapping relations to element hierachy

1:n relations are mapped to nested elements

5.2 Mapping tables

n:m relations are problematic

Denormalized content in the XML document – possibly high redundancy

Using XML schema

Representing keys and foreign keys with key / keyref

Using DTD

Mapping keys and foreign keys to attributes (ID/IDREF)

Make keys unique (ID must be unique document wide)

(22)

Keys and foreign key as nested elements

5.2 Mapping tables

Pid Name Category Address

1 Super Pizza 4 1

2 Turbo Pizza 3 2

Aid City Street Number

1 Braunschweig Big str. 55 2 Braunschweig Small str. 6 FK

Resolving of foreign key relations by embedding referenced elements

<!ELEMENT PizzaDelivery (Pid, Name, Category?, Address)>

<!ELEMENT Address (Aid, City, Street, Number)>

<!ELEMENT Pid (#PCDATA)>

<!ELEMENT Name (#PCDATA)>

<!ELEMENT Category (#PCDATA)>

(23)

Mapping object relational databases

Object relational databases support non atomic, complex columns

Tuple values

Collection values

5.2 Mapping tables

Collection values

Object values

Reference values

Existing structure shall be carried over to the XML document

Instance layer

Schema layer

(24)

Mapping object relational databases

Instance layer:Appropriate mapping of instances with complex attributes (tuple, sets or lists)

5.2 Mapping tables

Pid Name <Address> {Phone}

1 Super Pizza 4City Big str.Street 55Number 1

1 Super Pizza BS Big str. 55 {'0531/555-7447'

1 Super Pizza BS Big str. 55 {'0531/555-7447'

'0531/555-2232'}

<PizzaDelivery>

<Pid>1</Pid>

<Name>Super Pizza</Name>

<Address>

<City>BS</City>

<Street>Big str.</Street>

<Number>55</Number>

(25)

Mapping object relational databases

Schema layer: Derive XML schema or DTD from object relational schema

5.2 Mapping tables

CREATE ROW TYPE AddressType(

City VARCHAR(25), Street VARCHAR(20), Number INTEGER);

CREATE TABLE PizzaDelivery(

CREATE TABLE PizzaDelivery(

Pid INTEGER NOT NULL PRIMARY KEY, Name VARCHAR(20) NOT NULL,

Address AddressType,

Phone SET(INTEGER NOT NULL));

<!ELEMENT PizzaDelivery (Pid, Name, Address, Phone+)>

<!ELEMENT Address (City, Street, Number)>

<!ELEMENT Pid (#PCDATA)>

<!ELEMENT Name (#PCDATA)>

<!ELEMENT Phone (#PCDATA)>

<!ELEMENT City (#PCDATA)>

(26)

Mapping tables – summary

Database output – complete Required information – none Variable output format – no

Preservation of data types – by extended DTD or XML schema Storing keys and foreign keys

5.2 Mapping tables

Storing keys and foreign keys

Mapping to hierachies in the XML document

ID/IDREF

XML schema

Special features

Parsers must evaluate DTD extensions

XML schema is better suited

Appropriate represenation of tuples, sets, lists and references from

(27)

5.1 Mapping to XML 5.2 Mapping tables

5.3 Mapping query results

5. Mapping Rel2XML

5.4 Individual mapping 5.5 XSLT

5.6 Overview 5.7 References

(28)

Mapping of SQL query results to XML documents or XML elements

Standard XML representation

Result table to rowset elements

Every row to a row element

5.3 Mapping query results

Every row to a row element

Columns to subelements or XML attributes

No variable structure

Similar process is part of the SQL/XML standard

(29)

SQL

XML

5.3 Mapping query results

SELECT Name, Category, City FROM PizzaDelivery, Address WHERE City='Braunschweig' AND

PizzaDelivery.Address=Address.Aid

XML ?

<rowset>

<row no='1'>

<Name>Super Pizza</Name>

<Category>4</Category>

<City>Braunschweig</City>

</row>

</rowset>

?

(30)

Creating XML by using defaults from the DBMS

Implementation dependant, e.g.: MySQL has an option to produce XML output

Shell command to execute a query with username and database name, piped to a file

5.3 Mapping query results

./mysql -ujon test --xml -e 'SELECT * FROM t1' > t1.xml

<?xml version="1.0"?>

<?xml version="1.0"?>

<resultset statement="SELECT * FROM t1"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<row> <field name="Pid">1</field>

<field name="Name">Super Pizza</field>

<field name="Category">4</field>

<field name="Location">1</field> </row>

<row>…</row>

</resultset>

(31)

Mapping query results – summary

Database output – partial

Required information – database query or view Variable output format – no

Preservation of data types – usually not, but possible

5.3 Mapping query results

Preservation of data types – usually not, but possible to deduce

Storing keys and foreign keys

Possible to represent relations within the table

Embedding, ID/IDREF, XML schema

Special features

none

(32)

5.1 Mapping to XML 5.2 Mapping tables

5.3 Mapping query results

5. Mapping Rel2XML

5.4 Individual mapping 5.5 XSLT

5.6 Overview

(33)

Variants for individual mapping instructions

1 2

Extended database query with transformation instructions

Standard

5.4 Individual mapping

2

3

Standard

transformation XML query language

Standard

transformation XSLT stylesheet

Database

XML document XML view

Standardized document Standardized

XML document

(34)

(Extended) database query languages

5.4 Individual mapping

First Idea: use basic SQL

Database

XML document

(35)

Creating XML by using basic SQL

Basic idea is to use string concatenation in the select clause to build XML markup

|| operator from the SQL standard

5.4 Individual mapping

postgres=# SELECT 'abc' || 'def' AS "unspecified";

Concatenation requires values to be not NULL

Implementation independant

SELECT '<pizzerias><name>'||Name||'</name>',

'<category>'||Category||'</category></pizzerias>' FROM PizzaDelivery;

postgres=# SELECT 'abc' || 'def' AS "unspecified";

Result:

abcdef

(36)

Problems and limitations of basic SQL

Valid XML documents require a header and one root element

Workaround with additional SELECT statements

Nesting is difficult

5.4 Individual mapping

The output is a single table

No dependance on previous or following SELECT statements

Extend an SQL dialect by XML operators:

Database query (in SQL) to select the data to be presented in XML

(37)

Example

Select * from PizzaDelivery, Address where (Address=Aid)

construct

<PizzaDelivery>

5.4 Individual mapping

<PizzaDelivery>

<name>

{$name}

</name>

<city>{$city}</city>

<address>{$street}

{$number}</address>

</PizzaDelivery>

Access to columns from the SQL result

Arbitrary XML names Arbitrary XML element and attribute

names

(38)

Individual mapping instructions and XML queries

Query to the database with XML query languages is supported

5.4 Individual mapping

Standard

Database

XML document XML view

Standard

transformation XML query language

(39)

Implementing XML queries

Naive Implementation

Full content of the database is transformed to an XML document

XML query is processed on this document

5.4 Individual mapping

XML query is processed on this document

Very inefficient (XML document can be very large, can contain irrelevant information)

Better: XML view on the data in a database

XML document will not be materialized (virtual)

XML queries are processed on the virtual document

Much processing within the native database engine

(40)

Example: Silkroute

Silkroute

Middleware beween RDBMS and XML application

Develloped by AT&T and University of Pennsylvania

Creation of an XML view

5.4 Individual mapping

Creation of an XML view

Arbitrary output format

View is not materialized

XML queries to the view with XML-QL or XQuery Problems

Derive SQL queries from a view definition

(41)

Silkroute example

5.4 Individual mapping

Construct

<view>

from Address a, PizzaDelivery d construct

<PizzaDelivery>

<name>$d.name</name>

<address>

<city>$a.city</city>

<street>a.$street

a.$number</street>

</PizzaDelivery>

</view>

(42)

Benefits of using standardized XML documents as intermediate format

Less requirements, more flexibility, better compatibility

5.4 Individual mapping

Database

XML document

Standardized Standardized

XML Standard

transformation XSLT stylesheet

(43)

Individual mapping instructions – summary

Database output – complete or partial Required information

XML query

XSLT (see next section (5.5))

View definition

5.4 Individual mapping

View definition

Variable output format – yes

Preservation of data types – usually not, but possible to deduce

Storing keys and foreign keys

Embedding, ID/IDREF, XML schema

Special features

none

(44)

5.1 Mapping to XML 5.2 Mapping tables

5.3 Mapping query results

5. Mapping Rel2XML

5.4 Individual mapping 5.5 XSLT

5.6 Overview

(45)

XSLT

Extensible Stylesheet Language – Transformations

A language to describe transformations from source to target tree structures (= XML documents)

A transformation in XSLT

5.5 XSLT

A transformation in XSLT

Is described by a well-formed XML document called stylesheet

Can use elements of the XSLT namespace as well as of other namespaces

Contains template rules to execute the transformation

XML file

XSLT Stylesheet

XML file XSLT

Processor

(46)

XSLT stylesheet XSLT tree

5.5 XSLT

XSLT processor

XSLT stylesheet and

XML document

XSLT tree and Source tree

Transformation

process Result tree Result

document

(47)

Template rules

A rule consists of a pattern and a template

The pattern is compared to the nodes of the source document tree

5.5 XSLT

The template can be instanciated to create a part of the target tree. It can contain elements of the XSLT namespace which are instructions to create fragments

(48)

XSLT processing model

By processing a list of source nodes,

fragments of the target tree can be created The list starts with the root node only

A node is processed

By selecting the best matching pattern from all rules

5.5 XSLT

By selecting the best matching pattern from all rules (resolving any conflicts)

The template of the best matching rule is instanciated with the current node as context node

A template usually contains instructions to select further source tree nodes for processing

Recursivly repeat the selection of matching rules,

(49)

Structure of a stylesheet

5.5 XSLT

<xsl:stylesheet id={id}

extension-element-prefixes={token}

exclude-result-prefixes={token}

version=number>

<!-- Content: (xsl:import*, top-level-elements)-->

Elements and attributes with the XSLT namespace must be recognized by the XSLT processor

PIs and comments are ignored

<!-- Content: (xsl:import*, top-level-elements)-->

</xsl:stylesheet>

(50)

Top level elements

E.g. xsl:import, xsl:include, and most importantly xsl:template

5.5 XSLT

<xsl:template

match = {pattern}

match = {pattern}

name = {qname}

priority = {number}

mode = {qname}

<!-- Content: (xsl:param*, template) -->

</xsl:template

(51)

A pattern specifies a set of conditions to a node

Uses a set of alternative (|-seperated) address paths in the child and attribute axis

The use of '/' and '//', 'id' and 'key' functions is possible

5.5 XSLT

The use of '/' and '//', 'id' and 'key' functions is possible Pattern predicates ('[…]') can use all XPath

expressions

(52)

Multiple matching patterns

If multiple patterns match a node, the conflict is resolved by priorities (cf. priority attribute)

Imported rules have a lower priority than rules of the primary stylesheet

Alternatives are processed as if each alternative is defined by a

5.5 XSLT

Alternatives are processed as if each alternative is defined by a single rule

ChildOrAttributeAxisSpecifier::QName patterns have priority 0

ChildOrAttributeAxisSpecifier::NCName patterns have priority -0.25

ChildOrAttributeAxisSpecifier::NodeTest patterns have priority -0.5

(53)

XSLT contains default rules

Process the document recursivly

But have lower priority than rules in the stylesheet Example:

5.5 XSLT

Example:

<xsl:template match="*|/">

<xsl:apply-templates/>

</xsl:template>

(54)

Rules

Can be named and be called in templates of other rules Can have parameters which can be passed along on

their invocation, default values can be defined

The mode attribute allows a rule to be processed multiple

5.5 XSLT

The mode attribute allows a rule to be processed multiple times and with different results

If the template is invoked directly with xsl:call- template or xsl:apply-template, the filter

attributes (match, mode, priority or name) are not processed

(55)

Templates

Can contain literal elements (non XSLT

namespace) and elements of the XSLT namespace (instructions)

If the rule is selected, the template can construct

5.5 XSLT

If the rule is selected, the template can construct fragments of the result tree

Processing depends on the context

Default behaviour is to write all elements which are not in the XSLT namespace to the result tree

Must be valid XML

Can contain instructions

(56)

Instructions to process nodes recusively

5.5 XSLT

<xsl:apply-template

select = {node set expression}

mode = {qname}>

<!-- Content: (xsl:sort, xsl:with-param)* -->

</xsl:apply-template>

Without the attribute select all children of the context node are processed

Select can be a (XPath-) expression to select nodes

Could result in not terminating recursion!

</xsl:apply-template>

(57)

Instructions to create a node

5.5 XSLT

<xsl:element

name = {qname}

namespace = {uri-reference}

use-attribute-sets = {qname} >

<!-- Content: template -->

Name attribute is required, but can be calculated

Other create instructions are similar

xsl:attribute, xsl:attribute-set, xsl:text (to create a text/leaf node with whitespaces),

xsl:processing-instruction, xsl:comment

<!-- Content: template -->

</xsl:element>

(58)

Instructions for flow control

Conditional processing

5.5 XSLT

<xsl:if

test = {boolean expression}

<!-- Content: template -->

</xsl:if>

required

Test expression is evaluated and result is casted to a boolean. If it is true the template will be instanciated

</xsl:if>

(59)

Instructions for flow control

Multiple choice ("if-then-else" / "switch")

<xsl:choose

<!-- Content: (xsl:when+, xsl:otherwise?) -->

</xsl:choose>

<xsl:when

test = {boolean expression}

5.5 XSLT

If multiple xsl:when elements are true, only the first one is processed (no "break" needed)

If no xsl:when element is true and there is no xsl:otherwise, no content is created

test = {boolean expression}

<!-- Content: template -->

</xsl:when>

<xsl:otherwise

<!-- Content: template -->

</xsl:otherwise>

(60)

Repetition

5.5 XSLT

<xsl:for-each

select = {node-set expression}

<!-- Content: (xsl:sort*, template) -->

</xsl:for-each>

The template is instanciated for each node selected by the node set expression

On instanciation the current node becomes the

context node and all selected nodes are the node list If there is no explicit sort statement, the nodes are

(61)

"Calculation" of output text

The selected object is casted to a string value and is

5.5 XSLT

<xsl:value-of

select = {string expression}

disable-output-escaping = "yes" | "no" />

The selected object is casted to a string value and is inserted as content of the instanciated text node

(62)

Other statements for sorting, numbering, variables, …

see http://www.w3.org/TR/xslt

Some advice

5.5 XSLT

Some advice

"select" is used differently depending on its context!

Denomination "variable" is misleading!

Context node is changed by for-each!

(63)

5.5 XSLT

<?xml version="1.1"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

version="1.0">

<xsl:template match="resultset">

<html>

<head/>

<body>

<h1>

<xsl:text>Summary about </xsl:text>

<xsl:text>Summary about </xsl:text>

<xsl:value-of select="count(child::*)"/>

<xsl:text> Pizzeria</xsl:text>

<xsl:if test="count(child::*) > 1">

<xsl:text>s</xsl:text>

</xsl:if>

</h1>

<xsl:apply-templates/>

</body>

</html>

</xsl:template>

(64)

5.5 XSLT

<?xml version="1.0"?>

<resultset statement="SELECT * FROM t1"

xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance">

<row> <field name="Pid">1</field>

<field name="Name">Super Pizza</field>

<field name="Category">4</field>

<field name="Location">1</field> </row>

<field name="Location">1</field> </row>

<row>…</row>

</resultset>

<xsl:template match="field[attribute::name='Name']">

<h2>

<xsl:value-of select="."/>

</h2>

(65)

5.1 Mapping to XML 5.2 Mapping tables

5.3 Mapping query results

5. Mapping Rel2XML

5.4 Individual mapping 5.5 XSLT

5.6 Overview 5.7 References

(66)

Conclusion

Different methods to generate XML documents from stored information exist

Standard mapping of tables to XML

Standard XML document: fixed output format

5. Mapping Rel2XML

Standard XML document: fixed output format

Standard mapping of query results

Extend database queries by XML functionality Standard XML document

Individual mapping instructions

XML views on database contents

XML query languages processed on views

(67)

1. Introduction 2. XML Basics

3. Schema definition

4. XML query languages I 5. Mapping relational data

8. XML query languages II 9. XML storage I

10. XML storage - index 11. XML storage - native

5.6 Overview

5. Mapping relational data to XML

6. SQL/XML

7. XML processing

11. XML storage - native 12. Updates / Transactions 13. Systems

14. XML Benchmarks

(68)

Can Türker, "XML und Datenbanken", Lecture, University of Zurich, 2008 [Tür08]

Beginning XML Databases. Gavin Powell, Wiley &

Sons, 2007, ISBN 0471791202 [Pow07]

M. Scholl, "XML and Databases", Lecture, Uni

5.7 References

M. Scholl, "XML and Databases", Lecture, Uni Konstanz, WS07/08 [Scholl07]

Jon Stephens, MySQL Documentation Team, "MySQL 5.1 Reference Manual", 2007 [MySQL]

XML & Datenbanken. Konzepte, Sprachen und

Systeme. Klettke & Meyer, Dpunkt-Verlag, 2002, ISBN

(69)

Now, or ...

Room: IZ 232

Office our: Tuesday, 12:30 – 13:30 Uhr

Questions, Ideas, Comments

Office our: Tuesday, 12:30 – 13:30 Uhr or on appointment

Email: eckstein@ifis.cs.tu-bs.de

Referenzen

ÄHNLICHE DOKUMENTE

– nicht immer “exact match” möglich – “fuzzy match” / Abstandsfunktion Problempotential.. SchemaSQL

● Mapping distributed through Map Request / Reply message exchange. ●

The query processor of the database system cannot use any restriction on the did attribute, so it has to start with the smallest value for the compound surrogate dimension, starts

20 Please refer to the following for further information: The NHS Foundation Trust Code of Governance, Monitor, April 2010; The Healthy NHS Board: principles for good

UrbaneGeschichten 1 is a project and mobile web platform for a bottom-up citizens’ chronicle. It aims at collecting and mapping everyday life stories directly from

Ein solcher Partial Digest zerschneidet diese nur an manchen Restriction Sites, so dass wir Fragmente zwischen Restriction Sites erhalten, die nicht unbedingt aufeinander

After these general remarks about statistical maps and graphs and political power, I want to set out some thoughts about the critical potential of data visualizations.. My thoughts

The profile mapping of the storage ring kicker magnets was carried out with a two-axis sensor support as shown in a photograph of the hutch page.. A capacitive probe with two