XML and Databases Exercise Session 3 (courtesy of Ghislain Fourny/ETH)

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

Scenario: EOT/EOT-R/COT Resident admitted March 10th Admitted for PT and OT following knee replacement for patient with CHF, COPD, shortness of breath.
AP STUDY SESSION 2.
1
Feichter_DPG-SYKL03_Bild-01. Feichter_DPG-SYKL03_Bild-02.
1 Vorlesung Informatik 2 Algorithmen und Datenstrukturen (Parallel Algorithms) Robin Pomplun.
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
Objectives: Generate and describe sequences. Vocabulary:
UNITED NATIONS Shipment Details Report – January 2006.
RXQ Customer Enrollment Using a Registration Agent (RA) Process Flow Diagram (Move-In) Customer Supplier Customer authorizes Enrollment ( )
David Burdett May 11, 2004 Package Binding for WS CDL.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt BlendsDigraphsShort.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Year 6 mental test 10 second questions
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Break Time Remaining 10:00.
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
PP Test Review Sections 6-1 to 6-6
1 The Blue Café by Chris Rea My world is miles of endless roads.
EU market situation for eggs and poultry Management Committee 20 October 2011.
Bright Futures Guidelines Priorities and Screening Tables
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
2 |SharePoint Saturday New York City
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
BEEF & VEAL MARKET SITUATION "Single CMO" Management Committee 18 April 2013.
VOORBLAD.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
© 2012 National Heart Foundation of Australia. Slide 2.
Adding Up In Chunks.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Note to the teacher: Was 28. A. to B. you C. said D. on Note to the teacher: Make this slide correct answer be C and sound to be “said”. to said you on.
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
25 seconds left…...
Subtraction: Adding UP
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Analyzing Genes and Genomes
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Converting a Fraction to %
Clock will move after 1 minute
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
Select a time to count down from the clock above
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
The Systems Group at ETH Zurich XML and Databases Exercise Session 3 Ghislain Fourny © Department of Computer Science | ETH Zürich.
Presentation transcript:

XML and Databases Exercise Session 3 (courtesy of Ghislain Fourny/ETH)

Department of Computer Science Good to know: XML Schema types Simple type - predefined or user-defined - element or attribute type Complex type - user-defined - element type only Empty content Simple content Complex content Mixed content 2

Department of Computer Science Good to know: XML Schema types Types (can) have QNames: All predefined types User-defined types (here simple) 3 Tags, attributes... XML Schema looks like XML... that's because it is XML!

Department of Computer Science Good to know: XML Schema types They can also be anonymous. 4 Anonymous types can be defined under any xs:element or xs:attribute. Non- anonymous types have a global scope and must be defined directly under xs:schema.

Department of Computer Science Complex types in XML Schema Complex type, complex content 5

Department of Computer Science Complex types in XML Schema Simple content (here anonymous) 6

Department of Computer Science Complex types in XML Schema Empty content Simple content restricted to "" Or a complex content without any children Mixed content As in complex content, with an additional attribute mixed set to true in xs:complexType 7

Department of Computer Science Exercises 1-3 Passenger Flight Airport Booking 8

Department of Computer Science Exercises 1-3 Passenger: name, address, passport number Flight: ID, number of seats, date, origin, dest Airport: name, code, tax value Booking: credit card, flight, passenger 9

Department of Computer Science Exercise 1: XML Data Sample data 10

Department of Computer Science Exercise 1: XML Data How to prevent this? 11

Department of Computer Science Exercise 1: XML Data How to prevent this? With a DTD/Schema! 12

Department of Computer Science Exercise 2: XML Schema Modelling 13

Department of Computer Science Exercise 2: XML Schema Modelling 14 Passport number name address Passenger

Department of Computer Science Exercise 2: XML Schema Modelling 15 code name tax Passport number name address Airport Passenger

Department of Computer Science Exercise 2: XML Schema Modelling 16 code name tax flightID seatNo date Passport number name address Airport Flight Passenger

Department of Computer Science Exercise 2: XML Schema Modelling 17 code name tax flightID seatNo date Passport number name address Airport Flight Passenger source dest

Department of Computer Science Exercise 2: XML Schema Modelling 18 code name tax flightID seatNo date credit card Passport number name address Airport Flight Passenger source dest book

Department of Computer Science Exercise 2: XML Schema Modelling 19 code name tax flightID seatNo date credit card Passport number name address Airport Flight Passenger source dest book 1 1 N N N M

Department of Computer Science Exercise 2: Whats wrong? 20

Department of Computer Science Exercise 2: Inconsistency 21

Department of Computer Science Exercise 2: Inconsistency 22

Department of Computer Science Exercise 2: Redundancy 23

Department of Computer Science Exercise 2: Redundancy 24

Department of Computer Science Exercise 2: Extraneous data 25

Department of Computer Science Exercise 2: A Schema for Passenger 26 Passport number name address Passenger

Department of Computer Science Exercise 2: A Schema for Passenger 27 Passport number name address Passenger

Department of Computer Science Exercise 2: A Schema for Flight 28 flightID seatNo date Airport Flight source dest

Department of Computer Science Exercise 2: A Schema for Flight 29 flightID seatNo date Airport Flight source dest

Department of Computer Science Exercise 2: A Schema for Flight 30 flightID seatNo date Airport Flight source dest

Department of Computer Science Exercise 2: A Schema for Flight 31 flightID seatNo date Airport Flight source dest

Department of Computer Science Exercise 2: A Schema for Airport 32 code name tax Airport

Department of Computer Science Exercise 2: A Schema for Airport 33 code name tax Airport

Department of Computer Science Exercise 2: A Schema for Airport 34 code name tax Airport

Department of Computer Science Exercise 2: Root Element 35

Department of Computer Science Exercise 3: DTD and XML Schema 36

Department of Computer Science Exercise 3: Corresponding XML Schema 37

Department of Computer Science Exercise 4: Corresponding XML Schema 38

Department of Computer Science Exercise 3: Corresponding XML Schema 39

Department of Computer Science Exercise 3: Corresponding XML Schema 40

Department of Computer Science Exercise 3: Corresponding XML Schema 41

Department of Computer Science 42 Hope to see you next week!