1 / 13

Anfragesprachen für XML

Anfragesprachen für XML. Björn Gehl Betreuer: Tim Priesnitz SS2003 Proseminar “Logische Aspekte von XML”. Gert Smolka - PS-Lab - Universität Saarland. Motivation. select x from biblio.paper.author x. Roux 1976 Database Systems XML Systems Smith 1999 Data Production Cassio.

barb
Download Presentation

Anfragesprachen für XML

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Anfragesprachen für XML Björn Gehl Betreuer: Tim Priesnitz SS2003 Proseminar “Logische Aspekte von XML” Gert Smolka - PS-Lab - Universität Saarland

  2. Motivation select x from biblio.paper.author x Roux 1976 Database Systems XML Systems Smith 1999 Data Production Cassio author date title book title  Roux biblio article author date paper title author

  3. Übersicht • Anfragen • Datalog • Optimierung

  4. Anfrage 1. Ordnung 111 Roux 1976 Database Systems Database Systems Smith 1999 Data Production Cassio 1 select xfrom 1.2 y, y.2 xwhere Database Systems in y.1 2 112 11 3 113 1 121 1 1 2 2 ε 1 12 122 3 123  Smith 3 131 1 13 2 132

  5. where<book> <title> Database Systems </title> <author> $A </author> <year> $Y </year> </book> in db.xml construct $A Anfrage 2. Ordnung , $Y > 1990 Roux 1976 Database Systems Database Systems Smith 1999 Data Production Cassio author date title  Roux, Smith book title biblio book author date paper title author

  6. P0 P1 ∧ P2 ∧ … ∧ Pn Pi ::= P(x)|x Definition von Datalog • Syntax: Menge Hornklauseln mit Prädikaten •keine Negation • Rekursion • Teilsprache von Prolog T(x,y)  G(x,y) T(x,y)  G(x,z), T(z,y) x,y (T(x,y)  G(x,y)) x,y,z (T(x,y)  (G(x,z) ∧ T(z,y)))

  7. Kantenmenge E: Start a Ziel E(ans,author,x) ← E(ε,biblio,w), E(w,book,y), E(y,author,x), E(y,title,v), L(v,Database Systems) biblio book book 1 11 12 ε 1 1 111 Roux 1976 Database Systems Database Systems Smith 1999 Data Production Cassio author date 112 11 title 113 . . book 121 : : Knotenlabels L: title biblio Obj Wert book author ε 1 12 122 111 112 113 Roux 1976 Database System date 123 paper 131 title 13 author 132 1 author ans author 2 Datalog als Anfragesprache

  8. Optimierung für Anfragen Datenbankoptimierung… 1) Baumstrukturen 2) Auffalten 3) Bisimulation

  9. author 113 Smith book 131 title Datasystems Smith 13 author 132 Optimierung auf Baumstrukturen 111 Smith Datasystems Database Systems Roux 1999 author title 112 11 book 121 title biblio book author ε 1 12 122 date 123

  10. a b a b b b b Optimierung auf Graphen b a a . . .

  11. Bisimulation Seien g1 und g2 Graphen; x, x‘: Knoten in g1 y, y‘: Knoten in g2 1) root(g1) = x , root(g2) = y x~y 2) x~y & x = root(g1)  y = root(g2) x~y & y = root(g2)  x = root(g1) 3) x~y & (x,l,x’) ist Kante in g1 Kante (y,l,y’) in g2 mit selbem Label, so dassx’~y’ [auch umgekehrt mit x~y & (y,l,y’)] 4) x~y & x ist ein Blatt mit dem Wert v in g1 y ist auch ein Blatt mit gleichem Wert v in g2 [auch umgekehrt]

  12. Smith Smith Datasystems g1: g2: Smith Datasystems x3 y3 author author book author book x2 x4 x1 y2 y1 title title x5 y4 Beispiel für Bisimulation x1~y1, x2~y2, x3~y3, x4~y3, x5~y4  Bisimultation  g1 & g2 sind gleich

  13. Referenzen [1] Serge Abiteboul, Peter Buneman and Dan Suciu. Data on the Web, Kapitel 2-3, Morgan Kaufmann, 2000. [2] Serge Abiteboul, Semistructured Data: from Practice to Theory, LICS 2001.

More Related