![Page 1: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/1.jpg)
Intro. to XML & XML DB
Bun YueProfessor, CS/CISUHCL
![Page 2: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/2.jpg)
Intro. To XML
XML stands for eXtensible Markup Language.
XML is a system for defining, validating, and sharing documents.
Main standard organization: World Wide Web Consortium (W3C), http://www.w3.org/XML/.
![Page 3: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/3.jpg)
Background: SGML
XML is a simplified version of the Standard Generalized Markup Language (SGML).
Both XML and SGML may be considered as meta-languages for creating markup languages.
A valid XML document is also a SGML document.
![Page 4: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/4.jpg)
Background: HTML XML uses:
Elements for document structures Attributes to describe their properties
Unlike HTML, authors use XML to define and share vocabularies.
As a comparison, HTML has a fixed set of elements: <p>, <body>, <li>, etc, but not <chapter> or <bun>
HTML can be defined using XML: XHTML.
![Page 5: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/5.jpg)
HTML Examplesmemo.xml:
<?xml version="1.0"?><memo priority="very high"><from>Bun Yue</from><to>Everybody</to><body>Hello, welcome!</body></memo>
![Page 6: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/6.jpg)
HTML vs XML
XML HTML
Meta-language for defining Markup lang.
Markup language
Data only Data and display info
Application structures; no intrinsic display info.
Display information
All applications Mostly Web Client Application
![Page 7: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/7.jpg)
Issues with HTML No meaning on document structures. Hard to support a Semantic Web Example: human vs machine in:<h2>Bun Yue</h2><h2>Introduction to XML</h2>vs<instructor>Bun Yue</instructor><course>Introduction to XML</course> HTML Scalping is hard!
![Page 8: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/8.jpg)
Issues in HTML A traditional HTML files put the following
three major components in one document: Data contents Presentation design Programming logic
However, it may be desirable to have three different development teams to create the three components.
Results: difficult to create and maintain.
![Page 9: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/9.jpg)
XML in Web Applications
XML assists in the separation of data from presentation.
Can database be used for the same purpose? Discuss!
![Page 10: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/10.jpg)
Advantages of XML Strict syntax with unambiguous structures
for simpler and more meaningful processing.
Better modeling of application domain. Validation for early error checking. Extensible to fit requirements of different
domains. Human readable. Abundance of tools.
![Page 11: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/11.jpg)
Some Disadvantages of XML
Verbose Text-based Tree-based structures … This is not a complete list. We will
revisit this issue later.
![Page 12: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/12.jpg)
Core XML Standards XML Specification: XML syntax. XML Namespace: defining address
spaces to avoid naming conflicts. DTD (Document Type Definition):
specifying grammars of XML vocabularies.
XML Schema: a newer and more powerful way to define XML grammars that is itself in XML format.
![Page 13: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/13.jpg)
Core XML Standards
XLink: linking between XML documents.
XPointer: referring to parts of an XML document.
XPath: searching an XML document. XQuery: XML query language in the
line of SQL.
![Page 14: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/14.jpg)
Core XML Standards CSS (Cascading Stylesheet): a style
sheet standard for viewing XML and HTML.
XSL (eXtensible Stylesheet Language): for displaying and transforming XML documents: XSLT: the XSL part for XML
transformation. FO: formatting object, the display part of
XSL.
![Page 15: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/15.jpg)
Core XML Standards
DOM (Document Object Model): W3C standard for object and interface collections for manipulating XML documents (and HTML, etc).
![Page 16: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/16.jpg)
Tools and Technology
XML Editors: XML Parsers:
DOM: create a document object (tree based)
SAX: event driven Querying:
XPath XSLT XQuery
![Page 17: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/17.jpg)
Tools and Technology
XML Server: serve XML Data source management Transformation Consumption support, e.g.
RESTful (Representational state transfer) XQJ API (XQuery API for Java)
Content and subscription management
XML DB: storage of collection of XML documents.
![Page 18: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/18.jpg)
XML DB
Persistence and efficient access of collections of XML documents.
XML Enabled DB: DB provides features for production and
consumption of XML. Underlying storage may not be in XML
format: e.g. relations.
![Page 19: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/19.jpg)
Native XML DB
XML document as the basic data model.
XML document as a fundamental storage unit.
Standalone or not. E.g. Oracle 11g XML DB native but part of 11g.
![Page 20: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/20.jpg)
Querying
XQuery support
![Page 21: Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL](https://reader036.vdocuments.us/reader036/viewer/2022062518/56649e985503460f94b9afa0/html5/thumbnails/21.jpg)
Questions