XML and Databases - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

XML and Databases

Description:

Xml for data is usually simpler more straight forward in structure: less ... Application and platform independent data format. Unicode Multilanguage support ... – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 14
Provided by: stevec2
Category:

less

Transcript and Presenter's Notes

Title: XML and Databases


1
XML and Databases
2
Data and Document
  • There are really at least two distinct XML uses
  • XML to describe Documents
  • XML to describe Data

3
Document vs Data
XML for documents describes complex document
structures many elements with mixed content data
types usually just text
Data XML, simpler describing data structure, No
or little mixed content data types varied and
important
Machine to machine communication
Document processing
4
XML Data
  • Xml for data is usually simplermore straight
    forward in structure less hierarchical levels,
    no, or very few mixed elements
  • It is meant to be generated and read by
    applications
  • Data types are more importantthus the use of
    schemas rather than DTDs

5
Reasons for XML
  • Explosion in the need to share data over the
    Internet from enterprise databases
  • Different database softwares, application
    softwares, incompatible data schemas
  • XML provides an easily managed format for
    universal communication

6
Universal Communication
Unicode Multilanguage support
Application and platform independent data format
Data logic separate from presentation logic
7
Importance to Database
  • David Kroenke lists these ways in which XML is
    important for databases
  • Standard means for representing domains
  • Standard means for expressing database views
  • Clean separation of structure, content and
    materialization
  • Facility for document validity checking
  • Industry standards for document types
  • Kroenke, David Database Processing, Eighth
    Edition Prentice Hall, NJ, 2001, p 432

8
Issues
  • XML does not always translate well to relational
    data models
  • XML has a primarily hierarchical structure
  • Some sort of Data Mapping must occur

9
Data Mapping
XML application
Database server SQL
Mapping to XML
10
Approaches to Data Mapping
  • Result set mappingmaps the XML to the result set
    of an SQL Query. (A row element is created for
    each record. Each column becomes an element or
    attribute)
  • Schema mappingthe database structure is
    generated to and from XML Schema (we will cover
    this more later)

11
Commercial Database Support
  • SQL Servercan generate XML from SQL and can
    update tables from XML files.
  • Oracle 9-I includes XSU (XML SQL Utility that
    will
  • Generate XML based on SQL queries
  • Extract data from XML for insert or update

12
XML Databases
  • There has been some talk of creating XML
    databasesthat is a database whose native format
    is XML and which processes queries with XPath and
    XQuery
  • There has also been some movement to include XML
    as a native Data type in Relational databases

13
The Gist
  • XML is best used to communicate data
  • Databases are best used to store data
Write a Comment
User Comments (0)
About PowerShow.com