Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML – a data sharing standard DSC340 Mike Pangburn.

Similar presentations


Presentation on theme: "XML – a data sharing standard DSC340 Mike Pangburn."— Presentation transcript:

1 XML – a data sharing standard DSC340 Mike Pangburn

2 Data-sharing challenge Companies need to “talk” across different locations/systems and software Most database systems (and other software applications, e.g., Excel) can read text files formatted as XML.

3 Blind Men and Elephants

4 The ol’ standby: tab (or comma) delimited data… Who: authored it? to contact about data? What: are contents of database? When: was it collected? processed? finalized? Where: was the study done? Why: was the data collected? How: were data collected? processed? Verified? … can be pretty useless!

5 Metadata Literally, “data about data” a set of data that describes and gives information about other data ― Oxford English Dictionary

6 Early Example of Metadata

7 Is HTML a good way to share data? Bibliography Foundations of Databases Abiteboul, Hull, Vianu Addison Wesley, 1995 Data on the Web Abiteoul, Buneman, Suciu Morgan Kaufmann, 1999 Bibliography Foundations of Databases Abiteboul, Hull, Vianu Addison Wesley, 1995 Data on the Web Abiteoul, Buneman, Suciu Morgan Kaufmann, 1999

8 XML: Tags provide meaning (metadata) Foundations… Abiteboul Hull Vianu Addison Wesley 1995 …

9 XML vs. HTML HTML DELTA 101 Atlanta Brussels flight information XML DELTA 101 Atlanta Brussels flight information

10 Another example: iTunes Library is XML Track ID 617 Name Take Five Artist Dave Brubeck Quartet Album Time Out Genre Jazz Kind AAC audio file Size 5892093 Total Time 363578 ….

11 Acct./Fin XML example XBRL (eXtensible Business Reporting Language) is a language for the electronic communication of business and financial data. For example, company net profit has its own unique tag. Edgar Online (SEC company information) uses XBRL The solution will allow users to request XBRL formatted data for all US equities from within Microsoft Excel, custom templates, and the web.

12 HTML vs. XML HTML started with very few tags, but… HTML now has many tags, and more keep being added over time Messy, yet not customizable XML has very few standard tags You add custom tags that are particular to your data needs

13 XML helps solves the “Is this an elephant?” problem

14 The following code is legal in HTML: This is a paragraph This is another paragraph In XML all elements must have a closing tag like this: This is a paragraph This is another paragraph Opening and closing tags must have the same case: This is correct This is incorrect More strict tagging rules than HTML

15 In HTML, improperly nested tags like the following are frowned upon, but will not cause an error: This text is bold and italic In XML all elements must be properly nested within each other like this This text is bold and italic More strict tagging rules than HTML

16 Visualizing XML data: a “Tree” <data> Mary Maple 345 Seattle John Thailand 23456 </data> data Mary person name address name address streetnocity Maple345 Seattle John Thai phone 23456 id o555 Element node Value node Attribute node

17 Database data vs. XML Data John 3634 Sue 6343 Dick 6363 John 3634 Sue 6343 Dick 6363 row name phone “John”3634“Sue”“Dick”63436363 XML: persons Database table:

18 XML data can usually fit a DBMS table… Consider the case of: missing attributes An acceptable fit with table Even though blanks are deemed a bit undesirable in database tables John John 1234 1234 Joe Joe </person>  no phone ! namephone John1234 Joe-

19 …but the fit is not always good Problematic case: Repeated attributes A poor fit with table, because database- design rule is that you should not have two columns with the same name: Mary Mary 2345 2345 3456 3456 </person>  two phones ! namephone Mary23453456 If XML data had distinct “home” and “cell” columns, the issue goes away

20 Formatting (visualizing) XML data Formatting (visualizing in a web page) XML data requires a separate file What is that separate file? It’s called a “style sheet” There are a couple different standards for style sheets XML-specific standard: XSL Flexible standard: CSS CSS can be used with both.xml and.html files We will look at CSS after XML


Download ppt "XML – a data sharing standard DSC340 Mike Pangburn."

Similar presentations


Ads by Google