1 XML-KSI, 2004 XML- : an extendible framework for manipulating XML data Jaroslav Pokorny Charles University Praha.

Slides:



Advertisements
Similar presentations
XML: Extensible Markup Language
Advertisements

XML May 3 rd, XQuery Based on Quilt (which is based on XML-QL) Check out the W3C web site for the latest. XML Query data model –Ordered !
XML, XML Schema, Xpath and XQuery Slides collated from various sources, many from Dan Suciu at Univ. of Washington.
Agenda from now on Done: SQL, views, transactions, conceptual modeling, E/R, relational algebra. Starting: XML To do: the database engine: –Storage –Query.
From Semistructured Data to XML: Migrating The Lore Data Model and Query Language Roy Goldman, Jason McHugh, Jennifer Widom Stanford University
1 Lecture 10 XML Wednesday, October 18, XML Outline XML (4.6, 4.7) –Syntax –Semistructured data –DTDs.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Conceptual Data Modeling Using Entities and Relationships.
Query Languages Aswin Yedlapalli. XML Query data model Document is viewed as a labeled tree with nodes Successors of node may be : - an ordered sequence.
1 COS 425: Database and Information Management Systems XML and information exchange.
1 XML and QUERY Shilpi Ahuja CSE Data Mining 4 th April 2002.
Semi-structured Data. Facts about the Web Growing fast Popular Semi-structured data –Data is presented for ‘human’-processing –Data is often ‘self-describing’
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 The Relational Algebra and Relational Calculus.
XML(EXtensible Markup Language). XML XML stands for EXtensible Markup Language. XML is a markup language much like HTML. XML was designed to describe.
The Enhanced Entity- Relationship (EER) Model
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
Object Oriented Databases - Overview
1 Relational Algebra and Calculus Yanlei Diao UMass Amherst Feb 1, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
Introduction to XML This material is based heavily on the tutorial by the same name at
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
Knowledge Mediation in the WWW based on Labelled DAGs with Attached Constraints Jutta Eusterbrock WebTechnology GmbH.
XML, distributed databases, and OLAP/warehousing The semantic web and a lot more.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1 Chapter 1 - Introduction: Databases and Database Users - Outline Types of Databases and.
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation Document Type Definition.
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.
1 Relational Algebra and Calculus Chapter 4. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
TDDD43 XML and RDF Slides based on slides by Lena Strömbäck and Fang Wei-Kleiner 1.
Chapter 3 The Relational Model. 2 Chapter 3 - Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between.
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.
Of 33 lecture 3: xml and xml schema. of 33 XML, RDF, RDF Schema overview XML – simple introduction and XML Schema RDF – basics, language RDF Schema –
1 Relational Algebra. 2 Relational Query Languages v Query languages: Allow manipulation and retrieval of data from a database. v Relational model supports.
An OO schema language for XML SOX W3C Note 30 July 1999.
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.
1 Relational Algebra and Calculas Chapter 4, Part A.
An Introduction to XML Sandeep Bhattaram
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
1 XML eXtensible Markup Language. 2 XML vs. HTML HTML is a HyperText Markup language HTML is a HyperText Markup language Designed for a specific application,
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
Tutorial 13 Validating Documents with Schemas
More XML: semantics, DTDs, XPATH February 18, 2004.
Scaling Heterogeneous Databases and Design of DISCO Anthony Tomasic Louiqa Raschid Patrick Valduriez Presented by: Nazia Khatir Texas A&M University.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
1 Indexing The syntax for creating a index is: CREATE [UNIQUE] INDEX index_name ON table_name (column1, column2,... column_n) [ COMPUTE STATISTICS ]; Why.
1 Typing XQuery WANG Zhen (Selina) Something about the Internship Group Name: PROTHEO, Inria, France Research: Rewriting and strategies, Constraints,
Semi-structured Data In many applications, data does not have a rigidly and predefined schema: –e.g., structured files, scientific data, XML. Managing.
CSE 6331 © Leonidas Fegaras XQuery 1 XQuery Leonidas Fegaras.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database.
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.
1 XML eXtensible Markup Language. 2 Introduction and Motivation Dr. Praveen Madiraju Modified from Dr.Sagiv’s slides.
Extensible Markup Language (XML) Pat Morin COMP 2405.
XML: Extensible Markup Language
Entity- Relationship (ER) Model
Relational Model By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany)
XML QUESTIONS AND ANSWERS
Chapter 12 Outline Overview of Object Database Concepts
Lecture 9: XML Monday, October 17, 2005.
XQuery Leonidas Fegaras.
Relational Model B.Ramamurthy 5/28/2019 B.Ramamurthy.
Semi-structured Data In many applications, data does not have a rigidly and predefined schema: e.g., structured files, scientific data, XML. Managing such.
Lecture 11: XML and Semistructured Data
Presentation transcript:

1 XML-KSI, 2004 XML- : an extendible framework for manipulating XML data Jaroslav Pokorny Charles University Praha

2 XML-KSI, 2004 Two approaches to XML logical or physical Idea: XML as a database –DB of XML documents –„mix“ of (relational) DB and XML data –XML views (over non-XML and/or XML data) Advantages: –independence on original platforms and models on processed data –more flexible for design, manipulation (integration, updates, querying)

3 XML-KSI, 2004 Two approaches to XML implications –implementations: XML DBs (native, via relational, OO, OR), –special demands on query languages how do them powerful how to describe their semantics how implement them –new types of software: wrappers, mediators (personal) goal: to develop a powerful formal approach appropriate for manipulating both XML and non-XML data

4 XML-KSI, 2004 Outline n XML - shortly n XML – functional data model n functional typing XML (and non-XML data) n LT language n XML-schema, XML-database n XML- framework n Conclusions

5 XML-KSI, 2004 XML – an example <!DOCTYPE biblio [ <!ELEMENT title (#PCDATA) ]>

6 XML-KSI, 2004 XML – an example Fundamentals of DBS Ramez Elmasri Arlington Shamkant Navathe

7 XML-KSI, 2004 XML model n Usually: tree- or graph-oriented Here: inspiration by functional approach to conceptual modelling DEPARTMENT MEMBER* PROJECT* For example, the HIT data model from 80s.

8 XML-KSI, 2004 Synopsis of the approach n Typing XML data Background: –a functional type system (base of primitive types + functions, tuples, and unions) Extensions to: –typing XML regular expressions, –typing XML elements. n Querying XML elements –a general typed -calculus (functional variables and constants, tuples, applications of functions, -abstractions) XML-database schema as a set of variables of types, XML-database as any valuation of these variables –XML- - a syntactic variant of the typed -calculus over XML- data

9 XML-KSI, 2004 Typing XML data - informally E … a set of abstract elements. The content of an abstract element will be either a string from PCDATA, in the easiest example, or a sequence of abstract subelements (or groups), or empty. Ex: It is an instance of a phone element object. For an e  E, phone(e) returns e.g. the phone number ‘ ‘. phone element object will be conceived as a (partial) function from E into PCDATA.

10 XML-KSI, 2004 Typing XML data - informally Ex: is conceived a set of functions from E  E  E The current name element object, i.e. the one stored in a given XML database, is a function assigning to each abstract element e  E at most a couple of abstract elements. Hierarchy of notions: element type, element object, element

11 XML-KSI, 2004 Functional typing B … a set of symbols (the base) T ::= S primitive type  (T 1  T 2 ) functional type  (T 1,...,T n ) tuple type  (T 1 + T 2 ) union type where S  B Remark: relations are ((T 1,...,T n )  BOOL)-objects!

12 XML-KSI, 2004 Functional typing Interpretation: Members of B … mutually disjoint non-empty sets, (T 1  T 2 )... the set of all (total or partial) functions from T 1 into T 2, (T 1,...,T n ) … T 1 ...  T n, (T 1 +…+T n ) …  T i Exs: n arithmetic operations: +, -, *, / are ((NUMBER, NUMBER)  NUMBER)-objects. n logic: –and/((BOOL, BOOL)  BOOL), –universal R-quantifier  R, and existential R-quantifiers  R are ( (R  BOOL)  BOOL) - objects. –R-identity = R is ((R,R)  BOOL)-object. n aggregation functions: COUNT R /((R  BOOL)  NUMBER)

13 XML-KSI, 2004 Typing XML regular expressions Let B = {PCDATA, BOOL, NAME}. The type system T reg over B is recursively defined as follows. T ::= tag: PCDATA  tag: where tag  NAME. elementary regular expression  T* zero or more  T+ one or more  T?zero or one where T is an alternative or elementary regular expression.  (T 1  T 2 ) alternative

14 XML-KSI, 2004 Typing XML regular expressions Interpretation: Ex.: (T 1  T 2 ) … a set of objects of type T 1  T 2. T* … (T  BOOL) /partially ordered model/ T* … ((T, NUMBER)  BOOL) /ordered model/ –Consider a function f of this type. For a couple (t, i), f(t, i) = TRUE iff t is i th object in an (ordered) set of T-objects.

15 XML-KSI, 2004 Typing XML elements and attributes T reg over B, E. The type system T E induced by T reg (or T E if T reg is understood) containing the regular element expressions given by the following rules: E ::= TAG:T  TAG: elementary element types where tag:T and tag: are elementary regular expressions over B  E*  E+  E?  (E 1  E 2 )  TAG:(E 1,..., E n ) where tag  NAME. Elementary element types and regular element expressions TAG:(E 1,...,E n ) are called element types.

16 XML-KSI, 2004 Typing XML elements and attributes Semantics of element types: TAG:PCDATA … the set of all (partial functions) from E to tag:PCDATA … etc Attributes are also functions. Ex.: year (of monograph) is a function assigning to each monograph its year (of issue). Notation: E  MONOGRAPH  CDATA

17 XML-KSI, 2004 Example: BIBLIO element types TITLE:PCDATA FIRSTNAME:PCDATA SURNAME:PCDATA LOCALITY:PCDATA ZIP:PCDATA ADDRESS:(LOCALITY, ZIP) BOOK:(TITLE, AUTHOR*) NAME:(FIRSTNAME, SURNAME) MONOGRAPH:(TITLE, AUTHOR, EDITOR) YEAR/(MONOGRAPH  CDATA) EDITOR:MONOGRAPH* AUTHOR:(NAME, ADDRESS?) BIBLIO: (BOOK  MONOGRAPH)*

18 XML-KSI, 2004 LT language (Language of Terms) Func... constants, each of a fixed type, variables for each type from T. Let types T, T 1,..., T n (n  1) are members of T. Typed constants and variables are terms.  M(M 1,...,M n ) application  x 1,...,x n (M) -abstraction where x 1,...,x n are distinct variables  (M 1,...,M n )tuple  M i projections for a term M  (M 1,...,M n )  K:M tagged term where K/NAME. If M/T, then K:M/(E  T).

19 XML-KSI, 2004 Schema and DB n XML-database schema, S XML, is a set of variables of types from T E. n Given a database schema S XML, an XML- database is any valuation of these variables. Ex.: SURNAME, AUTHOR

20 XML-KSI, 2004 XML- framework What is it? XML- framework is a subset of LT + syntactic sugar Features: n queries are expressed by terms n Ex.: AUTHOR (1) RESULT: AUTHOR…. more „XML-like“) Typically:.. (.. …(expression)…), where expression/BOOL x (AUTHOR(x)) does the same as (1) n paths as compositions of functions Ex.: SURNAME(NAME(AUTHOR(m))) where m is a monograph abstract element object Notation: m.AUTHOR.NAME.SURNAME

21 XML-KSI, 2004 XML- framework n applications of logic, arithmetic, … functions  e (b.AUTHOR(e) and e.NAME.SURNAME = ‘Smith’) where b is a book abstract element object  b  e (b.AUTHOR(e) and e.NAME.SURNAME = ‘Smith’) is a YES/NO query.

22 XML-KSI, 2004 XML- framework n restructuring name:x.NAME ( title:y (.BOOK.(AUTHOR(x) and TITLE = y)) ) title:y ( name:x.NAME (.BOOK.(AUTHOR(x) and TITLE = y)) ) Notation: tagged variables, content of abstract elements by y, x n aggregations + nesting D. For each book, find the number of its authors. x, n (.BOOK..(TITLE = x and COUNT(AUTHOR) = n)) Notation: dots.. for omitting parts of paths and prefixes possibility to embed any user defined function

23 XML-KSI, 2004 XML- framework D(XQuery): FOR $x IN distinct(document(“biblio1.xml”)//book) LET $n := count($x/author) RETURN $x/title/text() $n

24 XML-KSI, 2004 Integration of heterogeneous information sources relational schemes, DTDs, ADTs, classes in OO user query answer typed objects

25 XML-KSI, 2004 Conclusions Issues: n finding appropriate restrictions of XML- for querying n implementation is in progress The forthcoming paper: n cleaning the model (ordered and unordered) n formal semantics of types, n extensions to tagged variables Future: n XML- with tag variables n semantics of XQuery in XML- framework