Docsity

XML and XQuery: Understanding XML Data Model, XML Schema, XPath, and XQuery, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download XML and XQuery: Understanding XML Data Model, XML Schema, XPath, and XQuery and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

XML, XML Schema, XPath and

XQuery Query Languages

XML Data

From HTML to XML

HTML describes the presentation

HTML

Bibliography

Foundations of Databases

Abiteboul, Hull, Vianu


Addison Wesley, 1995

Data on the Web

Abiteboul, Buneman, Suciu


Morgan Kaufmann, 1999

## XML Terminology
  • tags: book, title, author, …
  • start tag: , end tag:
  • elements: …,…
  • elements are nested
  • empty element: abbrv.
  • an XML document: single root element well formed XML document: if it has matching tags

XML: Attributes

Foundations of Databases

Abiteboul

1995

attributes are alternative ways to represent data

So Far

  • Differences between “xml data” versus

“relational data”?

  • Data model?
  • Typed?
  • Homogeneity?
  • Correctness?
  • Usage/Purpose?

“XML Data Model”

Numerous competing models:

  • Document Object Model (DOM):
    • class hierarchy ( node , element , attribute ,…)
    • defines API to inspect/modify the document
  • XML query data model (formal)

XML Namespaces

  • syntactic: ,

  • semantic: provide URL for “shared” schema

     … … … 

defined here

So Far

  • What are “namespaces” good for?
  • Are they typically available for relational

databases?

DTD - Element Type Definitions

XML Schemas

  • generalizes DTDs (SGML derivative)
  • now, instead uses XML syntax
  • two main documents: structure and data types
  • XML Schema more powerful but more complex

So Far

  • Differences between “xml schema” versus

“relational schema”?

  • Purpose? Do we need it?
  • Definition time?
  • Strictness of typing?
  • Underlying model?

Elements versus Types in

XML Schema

DTD: