Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
XML: Extensible Markup Language
An Introduction to XML Based on the W3C XML Recommendations.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 346 Day 24.
History Leading to XHTML
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
Document Type Definitions
Extensible Markup Language XML MIS 520 – Database Theory Fall 2001 (Day) Lecture 14.
1 COS 425: Database and Information Management Systems XML and information exchange.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic XML.
XML Introduction What is XML –XML is the eXtensible Markup Language –Became a W3C Recommendation in 1998 –Tag-based syntax, like HTML –You get to make.
Tutorial 11 Creating XML Document
XML Primer. 2 History: SGML vs. HTML vs. XML SGML (1960) XML(1996) HTML(1990) XHTML(2000)
Document Type Definitions. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Introduction to XML This material is based heavily on the tutorial by the same name at
1 Advanced Topics XML and Databases. 2 XML u Overview u Structure of XML Data –XML Document Type Definition DTD –Namespaces –XML Schema u Query and Transformation.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
4/20/2017.
Aalborg University – Department of Production XML Extensible Markup Language Kaj A. Jørgensen Aalborg University, Department of Production XML – Extensible.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 XML Taken from Chapter 7.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
Lecture 6 of Advanced Databases XML Schema, Querying & Transformation Instructor: Mr.Ahmed Al Astal.
XML in SQL Server Overview XML is a key part of any modern data environment It can be used to transmit data in a platform, application neutral form.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
XML Overview. Chapter 8 © 2011 Pearson Education 2 Extensible Markup Language (XML) A text-based markup language (like HTML) A text-based markup language.
Extensible Markup and Beyond
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Address: Course Page:
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
Introduction to XML. XML - Connectivity is Key Need for customized page layout – e.g. filter to display only recent data Downloadable product comparisons.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
XP 1 DECLARING A DTD A DTD can be used to: –Ensure all required elements are present in the document –Prevent undefined elements from being used –Enforce.
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
Company LOGO OODB and XML Database Management Systems – Fall 2012 Matthew Moccaro.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
Winter 2006Keller, Ullman, Cushing18–1 Plan 1.Information integration: important new application that motivates what follows. 2.Semistructured data: a.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
Lecture 16 Introduction to XML Boriana Koleva Room: C54
1 Introduction to XML XML stands for Extensible Markup Language. Because it is extensible, XML has been used to create a wide variety of different markup.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
XML Design Goals 1.XML must be easily usable over the Internet 2.XML must support a wide variety of applications 3.XML must be compatible with SGML 4.It.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
Tutorial 13 Validating Documents with Schemas
The Semistructured-Data Model Programming Languages for XML Spring 2011 Instructor: Hassan Khosravi.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
The Web Wizard’s Guide to HTML Chapter One World Wide Web Basics.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Martin Kruliš by Martin Kruliš (v1.1)1.
Working with XML. Markup Languages Text-based languages based on SGML Text-based languages based on SGML SGML = Standard Generalized Markup Language SGML.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
CIS 228 The Internet 9/20/11 XHTML 1.0. “Quirks” Mode Today, all browsers support standards Compliant pages are displayed similarly There are multiple.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Web Design Terminology Unit 2 STEM. 1. Accessibility – a web page or site that address the users limitations or disabilities 2. Active server page (ASP)
Extensible Markup Language (XML) Pat Morin COMP 2405.
XML BASICS and more…. What is XML? In common:  XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed.
Unit 4 Representing Web Data: XML
XML in Web Technologies
Database Processing with XML
Chapter 7 Representing Web Data: XML
Presentation transcript:

Chapter 27 The World Wide Web and XML

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet An Overview of XML XML Data Definition XML Data Manipulation XML and Databases SQL Facilities

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-3 The Web and the Internet Often thought of as synonymous, the Web and the Internet refer to two different arenas The Web is a gigantic amorphous database The Internet is a giant network URL’s are used to locate resources on the network (Uniform Resource Locator/Identifier) Markup languages are used to interact with the database

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-4 Hypertext Hypertext Markup Language is a simple language for creating and displaying documents Hypertext Transfer Protocol(HTTP) is used to transfer these documents over the internet At each server data can be served up from system files, or from databases The databases on web servers can be SQL databases

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-5 XML XML provides extensions that permit the markup language to interact with hypertext as well as many other languages, including SQL, and so is useful when implementing web databases XML normally begins with a header called a declaration, followed by an element, consisting of start tag, character data, and end tag

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-6 XML XML normally begins with a header called a declaration, followed by an element, consisting of start tag, character data, and end tag XML declaration XML element start tag, character data, end tag Hello, World. greeting tag; kind=“succinct” XML attribute Attribute name is “kind”; value=“succinct”

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-7 XML History XML was created in 1996 to overcome limitations in SGML and HTML SGML is large and complicated HTML fails to separate structural, semantic, and formatting meta-data, and is not always “well-formed” XML has not supplanted HTML in web browsers, but is used in other areas, especially data interchange

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-8 XML History SGML is large and complicated. It allow user to define their own tags and give their meaning You Should specify the first parameter ……..

Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-9 XML Applications Purchase orders, parts catalogues, and inventory records can be expressed in XML A database could consist of XML documents only, but it would NOT be relational XML can be used to represent relations, which could facilitate interchange between the internet and relational databases

Copyright © 2004 Pearson Addison-Wesley. All rights reserved XML Applications P1 NUT RED> 12 LONDON P2 left-wing-part-10 th -part-Bolt Green 17 Paris

Copyright © 2004 Pearson Addison-Wesley. All rights reserved XML Applications An XML information set is a document hierarchy

Copyright © 2004 Pearson Addison-Wesley. All rights reserved XML Hierarchy The root node is the top, and it has children Each child has one parent Relations are structured; XML documents are said to be semi-structured, because its rules are looser An API to XML’s document object model supports retrieval, insertion, deletion and updates(pp901)

Copyright © 2004 Pearson Addison-Wesley. All rights reserved DTDs Document Type Definitions can be constructed using the DTD definition language DTDs are part of the XML standard A DTD can mirror the structure of a relation and then be used to format the output from queries In turn, the XML document produced can be used to generate a relation at the other end Text objects must be well-formed and valid

Copyright © 2004 Pearson Addison-Wesley. All rights reserved XML Applications Revised Version P1 NUT 12 Part COLOR is Red by Default P2 left-wing-part-10 th -part-Bolt Green 17

Copyright © 2004 Pearson Addison-Wesley. All rights reserved XML Applications 1. Revised Version <attribute Partuple CITY(LONDON|Oslo|Paris) #required COLOR( Red|Green|Blue) “Red”> P1 5. NUT Part COLOR is Red by Default P2 left-wing-part-10 th -part-Bolt Green 17

Copyright © 2004 Pearson Addison-Wesley. All rights reserved Well-Formedness A textual object is well-formed if and only if: It conforms to the grammar defined in the XML standard Any textual object it references is well-formed Examples of fatal flaws: Start and end tags don’t match, or are missing More than one root element included

Copyright © 2004 Pearson Addison-Wesley. All rights reserved Validity A textual object is valid if and only if it is well-formed and it conforms to a specified DTD DTDs can support uniqueness and referential constraints via ID and IDREF attribute types These constraints do not function as keys, but can be used to transmit information from one relvar to another

Copyright © 2004 Pearson Addison-Wesley. All rights reserved Limitations of DTDs DTDs do not use XML syntax, and they cannot be processed by XML parsers Since everything in this arena is a character string, data type support is lacking They enforce an ordering of elements that is contra-relational They are still beneficial because they enforce a standard that is widely used

Copyright © 2004 Pearson Addison-Wesley. All rights reserved XML Schema XML Schema is an XML derivative, and can be interpreted by XML parsers Are written using a collection of names, from a name space ( The name space specification: xmlns:xsd=“ It is considerably more prolix XML can enforce primitive types and some derived types XML types have essentially no operators because “types” are still character strings

Copyright © 2004 Pearson Addison-Wesley. All rights reserved XML Schema XML Schema is an XML derivative, and can be interpreted by XML parsers It is considerably more prolix XML can enforce primitive types and some derived types XML types have essentially no operators because “types” are still character strings

Copyright © 2004 Pearson Addison-Wesley. All rights reserved XML Data Manipulation XQuery is based on Xpath, which means that it is a read-only facility for traversing XMLs hierarchical paths Because XQuery can report horizontal and vertical subsets, and combine the results, it is said to support “select, project, and join” XUpdate is in the early planning stages, but presumably will support updates For now, only proprietary solutions to update

Copyright © 2004 Pearson Addison-Wesley. All rights reserved XML and Databases Three approaches: Store XML documents as attributes Shred documents into attributes Store XML documents in “XML databases”

Copyright © 2004 Pearson Addison-Wesley. All rights reserved XML Documents as Attributes Define a new type, XMLDOC As a new type, XMLDOC should have operators defined, that can retrieve like XQuery, and that can check for well- formedness and validity

Copyright © 2004 Pearson Addison-Wesley. All rights reserved XML Documents Shred and Publish An XML document may be shredded into its components, which are then stored as attributes Attributes can be recombined and published as XML Documents This is an effective way for SQL databases to interact with the web Relational databases do not store hierarchies, nor are they intrinsically ordered, so shred and publish may not be “nonloss”

Copyright © 2004 Pearson Addison-Wesley. All rights reserved SQL Facilities XML Collection will offer support for shred and publish, where the publish feature supports publishing the XML data, and its schema XML Column will offer a new built-in type, XML that will come an XMLGEN operator to publish XML documents Database vendors offer built-in functions that can read and write elements within XML attribute values, e.g., XMLFILETOCLOB