Native XML Databases
Please turn off all
What is a Database?
These services are independent of database models
Relational (or SQL) databases handle about 20% of the world's information
Characteristics of normalizable data
But what about the other 80%?
Of course you can always fit anything into anything
But should you?
Index Engines: The Other Extreme
XML Databases
Why Did Hierarchical Databases Fail?
But what if
30 Years Makes a Big Difference
What are XML Databases Good For?
What XML Databases cannot do:
The Players
Questions to Ask
An XML Database should include
Berkeley DB XML
Installing
Creating a Database
Put Documents Into the Database
Run A Query
Queries with Namespaces
Run A Query Against a Named Document in the database
Connect to PHP
XQuery
XQuery Language
Documents to Query
Physical Representations to Query
Where is XQuery used?
The XML Model vs. the Relational Model
Query Data Types
An example document to query
The XQuery FLWOR
Query: List titles of all books in one document
Query Result: Book Titles
Query: List titles of all books in a collection of documents
Query Result: Book Titles
Specifying a context node
Query Result with wrapping
Serialization Format
XPath 1.0 Data Model
XPath 2.0 Data Model
Constructing sequences
Sequence Math
Sequence example
Data types and the PSVI
Questions?
Element Constructors
Query Result: Book Titles
Attribute Constructors
Query Result
Text Constructors
Query Result
Other Constructors
Expected Query Result
Query with where
Query Result: Titles of books published by Addison-Wesley
Query with Booleans
Query Result: books published by Addison-Wesley before 1993
Query with multiple variables
Query Result: A list of all the title-author pairs
Nested FLWOR Queries
Query Result: A list of the title and authors of each book in the bibliography
Query with let
Query Result: price differences
if then else
Query Result: Price differences
Query with sorting
Query Result
ORDER BY modifiers
Query Result
A different document about books
This document uses a different DTD
Query that joins two documents
Result
prices.xml Query Sample Data
Query with reused variables
Query Result
Multiple FLWOR Queries
Query Result
Querying documents that use namespaces
Questions?
Query Software
What's the difference between XQuery and XSLT?
XPath 2.0
XPath 2.0 Goals
Held over from XPath 1.0
Accessor Functions
Constructor Functions
Casting
Four kinds of comparison operators
Value comparison operators
General comparisons
Node comparisons
Order comparisons
Questions?
Functions and operators
Arithmetic operators
Numeric Functions
String functions
Regular expressions
Boolean Functions and Operators
Date and time functions
Qualified Name Functions
Node Functions
Sequence Functions
Sequence size Functions
Context Functions
Questions?
Other New features in XPath 2.0
XPath Comments
Namespace wildcards
Can use functions as location steps
Can use parenthesized expressions as location steps
Dereference steps
For Expressions
for Example
for Example
Conditional Expressions
Quantified Expressions
Questions?
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche
|
Cafe au Lait
Copyright 2002-2007 Elliotte Rusty Harold
Last Modified October 6, 2007