SlideShare a Scribd company logo
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

Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Dr. C.V. Suresh Babu
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
Bikash chhetri
 
Xml schema
Xml schemaXml schema
Xml schema
Prabhakaran V M
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
Gtu Booker
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Jussi Pohjolainen
 
Functions in javascript
Functions in javascriptFunctions in javascript
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
Manish Chaurasia
 
Xml dom
Xml domXml dom
Xml dom
sana mateen
 
XSLT.ppt
XSLT.pptXSLT.ppt
XSLT.ppt
KGSCSEPSGCT
 
transforming xml using xsl and xslt
transforming xml using xsl and xslttransforming xml using xsl and xslt
transforming xml using xsl and xslt
Hemant Suthar
 
Dtd
DtdDtd
1 xml fundamentals
1 xml fundamentals1 xml fundamentals
1 xml fundamentals
Dr.Saranya K.G
 
DTD
DTDDTD
Xslt
XsltXslt
XSD
XSDXSD
Understanding XML DOM
Understanding XML DOMUnderstanding XML DOM
Understanding XML DOM
Om Vikram Thapa
 
Transforming xml with XSLT
Transforming  xml with XSLTTransforming  xml with XSLT
Transforming xml with XSLT
Malintha Adikari
 

What's hot (20)

Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
Xml schema
Xml schemaXml schema
Xml schema
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Functions in javascript
Functions in javascriptFunctions in javascript
Functions in javascript
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Xpath presentation
Xpath presentationXpath presentation
Xpath presentation
 
Xml dom
Xml domXml dom
Xml dom
 
XSLT.ppt
XSLT.pptXSLT.ppt
XSLT.ppt
 
transforming xml using xsl and xslt
transforming xml using xsl and xslttransforming xml using xsl and xslt
transforming xml using xsl and xslt
 
Dtd
DtdDtd
Dtd
 
Xml
Xml Xml
Xml
 
1 xml fundamentals
1 xml fundamentals1 xml fundamentals
1 xml fundamentals
 
DTD
DTDDTD
DTD
 
Xslt
XsltXslt
Xslt
 
XML
XMLXML
XML
 
XSD
XSDXSD
XSD
 
Understanding XML DOM
Understanding XML DOMUnderstanding XML DOM
Understanding XML DOM
 
Transforming xml with XSLT
Transforming  xml with XSLTTransforming  xml with XSLT
Transforming xml with XSLT
 

Viewers also liked

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

Viewers also liked (11)

OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)
 
Generación de documentos de calidad con LATEX
Generación de documentos de calidad con LATEXGeneración de documentos de calidad con LATEX
Generación de documentos de calidad con LATEX
 
GNS3 Una Herramienta para Simulación de Redes de o Datos
GNS3 Una Herramienta para Simulación de Redes de o DatosGNS3 Una Herramienta para Simulación de Redes de o Datos
GNS3 Una Herramienta para Simulación de Redes de o Datos
 
Las competencias del e-moderador en el modelo de Gilly Salmon
Las competencias del e-moderador en el modelo de Gilly SalmonLas competencias del e-moderador en el modelo de Gilly Salmon
Las competencias del e-moderador en el modelo de Gilly Salmon
 
Breve explicación del modelo de Gilly Salmon
Breve explicación del modelo de Gilly SalmonBreve explicación del modelo de Gilly Salmon
Breve explicación del modelo de Gilly Salmon
 
Que es Slideshare y Como funciona!
Que es Slideshare y Como funciona!Que es Slideshare y Como funciona!
Que es Slideshare y Como funciona!
 
El modelo de_gilly_salmon
El modelo de_gilly_salmonEl modelo de_gilly_salmon
El modelo de_gilly_salmon
 
Modelo de Gilly Salmon y el rol del #tutorvirtual
Modelo de Gilly Salmon y el rol del #tutorvirtualModelo de Gilly Salmon y el rol del #tutorvirtual
Modelo de Gilly Salmon y el rol del #tutorvirtual
 
slideshare¿como funciona?
slideshare¿como funciona?slideshare¿como funciona?
slideshare¿como funciona?
 
The 4 degrees of separation between pain and pleasure
The 4 degrees of separation between pain and pleasureThe 4 degrees of separation between pain and pleasure
The 4 degrees of separation between pain and pleasure
 
社群變現怎麼做 社群經理人暨內容行銷操作實戰
社群變現怎麼做 社群經理人暨內容行銷操作實戰 社群變現怎麼做 社群經理人暨內容行銷操作實戰
社群變現怎麼做 社群經理人暨內容行銷操作實戰
 

Similar to XML-Extensible Markup Language

Introduction to XML.ppt
Introduction to XML.pptIntroduction to XML.ppt
Introduction to XML.ppt
Varsha Uchagaonkar
 
Introduction to XML.ppt
Introduction to XML.pptIntroduction to XML.ppt
Introduction to XML.ppt
Varsha Uchagaonkar
 
Unit iv xml dom
Unit iv xml domUnit iv xml dom
Unit iv xml dom
smitha273566
 
Xml iet 2015
Xml iet 2015Xml iet 2015
Xml iet 2015
kiransurariya
 
Data interchange integration, HTML XML Biological XML DTD
Data interchange integration, HTML XML Biological XML DTDData interchange integration, HTML XML Biological XML DTD
Data interchange integration, HTML XML Biological XML DTD
AnushaMahmood
 
Xml unit1
Xml unit1Xml unit1
Xml unit1
sathyasudha
 
XML
XMLXML
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Vijay Mishra
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Maung Nyunt
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
Pradeep Rapolu
 
Xml basics
Xml basicsXml basics
Xml basics
Kumar
 

Similar to XML-Extensible Markup Language (20)

Introduction to XML.ppt
Introduction to XML.pptIntroduction to XML.ppt
Introduction to XML.ppt
 
Introduction to XML.ppt
Introduction to XML.pptIntroduction to XML.ppt
Introduction to XML.ppt
 
Unit iv xml dom
Unit iv xml domUnit iv xml dom
Unit iv xml dom
 
Xml iet 2015
Xml iet 2015Xml iet 2015
Xml iet 2015
 
Data interchange integration, HTML XML Biological XML DTD
Data interchange integration, HTML XML Biological XML DTDData interchange integration, HTML XML Biological XML DTD
Data interchange integration, HTML XML Biological XML DTD
 
Xml
XmlXml
Xml
 
Xml unit1
Xml unit1Xml unit1
Xml unit1
 
Xml
XmlXml
Xml
 
XML
XMLXML
XML
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Ch2 neworder
Ch2 neworderCh2 neworder
Ch2 neworder
 
Xml
XmlXml
Xml
 
Xml
XmlXml
Xml
 
XML
XMLXML
XML
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
XMl
XMlXMl
XMl
 
Xml
XmlXml
Xml
 
Xmll
XmllXmll
Xmll
 
Xml basics
Xml basicsXml basics
Xml basics
 

Recently uploaded

Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
PrashantGoswami42
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 

Recently uploaded (20)

Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 

XML-Extensible Markup Language

  • 1.
  • 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.