DOC PREVIEW
SJSU CMPE 226 - XML and Databases

This preview shows page 1-2-15-16-17-32-33 out of 33 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

XML and DatabasesTable of Contents1.0 Introduction2.0 Is XML a Database?3.0 Why Use a Database?4.0 Data versus Documents4.1 Data-Centric Documents4.2 Document-Centric Documents4.3 Data, Documents, and Databases5.0 Storing and Retrieving Data5.1 Mapping Document Schemas to Database Schemas5.1.1 Table-Based Mapping5.1.2 Object-Relational Mapping5.2 Query Languages5.2.1 Template-Based Query Languages5.2.2 SQL-Based Query Languages5.2.3 XML Query Languages5.3 Storing Data in a Native XML Database5.4 Data Types, Null Values, Character Sets, and All That Stuff5.4.1 Data Types5.4.2 Binary Data5.4.3 Null Data5.4.4 Character Sets5.4.5 Processing Instructions and Comments5.4.6 Storing Markup5.5 Generating DTDs from Relational Schema and Vice Versa6.0 Storing and Retrieving Documents6.1 Storing Documents in the File System6.2 Storing Documents in BLOBs6.3 Native XML Databases6.3.1 What is a Native XML Database?6.3.2 Native XML Database Architectures6.3.2.1 Text-Based Native XML Databases6.3.2.2 Model-Based Native XML Databases6.3.3 Features of Native XML Databases6.3.3.1 Document Collections6.3.3.2 Query Languages6.3.3.3 Updates and Deletes6.3.3.4 Transactions, Locking, and Concurrency6.3.3.5 Application Programming Interfaces (APIs)6.3.3.6 Round-Tripping6.3.3.7 Remote Data6.3.3.8 Indexes6.3.3.9 External Entity Storage6.3.4 Normalization, Referential Integrity, and Scalability6.3.4.1 Normalization6.3.4.2 Referential Integrity6.3.4.3 Scalability6.3 Persistent DOMs (PDOMs)6.4 Content Management Systems7.0 XML Database Products8.0 Additional Links9.0 Comments and FeedbackXML and DatabasesCopyright 1999-2003 by Ronald BourretLast updated January, 2003Table of Contents1.0 Introduction2.0 Is XML a Database?3.0 Why Use a Database?4.0 Data versus Documents 4.1 Data-Centric Documents 4.2 Document-Centric Documents 4.3 Data, Documents, and Databases5.0 Storing and Retrieving Data 5.1 Mapping Document Schemas to Database Schemas 5.1.1 Table-Based Mapping 5.1.2 Object-Relational Mapping 5.2 Query Languages 5.2.1 Template-Based Query Languages 5.2.2 SQL-Based Query Languages 5.2.3 XML Query Languages 5.3 Storing Data in a Native XML Database 5.4 Data Types, Null Values, Character Sets, and All That Stuff 5.4.1 Data Types 5.4.2 Binary Data 5.4.3 Null Data 5.4.4 Character Sets 5.4.5 Processing Instructions and Comments 5.4.6 Storing Markup 5.5 Generating DTDs from Relational Schema and Vice Versa6.0 Storing and Retrieving Documents 6.1 Storing Documents in the File System 6.2 Storing Documents in BLOBs 6.3 Native XML Databases 6.3.1 What is a Native XML Database? 6.3.2 Native XML Database Architectures 6.3.2.1 Text-Based Native XML Databases 6.3.2.2 Model-Based Native XML Databases 6.3.3 Features of Native XML Databases 6.3.3.1 Document Collections 6.3.3.2 Query Languages 6.3.3.3 Updates and Deletes 6.3.3.4 Transactions, Locking, and Concurrency 6.3.3.5 Application Programming Interfaces (APIs)6.3.3.6 Round-Tripping 6.3.3.7 Remote Data 6.3.3.8 Indexes 6.3.3.9 External Entity Storage 6.3.4 Normalization, Referential Integrity, and Scalability 6.3.4.1 Normalization 6.3.4.2 Referential Integrity 6.3.4.3 Scalability 6.3 Persistent DOMs (PDOMs) 6.4 Content Management Systems7.0 XML Database Products8.0 Additional Links9.0 Comments and Feedback1.0 IntroductionThis paper gives a high-level overview of how to use XML with databases. It describes how the differences between data-centric and document-centric documents affect their usage with databases, how XML is commonly used with relational databases, and what native XML databases are and when to use them.2.0 Is XML a Database?Before we start talking about XML and databases, we need to answer a question that occurs to many people: "Is XML a database?"An XML document is a database only in the strictest sense of the term. That is, it is a collection of data. In many ways, this makes it no different from any other file -- after all,all files contain data of some sort. As a "database" format, XML has some advantages. For example, it is self-describing (the markup describes the structure and type names of the data, although not the semantics), it is portable (Unicode), and it can describe data in tree or graph structures. It also has some disadvantages. For example, it is verbose and access to the data is slow due to parsing and text conversion.A more useful question to ask is whether XML and its surrounding technologies constitute a "database" in the looser sense of the term -- that is, a database management system (DBMS). The answer to this question is, "Sort of." On the plus side, XML provides many of the things found in databases: storage (XML documents), schemas (DTDs, XML schema languages), query languages (XQuery, XPath, XQL, XML-QL, QUILT, etc.), programming interfaces (SAX, DOM, JDOM), and so on. On the minus side, it lacks many of the things found in real databases: efficient storage, indexes, security, transactions and data integrity, multi-user access, triggers, queries across multiple documents, and so on.Thus, while it may be possible to use an XML document or documents as a database in environments with small amounts of data, few users, and modest performance requirements, this will fail in most production environments, which have many users, strict data integrity requirements, and the need for good performance.A good example of the type of "database" for which an XML document is suitable is an .ini file -- that is, a file that contains application configuration information. It is much easier to invent a small XML language and write a SAX application for interpreting that language than it is to write a parser for comma-delimited files. In addition, XML allows you to have nested entries, something that is harder to do in comma-delimited files. However, this is hardly a database, since it is read and written linearly, and then only when the application is started and ended. Examples of more sophisticated data sets for which an XML document might be suitable as a database are personal contact lists (names, phone numbers, addresses, etc.), browser bookmarks, and descriptions of the MP3s you've stolen with the help of Napster. However, given the low price and ease of use of databases like dBASE and Access, there seems little reason to use an XML document as a database even in these cases. The only real advantage of XML is that the data is portable, and this is less of an advantage than it seems due to the widespread availability of tools for serializing


View Full Document

SJSU CMPE 226 - XML and Databases

Documents in this Course
SQL-99

SQL-99

71 pages

XML

XML

52 pages

XML

XML

14 pages

Chapter 9

Chapter 9

45 pages

Load more
Download XML and Databases
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view XML and Databases and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view XML and Databases 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?