1 / 20

Storing XML Data in Relational Databases

Storing XML Data in Relational Databases. Shaghayegh Sahebi Nesa Asoudeh. Outline. Introduction A data model for XML documents Different approaches to storing XML data in relational databases Query processing Conclusion and future work. Introduction.

noel
Télécharger la présentation

Storing XML Data in Relational Databases

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Storing XML Data in Relational Databases Shaghayegh Sahebi Nesa Asoudeh

  2. Outline • Introduction • A data model for XML documents • Different approaches to storing XML data in relational databases • Query processing • Conclusion and future work

  3. Introduction • The volume of XML data exchange is explosively Increasing. • The need for efficient mechanisms of XML data management is vital. • One appropriate solution is storing XML data in relational dataBases • Different models have been proposed.

  4. XPath data model: Root node Element nodes Attribute nodes Text nodes A Data Model for XML Documents

  5. A Data Model for XML Documents (cont.)

  6. Different Approaches of Storing XML Data in Relational Databases • two approaches of designing database schemas for XML documents: • Structure-mapping approach: Database schemas represent the logical structure (or DTDs if they are available) of target XML documents. • Model-mapping approach: Database schemas represent constructs of the XML document model. a fixed database schema is used to store the structure of all XML documents.

  7. Different Approaches of Storing XML Data in Relational Databases(cont.) • Classifying methods according to their dependency on document type definitions: • DTD dependent approaches: Basic inlining ,Shared inlining, Hybrid inlining • DTD independent approaches: Edge, Edge value, Xrel, Xparent, ORDpath, DLN,…

  8. Edge and Edge value • One of the first approaches • Models XML document as an ordered and labeled directed graph • Uses two tables to store XML documents: • Edge: • Edge (Source, Target, Ordinal, Label, Flag, Value) • Edge-Value: • Edge (Source, Target, Ordinal, Label, Flag) • Value (Node, Value)

  9. Monet • A variation of Edge approach. • Partitions the schema based on path labels. • N+1 tables for a path label l1.l2. ….ln. • N for l1 and l1.l2 and … • One for text or CData • Large number of small tables.

  10. XRel • Stores the XML data graph in four tables: • Path (PathId, PathExp) • Element (DocId, PathId, Start, End, Ordinal) • Text (DocId, pathId, Start, End, Value) • Attribute (DocId, PathId, Start, End, Value) • Uses “regions” to store the parent-child relationships. So doesn’t need node identifiers.

  11. Xparent • Uses four tables to store XML document: • LabelPath (Id, Len, Path) • DataPath (Pid, Cid) • Element (PathId, Did, Ordinal) • Data (PathId, Did, Ordinal, Value) • Each node has an identifier. • Parent-Child relationships are in DataPath table. • UTX: Uses Ancestor-Descendent relationships instead of Parent-Child ones.

  12. ORD-Path • Hierarchical labeling scheme • Determines ancestry relationship simply by comparison of labels • only positive, odd integers are assigned during an initial load; • even-numbered and negative integer component values are reserved for later insertions

  13. ORD-Path (cont.)

  14. DLN • A new numbering scheme called DLN (Dynamic Level Numbering) • a fixed number of digits for level values (fixed length). • application of sub values: • For instance to insert a node between nodes with ids 1.1/1 and 1.1/2we can add a further sub value level and assign 1.1/1/1 to the new node.

  15. N-Inode • A variation of DLN. • Number of insertions and deletions from an XML document is not restricted. • Uses k-dimensional identifiers for each node: (id1, io1, id2, io2, …, idk, iok) • Each dimension has an id (a number is calcuated like DLN) and an io(a number which shows the order of insertion) • Adds to io by one when inserting a node with existing id. • Adds a dimension when creating child for nodes with io > 0.

  16. Querying XML Documents • Query Languages (Lorel, QML-QL, XML-GL,…) • XPath( Boolean expressions and functions, traversing the tree to up, down left and right) • XQuery( XPath + some other facilities, FLWR expressions, … )

  17. Conclusion • There are many different approaches for DTD-independent storing of XML data in relational databases and each of them result in a different schema in a DBMS. • The approaches are not efficient enough. They should consider bulk loading, reconstruction of XML document, path traversal queries, parent-child relationships, ordered access, internal references, updating an XML document, …

  18. References • عمادي، مهدي، "بستري کارا براي مديريت داده­هاي XML"، (کارشناسي ارشد)، دانشگاه تهران، شهريور 85 • Florescu, D., Kossman, D., “Storing and Querying XML Data Using an RDBMS”. Bulletin of the IEEE Computer Society Technical Committee on Data Engineering, 1999, pp. 27-34. • Schmidt, A., Kersten, M., “Bulkloading and Maintaining XML Documents”. ACM 1-58113-445, 2/2/2003, pp. 407- 412. • Yoshikawa, M., Amagasa, T., Shimura, T., Uemura, S., “XRel: A Path-Based Approach to Storage and Retrieval of XML Documents using Relational Databases”. Proceedings of the Tenth International Conference on Database and Expert Systems Applications, Aug. 30 - Sep. 3, 1999 (DEXA’99), pp. 206-217. • Jiang, H., Lu, H., Wang, W., Yu, J.X., “Path Materialization Revisited: An Efficient Storage Model for XML Data”. 2nd Australian Institute of Computer Ethics Conference (AICE2000), Canberra, Conferences in Research and Practice in Information Technology, Vol. 1. J. Weckert, Ed, 2001. • Jiang, H., Lu, H., Wang, W., Yu, J.X., “XParent: An Efficient RDBMS-Based XML Database System”. AOE 98/99.EG01 and HKUST6060/00E, 2001.

  19. References( cont.) • O’Neil, P., O’Neil, E., Pal, S., Cseri, I., Schaller, G., Westbury, N., “ORDPATHs: Insert-Friendly XML Node Labels”. ACM 1-58113-859, 8/4/2006. • Böhme, T., Rahm, E., “Supporting Efficient Streaming and Insertion of XML Data in RDBMS”. http://dbs.uni-leipzig.de, 2001. • Emadi, M., Rahgozar, M., Ardalan, A., Kazerani, A., Ariyan, M., “Approaches and Schemes for Storing DTD-Independent XML Data in Relational Databases”. Transactions on Enineering, Computing and Technology Volume 13, May 2006, pp. 168-173. • Kit, L.H., Ng, V., “Enumerating XML Data for Dynamic Updating”. 16th Australasian Database Conference, University of Newcastle, Newcastle, Australia. Conferences in Research and Practice in Information Technology, Vol. 39. H.E. Williams and G. Dobbie, Eds., 2005. • D. Lee AND W. W. Chu, "Constraints-Preserving Transformation from XML Document Type Deffinition to Relational Schema," Proc. of 19th Intl. Conf. on Conceptual Modeling - ER (LNCS), Salt Lake City, Utah, USA, vol. 1920, October 2000و pp. 323- 338.

  20. Questions? <???/>

More Related