XML and Database COSC643 Sungchul Hong
Is XML a Database? Yes but only in the strictest sense of the term. It is a collection of data. (some sort) XML has a self-describing format. (mark up) It is portable. It can describe data in tree structure. It is slow due to the parsing and text conversion.
Is XML a DBMS? Sort of Storage: XML documents Schemas: DTD, schema Query Languages: Xquery, Xpath, XQL, QUILT, XML-QL, etc Programming interface: SAX, DOM, JDOM No efficient storage, indexes, security, transactions, data integrity, triggers, queries across multiple documents
Why Use a XML Database? Do you have legacy database you want to expose? Are you looking for a place to store your Web pages? Is the database used by an e-commerce application in which XML is used as a data transport?
XML Database Candidate You have a Web site built from a number of prose-oriented XML documents. Not only do you want to manage the site, you would like to provide a way for users to search its contents. Your documents are likely to have a less regular structure and things such as entity usage are probably important to you because they are a fundamental part of how your documents are structured.
Data or Document Store data or documents. –Data-centric XML document Regular structure –Document-centric XML document
ABC Airways provides Three non-stop flights daily from Dallas to Fort Worth. Deaparture times are 09:15, 11:15, and 13:15. Arrival times are minutes later.
ABC Airways Dallas Fort Worth 09:15 09:16 11:15 11:16 09:15 09:16
Document-Centric Documents Designed for human
Table-Based Mapping data
The following flights have available seats: SELECT Airline, FltNumber, Depart, Arrive FROM Flights $Airline $FltNumber> $Depart $Arrive XML Query
The following flights have available seats: ACME 123 Dec 12, :43 Dec 13, :21 Result
Structural Problem Items Members ORDERS