Experience with XML Schema Ashok Malhotra Schema Usage  Mapping XML Schema and XML documents controlled by the Schema to object classes and instances.

Slides:



Advertisements
Similar presentations
BAH DAML Tools XML To DAML Query Relevance Assessor DAML XSLT Adapter.
Advertisements

Native XML Database or RDBMS. Data or Document orientation If you are primarily storing documents, then a Native XML Database may be the best option.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
1 Web Data Management XML Schema. 2 In this lecture XML Schemas Elements v. Types Regular expressions Expressive power Resources W3C Draft:
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 28 Database Systems I The Relational Data Model.
1 Substitution Groups in XML Schemas Tomer Shiran Winter 2003/4 Semester.
1 Relational Model. 2 Relational Database: Definitions  Relational database: a set of relations  Relation: made up of 2 parts: – Instance : a table,
The Relational Model Lecture 3 Book Chapter 3 Relational Data Model Relational Query Language (DDL + DML) Integrity Constraints (IC) From ER to Relational.
Data Modelling. EAR model This modelling language allows a very small vocabulary: Just as English has nouns, verbs, adjectives, pronouns.., EAR models.
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
SQL Overview Defining a Schema CPSC 315 – Programming Studio Spring 2008 Project 1, Lecture 3 Slides adapted from those used by Jeffrey Ullman, via Jennifer.
XML with RDBMS coping with the paradigm issue. XML Storage options Incoming XML can be treated in different ways, depending on what your application needs:
Advanced Database CS-426 Week 13 – Object Relational Databases.
Using ER/Studio.
CONSTRAINTS AND UPDATES CHAPTER 3 (6/E) CHAPTER 5 (5/E) 1.
SQL Overview Defining a Schema CPSC 315 – Programming Studio Slides adapted from those used by Jeffrey Ullman, via Jennifer Welch Via Yoonsuck Choe.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
PL / SQL P rocedural L anguage / S tructured Q uery L anguage Chapter 7 in Lab Reference.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
The Relational Model These slides are based on the slides of your text book.
1 Introduction to databases concepts CCIS – IS department Level 4.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor Ms. Arwa.
The Relational Model. Review Why use a DBMS? OS provides RAM and disk.
Dr. Azeddine Chikh IS446: Internet Software Development.
XML Schemas in Oracle XML DB Ravi Murthy Sandeepan Banerjee Oracle Corporation.
Introduction to Accounting Information Systems
Database Technical Session By: Prof. Adarsh Patel.
Shaowen Wang CyberInfrastructure and Geospatial Information Laboratory (CIGI) Department of Geography and National Center for Supercomputing Applications.
1 Advanced Databases (CM036): Lecture # 5 ( Object-Relational and Nested-Relational Databases) Introduction to Object-Relational features of Oracle 9i.
Session IV Chapter 9 – XML Schemas
1 The Relational Model Instructor: Mohamed Eltabakh
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
FALL 2004CENG 351 File Structures and Data Management1 Relational Model Chapter 3.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
XML Schema. Why Schema? To define a class of XML documents Serve same purpose as DTD “Instance document" used for XML document conforming to schema.
An OO schema language for XML SOX W3C Note 30 July 1999.
Databases Shortfalls of file management systems Structure of a database Database administration Database Management system Hierarchical Databases Network.
XML – Part III. The Element … This type of element either has the element content or the mixed content (child element and data) The attributes of the.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
XML and Database.
Practical RDF Chapter 10. Querying RDF: RDF as Data Shelley Powers, O’Reilly SNU IDB Lab. Hyewon Lim.
Practical RDF Ch.10 Querying RDF: RDF as Data Taewhi Lee SNU OOPSLA Lab. Shelley Powers, O’Reilly August 27, 2004.
Session 1 Module 1: Introduction to Data Integrity
Declarative Languages and Model Based Development of Web Applications Besnik Selimi South East European University DAAD: 15 th Workshop “Software Engineering.
CS34311 The Relational Model. cs34312 Why Relational Model? Currently the most widely used Vendors: Oracle, Microsoft, IBM Older models still used IBM’s.
Relational Database Management System(RDBMS) Structured Query Language(SQL)
Jennifer Widom Relational Databases The Relational Model.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Welcome: To the fifth learning sequence “ Data Models “ Recap : In the previous learning sequence, we discussed The Database concepts. Present learning:
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
4 Copyright © 2004, Oracle. All rights reserved. Validating XML by Using XML Schema.
CENG 351 File Structures and Data Management1 Relational Model Chapter 3.
Oracle 11g: SQL Chapter 5 Data Manipulation and Transaction Control.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
Fundamental of Database Systems
Chapter 12 Information Systems.
Appendix D: Network Model
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Instructor: Mohamed Eltabakh
The Relational Model Relational Data Model
Relational Databases The Relational Model.
Relational Databases The Relational Model.
SQL OVERVIEW DEFINING A SCHEMA
Data Model.
Object – relational database
Presentation transcript:

Experience with XML Schema Ashok Malhotra

Schema Usage  Mapping XML Schema and XML documents controlled by the Schema to object classes and instances.  Storing XML Schemas and documents in the database.

Mapping XML Schema to Object Classes  Choice  Derivation by Restriction  Facets  Derivation Control  Namespace Restrictions  Problems with Annotations

Mapping XML Schema to Object Classes - Choice  Choice allows variations in the content of an object.  No equivalent construct in Java.  Some languages support variant classes.

Mapping XML Schema to Object Classes  Derivation by restriction has no object- oriented equivalent.  In the database, a restricted type is mapped to a dummy subtype with no additional fields. Restriction not enforced at SQL level.  Similarly, for datatypes, facets have no object-oriented equivalent.  Must be checked at runtime.

Mapping XML Schema to Object Classes – fixed, final, block, etc.  Fixed and final restrict derivation from elements.  Block restricts use of derived types where the parent type is expected.  Only final #all has a Java equivalent.

Mapping XML Schema to Object Classes – wildcard restrictions  Wildcards can be restricted to elements from a specific namespace.  No equivalent object-oriented concept.

Mapping XML Schema to Object Classes – problems with annotations  Can an annotation be added to a “ref” ?  If so, does it take precedence over an annotation of the entity referred to?  We assume annotations can be applied to a ‘ref’, and …  The annotation element on an attribute ref is associated with {Attribute Use}.  The annotation element on a model group ref or an element ref is associated with the {particle}.

Managing XML Schemas and documents in the database  Support is provided for the following tasks: – Registering XML Schemas. – Validating XML documents against a registered XML Schema. – Generating XML Schema from object classes. – Generating a structured database mapping from XML Schemas during XML Schema registration. This includes generating SQL object types, collection types, and default tables, and capturing the mapping information using special attributes. – Performing manipulation (DML) and queries on XML Schema-based XMLType tables. – Automatically inserting data into default tables when schema-based XML instances are inserted into Oracle XML DB repository using FTP, HTTP/WebDAV protocols and other languages.

Managing XML Schemas and documents in the database – Substitution groups  Instance data is stored in a column/table corresponding to the head element.  Additional information includes the actual element type.  Also includes, namespace prefixes, comments, PIs.

Managing XML Schemas and documents in the database – non-SQL datatypes  Datatypes that cannot be represented in SQL are mapped to a VARCHAR2 column.  This is also on option for datatypes that do map cleanly to SQL types e.g. integer.  Schema annotation can be used to specify storage option.

Managing XML Schemas and documents in the database – key/keyref  Not enforced at SQL level but at the XML level.  Key/keyref apply within a document whereas, in most cases, such constraints are useful over a document collection.

Managing XML Schemas and documents in the database – wildcard with namespace exclusion  Cannot define a wildcard that allows elements not in a specified namespace and also allows the null namespace.  Needed to add proprietary extensions to handle this case.

Managing XML Schemas and documents in the database – redefine  Redefine is the only XML Schema feature not supported.  No customer has asked for this, yet!