XML - Managing Data Exchange/The many-to-many relationship/Exercises

From Wikibooks, open books for an open world
< XML - Managing Data Exchange‎ | The many-to-many relationship
Jump to: navigation, search

Many-to-Many Chapter => The Many-to-Many Relationship

Many-to-Many Answers => Answers


1) Movie collection[edit]

Use the following data model:

Xml5moviedm.png

a. Using the IDREF method, create an XML schema to describe the illustrated data model. Include all of the attributes listed in the data model.
b. Create an XML document that includes at least two movies and two cast members per movie.
c. Create a simple XML style sheet to present the information in HTML format. No tables or CSS are necessary.


2) Student/Class Directory[edit]

a. Every class at a school can have many students, and each student can be registered to more than one class at a time. Create an XML schema to capture this many-to-many relationship. Be sure to include the class name, capacity, building number, building name, and room number. Also include the student first/last name separately and his or her grade for the class.
b. Using the XML schema created in part a, create an XML document and an XML stylesheet. You can make up your own data, but be sure to use at least three students for each class.


Many-to-Many Chapter => The Many-to-Many Relationship

Many-to-Many Answers => Answers