SlideShare a Scribd company logo
5
Most read
8
Most read
21
Most read
XML-Extensible Markup Language
XML
• Extensible Markup Language
• Designed to describe data and focus on what data is.
• Used to structure store and send information.
• Easy to understand and is self describing.
• XML is derived from Standard Generalized Markup
Language (SGML)
• Documents have tags giving extra information about
sections of the document
– E.g. <title> XML </title> <slide> Introduction …</slide>
• Extensible, unlike HTML
– Users can add new tags, and separately specify how the
tag should be handled for display
Types of XML databases
There are two major types of XML databases:
• XML-enabled: These map all XML to a
traditional database, accepting XML as input
and rendering XML as output.
• Native XML (NXD): The internal model
depends on XML and uses XML documents as
the fundamental unit of storage.
XML document rules
• A “well formed” XML doc has to have correct
XML syntax and they are :
– Must start with a n XML declaration to indicate
the version of XML being used as well as other
relevant attributes.
– Must have a root element.
– Must have a closing tag.
– XML tags are case sensitive.
– XML elements must be properly nested.
– XML attribute values must be quoted.
<?xml version = "1.0"?>
Structure of XML Data
<library xmlns:mevlana=“http://mevlana.edu.tr”>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
</book>
</library>
<!-- comments -->
5
Start tag
End tag
Element
Attribute
Namespace
Comments
tag
XML
Document
Node
• Hierarchical Data Model (Tree Structure).
• Basic object in XML is XML document.
• 2 main structuring concepts are used to
construct an XML doc
– Elements : start tag and end tag.
– Attributes : additional info to describe elements.
• In the tree representation
– Internal node : complex elements.
– Leaf node : simple elements.
Types of XML documents
• Data-centric XML doc
– Many small data items that follow a specific structure
and hence may be extracted from a structured DB.
– Formatted as XML doc inoder to exchange or display
over web.
• Doc-centric XML doc
– Large amounts of text ie.book
– Few or no structured data elements in these doc.
• Hybrid XML doc
– Doc may contain structured or unstructured data.
XML vs. Relational Database
XML Database
• XML data is hierarchical
• XML data is self-describing
• XML data has inherent
ordering
• An XML database contains
collections
Relational Database
• relational data is
represented in a model of
logical relationships
• relational data is not self-
describing
• Relational data does not
have inherent ordering
• A relational database
contains tables
XML vs. Relational Database
XML Representation
XML Document Schema
• Database schemas constrain what information
can be stored, and the data types of stored
values
• XML documents are not required to have an
associated schema
• Schemas are very important for XML data
exchange
• Two mechanisms for specifying XML schema
–Document Type Definition (DTD)
–XML Schema Definition (XSD)
Document Type Definition
• DTD constraints structure of XML data
– What elements can occur
– What attributes can/must an element have
– What subelements can/must occur inside each
element, and how many times.
• Limitations
– Data types in DTD are not general
– DTD has its own special syntax and thus require
special processors.
Document Type Definition
XML Schema Definition
• XML Schema is a more sophisticated schema
language which addresses the drawbacks of
DTDs. Supports Different data types.
• XML Schema is itself specified in XML syntax,
unlike DTDs
• XML Schema is integrated with namespaces
• XML Schema is significantly more complicated
than DTDs
Querying XML Data
• There are several languages used to access
XML data from XML Documents, some are:
– XPath
– Xquery (most popular)
XPath
XQuery
• XQuery is a general purpose query language for XML data
• XQuery is built on XPath expressions
• XQuery is derived from the quilt query language, which itself
borrows from SQL
• XQuery is supported by all database engines (IBM, Oracle,
Microsoft, etc.)
• XQuery uses FLOWR (for, let, where, order by , result)
– for  SQL from
– where  SQL where
– order by  SQL order by
– result  SQL select
– let allows temporary variables
XQuery
Benefits of XML
• XML doc is text based
– Takes less space can be transmitted efficiently
• One XML doc can be displayed differently on
different media.
• XML doc parts can be reused.
• Easy to understand.
Drawbacks of XML
• Case sensitive in nature
• XML syntax are redundant or large to binary
representation of the same data.
• Users must predefine their own tags
• Linking between XML docs requires xlink
which is complex compared to hyperlinks.
XML-Extensible Markup Language

More Related Content

What's hot (20)

PPT
Xpath.ppt
Prerak10
 
PPTX
Types of Drivers in JDBC
Hemant Sharma
 
PPTX
Static and Dynamic webpage
Aishwarya Pallai
 
PDF
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
Edureka!
 
PPTX
Java Script
husbancom
 
PPTX
Android styles and themes
Sourabh Sahu
 
PDF
jQuery for beginners
Arulmurugan Rajaraman
 
PPTX
Threads in JAVA
Haldia Institute of Technology
 
PPTX
Css3
Deepak Mangal
 
PPTX
Cascading Style Sheet (CSS)
AakankshaR
 
PPTX
Introduction to ajax
Pihu Goel
 
PPTX
Dynamic HTML (DHTML)
Himanshu Kumar
 
PPT
1 xml fundamentals
Dr.Saranya K.G
 
PPTX
Javascript operators
Mohit Rana
 
PPTX
DTD
Kamal Acharya
 
PPT
9. Input Output in java
Nilesh Dalvi
 
PPTX
Introduction to java
Veerabadra Badra
 
PDF
Basics of JavaScript
Bala Narayanan
 
Xpath.ppt
Prerak10
 
Types of Drivers in JDBC
Hemant Sharma
 
Static and Dynamic webpage
Aishwarya Pallai
 
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
Edureka!
 
Java Script
husbancom
 
Android styles and themes
Sourabh Sahu
 
jQuery for beginners
Arulmurugan Rajaraman
 
Cascading Style Sheet (CSS)
AakankshaR
 
Introduction to ajax
Pihu Goel
 
Dynamic HTML (DHTML)
Himanshu Kumar
 
1 xml fundamentals
Dr.Saranya K.G
 
Javascript operators
Mohit Rana
 
9. Input Output in java
Nilesh Dalvi
 
Introduction to java
Veerabadra Badra
 
Basics of JavaScript
Bala Narayanan
 

Viewers also liked (11)

PPTX
OPEN SHORTEST PATH FIRST (OSPF)
Ann Joseph
 
PDF
Generación de documentos de calidad con LATEX
Alejandro Valdes Jimenez
 
PDF
GNS3 Una Herramienta para Simulación de Redes de o Datos
Alejandro Valdes Jimenez
 
PDF
Las competencias del e-moderador en el modelo de Gilly Salmon
Roxana Contreras
 
PDF
Breve explicación del modelo de Gilly Salmon
Roxana Contreras
 
PPT
Que es Slideshare y Como funciona!
Munawar Ahmed
 
PDF
Modelo de Gilly Salmon y el rol del #tutorvirtual
Roxana Contreras
 
PPTX
slideshare¿como funciona?
zaira alvarado
 
PPT
The 4 degrees of separation between pain and pleasure
Deborah Davis
 
PPTX
社群變現怎麼做 社群經理人暨內容行銷操作實戰
Norika
 
OPEN SHORTEST PATH FIRST (OSPF)
Ann Joseph
 
Generación de documentos de calidad con LATEX
Alejandro Valdes Jimenez
 
GNS3 Una Herramienta para Simulación de Redes de o Datos
Alejandro Valdes Jimenez
 
Las competencias del e-moderador en el modelo de Gilly Salmon
Roxana Contreras
 
Breve explicación del modelo de Gilly Salmon
Roxana Contreras
 
Que es Slideshare y Como funciona!
Munawar Ahmed
 
Modelo de Gilly Salmon y el rol del #tutorvirtual
Roxana Contreras
 
slideshare¿como funciona?
zaira alvarado
 
The 4 degrees of separation between pain and pleasure
Deborah Davis
 
社群變現怎麼做 社群經理人暨內容行銷操作實戰
Norika
 
Ad

Similar to XML-Extensible Markup Language (20)

PPTX
Adbms_unit1_1 - Copy.pptxzsszcsczsxczxcxzcxzc
zmulani8
 
PPTX
XML1.pptx
53ShaikhImadoddin
 
PPTX
Adbms_unit1_1.pptx dsfdsfdfdfdfsdfdsfdsf
zmulani8
 
DOCX
Oracle soa xml faq
xavier john
 
DOCX
Xml viva questions
Vipul Naik
 
PPT
Xml 215-presentation
philipsinter
 
PPT
Xml 215-presentation
Manish Chaurasia
 
PPT
Deals with data Collectiona nd data management
rupanaveen24
 
PPTX
Introduction to XML
Abhra Basak
 
PPTX
advDBMS_XML.pptx
IreneGetzi
 
PPT
unit_5_XML data integration database management
sathiyabcsbs
 
PPT
Introduction to XML.ppt
Varsha Uchagaonkar
 
PPT
Introduction to XML.ppt
Varsha Uchagaonkar
 
PPT
Xml iet 2015
kiransurariya
 
PPT
XML and Databases
Cittrex
 
PPT
DATA INTEGRATION (Gaining Access to Diverse Data).ppt
careerPointBasti
 
PPT
database management system navathe chapter 26
AnishaCotta
 
PPT
ENCh26.ppt
ChagantiSahith
 
PPTX
XML Schema.pptx
JohnsonDcunha1
 
Adbms_unit1_1 - Copy.pptxzsszcsczsxczxcxzcxzc
zmulani8
 
Adbms_unit1_1.pptx dsfdsfdfdfdfsdfdsfdsf
zmulani8
 
Oracle soa xml faq
xavier john
 
Xml viva questions
Vipul Naik
 
Xml 215-presentation
philipsinter
 
Xml 215-presentation
Manish Chaurasia
 
Deals with data Collectiona nd data management
rupanaveen24
 
Introduction to XML
Abhra Basak
 
advDBMS_XML.pptx
IreneGetzi
 
unit_5_XML data integration database management
sathiyabcsbs
 
Introduction to XML.ppt
Varsha Uchagaonkar
 
Introduction to XML.ppt
Varsha Uchagaonkar
 
Xml iet 2015
kiransurariya
 
XML and Databases
Cittrex
 
DATA INTEGRATION (Gaining Access to Diverse Data).ppt
careerPointBasti
 
database management system navathe chapter 26
AnishaCotta
 
ENCh26.ppt
ChagantiSahith
 
XML Schema.pptx
JohnsonDcunha1
 
Ad

Recently uploaded (20)

PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PPT
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PDF
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
PPTX
MATLAB : Introduction , Features , Display Windows, Syntax, Operators, Graph...
Amity University, Patna
 
PPTX
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PDF
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
PPTX
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PPTX
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
Thermal runway and thermal stability.pptx
godow93766
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
MATLAB : Introduction , Features , Display Windows, Syntax, Operators, Graph...
Amity University, Patna
 
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
MRRS Strength and Durability of Concrete
CivilMythili
 
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
Design Thinking basics for Engineers.pdf
CMR University
 

XML-Extensible Markup Language

  • 2. XML • Extensible Markup Language • Designed to describe data and focus on what data is. • Used to structure store and send information. • Easy to understand and is self describing. • XML is derived from Standard Generalized Markup Language (SGML) • Documents have tags giving extra information about sections of the document – E.g. <title> XML </title> <slide> Introduction …</slide> • Extensible, unlike HTML – Users can add new tags, and separately specify how the tag should be handled for display
  • 3. Types of XML databases There are two major types of XML databases: • XML-enabled: These map all XML to a traditional database, accepting XML as input and rendering XML as output. • Native XML (NXD): The internal model depends on XML and uses XML documents as the fundamental unit of storage.
  • 4. XML document rules • A “well formed” XML doc has to have correct XML syntax and they are : – Must start with a n XML declaration to indicate the version of XML being used as well as other relevant attributes. – Must have a root element. – Must have a closing tag. – XML tags are case sensitive. – XML elements must be properly nested. – XML attribute values must be quoted.
  • 5. <?xml version = "1.0"?> Structure of XML Data <library xmlns:mevlana=“http://mevlana.edu.tr”> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> </book> </library> <!-- comments --> 5 Start tag End tag Element Attribute Namespace Comments tag XML Document Node
  • 6. • Hierarchical Data Model (Tree Structure). • Basic object in XML is XML document. • 2 main structuring concepts are used to construct an XML doc – Elements : start tag and end tag. – Attributes : additional info to describe elements. • In the tree representation – Internal node : complex elements. – Leaf node : simple elements.
  • 7. Types of XML documents • Data-centric XML doc – Many small data items that follow a specific structure and hence may be extracted from a structured DB. – Formatted as XML doc inoder to exchange or display over web. • Doc-centric XML doc – Large amounts of text ie.book – Few or no structured data elements in these doc. • Hybrid XML doc – Doc may contain structured or unstructured data.
  • 8. XML vs. Relational Database XML Database • XML data is hierarchical • XML data is self-describing • XML data has inherent ordering • An XML database contains collections Relational Database • relational data is represented in a model of logical relationships • relational data is not self- describing • Relational data does not have inherent ordering • A relational database contains tables
  • 11. XML Document Schema • Database schemas constrain what information can be stored, and the data types of stored values • XML documents are not required to have an associated schema • Schemas are very important for XML data exchange • Two mechanisms for specifying XML schema –Document Type Definition (DTD) –XML Schema Definition (XSD)
  • 12. Document Type Definition • DTD constraints structure of XML data – What elements can occur – What attributes can/must an element have – What subelements can/must occur inside each element, and how many times. • Limitations – Data types in DTD are not general – DTD has its own special syntax and thus require special processors.
  • 14. XML Schema Definition • XML Schema is a more sophisticated schema language which addresses the drawbacks of DTDs. Supports Different data types. • XML Schema is itself specified in XML syntax, unlike DTDs • XML Schema is integrated with namespaces • XML Schema is significantly more complicated than DTDs
  • 15. Querying XML Data • There are several languages used to access XML data from XML Documents, some are: – XPath – Xquery (most popular)
  • 16. XPath
  • 17. XQuery • XQuery is a general purpose query language for XML data • XQuery is built on XPath expressions • XQuery is derived from the quilt query language, which itself borrows from SQL • XQuery is supported by all database engines (IBM, Oracle, Microsoft, etc.) • XQuery uses FLOWR (for, let, where, order by , result) – for  SQL from – where  SQL where – order by  SQL order by – result  SQL select – let allows temporary variables
  • 19. Benefits of XML • XML doc is text based – Takes less space can be transmitted efficiently • One XML doc can be displayed differently on different media. • XML doc parts can be reused. • Easy to understand.
  • 20. Drawbacks of XML • Case sensitive in nature • XML syntax are redundant or large to binary representation of the same data. • Users must predefine their own tags • Linking between XML docs requires xlink which is complex compared to hyperlinks.