XML Many-to-Many Relationship January 30, 2006. Learning Objectives ● Create a schema for a data model containing a many:many relationship ● Understand.

Slides:



Advertisements
Similar presentations
XML III. Learning Objectives Formatting XML Documents: Overview Using Cascading Style Sheets to format XML documents Using XSL to format XML documents.
Advertisements

The eXtensible Markup Language (XML) An Applied Tutorial Kevin Thomas.
XML: Extensible Markup Language
Technology Reviews :XSL Park, Ho-gun. What is XSL Extensible Style sheet LanguageExtensible Style sheet Language An XML-based language used to.
Basics Of Spreadsheets Chapter Spreadsheet spreadsheet: grid of cells, each of which can contain text data or numeric data.
XML: Managing Data Exchange Stylesheets. Lesson Contents CSS The basic XSL file XSL transforms Templates Sort Numbering Parameters and Variables Datatypes.
Excel Chapter 6 Review slides. How many worksheets are in a workbook, by default? three.
XML Unit 6 October 31. XML, review XML is used to markup data Used to describe information Uses tags like HTML –But all tags are user-defined –Must be.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 3 Style Sheets: CSS WEB.
Information Technology in Organizations
Introduction to XML This material is based heavily on the tutorial by the same name at
Exploring Microsoft® Office Grauer and Barber 1 Committed to Shaping the Next Generation of IT Experts. Robert Grauer and Maryann Barber Using.
Manohar – Why XML is Required Problem: We want to save the data and retrieve it further or to transfer over the network. This.
XP New Perspectives on Microsoft Access 2002 Tutorial 71 Microsoft Access 2002 Tutorial 7 – Integrating Access With the Web and With Other Programs.
Chapter 5 UNDERSTANDING AND DESIGNING ACCOUNTING DATA.
4/20/2017.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
Pemrograman Berbasis WEB XML part 2 -Aurelio Rahmadian- Sumber: w3cschools.com.
RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting.
Chapter 9 Web Services Architecture and XML. Objectives By study in the chapter, you will be able to: Describe what is the goal of the Web services architecture.
Organizing Information Digitally Norm Friesen. Overview General properties of digital information Relational: tabular & linked Object-Oriented: inheritance.
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
XP New Perspectives on XML Tutorial 6 1 TUTORIAL 6 XSLT Tutorial – Carey ISBN
WORKING WITH XSLT AND XPATH
An Introduction to XML Presented by Scott Nemec at the UniForum Chicago meeting on 7/25/2006.
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
F-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
Session IV Chapter 9 – XML Schemas
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
XML About XML Things to be known Related Technologies XML DOC Structure Exploring XML.
IST 221 Internet Concepts and Applications Introduction to XML II CSS and XSLT Style Sheets.
Data Structure & File Systems Hun Myoung Park, Ph.D., Public Management and Policy Analysis Program Graduate School of International Relations International.
Implementing an REA Model in a Relational Database
The One-to-many Relationship A relationship in which one object can reference several instances of another.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
ACG 6415 XSLT Presenting XML and XBRL. Re-Purpose  The main benefit of XML / XBRL Reusability of Data contained in Instance Document We need a method.
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.
Tutorial 13 Validating Documents with Schemas
JSTL The JavaServer Pages Standard Tag Library (JSTL) is a collection of useful JSP tags which encapsulates core functionality common to many JSP applications.
XP New Perspectives on XML, 2 nd Edition Tutorial 8 1 TUTORIAL 8 CREATING ELEMENT GROUPS.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
XML A Language Presentation. Outline 1. Introduction 2. XML 2.1 Background 2.2 Structure 2.3 Advantages 3. Related Technologies 3.1 DTD 3.2 Schemas and.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
XP New Perspectives on XML, 2 nd Edition Tutorial 7 1 TUTORIAL 7 CREATING A COMPUTATIONAL STYLESHEET.
All Presentation Material Copyright Eurostep Group AB ® A Meta-model of EXPRESS in UML for MOF and UML to EXPRESS David Price April 2002.
Session II Chapter 3 – Chapter 3 – XPath Patterns & Expressions Chapter 4 – XPath Functions Chapter 15 – XPath 2.0http://
JAVA BEANS JSP - Standard Tag Library (JSTL) JAVA Enterprise Edition.
MIS2502: Data Analytics Relational Data Modeling
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
ACG 4401 XSLT Extensible Stylesheet Language for Transformations Presenting XML and XBRL.
XP 1 XSLT II Robin Burke ECT 360. XP 2 Outline Conditionals Numbering Functions and operators Variables and parameters Named and recursive templates.
XP 1 XSLT II Robin Burke ECT 360. XP 2 Homework #4 Forgot we hadn't covered "choose" becomes extra credit My books.xml didn't include descriptions.
ACG 4401 XSLT Extensible Stylesheet Language for Transformations Presenting XML and XBRL.
1 Lecture 7 Style Sheets: CSS. 2 Motivation HTML markup can be used to represent –Semantics: h1 means that an element is a top-level heading –Presentation:
VCE IT Theory Slideshows by Mark Kelly study design By Mark Kelly, vceit.com, Begin.
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
Displaying Data with XSLT ©NIITeXtensible Markup Language/Lesson 6/Slide 1 of 45 Objectives In this lesson, you will learn to: * Perform conditional formatting.
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.
Rendering XML Documents ©NIITeXtensible Markup Language/Lesson 5/Slide 1 of 46 Objectives In this session, you will learn to: * Define rendering * Identify.
Chapter 5 UNDERSTANDING AND DESIGNING ACCOUNTING DATA
Getting Started with CSS
HTML5 and CSS3 Illustrated Unit D: Formatting Text with CSS
Tutorial 04 (cont’) Using XPath Patterns in an XSLT Style Sheet.
Cascading Style Sheets - Building a stylesheet
Chapter 5 Data Resource Management.
BUS2206 Access Lab Queries Second Term,
Cascading Style Sheets - Building a stylesheet
Unit 6 - XML Transformations
Presentation transcript:

XML Many-to-Many Relationship January 30, 2006

Learning Objectives ● Create a schema for a data model containing a many:many relationship ● Understand the purpose of and how to implement an XML include ● Define the format of displayed numeric values using an XML numeric function ● Define numeric elements using more specific data types

M:M Data Model A hotel can have many amenities, and an amenity can be at many hotels.

M:M Relationships in XML: Problem ● Many-to-many relationship is not supported directly by XML. ● Each element may only have a single parent element.

M:M Relationships in XML: Solutions ● Create XML documents that eliminate the need for a many-to-many relationship. – Create a separate XML doc for each entity. – Eliminate the need for a many-to-many relationship by creating two schemas. ● Represent the many-to-many relationship using unique identifiers. ● Discard the information that requires the many-to-many relationship.

Two 1:M Relationships ● How do you link schemas? – element:

Multiple Schemas: Advantages ● Ease of schema maintenance ● Improved schema readability ● Commonly occurring elements can be reused by other schemas.

Exercise 1: 1) Create a separate schema. 2) Link schemas with element.

Data Types for Schemas ● Previous chapters: – year – month – time – anyURI – date

More Schema Data Types

Exercise 2: Data Types ● Use data type “positiveInteger” to describe data for: – City population – Hotel lower price – Hotel upper price

XSLT Functions ● Manipulate or format numeric data – Chapter 3, 1:M relationship: displays number of hotels within a city – Chapter 5, M:M relationship: format-number() function converts a numeric value into a string using specified patterns

XSLT Functions ● Format-number (number, pattern) – Number is the numeric value to be formatted – Pattern is a string that lays out the general representation of a number. Each character in the string represents either a digit from number or some special punctuation such as a comma or minus sign.

XSLT Functions

Other XSLT Functions

Exercise 3: XSLT Functions 1.Use format-number() function to display population to show digits grouped by three's, separated by a comma. 2.Use position() and last() functions to separate hotel amenities with a comma.

Summary ● To implement a m:m relationship in XML, it is necessary to break the relationship into two one-to- many type relationships. ● A schema designer may find it necessary to break the schema into separate files and link them using an include statement. ● Numeric elements can be more specifically described using data types that define the number type. ● Additional numeric functions can be used in the XML style sheet to manipulate or format numeric data.

M:M Chapter Exercise 1.Create two XML schemas to describe the illustrated data model. Include all of the attributes listed in the data model. 2.Create an XML document that includes at least two movies and two cast members per movie. 3.Create an XML style sheet to present the information in HTML format.