XML to Database Mapping - Towson University

XML to Relational Database Mapping Bhavin Kansara Introduction XML/relational mapping means data transformation between XML and relational data models XML documents can be transformed to relational data models or vice versa. Mapping method is the way the mapping is

done XML XML: Extensible Markup Language Documents have tags giving extra information about sections of the document E.g. XML Introduction XML has emerged as the standard for representing and exchanging data on the World Wide Web.

The increasing amount of XML documents requires the need to store and query XML documents efficiently. XML vs. HTML HTML tags describe how to render things on the screen, while XML tags describe what thing are. HTML tags are designed for the interaction between

humans and computers, while XML tags are designed for the interactions between two computers. Unlike HTML, XML tags tell you what the data means, rather than how to display it abc

xyz def Title of page abc

XML Technologies Schema Languages DTDs XML Schemas Query Languages XPath

XQuery XSLT Programming APIs DOM SAX { for $b in doc("http://bstore1.example.com/bib.xml")/bib/book where $b/publisher = "Addison-Wesley" and $b/@year > 1991

return { $b/title } }

Belgian Waffles $5.95 two of our famous Belgian Waffles 650 DTD ( Document Type Definition )

DTD stands for Document Type Definition The purpose of a Document Type Definition is to define the legal building blocks of an XML document. It formally defines relationship between the various elements that form the documents. DTD allows computers to check that each component of document occurs in a valid place within the document.

DTD ( Document Type Definition ) XML vs. Relational Database CUSTOMER Name Age ABC

30 XYZ 40 ABC 30

XYZ 40 XML vs. Relational Database XML vs. Relational Database

XML vs. Relational Database When XML representation is not beneficial When downstream processing of the data is relational When the highest possible performance is required

When any normalized data components have value outside the XML representation or the data need not be retained in XML form to have value When the data is naturally tabular When XML representation is beneficial When schema is volatile When data is inherently hierarchical in nature When data represents business objects in

which the component parts do not make sense when removed from the context of that business object When applications have sparse attributes When low-volume data is highly structured XML-to-Relational mapping Schema mapping Database schema is generated from an XML schema or DTD for the storage of XML

documents. Data mapping Shreds an input XML document into relational tuples and inserts them into the relational database whose schema is generated in the schema mapping phase Schema Mapping Simplifying DTD

DTD graph Inlined DTD graph Given a DTD graph, a node is inlinable if and only if it has exactly one incoming edge and that edge is a normal edge. Inlined DTD graph Generated Database Schema

Data Mapping XML file is used to insert data into generated database schema Parser is used to fetch data from XML file. Summary

Simplify DTD Create DTD graph from simplified DTD Create inlined DTD graph from DTD graph Use inlined DTD graph to generate database schema Insert values from XML file into generated

tables References Mapping DTDs to relational schemas with semantic constraints, Teng Lv, Ping Yan, April 2006, Science Direct CPI: Constraints-Preserving Inlining algorithm for mapping XML DTD to relational schema, Dongwon Lee, Wesley W. Chu, October 2001, Science Direct A mapping schema and interface for XML stores, Sihem Amer-Yahia, Divesh Srivastava, November 2002,ACM

Designing information-preserving mapping schemes for XML, Denilson Barbosa, Juliana Freire, Alberto O. Mendelzon, August 2005, ACM A performance evaluation of storing XML data in relational database management systems, Latifur Khan, Yan Rao, November 2001, ACM Questions

Recently Viewed Presentations

  • Use of ICT across the Curriculum - Fronter Home - itslearning

    Use of ICT across the Curriculum - Fronter Home - itslearning

    Ofsted Report on ICT in schools 2008-2011 "Pupils' achievement in ICT was good or outstanding in over half of the primary schools visited over the three years of the survey".
  • From Thematic Statement to Thesis Statement:

    From Thematic Statement to Thesis Statement:

    Your THESIS may be TWO sentences: Any avid reader comes to understand that in both fiction and drama, often daughters are influenced more by their fathers than by their mothers. A comparison of Faulkner's Dewey Dell from As I Lay...
  • IBEW 1620 - Qalipu

    IBEW 1620 - Qalipu

    IBEW 1620. Application Process. Membership Application/Login. Click here to apply now. Select Create New Account. Enter Information. Click Create account once all completed. Fill in Information. Once you get signed in, you must finish filling out your information
  • - A Task-Based Framework for Modeling User's Search Behaviors

    - A Task-Based Framework for Modeling User's Search Behaviors

    A Task-based Framework for User Behavior Modeling and Search Personalization* Hongning Wang. Department of Computer Science. University of Illinois at Urbana-Champaign. Urbana IL, 61801 USA. [email protected] *work is done when visiting Microsoft Research
  • Sakai Perspective on Interoperability

    Sakai Perspective on Interoperability

    VLEs Going Forward Scanning the Horizon Charles Severance OS VLE Next Generation Workshop Cambridge June 29, 2006 This material is Copyright Creative Commons ...
  • Entry Music Trinity Candle Prayer We light these

    Entry Music Trinity Candle Prayer We light these

    Forgiveness: This Is Our World . Written and produced by . ISingPop If we're gonna close our eyes. To the things we do. And the things we say. Then when will we realise. There's a deeper love. There's a better...
  • Secretary of State Notary Education Seminar

    Secretary of State Notary Education Seminar

    No "Notario Publico" in Oregon. A non-attorney notary may not: Use the term "notario" or "notario publico" Practice law - give legal advice or draft legal documents, unless you are supervised by an attorney or are a licensed professional regarding...
  • Leyendo la Biblia con Jesús como guía

    Leyendo la Biblia con Jesús como guía

    ¿Por qué estudiar Colosenses? ¿Alguna ves te has sorprendido al descubrir . algo nuevo acerca de un amigo que . creías . que . conocías bien? Esa . es una de las cosas interesantes acerca de una relación con Cristo:...