SlideShare una empresa de Scribd logo
1 de 16
XML
Data Modeling
Document Modeling
A document model defines a set of element names and attributes
that can appear in an XML document.
A document model, more formally and generally known as a data
model, describes the logical structure of a set of data.
The data model specifies which information a data set contains in
terms of the names of the fields, which data each field can contain,
and the relationships between fields and other sets of data.
Document Model
-You want to define an XML vocabulary, and you need to ensure that
people can computers produce XML documents that conform on the
vocabulary.
-You want to reduce the cost of creating a new XML-aware
application.
-You want to ensure that XML documents meet a certain level of
quality, in terms of their structure and the data that they contain.
-XML documents are created by people or other applications and are
consumed (read) by other applications.
A data model becomes important in the
following scenarios:
There are three major technologies that you can use to create a data
model for your XML documents:
-DTD
-XDR Schema
-XML Schema
Types of Data Models
DTD, or Document Type Definition, is a technology that’s part of the
XML specification. This means that all validating XML parsers must be
able to read and work with a DTD.
A validating XML parser can not only read XML documents, but verify
that they conform to a specific schema.
Data Modeling with DTD
<?xml version=“1.0” encoding=“UTF-8”?>
<!– The DTD follows... -->
<!DOCTYPE people
[
<!ELEMENT people (person+)>
<!ELEMENT person (name)>
<!ELEMENT name (first, last)>
<!ELEMENT first (#PCDATA)>
<!ELEMENT last (#PCDATA)>
]>
Example of a DTD
<!–- The XML data begins here... -->
<people>
<person>
<name>
<first>Erik</first>
<last>Westermann</last>
</name>
</person>
<person>
<name>
<first>Tom</first>
<last>Archer</last>
</name>
</person>
</people>
-DTDs use a specialized syntax that’s different from XML, making
them more difficult to learn for people without a background in SGML
or XML
-DTDs don’t allow you to specify which type of data an element can
contain.
-DTDs have a fixed, non-extensible content model that doesn’t allow
developers to create new elements and attributes.
-DTDs don’t support namespaces.
Disadvantages of DTD
XDR, or XML Data Reduced, is an XML vocabulary invented by
Microsoft taht allows you to describe the schema of an XML
document.
The XDR describes that schema in terms of not only the document’s
content, but also which types of content are contained in the
document’s elements.
The primary drawback to using XDR is that it’s limited to Microsoft
products and technologies – other vendors don’t support XDR.
Data Modeling with XDR Schema
<?xml version=“1.0” encoding=“UTF-8”?>
<Schema name=“Untitled-schema”
xmlns=“urn:schemas-microsfot-com:xml-data”
xmlns:dt=“urn:schemas-microsoft-com:datatypes”>
<ElementType name=“people” model=“closed” content=“eltOnly” order=“seq”>
<AttributeType name=“xmlns” dt:type=“string”/>
<attribute type=“xmlns”/>
<element type=“person” minOccurs=“1” maxOccurs=“*” />
</ElementType>
<ElementType name=“person” model=“closed” content=“eltOnly” order=“seq”>
<element type=“name” minOccurs=“1” maxOccurs=“1” />
</ElementType>
An Example of XDR
<ElementType name=“name” model=“closed” content=“eltOnly” order=“seq”>
<element type=“first” minOccurs=“1” maxOccurs=“1” />
<element type=“last” minOccurs=“1” maxOccurs=“1” />
</ElementType>
<ElementType name=“first” model=“closed” content=“textOnly”
dt:type=“string”/>
<ElementType name=“last” model=“closed” content=“textOnly”
dt:type=“string”/>
</Schema>
XSD, the XML Schema Definition, is a W3C recommendation that
allows you to describe XML schemas using an XML vocabulary.
The XSD describes the XML Document in terms of its data types.
Data Modeling with XSD
<?xml version=“1.0” encoding=“UTF-8”?>
<xs:schema xmlns:xs=“http://www.w3.org/2001/XMLSchema”
elementFormDefault=“qualified”>
<xs:element name=“first” type=“xs:string”/>
<xs:element name=“last” type=“xs:string”/>
<xs:element name=“name”>
<xs:complexType>
<xs:sequence>
<xs:element ref=“first”/>
<xs:element ref=“last”/>
</xs:sequence>
</xs:complexType>
</xs:element>
An Example of XSD
<xs:element name=“people”>
<xs:complexType>
<xs:sequence>
<xs:element ref=“person” maxOccurs=“unbounded”/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name=“person”>
<xs:complexType>
<xs:sequence>
<xs:element ref=“name”/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
DTDs
-Have been around for a long time and enjoy broad support from a
wide range of products and vendors
-Generally well-understood
XDR
-Microsoft-specific technology. Limited support in the industry.
XSD
-W3C Standard. Broader acceptance from vendors.
-New in the market.
Which Dat Modelling Schema Should I use?

Más contenido relacionado

La actualidad más candente (20)

All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
 
Xml namespace
Xml namespaceXml namespace
Xml namespace
 
Function in PL/SQL
Function in PL/SQLFunction in PL/SQL
Function in PL/SQL
 
RDBMS
RDBMSRDBMS
RDBMS
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
 
NOSQL vs SQL
NOSQL vs SQLNOSQL vs SQL
NOSQL vs SQL
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modeling
 
NoSQL and MapReduce
NoSQL and MapReduceNoSQL and MapReduce
NoSQL and MapReduce
 
Database
DatabaseDatabase
Database
 
SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
 
DOM and SAX
DOM and SAXDOM and SAX
DOM and SAX
 
Code generation in Compiler Design
Code generation in Compiler DesignCode generation in Compiler Design
Code generation in Compiler Design
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database Model
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Object oriented databases
Object oriented databasesObject oriented databases
Object oriented databases
 
SQL
SQLSQL
SQL
 

Similar a XML - Data Modeling

Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faqxavier john
 
Applied xml programming for microsoft 3
Applied xml programming for microsoft 3Applied xml programming for microsoft 3
Applied xml programming for microsoft 3Raghu nath
 
Enhanced xml validation using srml01
Enhanced xml validation using srml01Enhanced xml validation using srml01
Enhanced xml validation using srml01IJwest
 
Catalog-based Conversion from Relational Database into XML Schema (XSD)
Catalog-based Conversion from Relational Database into XML Schema (XSD)Catalog-based Conversion from Relational Database into XML Schema (XSD)
Catalog-based Conversion from Relational Database into XML Schema (XSD)CSCJournals
 
Xml viva questions
Xml viva questionsXml viva questions
Xml viva questionsVipul Naik
 
advDBMS_XML.pptx
advDBMS_XML.pptxadvDBMS_XML.pptx
advDBMS_XML.pptxIreneGetzi
 
A Survey on Heterogeneous Data Exchange using Xml
A Survey on Heterogeneous Data Exchange using XmlA Survey on Heterogeneous Data Exchange using Xml
A Survey on Heterogeneous Data Exchange using XmlIRJET Journal
 
eXtensible Markup Language
eXtensible Markup LanguageeXtensible Markup Language
eXtensible Markup LanguageAditya Raj
 
Innovative way for normalizing xml document
Innovative way for normalizing xml documentInnovative way for normalizing xml document
Innovative way for normalizing xml documentAlexander Decker
 
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
 
distributed system concerned lab sessions
distributed system concerned lab sessionsdistributed system concerned lab sessions
distributed system concerned lab sessionsmilkesa13
 

Similar a XML - Data Modeling (20)

Er2000
Er2000Er2000
Er2000
 
Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faq
 
XML1.pptx
XML1.pptxXML1.pptx
XML1.pptx
 
Applied xml programming for microsoft 3
Applied xml programming for microsoft 3Applied xml programming for microsoft 3
Applied xml programming for microsoft 3
 
Enhanced xml validation using srml01
Enhanced xml validation using srml01Enhanced xml validation using srml01
Enhanced xml validation using srml01
 
Catalog-based Conversion from Relational Database into XML Schema (XSD)
Catalog-based Conversion from Relational Database into XML Schema (XSD)Catalog-based Conversion from Relational Database into XML Schema (XSD)
Catalog-based Conversion from Relational Database into XML Schema (XSD)
 
Xml viva questions
Xml viva questionsXml viva questions
Xml viva questions
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
XML
XML XML
XML
 
XML Schema.pptx
XML Schema.pptxXML Schema.pptx
XML Schema.pptx
 
Xml Overview
Xml OverviewXml Overview
Xml Overview
 
XML Databases.ppt
XML Databases.pptXML Databases.ppt
XML Databases.ppt
 
XML Unit 01
XML Unit 01XML Unit 01
XML Unit 01
 
advDBMS_XML.pptx
advDBMS_XML.pptxadvDBMS_XML.pptx
advDBMS_XML.pptx
 
A Survey on Heterogeneous Data Exchange using Xml
A Survey on Heterogeneous Data Exchange using XmlA Survey on Heterogeneous Data Exchange using Xml
A Survey on Heterogeneous Data Exchange using Xml
 
eXtensible Markup Language
eXtensible Markup LanguageeXtensible Markup Language
eXtensible Markup Language
 
Innovative way for normalizing xml document
Innovative way for normalizing xml documentInnovative way for normalizing xml document
Innovative way for normalizing xml document
 
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
 
Bt0078
Bt0078Bt0078
Bt0078
 
distributed system concerned lab sessions
distributed system concerned lab sessionsdistributed system concerned lab sessions
distributed system concerned lab sessions
 

Más de Joel Briza

Management Information Systems - Chapter 3
Management Information Systems - Chapter 3Management Information Systems - Chapter 3
Management Information Systems - Chapter 3Joel Briza
 
Management Information Systems - Chapter 2
Management Information Systems - Chapter 2Management Information Systems - Chapter 2
Management Information Systems - Chapter 2Joel Briza
 
Management Information Technology - Chapter 1
Management Information Technology - Chapter 1Management Information Technology - Chapter 1
Management Information Technology - Chapter 1Joel Briza
 
System analysis and design Part2
System analysis and design Part2System analysis and design Part2
System analysis and design Part2Joel Briza
 
System Analysis and Design
System Analysis and DesignSystem Analysis and Design
System Analysis and DesignJoel Briza
 
Web programming and development - Introduction
Web programming and development - IntroductionWeb programming and development - Introduction
Web programming and development - IntroductionJoel Briza
 
Business software packages mkis
Business software packages   mkisBusiness software packages   mkis
Business software packages mkisJoel Briza
 
Network security Encryption
Network security EncryptionNetwork security Encryption
Network security EncryptionJoel Briza
 
Business software packages - Accounting Software Systems
Business software packages - Accounting Software SystemsBusiness software packages - Accounting Software Systems
Business software packages - Accounting Software SystemsJoel Briza
 
Business software packages
Business software packagesBusiness software packages
Business software packagesJoel Briza
 
Database management systems
Database management systemsDatabase management systems
Database management systemsJoel Briza
 

Más de Joel Briza (11)

Management Information Systems - Chapter 3
Management Information Systems - Chapter 3Management Information Systems - Chapter 3
Management Information Systems - Chapter 3
 
Management Information Systems - Chapter 2
Management Information Systems - Chapter 2Management Information Systems - Chapter 2
Management Information Systems - Chapter 2
 
Management Information Technology - Chapter 1
Management Information Technology - Chapter 1Management Information Technology - Chapter 1
Management Information Technology - Chapter 1
 
System analysis and design Part2
System analysis and design Part2System analysis and design Part2
System analysis and design Part2
 
System Analysis and Design
System Analysis and DesignSystem Analysis and Design
System Analysis and Design
 
Web programming and development - Introduction
Web programming and development - IntroductionWeb programming and development - Introduction
Web programming and development - Introduction
 
Business software packages mkis
Business software packages   mkisBusiness software packages   mkis
Business software packages mkis
 
Network security Encryption
Network security EncryptionNetwork security Encryption
Network security Encryption
 
Business software packages - Accounting Software Systems
Business software packages - Accounting Software SystemsBusiness software packages - Accounting Software Systems
Business software packages - Accounting Software Systems
 
Business software packages
Business software packagesBusiness software packages
Business software packages
 
Database management systems
Database management systemsDatabase management systems
Database management systems
 

Último

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2
 

Último (20)

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 

XML - Data Modeling

  • 3. A document model defines a set of element names and attributes that can appear in an XML document. A document model, more formally and generally known as a data model, describes the logical structure of a set of data. The data model specifies which information a data set contains in terms of the names of the fields, which data each field can contain, and the relationships between fields and other sets of data. Document Model
  • 4. -You want to define an XML vocabulary, and you need to ensure that people can computers produce XML documents that conform on the vocabulary. -You want to reduce the cost of creating a new XML-aware application. -You want to ensure that XML documents meet a certain level of quality, in terms of their structure and the data that they contain. -XML documents are created by people or other applications and are consumed (read) by other applications. A data model becomes important in the following scenarios:
  • 5. There are three major technologies that you can use to create a data model for your XML documents: -DTD -XDR Schema -XML Schema Types of Data Models
  • 6. DTD, or Document Type Definition, is a technology that’s part of the XML specification. This means that all validating XML parsers must be able to read and work with a DTD. A validating XML parser can not only read XML documents, but verify that they conform to a specific schema. Data Modeling with DTD
  • 7. <?xml version=“1.0” encoding=“UTF-8”?> <!– The DTD follows... --> <!DOCTYPE people [ <!ELEMENT people (person+)> <!ELEMENT person (name)> <!ELEMENT name (first, last)> <!ELEMENT first (#PCDATA)> <!ELEMENT last (#PCDATA)> ]> Example of a DTD
  • 8. <!–- The XML data begins here... --> <people> <person> <name> <first>Erik</first> <last>Westermann</last> </name> </person> <person> <name> <first>Tom</first> <last>Archer</last> </name> </person> </people>
  • 9. -DTDs use a specialized syntax that’s different from XML, making them more difficult to learn for people without a background in SGML or XML -DTDs don’t allow you to specify which type of data an element can contain. -DTDs have a fixed, non-extensible content model that doesn’t allow developers to create new elements and attributes. -DTDs don’t support namespaces. Disadvantages of DTD
  • 10. XDR, or XML Data Reduced, is an XML vocabulary invented by Microsoft taht allows you to describe the schema of an XML document. The XDR describes that schema in terms of not only the document’s content, but also which types of content are contained in the document’s elements. The primary drawback to using XDR is that it’s limited to Microsoft products and technologies – other vendors don’t support XDR. Data Modeling with XDR Schema
  • 11. <?xml version=“1.0” encoding=“UTF-8”?> <Schema name=“Untitled-schema” xmlns=“urn:schemas-microsfot-com:xml-data” xmlns:dt=“urn:schemas-microsoft-com:datatypes”> <ElementType name=“people” model=“closed” content=“eltOnly” order=“seq”> <AttributeType name=“xmlns” dt:type=“string”/> <attribute type=“xmlns”/> <element type=“person” minOccurs=“1” maxOccurs=“*” /> </ElementType> <ElementType name=“person” model=“closed” content=“eltOnly” order=“seq”> <element type=“name” minOccurs=“1” maxOccurs=“1” /> </ElementType> An Example of XDR
  • 12. <ElementType name=“name” model=“closed” content=“eltOnly” order=“seq”> <element type=“first” minOccurs=“1” maxOccurs=“1” /> <element type=“last” minOccurs=“1” maxOccurs=“1” /> </ElementType> <ElementType name=“first” model=“closed” content=“textOnly” dt:type=“string”/> <ElementType name=“last” model=“closed” content=“textOnly” dt:type=“string”/> </Schema>
  • 13. XSD, the XML Schema Definition, is a W3C recommendation that allows you to describe XML schemas using an XML vocabulary. The XSD describes the XML Document in terms of its data types. Data Modeling with XSD
  • 14. <?xml version=“1.0” encoding=“UTF-8”?> <xs:schema xmlns:xs=“http://www.w3.org/2001/XMLSchema” elementFormDefault=“qualified”> <xs:element name=“first” type=“xs:string”/> <xs:element name=“last” type=“xs:string”/> <xs:element name=“name”> <xs:complexType> <xs:sequence> <xs:element ref=“first”/> <xs:element ref=“last”/> </xs:sequence> </xs:complexType> </xs:element> An Example of XSD
  • 15. <xs:element name=“people”> <xs:complexType> <xs:sequence> <xs:element ref=“person” maxOccurs=“unbounded”/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name=“person”> <xs:complexType> <xs:sequence> <xs:element ref=“name”/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
  • 16. DTDs -Have been around for a long time and enjoy broad support from a wide range of products and vendors -Generally well-understood XDR -Microsoft-specific technology. Limited support in the industry. XSD -W3C Standard. Broader acceptance from vendors. -New in the market. Which Dat Modelling Schema Should I use?