SlideShare a Scribd company logo
1 of 29
HPD Presentation
Semi-Structured data &
XML
Presented by-
Diksha R. Gupta
Roll no.:- 7
Semistructured Data
 Another data model, based on trees.
 Motivation: flexible representation of data.
◦ Often, data comes from multiple sources
with differences in notation, meaning, etc.
 Motivation: sharing of documents among
systems and databases.
3
Graphs of Semistructured Data
 Nodes = objects.
 Labels on arcs (attributes, relationships).
 Atomic values at leaf nodes (nodes with no
arcs out).
 Flexibility: no restriction on:
◦ Labels out of a node.
◦ Number of successors with a given label.
4
XML
 XML = Extensible Markup Language.
 While HTML uses tags for formatting
(e.g., “italic”), XML uses tags for
semantics (e.g., “this is an address”).
 Key idea: create tag sets for a domain
(e.g., genomics), and translate all data into
properly tagged XML documents.
7
HTML and XML
8
XML stands for extensible Markup Language
HTML is used to mark up
text so it can be displayed to
users
XML is used to mark up
data so it can be processed
by computers
HTML describes both
structure (e.g. <p>, <h2>,
<tr>,<td>) and appearance
(e.g. <br>, <font>, <i>)
XML describes only
content, or “meaning”
HTML uses a fixed,
unchangeable set of tags
In XML, you make up
your own tags
HTML
<h1> Bibliography </h1>
<p> <i> Foundations of Databases </i>
Abiteboul, Hull, Vianu
<br> Addison Wesley, 1995
<p> <i> Data on the Web </i>
Abiteboul, Buneman, Suciu
<br> Morgan Kaufmann, 1999
XML
<bibliography>
<book> <title> Foundations… </title>
<author> Abiteboul </author>
<author> Hull </author>
<author> Vianu </author>
<publisher> Addison Wesley </publisher>
<year> 1995 </year>
</book>
…
</bibliography>
XML describes the content
Well-Formed and Valid XML
 Well-Formed XML allows you to invent
your own tags.
◦ Similar to labels in semistructured data.
 Valid XML involves a DTD (Document
Type Definition), a grammar for tags.
12
Well-Formed XML
 Start the document with a declaration,
surrounded by <?xml … ?> .
 Normal declaration is:
<?xml version = “1.0” standalone = “yes”
?>
◦ “Standalone” = “no DTD provided.”
 Balance of document is a root tag
surrounding nested tags.
13
Tags
 Tags, as in HTML, are normally matched
pairs, as <FOO> … </FOO> .
 Tags may be nested arbitrarily.
 XML tags are case sensitive.
14
XML and Semistructured Data
 Well-Formed XML with nested tags is
exactly the same idea as trees of semi-
structured data.
 We shall see that XML also enables non
tree structures, as does the semi-structured
data model.
15
Example
 The <BARS> XML document is:
16
Joe’s Bar
Bud 2.50 Miller 3.00
PRICE
BAR
BAR
BARS
NAME . . .
BAR
PRICE
NAME
BEER
BEER
NAME
Slide 27- 17
XML Hierarchical (Tree) Data Model
(contd.)
 The basic object is XML is the XML
document.
 There are two main structuring concepts
that are used to construct an XML
document:
◦ Elements
◦ Attributes
 Attributes in XML provide additional
information that describe elements.
Slide 27- 18
XML Hierarchical (Tree) Data Model
(contd.)
 As in HTML, elements are identified in a document by
their start tag and end tag.
◦ The tag names are enclosed between angled brackets
<…>, and end tags are further identified by a
backslash </…>.
 Complex elements are constructed from other elements
hierarchically, whereas simple elements contain data
values.
 It is straightforward to see the correspondence between
the XML textual representation and the tree structure.
◦ In the tree representation, internal nodes represent
complex elements, whereas leaf nodes represent
simple elements.
◦ That is why the XML model is called a tree model or
a hierarchical model.
Slide 27- 19
XML Hierarchical (Tree) Data Model
(contd.)
 It is possible to characterize three main types of XML documents:
1. Data-centric XML documents
 These documents have many small data items that follow
a specific structure, and hence may be extracted from a
structured database. They are formatted as XML
documents in order to exchange them or display them
over the Web.
2. Document-centric XML documents:
 These are documents with large amounts of text, such as
news articles or books. There is little or no structured data
elements in these documents.
3. Hybrid XML documents:
 These documents may have parts that contains structured
data and other parts that are predominantly textual or
unstructured.
DTD Structure
<!DOCTYPE <root tag> [
<!ELEMENT <name>(<components>)>
. . . more elements . . .
]>
22
DTD Elements
 The description of an element consists of
its name (tag), and a parenthesized
description of any nested tags.
◦ Includes order of subtags and their
multiplicity.
 Leaves (text elements) have #PCDATA
(Parsed Character DATA ) in place of
nested tags.
23
Example: DTD
<!DOCTYPE BARS [
<!ELEMENT BARS (BAR*)>
<!ELEMENT BAR (NAME, BEER+)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT BEER (NAME, PRICE)>
<!ELEMENT PRICE (#PCDATA)>
]>
24
A BARS object has
zero or more BAR’s
nested within.
A BAR has one
NAME and one
or more BEER
subobjects.
A BEER has a
NAME and a
PRICE.
NAME and PRICE
are text.
Element Descriptions
 Sub tags must appear in order shown.
 A tag may be followed by a symbol to
indicate its multiplicity.
◦ * = zero or more.
◦ + = one or more.
◦ ? = zero or one.
 Symbol | can connect alternative sequences
of tags.
25
XML Schema
 In XML format
 Element names and types associated locally
 Includes primitive data types (integers, strings,
dates, etc.)
 Supports value-based constraints (integers >
100)
 User-definable structured types
 Inheritance (extension or restriction)
 Foreign keys
 Element-type reference constraints
Sample XML Schema
<schema version=“1.0” xmlns=“http://www.w3.org/1999/XMLSchema”>
<element name=“author” type=“string” />
<element name=“date” type = “date” />
<element name=“abstract”>
<type>
…
</type>
</element>
<element name=“paper”>
<type>
<attribute name=“keywords” type=“string”/>
<element ref=“author” minOccurs=“0” maxOccurs=“*” />
<element ref=“date” />
<element ref=“abstract” minOccurs=“0” maxOccurs=“1” />
<element ref=“body” />
</type>
</element>
</schema>
Hpd ppt

More Related Content

What's hot (20)

XML Databases
XML DatabasesXML Databases
XML Databases
 
XML
XMLXML
XML
 
Xml dtd- Document Type Definition- Web Technology
Xml dtd- Document Type Definition- Web TechnologyXml dtd- Document Type Definition- Web Technology
Xml dtd- Document Type Definition- Web Technology
 
Ordbms
OrdbmsOrdbms
Ordbms
 
Xml2
Xml2Xml2
Xml2
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
 
Web data management (chapter-1)
Web data management (chapter-1)Web data management (chapter-1)
Web data management (chapter-1)
 
XML
XMLXML
XML
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
 
12 SQL
12 SQL12 SQL
12 SQL
 
Building XML Based Applications
Building XML Based ApplicationsBuilding XML Based Applications
Building XML Based Applications
 
Xml
XmlXml
Xml
 
Difference between dtd and xsd
Difference between dtd and xsdDifference between dtd and xsd
Difference between dtd and xsd
 
9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS9. Object Relational Databases in DBMS
9. Object Relational Databases in DBMS
 
XML and Databases
XML and DatabasesXML and Databases
XML and Databases
 
Xml dtd
Xml dtdXml dtd
Xml dtd
 
DTD
DTDDTD
DTD
 
eXtensible Markup Language
eXtensible Markup LanguageeXtensible Markup Language
eXtensible Markup Language
 
Web data management
Web data managementWeb data management
Web data management
 
Intro to xml
Intro to xmlIntro to xml
Intro to xml
 

Viewers also liked

Skins textual analysis
Skins textual analysisSkins textual analysis
Skins textual analysisKaylaCarstens
 
Cumplea+¦os feliz
Cumplea+¦os felizCumplea+¦os feliz
Cumplea+¦os felizJavi García
 
Vinit Gloves- Standard
Vinit Gloves- StandardVinit Gloves- Standard
Vinit Gloves- StandardVinit KHETAN
 
Lista de informatica
Lista de informaticaLista de informatica
Lista de informaticayolit74
 
Hotsos 2013 - Creating Structure in Unstructured Data
Hotsos 2013 - Creating Structure in Unstructured DataHotsos 2013 - Creating Structure in Unstructured Data
Hotsos 2013 - Creating Structure in Unstructured DataMarco Gralike
 
Ixonos’ perspectives on MirrorLink
Ixonos’ perspectives on MirrorLinkIxonos’ perspectives on MirrorLink
Ixonos’ perspectives on MirrorLinkIxonos Plc
 
Chemical structure representation in PubChem
Chemical structure representation in PubChemChemical structure representation in PubChem
Chemical structure representation in PubChemNextMove Software
 
ATM(AUTOMATIC TELLER MACHINE)-HISTORY,TYPES, WORKING, STRUCTURE
ATM(AUTOMATIC TELLER MACHINE)-HISTORY,TYPES, WORKING, STRUCTUREATM(AUTOMATIC TELLER MACHINE)-HISTORY,TYPES, WORKING, STRUCTURE
ATM(AUTOMATIC TELLER MACHINE)-HISTORY,TYPES, WORKING, STRUCTURERadhika Venkat
 

Viewers also liked (18)

Skins textual analysis
Skins textual analysisSkins textual analysis
Skins textual analysis
 
PDF Nov-Dec 66-68
PDF Nov-Dec 66-68PDF Nov-Dec 66-68
PDF Nov-Dec 66-68
 
Cumplea+¦os feliz
Cumplea+¦os felizCumplea+¦os feliz
Cumplea+¦os feliz
 
Rubric
RubricRubric
Rubric
 
Letter
LetterLetter
Letter
 
Production log 1
Production log 1Production log 1
Production log 1
 
Scan4
Scan4 Scan4
Scan4
 
ZPVDAY16
ZPVDAY16ZPVDAY16
ZPVDAY16
 
Vinit Gloves- Standard
Vinit Gloves- StandardVinit Gloves- Standard
Vinit Gloves- Standard
 
ZP2015summerpromo
ZP2015summerpromoZP2015summerpromo
ZP2015summerpromo
 
Lista de informatica
Lista de informaticaLista de informatica
Lista de informatica
 
Production log 1
Production log 1Production log 1
Production log 1
 
Ppt final
Ppt finalPpt final
Ppt final
 
Information filtering
Information filteringInformation filtering
Information filtering
 
Hotsos 2013 - Creating Structure in Unstructured Data
Hotsos 2013 - Creating Structure in Unstructured DataHotsos 2013 - Creating Structure in Unstructured Data
Hotsos 2013 - Creating Structure in Unstructured Data
 
Ixonos’ perspectives on MirrorLink
Ixonos’ perspectives on MirrorLinkIxonos’ perspectives on MirrorLink
Ixonos’ perspectives on MirrorLink
 
Chemical structure representation in PubChem
Chemical structure representation in PubChemChemical structure representation in PubChem
Chemical structure representation in PubChem
 
ATM(AUTOMATIC TELLER MACHINE)-HISTORY,TYPES, WORKING, STRUCTURE
ATM(AUTOMATIC TELLER MACHINE)-HISTORY,TYPES, WORKING, STRUCTUREATM(AUTOMATIC TELLER MACHINE)-HISTORY,TYPES, WORKING, STRUCTURE
ATM(AUTOMATIC TELLER MACHINE)-HISTORY,TYPES, WORKING, STRUCTURE
 

Similar to Hpd ppt

advDBMS_XML.pptx
advDBMS_XML.pptxadvDBMS_XML.pptx
advDBMS_XML.pptxIreneGetzi
 
DATA INTEGRATION (Gaining Access to Diverse Data).ppt
DATA INTEGRATION (Gaining Access to Diverse Data).pptDATA INTEGRATION (Gaining Access to Diverse Data).ppt
DATA INTEGRATION (Gaining Access to Diverse Data).pptcareerPointBasti
 
unit_5_XML data integration database management
unit_5_XML data integration database managementunit_5_XML data integration database management
unit_5_XML data integration database managementsathiyabcsbs
 
Web Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdfWeb Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdfAnonymousXhmybK
 
Unit2_XML_S_SS_US Data_CS19414.pptx
Unit2_XML_S_SS_US Data_CS19414.pptxUnit2_XML_S_SS_US Data_CS19414.pptx
Unit2_XML_S_SS_US Data_CS19414.pptxNEHARAJPUT239591
 
chapter 4 web authoring unit 4 xml.pptx
chapter 4 web authoring  unit 4 xml.pptxchapter 4 web authoring  unit 4 xml.pptx
chapter 4 web authoring unit 4 xml.pptxamare63
 
distributed system concerned lab sessions
distributed system concerned lab sessionsdistributed system concerned lab sessions
distributed system concerned lab sessionsmilkesa13
 
Innovative way for normalizing xml document
Innovative way for normalizing xml documentInnovative way for normalizing xml document
Innovative way for normalizing xml documentAlexander Decker
 

Similar to Hpd ppt (20)

XML-Unit 1.ppt
XML-Unit 1.pptXML-Unit 1.ppt
XML-Unit 1.ppt
 
advDBMS_XML.pptx
advDBMS_XML.pptxadvDBMS_XML.pptx
advDBMS_XML.pptx
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
DATA INTEGRATION (Gaining Access to Diverse Data).ppt
DATA INTEGRATION (Gaining Access to Diverse Data).pptDATA INTEGRATION (Gaining Access to Diverse Data).ppt
DATA INTEGRATION (Gaining Access to Diverse Data).ppt
 
ENCh26.ppt
ENCh26.pptENCh26.ppt
ENCh26.ppt
 
unit_5_XML data integration database management
unit_5_XML data integration database managementunit_5_XML data integration database management
unit_5_XML data integration database management
 
Xml 1
Xml 1Xml 1
Xml 1
 
Xml intro1
Xml intro1Xml intro1
Xml intro1
 
Web Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdfWeb Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdf
 
Unit2_XML_S_SS_US Data_CS19414.pptx
Unit2_XML_S_SS_US Data_CS19414.pptxUnit2_XML_S_SS_US Data_CS19414.pptx
Unit2_XML_S_SS_US Data_CS19414.pptx
 
Introduction to xml schema
Introduction to xml schemaIntroduction to xml schema
Introduction to xml schema
 
Xml sasidhar
Xml  sasidharXml  sasidhar
Xml sasidhar
 
chapter 4 web authoring unit 4 xml.pptx
chapter 4 web authoring  unit 4 xml.pptxchapter 4 web authoring  unit 4 xml.pptx
chapter 4 web authoring unit 4 xml.pptx
 
1 xml fundamentals
1 xml fundamentals1 xml fundamentals
1 xml fundamentals
 
distributed system concerned lab sessions
distributed system concerned lab sessionsdistributed system concerned lab sessions
distributed system concerned lab sessions
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Xml
XmlXml
Xml
 
Innovative way for normalizing xml document
Innovative way for normalizing xml documentInnovative way for normalizing xml document
Innovative way for normalizing xml document
 

More from dikshagupta111

More from dikshagupta111 (10)

Osd diksha presentation
Osd diksha presentationOsd diksha presentation
Osd diksha presentation
 
Dik seminar
Dik seminarDik seminar
Dik seminar
 
Diksha sda presentation
Diksha sda presentationDiksha sda presentation
Diksha sda presentation
 
Dik acn presentation
Dik acn presentationDik acn presentation
Dik acn presentation
 
Final ppt
Final pptFinal ppt
Final ppt
 
Ppt final
Ppt finalPpt final
Ppt final
 
Diksha gupta
Diksha guptaDiksha gupta
Diksha gupta
 
Hpd 1
Hpd 1Hpd 1
Hpd 1
 
Parallel language &amp; compilers
Parallel language &amp; compilersParallel language &amp; compilers
Parallel language &amp; compilers
 
Final ppt
Final pptFinal ppt
Final ppt
 

Recently uploaded

Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spaintimesproduction05
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSrknatarajan
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 

Recently uploaded (20)

Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 

Hpd ppt

  • 1. HPD Presentation Semi-Structured data & XML Presented by- Diksha R. Gupta Roll no.:- 7
  • 2.
  • 3. Semistructured Data  Another data model, based on trees.  Motivation: flexible representation of data. ◦ Often, data comes from multiple sources with differences in notation, meaning, etc.  Motivation: sharing of documents among systems and databases. 3
  • 4. Graphs of Semistructured Data  Nodes = objects.  Labels on arcs (attributes, relationships).  Atomic values at leaf nodes (nodes with no arcs out).  Flexibility: no restriction on: ◦ Labels out of a node. ◦ Number of successors with a given label. 4
  • 5.
  • 6.
  • 7. XML  XML = Extensible Markup Language.  While HTML uses tags for formatting (e.g., “italic”), XML uses tags for semantics (e.g., “this is an address”).  Key idea: create tag sets for a domain (e.g., genomics), and translate all data into properly tagged XML documents. 7
  • 8. HTML and XML 8 XML stands for extensible Markup Language HTML is used to mark up text so it can be displayed to users XML is used to mark up data so it can be processed by computers HTML describes both structure (e.g. <p>, <h2>, <tr>,<td>) and appearance (e.g. <br>, <font>, <i>) XML describes only content, or “meaning” HTML uses a fixed, unchangeable set of tags In XML, you make up your own tags
  • 9. HTML <h1> Bibliography </h1> <p> <i> Foundations of Databases </i> Abiteboul, Hull, Vianu <br> Addison Wesley, 1995 <p> <i> Data on the Web </i> Abiteboul, Buneman, Suciu <br> Morgan Kaufmann, 1999
  • 10. XML <bibliography> <book> <title> Foundations… </title> <author> Abiteboul </author> <author> Hull </author> <author> Vianu </author> <publisher> Addison Wesley </publisher> <year> 1995 </year> </book> … </bibliography> XML describes the content
  • 11.
  • 12. Well-Formed and Valid XML  Well-Formed XML allows you to invent your own tags. ◦ Similar to labels in semistructured data.  Valid XML involves a DTD (Document Type Definition), a grammar for tags. 12
  • 13. Well-Formed XML  Start the document with a declaration, surrounded by <?xml … ?> .  Normal declaration is: <?xml version = “1.0” standalone = “yes” ?> ◦ “Standalone” = “no DTD provided.”  Balance of document is a root tag surrounding nested tags. 13
  • 14. Tags  Tags, as in HTML, are normally matched pairs, as <FOO> … </FOO> .  Tags may be nested arbitrarily.  XML tags are case sensitive. 14
  • 15. XML and Semistructured Data  Well-Formed XML with nested tags is exactly the same idea as trees of semi- structured data.  We shall see that XML also enables non tree structures, as does the semi-structured data model. 15
  • 16. Example  The <BARS> XML document is: 16 Joe’s Bar Bud 2.50 Miller 3.00 PRICE BAR BAR BARS NAME . . . BAR PRICE NAME BEER BEER NAME
  • 17. Slide 27- 17 XML Hierarchical (Tree) Data Model (contd.)  The basic object is XML is the XML document.  There are two main structuring concepts that are used to construct an XML document: ◦ Elements ◦ Attributes  Attributes in XML provide additional information that describe elements.
  • 18. Slide 27- 18 XML Hierarchical (Tree) Data Model (contd.)  As in HTML, elements are identified in a document by their start tag and end tag. ◦ The tag names are enclosed between angled brackets <…>, and end tags are further identified by a backslash </…>.  Complex elements are constructed from other elements hierarchically, whereas simple elements contain data values.  It is straightforward to see the correspondence between the XML textual representation and the tree structure. ◦ In the tree representation, internal nodes represent complex elements, whereas leaf nodes represent simple elements. ◦ That is why the XML model is called a tree model or a hierarchical model.
  • 19. Slide 27- 19 XML Hierarchical (Tree) Data Model (contd.)  It is possible to characterize three main types of XML documents: 1. Data-centric XML documents  These documents have many small data items that follow a specific structure, and hence may be extracted from a structured database. They are formatted as XML documents in order to exchange them or display them over the Web. 2. Document-centric XML documents:  These are documents with large amounts of text, such as news articles or books. There is little or no structured data elements in these documents. 3. Hybrid XML documents:  These documents may have parts that contains structured data and other parts that are predominantly textual or unstructured.
  • 20.
  • 21.
  • 22. DTD Structure <!DOCTYPE <root tag> [ <!ELEMENT <name>(<components>)> . . . more elements . . . ]> 22
  • 23. DTD Elements  The description of an element consists of its name (tag), and a parenthesized description of any nested tags. ◦ Includes order of subtags and their multiplicity.  Leaves (text elements) have #PCDATA (Parsed Character DATA ) in place of nested tags. 23
  • 24. Example: DTD <!DOCTYPE BARS [ <!ELEMENT BARS (BAR*)> <!ELEMENT BAR (NAME, BEER+)> <!ELEMENT NAME (#PCDATA)> <!ELEMENT BEER (NAME, PRICE)> <!ELEMENT PRICE (#PCDATA)> ]> 24 A BARS object has zero or more BAR’s nested within. A BAR has one NAME and one or more BEER subobjects. A BEER has a NAME and a PRICE. NAME and PRICE are text.
  • 25. Element Descriptions  Sub tags must appear in order shown.  A tag may be followed by a symbol to indicate its multiplicity. ◦ * = zero or more. ◦ + = one or more. ◦ ? = zero or one.  Symbol | can connect alternative sequences of tags. 25
  • 26.
  • 27. XML Schema  In XML format  Element names and types associated locally  Includes primitive data types (integers, strings, dates, etc.)  Supports value-based constraints (integers > 100)  User-definable structured types  Inheritance (extension or restriction)  Foreign keys  Element-type reference constraints
  • 28. Sample XML Schema <schema version=“1.0” xmlns=“http://www.w3.org/1999/XMLSchema”> <element name=“author” type=“string” /> <element name=“date” type = “date” /> <element name=“abstract”> <type> … </type> </element> <element name=“paper”> <type> <attribute name=“keywords” type=“string”/> <element ref=“author” minOccurs=“0” maxOccurs=“*” /> <element ref=“date” /> <element ref=“abstract” minOccurs=“0” maxOccurs=“1” /> <element ref=“body” /> </type> </element> </schema>