The document discusses eXtensible Markup Language (XML). XML is a markup language for documents containing structured information. It is based on Standard Generalized Markup Language and was introduced by the World Wide Web Consortium in 1998. The document compares XML to HTML and outlines XML syntax including elements, attributes, and documents. It also discusses XML queries, mediators, converting relational databases to XML, and challenges facing XML.
XML Document Object Model (DOM) is a standard for accessing and navigating XML code. All structured documents have a DOM system. The DOM simply defines the objects and properties in code, so parsers can identify and understand the individual parts. The DOM presents an XML document as a tree-structure. Knowing the XML DOM is a must for anyone working with XML.
DOM,XML,DOCUMENT OBJECT MODEL,DOCUMENT,OBJECT,MODEL,API,XML API,INTERFACE,XML INTERFACE,DOM INTERFACE,DOM IN XML,DOM LEVELS,DOM CORE,XML PARSER,XML AND WEB SERVICES,
A comparison of a database table to an XML document. There is an overview of basic XML concepts suchs as attribute, element, entity, and tag. Data centric and document centric XML document are covered.
guardian.co.uk is a leading UK-based news website. We've spent ten years fighting relational database representations of our domain model, until the implementation of our API made us realise that if only we could store documents everything got simpler. I'll talk about the history that led us to choosing MongoDB as a key part of our infrastructure going forward and how we're progressively migrating from our relational database.
With huge credit to Mat Wall @matwall for creating the original version of this talk.
XML Document Object Model (DOM) is a standard for accessing and navigating XML code. All structured documents have a DOM system. The DOM simply defines the objects and properties in code, so parsers can identify and understand the individual parts. The DOM presents an XML document as a tree-structure. Knowing the XML DOM is a must for anyone working with XML.
DOM,XML,DOCUMENT OBJECT MODEL,DOCUMENT,OBJECT,MODEL,API,XML API,INTERFACE,XML INTERFACE,DOM INTERFACE,DOM IN XML,DOM LEVELS,DOM CORE,XML PARSER,XML AND WEB SERVICES,
A comparison of a database table to an XML document. There is an overview of basic XML concepts suchs as attribute, element, entity, and tag. Data centric and document centric XML document are covered.
guardian.co.uk is a leading UK-based news website. We've spent ten years fighting relational database representations of our domain model, until the implementation of our API made us realise that if only we could store documents everything got simpler. I'll talk about the history that led us to choosing MongoDB as a key part of our infrastructure going forward and how we're progressively migrating from our relational database.
With huge credit to Mat Wall @matwall for creating the original version of this talk.
Dare to build vertical design with relational data (Entity-Attribute-Value)Ivo Andreev
Entity-Attribute-Value model is often called “anti-pattern” by the criticism. And probably they would be right if one misses to read the “Handle with Care” label on it. Enthusiastic inexperienced developers would easily compromise the benefits of relational DB but the coin has yet another side. Hierarchical object with thousands of properties, unknown schema, flexibility and millions of records. As always – we have to sacrifice one thing in order to win another. Then all it comes to priorities and ability for decision making. At this lecture you will not get a step-by-step manual but instead get ideas for how to build one for you. A challenge, a proof of concept, hard work and successful project for millions – that is the story to share.
Designing an extensible, flexible schema that supports user customization is a common requirement, but it's easy to paint yourself into a corner.
Examples of extensible database requirements:
- A database that allows users to declare new fields on demand.
- Or an e-commerce catalog with many products, each with distinct attributes.
- Or a content management platform that supports extensions for custom data.
The solutions we use to meet these requirements is overly complex and the performance is terrible. How should we find the right balance between schema and schemaless database design?
I'll briefly cover the disadvantages of Entity-Attribute-Value (EAV), a problematic design that's an example of the antipattern called the Inner-Platform Effect, That is, modeling an attribute-management system on top of the RDBMS architecture, which already provides attributes through columns, data types, and constraints.
Then we'll discuss the pros and cons of alternative data modeling patterns, with respect to developer productivity, data integrity, storage efficiency and query performance, and ease of extensibility.
- Class Table Inheritance
- Serialized BLOB
- Inverted Indexing
Finally we'll show tools like pt-online-schema-change and new features of MySQL 5.6 that take the pain out of schema modifications.
When does InnoDB lock a row? Multiple rows? Why would it lock a gap? How do transactions affect these scenarios? Locking is one of the more opaque features of MySQL, but it’s very important for both developers and DBA’s to understand if they want their applications to work with high performance and concurrency. This is a creative presentation to illustrate the scenarios for locking in InnoDB and make these scenarios easier to visualize. I'll cover: key locks, table locks, gap locks, shared locks, exclusive locks, intention locks, insert locks, auto-inc locks, and also conditions for deadlocks.
XML is everywhere. Computers, Mobiles, Bank Systems, Internet, TVs, Microwaves, all use XML as an Information Wrapping and Information Xchange System. We will tell you all the basics in a simplest possible way.
1. eXtensible Markup Language (XML)
Presented By:
Nisha Dwivedi
2. Outline of Presentation
Introduction
Comparison between XML and HTML
XML Syntax
XML Queries and Mediators
Challenges
Summary
3. What is XML?
eXtensible Markup Language
Markup language for documents containing
structured information
Defined by four specifications:
XML, the Extensible Markup Language
XLL, the Extensible Linking Language
XSL, the Extensible Style Language
XUA, the XML User Agent
4. XML….
Based on Standard Generalized Markup
Language (SGML)
Version 1.0 introduced by World Wide Web
Consortium (W3C) in 1998
Bridge for data exchange on
the Web
5. Comparisons
XML HTML
Extensible set of tags Fixed set of tags
Content orientated Presentation oriented
Standard Data No data validation
infrastructure capabilities
Allows multiple Single presentation
output forms
6. Authoring XML
Elements
An XML element is made up of a start tag, an end
tag, and data in between.
Example:
<director> Matthew Dunn </director>
Example of another element with the same value:
<actor> Matthew Dunn </actor>
XML tags are case-sensitive:
<CITY> <City> <city>
XML can abbreviate empty elements, for example:
<married> </married> can be abbreviated to
<married/>
7. Authoring XML
Elements (cont’d)
An attribute is a name-value pair separated
by an equal sign (=).
Example:
<City ZIP=“94608”> Emeryville </City>
Attributes are used to attach additional,
secondary information to an element.
8. Authoring XML
Documents
A basic XML document is an XML element
that can, but might not, include nested XML
elements.
Example:
<books>
<book isbn=“123”>
<title> Second Chance </title>
<author> Matthew Dunn </author>
</book>
</books>
9. XML Data Model:
Example
<BOOKS>
<book id=“123” BOOKS
loc=“library”> book
loc=“library” article
<author>Hull</author>
<title>California</title> ref
123 555
<year> 1995 </year>
</book> author year author title
<article id=“555” title
ref=“123”>
<author>Su</author> Hull 1995 Su Purdue
<title> Purdue</title> California
</article>
</BOOKS>
10. Authoring XML
Documents (cont’d)
Authoring guidelines:
All elements must have an end tag.
All elements must be cleanly nested
(overlapping elements are not allowed).
All attribute values must be enclosed in
quotation marks.
Each document must have a unique first
element, the root node.
11. Authoring XML Data
Islands
A data island is an XML document that exists
within an HTML page.
The <XML> element marks the beginning of
the data island, and its ID attribute provides a
name that you can use to reference the data
island.
12. Authoring XML Data
Islands (cont’d)
Example:
<XML ID=“XMLID”>
<customer>
<name> Mark Hanson </name>
<custID> 29085 </custID>
</customer>
</XML>
13. Document Type
Definitions (DTD)
An XML document may have an optional
DTD.
DTD serves as grammar for the underlying
XML document, and it is part of XML
language.
DTDs are somewhat unsatisfactory, but no
consensus exists so far beyond the basic
DTDs.
DTD has the form:
<!DOCTYPE name [markupdeclaration]>
14. DTD (cont’d)
Consider an XML document:
<db><person><name>Alan</name>
<age>42</age>
<email>agb@usa.net </email>
</person>
<person>………</person>
……….
</db>
15. DTD (cont’d)
DTD for it might be:
<!DOCTYPE db [
<!ELEMENT db (person*)>
<!ELEMENT person (name, age, email)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT age (#PCDATA)>
<!ELEMENT email (#PCDATA)>
]>
16. DTD (cont’d)
Occurrence Indicator:
Indicator Occurrence
(no indicator) Required One and only
one
? Optional None or one
* Optional, None, one, or
repeatable more
+ Required, One or more
repeatable
17. XML Query Languages
The first XML query languages
LOREL (Stanford)
XQL
Several other query languages have been
developed (e.g. UNQL, XPath)
XML-QL considered by W3C for
standardization
Currently W3C is considering and working on
a new query language: XQuery
18. A Query Language for
XML: XML-QL
Developed at AT&T labs
To extract data from the input XML data
Has variables to which data is bound and
templates which show how the output XML
data is to be constructed
Uses the XML syntax
Based on a where/construct syntax
Where combines from and where parts of
SQL
Construct corresponds to SQL’s select
19. XML-QL Query: Example 1
Retrieve all authors of books published by
Morgan Kaufmann:
where <book>
<publisher><name>
Morgan Kaufmann
</name> </publisher>
<title> $T </title>
<author> $A </author>
</book> in “www.a.b.c/bib.xml”
construct <result> $A </result>
20. XML-QL Query: Example 2
XML-QL query asking for all bookstores that sell
The Java Programming Language for under $25:
where <store>
<name> $N </name>
<book>
<title> The Java Programming Language </title>
<price> $P </price>
</book>
</store> in “www.store/bib.xml”
$P < 25
construct <result> $N </result>
21. Semistructured Data and
Mediators
Semistructured data is often encountered in data
exchange and integration
At the sources the data may be structured (e.g. from
relational databases)
We model the data as semistructured to facilitate
exchange and integration
Users see an integrated semistructured view that
they can query
Queries are eventually reformulated into queries over
the structured resources (e.g. SQL)
Only results need to be materialized
22. What is a mediator ?
A complex software component that
integrates and transforms data from one or
several sources using a declarative
specification
Two main contexts:
Data conversion: converts data between
two different models
e.g. by translating data from a relational
database into XML
Data integration: integrates data from
different sources into a common view
23. Converting Relational
Database to XML
Example: Export the following data into XML and group
books by store
Relational Database:
Store (sid, name, phone)
Book (bid, title, authors)
StoreBook (sid , bid, price, stock)
price stock
name Store StoreBook Book authors
phone sid title bid