Download presentation
Presentation is loading. Please wait.
Published byAdam Curtis Modified over 9 years ago
1
XML/Relational Mapping Gregory Schroeder April 28, 2015
2
XML/Relational Mapping 2 eXtensible Markup Language (XML) – Text-based format that allows for the structuring of electronic document and is not limited to a set of labels 1 – Used to describe and share data over networks, including the Internet – Defined by: Document Type Definition (DTD) XML Schema Image courtesy en.wikipedia.org
3
XML/Relational Mapping 3 Relational Database – A collection of data items organized as a set of formally-described tables from which data can be accessed or reassembled in many different ways without having to reorganize the database tables 2 – Commonly used by businesses to store information Image courtesy of www.svgopen.org
4
XML/Relational Mapping 4 ● Table-based mapping models XML documents as tables in the relational database ● Simple to follow and easy to understand. ● Limited to XML data that follows a certain structure: 3...............
5
XML/Relational Mapping 5 ● Object-relational mapping works with XML data that does not follow the limited structure required by table-based mapping ● Follows a two-step process: 3 ● 1) XML is mapped to an object schema ● 2) Object schema is mapped to a relational model
6
XML/Relational Mapping 6 ● XML: 1234 Gallagher Industries 29.10.00 A-10 12 10.95 B-43 600 3.99
7
XML/Relational Mapping 7 ● Object schema: object SalesOrder { number = 1234; customer = “Gallagher Industries”; date = 29.10.00; items = {ptrs to Item objects}; } object Item { number = 1; part = “A-10”; quantity = 12; price – 10.95; } object Item { number = 2; part = “B-43”; quantity = 600; price = 3.95; }
8
XML/Relational Mapping 8 ● Relational model: SaleOrders ---------- Number Customer Date ------ -------------------- --------- 1234 Gallagher Industries 29.10.00......... Items ----- SONumber Item Part Quanity Price -------- ---- ---- ------- ----- 1234 1 A-10 12 10.95 1234 2 B-43 600 3.99...............
9
XML/Relational Mapping 9 ● Steps to map DTD to relational schema: 4 1. Simplify DTD 2. Map complex elements 3. Map content of complex elements 1. Single reference of simple element 2. Repeated reference of simple element 3. Reference to a complex element 4. Map attributes 1. Single-valued attributes 2. Multi-valued attributes
10
XML/Relational Mapping 10 ● References: ● 1 Rouse, Margaret. "What Is XML (Extensible Markup Language)? - Definition from WhatIs.com." SearchSOA. December 1, 2014. Accessed April 28, 2015. http://searchsoa.techtarget.com/definition/XML. ● 2 Rouse, Margaret. "What Is Relational Database? - Definition from WhatIs.com." SearchSQLServer. April 1, 2006. Accessed April 28, 2015. http://searchsqlserver.techtarget.com/definition/relational-database. ● 3 Bourret, Ronald. "Ronald Bourret." Rpbourret.com. September 1, 2005. Accessed April 28, 2015. http://www.rpbourret.com/xml/DTDToDatabase.htm. ● 4 Madiraju, Praveen. "DTD to Schema." Lecture, Advanced Database Systems from Marquette University, February 24, 2015. ● Dongwon Lee, Murali Mani, Wesley W. Chu "Effective Schema Conversions between XML and Relational Models" In European Conf. on Artificial Intelligence (ECAI), Knowledge Transformation Workshop (ECAI-OT), Lyon, France, July 2002 (Invited) ● Florescu, Daniela, and Donald Kossmann. "Storing and Querying XML Data Using and RDBMS." Bulletin of the IEEE Computer Society Technical Committee on Data Engineering, 1999. Accessed April 28, 2015. http://courses.cs.washington.edu/courses/cse544/02sp/papers/florescu99.ps. ● A.A. Abdel-aziz, H. Oakasha, "Mapping XML DTDs to relational schemas", AICCSA, 2005, 2013 ACS International Conference on Computer Systems and Applications (AICCSA), 2013 ACS International Conference on Computer Systems and Applications (AICCSA) 2005, pp. 47-I, doi:10.1109/AICCSA.2005.1387044
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.