Outline ■Structure of XML Data ■XML Document Schema Querying and Transformation Application Program Interfaces to XML ■Storage of XML Data XML Applications Database System Concepts-7th Edition 30.2 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 30.2 ©Silberschatz, Korth and Sudarshan th Edition Outline ▪ Structure of XML Data ▪ XML Document Schema ▪ Querying and Transformation ▪ Application Program Interfaces to XML ▪ Storage of XML Data ▪ XML Applications
Introduction XML:Extensible Markup Language Defined by the WWConsortium(W3C) Derived from SGML(Standard Generalized Markup Language),but simpler to use than 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 Database System Concepts-7th Edition 30.3 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 30.3 ©Silberschatz, Korth and Sudarshan th Edition Introduction ▪ XML: Extensible Markup Language ▪ Defined by the WWW Consortium (W3C) ▪ Derived from SGML (Standard Generalized Markup Language), but simpler to use than 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
XML Introduction (Cont.) The ability to specify new tags,and to create nested tag structures make XML a great way to exchange data,not just documents. Much of the use of XML has been in data exchange applications,not as a replacement for HTML Tags make data(relatively)self-documenting ·E.g, <university> <department> <dept name>Comp.Sci.</dept name> <building>Taylor </building> <budget>100000 </budget> </department> <course> <course id>CS-101 </course id> <title>Intro.to Computer Science </title> <dept_name>Comp.Sci </dept_name> <credits>4 </credits> </course> </university> Database System Concepts-7th Edition 30.4 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 30.4 ©Silberschatz, Korth and Sudarshan th Edition XML Introduction (Cont.) ▪ The ability to specify new tags, and to create nested tag structures make XML a great way to exchange data, not just documents. • Much of the use of XML has been in data exchange applications, not as a replacement for HTML ▪ Tags make data (relatively) self-documenting • E.g., <university> <department> <dept_name> Comp. Sci. </dept_name> <building> Taylor </building> <budget> 100000 </budget> </department> <course> <course_id> CS-101 </course_id> <title> Intro. to Computer Science </title> <dept_name> Comp. Sci </dept_name> <credits> 4 </credits> </course> </university>
XML:Motivation Data interchange is critical in today's networked world ·Examples: Banking:funds transfer Order processing (especially inter-company orders) Scientific data Chemistry:ChemML,... Genetics:BSML (Bio-Sequence Markup Language),.. 。 Paper flow of information between organizations is being replaced by electronic flow of information Each application area has its own set of standards for representing information XML has become the basis for all new generation data interchange formats Database System Concepts-7th Edition 30.5 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 30.5 ©Silberschatz, Korth and Sudarshan th Edition XML: Motivation ▪ Data interchange is critical in today’s networked world • Examples: ▪ Banking: funds transfer ▪ Order processing (especially inter-company orders) ▪ Scientific data • Chemistry: ChemML, … • Genetics: BSML (Bio-Sequence Markup Language), … • Paper flow of information between organizations is being replaced by electronic flow of information ▪ Each application area has its own set of standards for representing information ▪ XML has become the basis for all new generation data interchange formats
XML Motivation (Cont.) Earlier generation formats were based on plain text with line headers indicating the meaning of fields Similar in concept to email headers ·Does not allow for nested structures,no standard“type”language Tied too closely to low level document structure (lines,spaces,etc) Each XML based standard defines what are valid elements,using XML type specification languages to specify the syntax DTD(Document Type Descriptors) XML Schema Plus textual descriptions of the semantics XML allows new tags to be defined as required However,this may be constrained by DTDs A wide variety of tools is available for parsing,browsing and querying XML documents/data Database System Concepts-7th Edition 30.6 @Silberschatz,Korth and Sudarshan
Database System Concepts - 7 30.6 ©Silberschatz, Korth and Sudarshan th Edition XML Motivation (Cont.) ▪ Earlier generation formats were based on plain text with line headers indicating the meaning of fields • Similar in concept to email headers • Does not allow for nested structures, no standard “type” language • Tied too closely to low level document structure (lines, spaces, etc) ▪ Each XML based standard defines what are valid elements, using • XML type specification languages to specify the syntax ▪ DTD (Document Type Descriptors) ▪ XML Schema • Plus textual descriptions of the semantics ▪ XML allows new tags to be defined as required • However, this may be constrained by DTDs ▪ A wide variety of tools is available for parsing, browsing and querying XML documents/data