Requêtes OLAP sur une base de données XML native - Cercle ...
Requêtes OLAP sur une base de données XML native - Cercle ...
Requêtes OLAP sur une base de données XML native - Cercle ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
In Figure 1.2 the preor<strong>de</strong>r and postor<strong>de</strong>r traversal of an <strong>XML</strong> tree are shown. The document<br />
or<strong>de</strong>r is a < b < c < d < e < f < g < h < i < j, and thus pre(a) = 0, pre(b) = 1, . . . ,<br />
pre(j) = 9. The postor<strong>de</strong>r traversal is acquired: post(d) = 0, post(e) = 1, post(c) = 2,<br />
post(f) = 3, post(b) = 4, post(i) = 5, post(j) = 6, post(h) = 7, post(g) = 8, post(a) = 9.<br />
3.6 Modélisation <strong>de</strong>s documents <strong>XML</strong> 24<br />
(2)<br />
c<br />
(1)<br />
(3) d (4)<br />
b<br />
e<br />
(5)<br />
f<br />
(a)<br />
a<br />
(0)<br />
g<br />
h<br />
(6)<br />
(7)<br />
i (8) j (9)<br />
(2)<br />
c<br />
(4)<br />
(0) d (1)<br />
Fig. 3.3 1.2. – (a) Parcours Preor<strong>de</strong>rpré-ordre and (b) postor<strong>de</strong>r et (b) parcours traversal post-ordre of and’un <strong>XML</strong>arbre. tree<br />
b<br />
e<br />
(3)<br />
f<br />
(b)<br />
a<br />
i<br />
(9)<br />
g<br />
h<br />
(8)<br />
(7)<br />
(5) j (6)<br />
SAX n’est pas à proprement parlé un modèle pour les documents <strong>XML</strong> mais il peut être<br />
vu comme un modèle événementiel pour <strong>XML</strong>. En effet, SAX permet <strong>de</strong> parcourir le document<br />
<strong>XML</strong> séquentiellement. A chaque nouvel élément et à chaque fin d’élément, un événement est<br />
1.4 déclenché. <strong>XML</strong> Cet outilQuery sert donc àLanguages interroger un document <strong>XML</strong> à l’ai<strong>de</strong> d’un programme tiers <strong>de</strong><br />
façon séquentielle. Il est donc impossible <strong>de</strong> remonter dans le document <strong>XML</strong> ou <strong>de</strong> réordonner<br />
To les obtain nœuds, specified ce qu’il est data possible from <strong>de</strong> anfaire <strong>XML</strong>avec data<strong>base</strong> le modèle a number DOM. of special query languages have<br />
been <strong>de</strong>veloped, e.g. <strong>XML</strong>-QL [20], XQL [66], XPath [81], and XQuery [80]. A common<br />
L’avantage <strong>de</strong> SAX est qu’il ne nécessite pas beaucoup <strong>de</strong> place en mémoire contrairement<br />
feature of these languages is a possibility to formulate paths in the <strong>XML</strong> graph. Such a<br />
à DOM dont nous parlerons au point 3.6.4.<br />
path is a sequence of element or attribute names from the root element to a leaf. Regular<br />
expressions provi<strong>de</strong> a valuable method for paths specifications. In fact, most of <strong>XML</strong><br />
query 3.6.3 languages Infoset are <strong>base</strong>d on the XPath language that uses a form of path expressions for<br />
composing more general queries.<br />
Infoset [16] est <strong>une</strong> représentation abstraite <strong>de</strong>s informations contenues dans un document<br />
<strong>XML</strong>. Infoset définit un document <strong>XML</strong> bien formé comme un ensemble d’éléments d’informations.<br />
Il y a onze éléments d’information et chaque élément possè<strong>de</strong> un ensemble <strong>de</strong> propriétés.<br />
Par exemple, pour un élément <strong>XML</strong>, les propriétés sont les suivantes : <strong>une</strong> liste d’éléments<br />
enfants, l’élément parent, les attributs, le nom <strong>de</strong> l’élément, l’espace <strong>de</strong> nom et son préfixe.<br />
Il est à noter que toutes les informations du document <strong>XML</strong> ne sont pas représentées dans<br />
l’Infoset comme, par exemple, l’ordre <strong>de</strong>s attributs et les éléments <strong>XML</strong> vi<strong>de</strong>s. Le but d’Infoset est<br />
<strong>de</strong> représenter les informations généralement utiles à un analyseur <strong>XML</strong>. Le groupe s’occupant<br />
<strong>de</strong> la recommandation Infoset a donc jugé inutile <strong>de</strong> gar<strong>de</strong>r <strong>de</strong>s informations comme les éléments<br />
vi<strong>de</strong>s. Cependant, Infoset est <strong>de</strong>venu la <strong>base</strong> <strong>de</strong> plusieurs modèles <strong>de</strong> <strong>données</strong> plus sophistiqués<br />
utilisés par les processeurs <strong>XML</strong>.<br />
3.6.4 DOM<br />
Le DOM [17], Document Object Mo<strong>de</strong>l ou modèle objet <strong>de</strong> document <strong>XML</strong>, est fondamentalement<br />
différent d’Infoset. Infoset est un modèle <strong>de</strong> <strong>données</strong>, il définit <strong>une</strong> représentation abstraite<br />
<strong>de</strong>s <strong>données</strong> d’un document <strong>XML</strong>. DOM est plutôt <strong>une</strong> API, il définit <strong>une</strong> interface pour les <strong>données</strong><br />
et la structure d’un document <strong>XML</strong> afin qu’un programme puisse naviguer dans l’arbre et