XML과 Database 홍기형 성신여자대학교 성신여자대학교 홍기형.

Slides:



Advertisements
Similar presentations
XML-based Network Management Rob Enns
Advertisements

XML: Extensible Markup Language
By Daniela Floresu Donald Kossmann
XML/EDI Overview West Chester Electronic Commerce Resource Center (ECRC)
Relational Databases for Querying XML Documents: Limitations & Opportunities VLDB`99 Shanmugasundaram, J., Tufte, K., He, G., Zhang, C., DeWitt, D., Naughton,
Data Management for XML: Research Directions By: Jennifer Widom Stanford University Reviewer: Kristin Streilein.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 13-1 COS 346 Day 25.
1 COS 425: Database and Information Management Systems XML and information exchange.
1 Statistics XML: –Altavista: 800,000 pages returned. –Amazon.com: 242 books. In comparison: –God: 12,000 books, 7 Million pages –Bible: 32,000 books,
1 New Ways of Querying the Web by Eliahu Brodsky and Alina Blizhovsky.
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.
Chapter 14 Database Connectivity and Web Technologies
Sebastian Bitzer Seminar Semistructured Data University of Osnabrueck May 2, 2003 XML An introduction in relation to semistructured.
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.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
XML Fundementals XML vs.. HTML XML vs.. HTML XML Document (elements vs. attributes) XML Document (elements vs. attributes) XML and RDBMS XML and RDBMS.
XML, distributed databases, and OLAP/warehousing The semantic web and a lot more.
XML: More than just a cool acronym? Michael Mason DecisionSoft Limited.
JSP Standard Tag Library
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
XML – Extensible Markup Language XML eXtensible – add to language. Markup – delimit info using tags. Language – a way to express info.
Lecture 21 XML querying. 2 XSL (eXtensible Stylesheet Language) In HTML, default styling is built into browsers as tag set for HTML is predefined and.
Lecture 6 of Advanced Databases XML Schema, Querying & Transformation Instructor: Mr.Ahmed Al Astal.
XML By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany) DIRECTOR ARUNAI ENGINEERING COLLEGE TIRUVANNAMALAI.
XML and its applications: 4. Processing XML using PHP.
DATABASE and XML Moussa Mané. Learning Objectives ● Learn about Native XML Databases ● Learn about the conversion technology available ● Understand New.
Another PillowTalk Presentation  2004 Dynamic Systems, Inc. Introduction to XML for SOA Lee H. Burstein,
Database Solutions for Storing and Retrieving XML Documents.
XML Overview. Chapter 8 © 2011 Pearson Education 2 Extensible Markup Language (XML) A text-based markup language (like HTML) A text-based markup language.
Introduction to XML. XML - Connectivity is Key Need for customized page layout – e.g. filter to display only recent data Downloadable product comparisons.
Demystifying the eXtensible Markup Language Nick Roberts & Jim Few
XML BIS4430 – unit 10. XML Origins Extensible Markup Language (XML) 1998 Inspired by Standard Generalized Markup Language (SGML) and HTML. SGML defines.
Midterm Exam Chapters 1,2,3,5, 6,7 (closed book) March 11, 2014.
Fundamentals of Database Chapter 7 Database Technologies.
Company LOGO OODB and XML Database Management Systems – Fall 2012 Matthew Moccaro.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
1 Lessons from the TSIMMIS Project Yannis Papakonstantinou Department of Computer Science & Engineering University of California, San Diego.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
1 What Is XML? eXtensible Markup Language for data –Standard for publishing and interchange –“Cleaner” SGML for the Internet Applications: –Data exchange.
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
1 Overview of XSL. 2 Outline We will use Roger Costello’s tutorial The purpose of this presentation is  To give a quick overview of XSL  To describe.
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 Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
Lecture 20 XML. 2 Objectives What semistructured data is. Concepts of the Object Exchange Model (OEM), a model for semistructured data. Basics of Lore,
Gaining and keeping competitive advantage through J2EE and XML interoperability Dimitri Maesfranckx Product Manager.
XML and Its Applications Ben Y. Zhao, CS294-7 Spring 1999.
The Semistructured-Data Model Programming Languages for XML Spring 2011 Instructor: Hassan Khosravi.
XML and Database.
1 “Universal Data-Speak”: The eXtensible Markup Language Zack Ives CSE 590DB, Winter 2000 University of Washington 3 January 2000.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
1 Introduction JAXP. Objectives  XML Parser  Parsing and Parsers  JAXP interfaces  Workshops 2.
DBMS_Week 3-4 DBMS. Three-Schema Architecture – Internal schema (one view) describes physical storage structures access paths, indexes used Typically.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
WEB SERVER SOFTWARE FEATURE SETS
Martin Kruliš by Martin Kruliš (v1.1)1.
Semi-structured Data In many applications, data does not have a rigidly and predefined schema: –e.g., structured files, scientific data, XML. Managing.
A Portrait of the Semantic Web in Action Jeff Heflin and James Hendler IEEE Intelligent Systems December 6, 2010 Hyewon Lim.
SEMI-STRUCTURED DATA (XML) 1. SEMI-STRUCTURED DATA ER, Relational, ODL data models are all based on schema Structure of data is rigid and known is advance.
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
XML Extensible Markup Language
1 LM 6 Database Applications Dr. Lei Li. Learning Objectives Explain three components of a client-server system Describe differences between a 2-tiered.
XML and Distributed Applications By Quddus Chong Presentation for CS551 – Fall 2001.
I Copyright © 2004, Oracle. All rights reserved. Introduction.
XML Databases Presented By: Pardeep MT15042 Anurag Goel MT15006.
XML: Extensible Markup Language
Querying and Transforming XML Data
XML in Web Technologies
XML Data Introduction, Well-formed XML.
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
XML and its applications: 4. Processing XML using PHP
Presentation transcript:

XML과 Database 홍기형 성신여자대학교 성신여자대학교 홍기형

차례 Database, Web, and XML XML Database Systems Data Models Query Language and Processing Storage and Index Other issues 성신여자대학교 홍기형

Database and Web, before XML DB : a back-end server for Web Applications CGI JDBC Embedded SQL Web Information Retrieval Target to manage (Web DB) Thin Client Scripts Middle Tier HTML Web Server Template Engine Scripts HTML Templates Application Server Application Code Mapping Code Back End 성신여자대학교 홍기형

XML eXtensible Markup Language A new emerging standard for data representation and exchange on the internet See the XML catalog , http://www.xml.org Separating content from presentation Easy to provide multiple view of the same data Easily parsed and self-describing 성신여자대학교 홍기형

XML Extensible — a dynamic data model Simple — human-readable, easy to use Flexible — for handling complex data Portable — for cross-platform data exchange Standard — easy to integrate, widely adopted It is important that these points are clear. To understand these benefits is to understand the difference between different XML tools. Most tools support the benefits at the top of the list, but to fully leverage XML, a tool has to support the entire list. Simple: a data format that is as easy to use as HTML. Extensible: the biggie - it is a dynamic data mode so that you are not locked into a rigid data model. Flexible: Just because it is simple does not mean that it is limited. XML is flexible enough to handle all the complex data that today’s apps rely on including relationships and hierarchical info. Portable: just like HTML and Java Standard: all the benefits of standards (plug and play, easy to learn) apply here BREAK FOR DEMO 성신여자대학교 홍기형

HTML과 XML 문서 비교 성신여자대학교 홍기형

Data mixed with presentation XML Is All About Data HTML example: <heading1> Invoice </heading1> <bold>To: Joe Bloggs <P> From: J. Abrams <P> Date: 2/1/1999<P> Amount: $100 <P> Tax: 21% <P> Total $121 </bold> Data mixed with presentation Let’s illustrate the difference between HTML and XML, and demonstrate where HTML falls short. Here is some HTML that shows an invoice from a guy named Joe. But if you look at the HTML, all that it can tell you is that “Joe” should be displayed in bold because (click) HTML mixes data with presentation. This is why XML was born. (click) It comes to you from the World Wide Web Consortium (W3C), the same people who brought you HTML. This example shows you the same invoice in XML. The first thing you will notice is that it is (click) human readable. It is ASCII so it is readable as well as portable. Also, XML includes tags (click) so that even though I haven’t told you anything about this data in advance, you can read it and easily understand the data in this invoice. This is essential for sharing data over the Web. But the killer feature of XML - XML Nirvana - is that XML is (click) extensible. If, all-of-a-sudden, you want to keep Joe’s address - no problem! You can easily add a new field to a single data object without disrupting any of your existing data. XML is a dynamic data model (!!), which means that you can easily expand to add new and unanticipated functions to your business or work with new partners. For database people: no schema evolution!!! 성신여자대학교 홍기형

XML Is All About Data Human Readable Comes with Tags XML example: <Invoice> <Customer> Joe Bloggs </Customer> <From> J. Abrams </From> <Date year=‘1999’ month=‘2’ day = ‘1’ /> <Amount unit = ‘Dollars’> 100 </Amount> <TaxRate> 21 </TaxRate> <Total currency = “Dollars”>121 </Total> </Invoice> Comes with Tags 성신여자대학교 홍기형

XML Is All About Data Extensible XML example: <Invoice> <Customer> <Name>Joe Bloggs </Name> <Address> 25 Mall Road </Address> </Customer> <From> J. Abrams </From> <Date year=‘1999’ month=‘2’ day = ‘1’ /> <Amount unit = ‘Dollars’> 100 </Amount> <TaxRate> 21 </TaxRate> <Total unit = “Dollars”>121 </Total> </Invoice> <Name>Joe Bloggs </Name> <Address> 25 Mall Road </Address> 성신여자대학교 홍기형

XML Family of Standards DOM (Document Object Model) XML Namespaces XSL (style language) XQL (XSL query language) XML Data / DCD / Schema XUL (updates, future) …many more XML is more than just a data format, it comes with a family of interface standards for accessing and manipulating the data. The W3C continues to pump these out, with many new additions in the years to come. Object Design is a member of the W3C, and is actively involved with developing these standards. So let’s take a look at some of these standards, which today’s tools must support to fully leverage XML: XML is the data format standard DOM is the API for writing apps on top of XML XML Namespaces (recommended): how to differentiate between two tags of the same name but in different contexts. Such as the name of the book versus the name of the buyer of the book. These three are recommended by the W3C (I.e. are standards today) and the following are still in the process of being finalized: XSL: XML Style Language (2nd working draft) - lets you present the data in various styles - order the data, filter it (similar to a select statement). XQL: XML Query language (draft) - a standard way of querying XML data (similar to SQL) XML Data: ways of handling application (non-document) data. We are very involved with those committees at the W3C (target date for Proposed Recommendation is 9/99). XUL: XML update language for updating an XML document at the element level. This is still just at the idea stage. 성신여자대학교 홍기형

Building Web Applications with XML Thin Client Scripts Quickly react to changes Lower maintenance costs Does not depend on a single vendor Middle Tier HTML Web Server / App Server XSL Application Code DOM XML Server Standard API and Template Language XML Back End 성신여자대학교 홍기형

Legacy DBs for XML Applications XML as a new data-exchange format for legacy DB applications DB2XML Transforming the results of database queries or complete databases into XML documents or into HTML documents using XSLT stylesheets. DB2XML can be used: as a standalone tool (with GUI or command line), as a servlet to dynamically generate XML-documents using the DB2XML API 성신여자대학교 홍기형

XML Database Systems 3 approaches Build special-purpose systems Lore, Strudel Best performance for XML data Use object-oriented database systems eXelon, Monet, Ozone Object-oriented modeling Use relational database systems Oracle, Microsoft Matured large market 성신여자대학교 홍기형

Lore Query Processor Data Engine Textual Interface Query Plan Generator Preprocessing (Lorel2OQL) Parsing Applications HTML GUI Utilities Query Operators Object Manager Optimizer External Data API Physical Storage External, Read-only Data Sources queries Non-query Requests Query Processor Data Engine 성신여자대학교 홍기형

eXelon 성신여자대학교 홍기형

Oracle 8i 성신여자대학교 홍기형

Data Models for XML XML is not a data model Structure of an XML document an ordered list of elements each element may have a set of attributes may have (sub)elements (nested elements) Structured data and full text mixed together DOM defines how to translate an XML document into a data structure for processing Need a true data model for XML data 성신여자대학교 홍기형

OEM: a Semi-structured Data Model Object Exchange Model (Lore) Semi-structured Data Self-describing structure, the lack of schema the structure changes rapidly and unpredictably Labeled direct graph Node : Object (OID) or atomic value (leaf) Labeled Edge : object-subobject relationship 성신여자대학교 홍기형

OEM, an example <DBGroup> <Member Name=“유” Advisor=“m1”> <Age>28</Age> </Member> <Member ID=“m1”, Project=“p1”> <Name>박</Name> <Advisor>홍</Advisor> <Project ID=“p1” Member=“m1”> <Title>XML DB</Title> </Project> </DBGroup> DBGroup &1 Member Project Member &2 &3 &4 {Name=“Smith”, Advisor=“m1”} {ID=“m1, Project=“p1”} {ID=“p1, Project=“m1”} Age Name Advisor Title &5 &6 &7 &8 Text Text Text Text &12 &9 &10 &11 “28” “박” “홍” 성신여자대학교 홍기형

Issues in Data Modeling How to simultaneously view XML information in both a set of documents a single large database No loss of information in XML How to represent the Ordering of elements external/internal entities, processing instructions 성신여자대학교 홍기형

XML DB Design When should attributes (subelements) be used? Is a 1-to-1 relationship best represented using element nesting or IDREFs? How to translate the conceptual model (OEM?) into an XML encoding? Need to identify the relationship between DTDs and traditional DB schema 성신여자대학교 홍기형

Query Languages for XML DB Requirements Path Expressions Queries over the structured and semistructured data full text the mixture of data elements and full text W3C, Query Languages for the Web, 1998 QL for semistructured data Lorel, UnQL XQL, XML-QL 성신여자대학교 홍기형

XML-QL Syntax Select <variable-list> where <XML-pattern>+ Example select $n, $h where <person> <age=$a> <name> $n </name> <address> 서울 성북구 동선동3가</address> [<hobby> $h </hobby>] </person>, $a > 18 성신여자대학교 홍기형

Issues in Query Processing The true requirements for XML QL is not known Need to review all facets of traditional query processing Need to Develop a new IR model proximity in XML documents similarity measure between XML elements 성신여자대학교 홍기형

How to integrate Optimization Schemes traditional (DB) query processing model and information retrieval model Optimization Schemes for not well-structured XML data for queries mixed with full text retrieval and structured/semistructured search 성신여자대학교 홍기형

Storage Structure and Indexing Clustering schemes for storing XML data New index types for quickly finding certain elements, attributes, and more complex structural patterns element orderings Determine the level of parsing for storing XML documents Based on the analysis of encoding pattern merging identical text strings (sub-patterns) by using appropriate IDREFs compression based on regular patterns 성신여자대학교 홍기형

Issues in Various DB Features Full view support for XML both virtual and materialized views incremental maintenance XSL as a view definition language Data integrity issue What are constraints on XML data? key, referential, domain How to represent the constraints How to check them when changes occur 성신여자대학교 홍기형

Transaction Control over XML database Performance Evaluation Trigger active database capabilities in XML Transaction Control over XML database Performance Evaluation need to make an appropriate benchmark for XML data XML data set query types mix of queries and updates 성신여자대학교 홍기형

References Research issues Storing XML data into RDBMSs Data Management for XML: Research Directions, http://www-db.stanford.edu/~wisom/xml-whitepaper.html More on Data Management for XML, http://www.cs.washington.edu/homes/alon/widom-response.html Storing XML data into RDBMSs A Performance Evaluation of Alternative Mapping Schemes for Storing XML Data in a Relational Database, ercim.inria. publications/RR-3680 XML Database Systems http://www.xmlsoftware.com/database/ 성신여자대학교 홍기형