Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML Databases Presented By: Pardeep MT15042 Anurag Goel MT15006.

Similar presentations


Presentation on theme: "XML Databases Presented By: Pardeep MT15042 Anurag Goel MT15006."— Presentation transcript:

1 XML Databases Presented By: Pardeep MT15042 Anurag Goel MT15006

2 Outline  Introduction to XML  XML Documents  XML Databases  XML Model v/s Relational Model  Mapping between XML Model and Relational Model

3 What is XML?  XML (eXtensible Markup Language) is a meta-language used to represent and manipulate data elements and enables designers to create customized tags.  Similar to HTML in structure, but XML is concerned with the description and representation of data, rather than with the way it is displayed.  XML has tree-structured (hierarchical) data model.  XML has emerged as the standard for structuring and exchanging data over the web.

4 Raw Data (Course information) : CIS 3730 Designing and Managing Data CRN: 10059 Instructor: Dr. Jack Zheng XML Format : CIS 3730 Designing and Managing Data Dr. Jack Zheng XML Document: Elements and Attributes Element (Simple) Element (Complex) Attribute

5 XML Document: Well Formed and Valid  An XML document is well formed if it is syntactically correct.  An XML document is valid if it is well formed and follow the structure specified in a separate XML DTD file or XML schema file.

6 Why XML for databases?  One of the main reasons that XML was developed was to allow the exchange of semi-structured documents like invoices, order forms, applications etc. over the internet.  Using a database system to store XML documents allows users to be able to better access information.  XML is very flexible  Data is maintained in a self-describing format to accommodate a variety of ever-evolving business needs.

7  Simply a database that stores XML Documents  There are two major types of XML databases: XML-enabled: These map all XML to a traditional database (such as a relational database), accepting XML as input and rendering XML as output. Native XML (NXD): The internal model of such databases depends on XML and uses XML documents as the fundamental unit of storage. What is an XML Database?

8 XML Model V/S Relational Model  Relational data is represented in a model of logical relationships.  Relational data is not self- describing.  Relational data does not have inherent ordering.  In relational database, schema is an inherent part of database.  It is not allowed in relational databases.  XML data is hierarchical (nesting of elements is allowed).  XML data is self-describing.  XML data has inherent ordering.  In XML, schema is optional.  Mixture of text with Sub elements is legal in XML.

9  The table becomes the root element (a complex type): may use the table name as the root element name.  Each row (record) becomes direct child elements (complex types) under the root element.  Each value in the row becomes (two choices) an attribute of the row element (the column name becomes the attribute name, and the data becomes the attribute value), or an third level child element (simple type) under the row element: the column name becomes the element name and the data becomes the text node under the element. Going from Relational Model to XML Model

10 Example 1 Speedy Express (503) 555-9831 2 United Package (503) 555-3199 3 Federal Shipping (503) 555-9931 Shippers Table

11  XML documents can be decomposed into a relational table.  Those decomposed XML documents can be made into relational tables and published to an XML document( they might differ from the original)  During the decomposing process, the XML document loses most of it structure in order to map into the relational table; not all the tags are stored in the relational tables. Going from XML Model to Relational Model

12 94872 PEN 19.95 30 94866 BINDER 7.95 26 92219 LABELS 12.95 250 Item Order Example

13 Conclusion  XML documents are best suited for modelling semi-structured data (data does not conform to a fixed schema).  XML documents can optionally have a DTD or XML schema, which defines the valid syntax of an XML document.  XML is very flexible and XML tags are self-describing tags that’s why, XML is extensively used as a data format standard for exchanging the data over the web.

14 Thank You


Download ppt "XML Databases Presented By: Pardeep MT15042 Anurag Goel MT15006."

Similar presentations


Ads by Google