Presentation is loading. Please wait.

Presentation is loading. Please wait.

Management of XML and Semistructured Data

Similar presentations


Presentation on theme: "Management of XML and Semistructured Data"— Presentation transcript:

1 Management of XML and Semistructured Data
10/23/03

2 XML a W3C standard to complement HTML origins: structured text SGML
motivation: HTML describes presentation XML describes content has Technical Report with syntax defn

3 Why XML? SELF-DESCRIBING DATA
INTEGRATION OF TRADITIONAL DATABASES AND FORMATS MODIFICATIONS TO DATA PRESENTATION - NO REPROGRAMMING REQUIRED ONE-SERVER VIEW OF DISTRIBUTED DATA INTERNATIONALIZATION OPEN AND EXTENSIBLE FUTURE-ORIENTED TECHNOLOGY

4 From HTML to XML HTML describes the presentation

5 HTML <h1> Bibliography </h1>
<p> <i> Foundations of Databases </i> Abiteboul, Hull, Vianu <br> Addison Wesley, 1995 <p> <i> Data on the Web </i> Abiteoul, Buneman, Suciu <br> Morgan Kaufmann, 1999

6 XML XML describes the content <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

7 XML EXAMPLE <?xml version="1.0"?> <!DOCTYPE PARENT [ <!ELEMENT PARENT (CHILD*)> <!ELEMENT CHILD (MARK?,NAME+)> <!ELEMENT MARK EMPTY> <!ELEMENT NAME (LASTNAME+,FIRSTNAME+)*> <!ELEMENT LASTNAME (#PCDATA)> <!ELEMENT FIRSTNAME (#PCDATA)> <!ATTLIST MARK NUMBER ID #REQUIRED LISTED CDATA #FIXED "yes" TYPE (natural|adopted) "natural"> <!ENTITY STATEMENT "This is well-formed XML"> ]> <PARENT> &STATEMENT; <CHILD> <MARK NUMBER="1" LISTED="yes" TYPE="natural"/> <NAME> <LASTNAME>child</LASTNAME> <FIRSTNAME>second</FIRSTNAME> </NAME> </CHILD> </PARENT>

8 XML Terminology tags: book, title, author, …
start tag: <book>, end tag: </book> elements: <book>…<book>,<author>…</author> elements are nested empty element: <red></red> abbrv. <red/> an XML document: single root element well formed XML document: if it has matching tags

9 More XML: Attributes <book price = “55” currency = “USD”>
<title> Foundations of Databases </title> <author> Abiteboul </author> <year> 1995 </year> </book> attributes are alternative ways to represent data

10 More XML: Oids and References
<person id=“o555”> <name> Jane </name> </person> <person id=“o456”> <name> Mary </name> <children idref=“o123 o555”/> </person> <person id=“o123” mother=“o456”><name>John</name> oids and references in XML are just syntax

11 More XML: CDATA Section
Syntax: <![CDATA[ .....any text here...]]> Example: <example> <![CDATA[ some text here </notAtag> <>]]> </example>

12 More XML: Entity References
Syntax: &entityname; Example: <element> this is less than < </element> Some entities: < > & & &apos; " & Unicode char

13 More XML: Processing Instructions
Syntax: <?target argument?> Example: <product> <name> Alarm Clock </name> <?ringBell 20?> <price> </price> </product> What do they mean ?

14 More XML: Comments Syntax <!-- .... Comment text... -->
Yes, they are part of the data model !!!

15 XML Namespaces syntactic: <number> , <isbn:number>
semantic: provide URL for schema <tag xmlns:mystyle = “ <mystyle:title> … </mystyle:title> <mystyle:number> … </tag> defined here

16 XML Namespaces http://www.w3.org/TR/REC-xml-names (1/99)
name ::= [prefix:]localpart <book xmlns:isbn=“ <title> … </title> <number> 15 </number> <isbn:number> …. </isbn:number> </book>

17 Textbooks Data on the Web: from Relations, to Semistructured Data and XML, Abiteboul, Buneman, Suciu For foundations W3C homepage, For current standards Professional XML Databases, Kevin Williams For current XML technologies


Download ppt "Management of XML and Semistructured Data"

Similar presentations


Ads by Google