Fundamentals, Design, and Implementation, 9/e Cos 346 Day 23.

Slides:



Advertisements
Similar presentations
XML: Extensible Markup Language
Advertisements

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 346 Day 24.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 346 Day 25.
Fundamentals, Design, and Implementation, 9/e Chapter 12 ODBC, OLE DB, ADO, and ASP.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 236 Day 23.
XML A brief introduction ---by Yongzhu Li. XML --- a brief introduction 2 CSI668 Topics in System Architecture SUNY Albany Computer Science Department.
Fundamentals, Design, and Implementation, 9/e COS 346 DAY 22.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 236 Day 24.
Database Processing Applications Chapter Seven DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
Chapter 12 Database Connectivity with ASP.NET JavaScript, Third Edition.
Chapter 14 Database Connectivity and Web Technologies
COS 381 Day 16. Agenda Assignment 4 posted Due April 1 There was no resubmits of Assignment Capstone Progress report Due March 24 Today we will discuss.
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.
Pemrograman Berbasis WEB XML part 2 -Aurelio Rahmadian- Sumber: w3cschools.com.
1 XML eXtensible Markup Language. 2 What is XML?  XML היא שפה תיאורית  XML נועדה לספק דרך סטנדרטית לתיאור משמעות מידע ומבנה מידע כאשר הוא מועבר בין.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
1 XML at a neighborhood university near you Innovation 2005 September 16, 2005 Kwok-Bun Yue University of Houston-Clear Lake.
IT420: Database Management and Organization XML 21 April 2006 Adina Crăiniceanu
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.
Another PillowTalk Presentation  2004 Dynamic Systems, Inc. Introduction to XML for SOA Lee H. Burstein,
XML Overview. Chapter 8 © 2011 Pearson Education 2 Extensible Markup Language (XML) A text-based markup language (like HTML) A text-based markup language.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 14 Networks, Multi-Tier Architectures, and XML.
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Address: Course Page:
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.
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.
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 David M. Kroenke’s Chapter Thirteen: XML and ADO.NET Part Four Database.
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.
XML Extensible Markup Language
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
Fundamentals, Design, and Implementation, 9/e by David M. Kroenke BSA206 Database Management Systems Lecture 21: Databases and the Web Chapters 12, 13.
Introduction to XML This presentation covers introductory features of XML. What XML is and what it is not? What does it do? Put different related technologies.
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
ADO.NET. ADO.NET is a new, improved, and greatly expanded version of ADO that was developed for the Microsoft.NET initiative It incorporates all of the.
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.
Jennifer Widom XML Data Introduction, Well-formed XML.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
+ Connecting to the Web Chapter 7. + Chapter Objectives Understand and be able to set up Web database processing Learn the basic concepts of Extensible.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
+ 1 XML eXtensible Markup Language. + 2 XML Lecture Adapted from the work of Dr. Praveen Madiraju of Marquette University.
1 Introduction JAXP. Objectives  XML Parser  Parsing and Parsers  JAXP interfaces  Workshops 2.
Computing & Information Sciences Kansas State University Friday, 20 Oct 2006CIS 560: Database System Concepts Lecture 24 of 42 Friday, 20 October 2006.
Database Connectivity with ASP.NET. 2 Introduction Web pages commonly used to: –Gather information stored on a Web server database Most server-side scripting.
Martin Kruliš by Martin Kruliš (v1.1)1.
Introduction Because database applications today reside in a complicated environment, various standards have been developed for accessing database servers.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Eleven: The Web Server Environment.
 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:
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
Database Processing Applications Chapter Seven DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 7 th Edition.
XML Notes taken from w3schools. What is XML? XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed.
XML and Distributed Applications By Quddus Chong Presentation for CS551 – Fall 2001.
XML 1. Chapter 8 © 2013 Pearson Education, Inc. Publishing as Prentice Hall SAMPLE XML SCHEMA (XSD) 2 Schema is a record definition, analogous to the.
I Copyright © 2004, Oracle. All rights reserved. Introduction.
XML: Extensible Markup Language
Unit 4 Representing Web Data: XML
XML Related Technologies
XML in Web Technologies
Session I - Introduction
Session I - Introduction
Database Processing with XML
Database Processing Applications
Chapter 7 Representing Web Data: XML
XML Data Introduction, Well-formed XML.
CSE591: Data Mining by H. Liu
Presentation transcript:

Fundamentals, Design, and Implementation, 9/e Cos 346 Day 23

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/2 Copyright © 2004 Agenda  Students Evaluations  Assignment 9 Not Corrected yet –Will have completed by Next Class  Assignment 10 Posted –Due April 26  Quiz 4 –May 6 10 AM –Chap 9, 10, 12, 13 & 15  Next Class. Thursday, April 22, maybe canceled/modified due to Chancellors visit. Check in WebCT for Updates.  Today –Discussion on OBDC, OLE DB, AD0 and ASP

Fundamentals, Design, and Implementation, 9/e Chapter 13 XML and ADO.NET

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/4 Copyright © 2004 Introduction  Database processing and document processing need each other –Database processing needs document processing for expressing database views –Document processing needs database processing for storing and manipulating data  As Internet usage increased, organizations wanted to make their Web pages more functional by displaying and updating data from organizational databases

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/5 Copyright © 2004 XML  XML, or Extensible Markup Language, developed in early 1990s –XML is a subset of SGML, or Standard Generalized Markup Language  Today XML is a hybrid of document processing and database processing –It provides a standardized yet customizable way to describe the content of documents –XML documents can automatically be generated from database data, and vice versa  SOAP is an XML-based standard protocol for sending messages of any type, using any protocol over the Internet

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/6 Copyright © 2004 XML (cont.)  XML is used for describing, representing, and materializing database views  XML is better than HTML because –It provides a clear separation between document structure, content, and materialization –It is standardized but allows for extension by developers –XML tags accurately represent the semantics of their data  Document Type Declarations (DTDs) and XML Schemas can be used to describe the content of XML documents  Both Oracle and SQL Server can produce XML documents from database data

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/7 Copyright © 2004 Example: XML Document

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/8 Copyright © 2004 XML DTD  XML document consists of two sections: –Document Type Declaration (DTD) The DTD begins with DOCTYPE –Document data  XML documents could be –Type-valid if the document conforms to its DTD –Well-formed and not be type-valid, because It violates the structure of its DTD It has no DTD  DTD may be stored externally so many documents can be validated against the same DTD

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/9 Copyright © 2004 XSLT  XSLT, or the Extensible Style Language may be used to materialize (transform) XML documents using XSL document –From XML documents into HTML or into XML in another format  XSLT is a declarative transformation language –Declarative: create rules, not procedure, to materialize the document –Transformational: transforms the input document into another document  XSLT uses stylesheets to indicate how to transform the elements of the XML document into another format

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/10 Copyright © 2004 Example: External DTD

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/11 Copyright © 2004 Example: XML Document

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/12 Copyright © 2004 Example: XML  HTML

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/13 Copyright © 2004 Example: XML  Browser

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/14 Copyright © 2004 XML Schema  XML Schema is a standard for describing the content of an XML document, i.e., defining custom vocabularies –Documents that conform to an XML Schema are called schema-valid –An XML document can be well-formed and be neither type-valid nor schema-valid  Unlike DTDs, XML Schema documents are themselves XML documents that can be validated against their schema maintained by W3C

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/15 Copyright © 2004 Example: XML Schema

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/16 Copyright © 2004 Example: XML Schema

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/17 Copyright © 2004 Elements and Attributes  Schemas consist of elements and attributes –Elements are used to carry data and attributes are used to carry metadata  Two types of elements: –Simple elements have a single data value –ComplexType elements can have one or more simple or complexType elements ComplexType elements can have attributes

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/18 Copyright © 2004 Flat Schemas  Flat schemas have all elements at the same level

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/19 Copyright © 2004 Structured Schemas  Structured schemas have defined subgroups

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/20 Copyright © 2004 Global Elements  To eliminate the definition duplication, elements can be declared globally, i.e., reside at the top level of the schema, and then reused

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/21 Copyright © 2004 Global Elements

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/22 Copyright © 2004 Example XML Industry Standards  Accounting –Extensible Financial Reporting Markup Language (XFRML)  Architecture and Construction –Architecture, Engineering, and Construction XML (aecXML)  Automotive –Automotive Industry Action Group (AIAG) –XML for the Automotive Industry (SAE J2008)  Banking –Banking Industry Technology Secretariat (BITS) –Bank Internet Payment System (BIPS)  Electronic Data Interchange –Data Interchange Standards Association (DISA) –XML/EDI Group

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/23 Copyright © 2004 Example XML Industry Standards (cont.)  Human Resources –Human Resources Markup Language (hrml)  Insurance –ACORD: Property and Casualty  Real Estate –Real Estate Listing Management System (OpenMLS) –Real Estate Transaction Standard (RETS)  Software –IBM –INRIA: Koala Bean Markup Language (KBML) –Open Software Description Format (OSD)  Workflow –Simple Workflow Access Protocol (SWAP) –Workflow Management Coalition (MfMC): Wf-XML

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/24 Copyright © 2004 ADO.NET  ADO.NET is a new, improved, and greatly expanded version of ADO that was developed for the Microsoft.NET initiative  It incorporates all of the functionality of ADO and facilitates the transformation of XML documents to and from database data  It uses datasets, which is an in-memory, fully-functioned, independent databases

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/25 Copyright © 2004 Role of ADO.NET  ADO.NET serves as an intermediary between all types of.NET applications and the DBMS and database

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/26 Copyright © 2004 Data Provider  A.NET data provider is a library of classes that provides ADO.NET services  Microsoft’s provides three data providers –OLE DB data provider can be used to process any OLE DB-compliant data source –SQLClient data provider is purpose-built for use with SQL Server –OracleClient data provider is purpose-built for use with Oracle

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/27 Copyright © 2004 Data Provider Components

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/28 Copyright © 2004 Data Provider Components  A connection object is similar to the OBDC’s connection object  A command object is created on an established connection  A data reader provides read-only, forward-only, fast access to database data  An application can get and put data to and from the database using the command object  A dataset is an in-memory database that is disconnected from any regular database –It distinguishes ADO.NET from the previous data access technology

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/29 Copyright © 2004 The ADO.NET Dataset  A dataset is an in-memory database that is disconnected from any regular database  Datasets can have –Multiple tables, views, and relationships Tables may have surrogate key (auto increment columns), primary keys, and be declared as unique –Referential integrity rules and actions –The equivalent of triggers  Datasets may be constructed from several different databases and managed by different DBMS

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/30 Copyright © 2004 Dataset Advantages  Dataset contents and its XML schema can be easily formatted as an XML document  Also, XML schema documents can be read to create the structure of the dataset, and XML documents can be read to fill the dataset  Datasets are needed to provide a standardized, non-proprietary means to process database views –This is important for the processing of views with multiple multi-value paths

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/31 Copyright © 2004 Dataset Disadvantages  Because dataset data are disconnected from regular database, only optimistic locking can be used when updating the regular database with the dataset  In the case of conflict, either the dataset must be reprocessed or the data change must be forced onto the database, causing the lost update problem  Thus, datasets cannot be used for applications in which optimistic locking is problematical –Instead, the ADO.NET command object should be used

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/32 Copyright © 2004 XML Standards  XML: Extensible Markup Language  XSL: XSLT Stylesheet. The document that provides the {match, action} pairs and other data for XSLT to use when transforming an XML document  XSLT: A program that applies XSLT Stylesheets to an XML document to produce a transformed XML document  XML schema: An XML-compliant language for constraining the structure of an XML document

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/33 Copyright © 2004 Additional XML Standards  Xpath –A sublanguage within XSLT used to identify parts of an XML document to be transformed –Can also be used for calculations and string manipulation  Xpointer –A standard for linking one document to another  SAX: Simple API (application program interface) for XML –An event-based parser that notifies a program when the elements of an XML document have been encountered during document parsing

Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 13/34 Copyright © 2004 Additional XML Standards (cont.)  DOM: Document Object Model –An API that represents an XML document as a tree –Each node of the tree represents a piece of the XML document –A program can directly access and manipulate a node of the DOM representation  Xquery –A standard for expressing database queries as XML documents –The structure of the query uses XPath facilities, and the result of the query is represented in an XML format  XML Namespaces: A standard for allocating terminology to defined collections –X:Name is interpreted as the element Name as defined in namespace X –Useful for disambiguating terms

Fundamentals, Design, and Implementation, 9/e Chapter 13 XML and ADO.NET