Title: XML Databases
1XML Databases
2Outline
- XML, XML Storage
- Commercial XML Databases
- Demo
- Conclusions and References
3XML
- Extendible Markup Language
Enables users to define their own markup
languages to describe data
The tags give meaning to the data so it can be
easily understood
ltbookgt lttitlegtOracle XML Handbooklt/titlegt
ltauthorgtStefan Kiritzovlt/authorgt
ltisbngt0-07-212489-Xlt/isbngt ltpricegt33.44lt/price
gt lt/bookgt
- Helps integration of businesses
4An XML document
- ltbibgt
- ltbook ida1gt
- lttitlegtAlgorithms in Javalt/titlegt
- ltauthorgtRobert Sedgewicklt/authorgt
- ltisbngt0-201-51059-6lt/isbngt
- ltpricegt46.25lt/pricegt
- lt/bookgt
- ltbook idjbgt
- lttitlegtJava Beans Designlt/titlegt
- ltauthorgtBjarne Stroustruplt/authorgt
- ltisbngt0-201-54330-3lt/isbngt
- ltpricegt42.25lt/pricegt
- lt/bookgt
- lt/bibgt
ltbibgt ltbook ida1gt lttitlegtAlgorithms in
Javalt/titlegt ltauthorgtRobert
Sedgewicklt/authorgt ltisbngt0-201-51059-6lt/isbn
gt ltpricegt46.25lt/pricegt lt/bookgt ltbook
idjbgt lttitlegtJava Beans Designlt/titlegt
ltauthorgtBjarne Stroustruplt/authorgt
ltisbngt0-201-54330-3lt/isbngt
ltpricegt42.25lt/pricegt lt/bookgt lt/bibgt
ltbibgt ltbook ida1gt lttitlegtAlgorithms in
Javalt/titlegt ltauthorgtRobert
Sedgewicklt/authorgt ltisbngt0-201-51059-6lt/isbn
gt ltpricegt46.25lt/pricegt lt/bookgt ltbook
idjbgt lttitlegtJava Beans Designlt/titlegt
ltauthorgtBjarne Stroustruplt/authorgt
ltisbngt0-201-54330-3lt/isbngt
ltpricegt42.25lt/pricegt lt/bookgt lt/bibgt
ltbibgt ltbook ida1gt lttitlegtAlgorithms in
Javalt/titlegt ltauthorgtRobert
Sedgewicklt/authorgt ltisbngt0-201-51059-6lt/isbn
gt ltpricegt46.25lt/pricegt lt/bookgt ltbook
idjbgt lttitlegtJava Beans Designlt/titlegt
ltauthorgtBjarne Stroustruplt/authorgt
ltisbngt0-201-54330-3lt/isbngt
ltpricegt42.25lt/pricegt lt/bookgt lt/bibgt
data
5An XML document - the DTD
ltbibgt ltbook idagt lttitlegtabc lt/titlegt
ltauthorgtabclt/authorgt ltisbngtabc lt/isbngt
ltpricegtabc lt/pricegt lt/bookgt ltbook idbgt
lttitlegtabc lt/titlegt ltauthorgtabclt/authorgt
ltisbngtabc lt/isbngt ltpricegtabc lt/pricegt
lt/bookgt lt/bibgt
lt!-- Document Type Definition --gt lt!ELEMENT bib
( book )gt lt!ELEMENT book ( title, author,
isbn, price? )gt lt!ATTLIST book id ID
REQUIREDgt lt!ELEMENT title ( PCDATA
)gt lt!ELEMENT author ( PCDATA )gt lt!ELEMENT isbn
( PCDATA )gt lt!ELEMENT price ( PCDATA )gt
6Store XML data in a database
- Save it as Character Large Objects (CLOBs)
- Object Oriented
- A generic internal representation for XML
elements is used
7Native XML database
- reasons for using native XML Storage
- there is no mapping to a (ROROO)DBMS
DOM Tree
XPath
8Commercial XML Databases
9Tamino by Software AG
- Stores XML documents natively
- Executes queries and returns results over HTTP
- Query language is X-Query (based on XPath)
10dbXML by
XMLDB
- A native XML database (written in Java)
- Query language used XPath
- dbXML Core is an Open Source project
- Vendor-neutral XML database API
11Demo
12Conclusions and References
13Conclusions
- Native XML-Databases
- inherit all the benefits derived from using XML
and related technologies - simplify development of XML based applications
- High Performance
14Conclusions (continued)
- Native XML-Databases will complement existing
DBMS technologies - opportunity for a new generation of DBMS that are
designed for XML
15References
- XML and Databases, Ronald Bourret
- http//www.rpbourret.com/xml/XMLAndDatabases.htm
- Software AG - Tamino XML Database
- http//www.softwareag.com/tamino/
- dbXML Core
- http//www.dbxml.org/
16Thanks !
- Comments and Questions Section
17XML Document
ltbibgt ltbookgt lttitlegtMusiclt/titlegt
ltauthorgtKiritzovlt/authorgt
ltisbngt0-07-212489-Xlt/isbngt lt/bookgt ltbookgt
lttitlegtHTML 4.0lt/titlegt
ltauthorgtMartinlt/authorgt ltisbngt0-03-647449-1lt
/isbngt lt/bookgt lt/bibgt
DOM Tree
18XML support in Oracle9i
- Native XML type support. For applications that
need to store and retrieve large amounts of
complex XML, Oracle9i stores XML natively by
introducing XMLType, a new object datatype, and
features extremely fast, navigational access and
searches for XML documents.
19XML support in Oracle9i ...
- The basic strategies for storing XML documents in
the database are - Storing an XML document as a single, intact
object with its tags in a CLOB or BLOB - Storing an XML document as data and distributing
it untagged across object-relational tables - Combining XML documents and data using views
20XMLDB
- SMB GmbH
- dbXML Group L.L.C
- OpenHealth Care Group
21XPath example
ltbibgt ltbook idAgt lttitlegtAlgorithms in
Javalt/titlegt ltauthorgtRobert
Sedgewicklt/authorgt ltisbngt0-201-51059-6lt/isbn
gt ltpricegt46.25lt/pricegt lt/bookgt ltbook
idjbgt lttitlegtJava Beans Designlt/titlegt
ltauthorgtBjarne Stroustruplt/authorgt
ltisbngt0-201-54330-3lt/isbngt
ltpricegt42.25lt/pricegt lt/bookgt lt/bibgt
ltbook idAgt lttitlegtAlgorithms in
Javalt/titlegt ltauthorgtRobert
Sedgewicklt/authorgt ltisbngt0-201-51059-6lt/isbngt
ltpricegt46.25lt/pricegt lt/bookgt
ltbook idAgt lttitlegtAlgorithms in
Javalt/titlegt ltauthorgtRobert
Sedgewicklt/authorgt ltisbngt0-201-51059-6lt/isbngt
ltpricegt46.25lt/pricegt lt/bookgt
/bib/book1
/bib/book1
ltauthorgtRobert Sedgewicklt/authorgt
/bib/booklast()
/bib/booklast()
//author
//author
ltbook idjbgt lttitlegtJava Beans
Designlt/titlegt ltauthorgtBjarne
Stroustruplt/authorgt ltisbngt0-201-54330-3lt/isbngt
ltpricegt42.25lt/pricegt lt/bookgt
//book_at_idA
ltauthorgtBjarne Stroustruplt/authorgt
22Relational Mapping
ltbibgt ltbook ida1gt lttitlegtMusiclt/titlegt
ltauthorgtKiritzovlt/authorgt
ltisbngt0-07-212489-Xlt/isbngt lt/bookgt ltbook
idb1gt lttitlegtHTML 4.0lt/titlegt
ltauthorgtMartinlt/authorgt ltisbngt0-03-647449-1lt
/isbngt lt/bookgt lt/bibgt
id title author isbn price a1
Music Kiritzov 0-07-212489-X null b1
HTML 4.0 Martin 0-03-647449-1 null
23Object-Relational Mapping
ltbibgt ltbook ida1gt lttitlegtMusiclt/titlegt
ltauthorgtKiritzovlt/authorgt
ltisbngt0-07-212489-Xlt/isbngt lt/bookgt ltbook
idb1gt lttitlegtHTML 4.0lt/titlegt
ltauthorgtMartinlt/authorgt ltisbngt0-03-647449-1lt
/isbngt lt/bookgt lt/bibgt
Class bib book b String id Class
book String title String author
String isbn
24XML Schema
ltxsdschema xmlnsxsd"http//www.w3.org/2001/XMLS
chema"gt ltxsdelement name"bib"
type"bibType"/gt ltxsdcomplexType
name"bibType"gt ltxsdsequencegt
ltxsdelement name"title" type"xsdstring"
minOccurs"1" maxOccurs"1"/gt
ltxsdelement name"author" type"xsdstring"
minOccurs"1" maxOccurs"1"/gt
ltxsdelement name"isbn" type"xsdstring"
minOccurs"1" maxOccurs"1"/gt
ltxsdelement name"price" type"xsddouble"
minOccurs"0" maxOccurs"1"/gt
lt/xsdsequencegt lt/xsdcomplexTypegt
lt/xsdschemagt
25XML Schema ...
ltxsdcomplexType name"bibType"gt
ltxsdcomplexContentgt ltxsdrestriction
base"xsdanyType"gt ltxsdattribute
name"id" type"xsdstring"/gt
lt/xsdrestrictiongt lt/xsdcomplexContentgt lt/xs
dcomplexTypegt
26XSL Example
XML Document
XML Document with XSLT
XSL File