XML Databases - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

XML Databases

Description:

book id='jb' title Java Beans Design /title author Bjarne Stroustrup /author ... Class bib. book[] b; String id; Class book. String title; String author; ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 27
Provided by: UGALib3
Category:
Tags: xml | class | databases

less

Transcript and Presenter's Notes

Title: XML Databases


1
XML Databases
  • B. Aleman Meza

2
Outline
  • XML, XML Storage
  • Commercial XML Databases
  • Demo
  • Conclusions and References

3
XML
  • Extendible Markup Language
  • Text-based and readable

Enables users to define their own markup
languages to describe data
The tags give meaning to the data so it can be
easily understood
  • Is Presentation Neutral

ltbookgt lttitlegtOracle XML Handbooklt/titlegt
ltauthorgtStefan Kiritzovlt/authorgt
ltisbngt0-07-212489-Xlt/isbngt ltpricegt33.44lt/price
gt lt/bookgt
  • Based on open standards
  • Based on Unicode
  • Helps integration of businesses

4
An 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
5
An 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
6
Store XML data in a database
  • Save it as Character Large Objects (CLOBs)
  • Mappings to a DBMS
  • Relational
  • Object Relational
  • Object Oriented
  • A generic internal representation for XML
    elements is used

7
Native XML database
  • native storage
  • reasons for using native XML Storage
  • semi-structured data
  • retrieval speed
  • there is no mapping to a (ROROO)DBMS

DOM Tree
XPath
8
Commercial XML Databases
9
Tamino by Software AG
  • Stores XML documents natively
  • Executes queries and returns results over HTTP
  • Query language is X-Query (based on XPath)

10
dbXML 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

11
Demo
12
Conclusions and References
13
Conclusions
  • Native XML-Databases
  • inherit all the benefits derived from using XML
    and related technologies
  • simplify development of XML based applications
  • High Performance

14
Conclusions (continued)
  • Native XML-Databases will complement existing
    DBMS technologies
  • opportunity for a new generation of DBMS that are
    designed for XML

15
References
  • 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/

16
Thanks !
  • Comments and Questions Section

17
XML 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
18
XML 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.

19
XML 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

20
XMLDB
  • SMB GmbH
  • dbXML Group L.L.C
  • OpenHealth Care Group

21
XPath 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
  • XPath query

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
22
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
id title author isbn price a1
Music Kiritzov 0-07-212489-X null b1
HTML 4.0 Martin 0-03-647449-1 null
23
Object-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
24
XML 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
25
XML Schema ...
ltxsdcomplexType name"bibType"gt
ltxsdcomplexContentgt ltxsdrestriction
base"xsdanyType"gt ltxsdattribute
name"id" type"xsdstring"/gt
lt/xsdrestrictiongt lt/xsdcomplexContentgt lt/xs
dcomplexTypegt
26
XSL Example
XML Document
XML Document with XSLT
XSL File
Write a Comment
User Comments (0)
About PowerShow.com