cis562f10_notes8_XMLDBModel

cis562f10_notes8_XMLDBModel - 10/20/2010 2. XML models A...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
10/20/2010 1 2. XML models — A data model is a set of concepts describing data types, relationships and constraints, together with (optional) a set of operations for data in a database — Some data models are more powerful than others, i.e., they are not the same — People have proposed many data models for XML. They may emphasize on different aspects — We discuss two useful XML data models here DOM data model Document Object Model: an objec oriented node centric data mode object-oriented, node-centric data model — It has Levels from 0 (for HTML) to 3 — It provides an API that exposes an XML document to a programming/scripting language — A DOM compiler exists for almost every programming language — An XML document can be viewed as a tree
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10/20/2010 2 * DOM concepts o Document : has one name and one (root) element. o Elemen : has a name a collection of attributes Element : has a name, a collection of attributes, and an ordered collection of character data and elements (may be interspersed). o Attribute : has a name and a value (string). o Character data : has a value (string). o Comment : has a value (string). o Node : can be a document (root) node, element node, character data (text) node, attribute node, comment node, or processing instruction node (the last two will not discussed). o Node list : consists of an ordered collection of elements and/or text nodes where each node is associated with an integer index.
Background image of page 2
10/20/2010 3 o Attribute set : a collection of attribute nodes. o There are some constraints such as: - Each document name may occur only once - All elements other than the document element have an element node as a parent. The document element has no parent - No attribute name may appear more than once in an element - The integer index is constrained to be the set of consecutive integer consecutive integers - Each node has 0 or 1 previous sibling, and 0 or 1 next sibling - Every child of a node has that node as its unique
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/07/2011 for the course CIS 550 taught by Professor Yoon,d during the Spring '08 term at University of Michigan-Dearborn.

Page1 / 17

cis562f10_notes8_XMLDBModel - 10/20/2010 2. XML models A...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online