Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Systems Group at ETH Zurich XML and Databases Exercise Session 3 Ghislain Fourny © Department of Computer Science | ETH Zürich.

Similar presentations


Presentation on theme: "The Systems Group at ETH Zurich XML and Databases Exercise Session 3 Ghislain Fourny © Department of Computer Science | ETH Zürich."— Presentation transcript:

1 The Systems Group at ETH Zurich XML and Databases Exercise Session 3 Ghislain Fourny © Department of Computer Science | ETH Zürich

2 Department of Computer Science Exercise 1: Comparison with RDB 2

3 Department of Computer Science Exercise 1: Primary keys? 3 code name tax flightID seatNo date credit card Passport number name address Airport Flight Passenger source dest book 1 1 N N N M

4 Department of Computer Science Exercise 1: Primary keys 4 code name tax flightID seatNo date credit card Passport number name address Airport Flight Passenger source dest book 1 1 N N N M

5 Department of Computer Science Exercise 1: Primary keys with XML Schema 5

6 Department of Computer Science Exercise 1: M-N relationship? 6 code name tax flightID seatNo date credit card Passport number name address Airport Flight Passenger source dest book 1 1 N N N M

7 Department of Computer Science Exercise 1: M-N relationship 7 code name tax flightID seatNo date credit card Passport number name address Airport Flight Passenger source dest book 1 1 N N N M

8 Department of Computer Science Exercise 1: Reservation with XML Schema 8

9 Department of Computer Science Exercise 1: Reservation with XML Schema 9

10 Department of Computer Science Exercise 2: Foreign-key constraints? 10

11 Department of Computer Science Exercise 2: Foreign-key constraints 11

12 Department of Computer Science Exercise 1: Foreign-key constraints? 12

13 Department of Computer Science Exercise 1: Foreign-key constraints 13

14 Department of Computer Science Exercise 1: Foreign-key constraints with XML Schema 14

15 Department of Computer Science Exercise 1: Which constraints DTD can express 15

16 Department of Computer Science Exercise 1: Which constraints DTD can express  Unique constraints with IDs  But on whole document (in XML Schema, selector allows to define domain of uniqueness)  References with IDREFs  In DTD, IDs and IDREFs must begin with a letter – in XML Schema, any value can be used 16

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


Download ppt "The Systems Group at ETH Zurich XML and Databases Exercise Session 3 Ghislain Fourny © Department of Computer Science | ETH Zürich."

Similar presentations


Ads by Google