CSc 8711, Spring 2009

Assignment 2 (ER Database - in XML)

Due: 13 February, 2009

This assignment deals with the XML representation of a database viewed at the Entity Relationship data model level. The following are two sample XML files representing a student database ER schema and the corresponding database ER instance:

The format of these files are self-explanatory. Further clarifications will be given as we proceed with the assignment.

Complete the following tasks:

  1. Create Model and Data files for your favorite database (at least 3 entity types and 3-4 entity instances each and 3 relationship types and 3-4 relationship instances each).
  2. Design XML Schema for Model XML file.
  3. Design XML Schema for Data XML file.
  4. Write a Java program (DOM parser) that validates XML Data file against the corresponding XML Model file.

Checks to be made in your Java program to validate ER data against ER Model.

  1. MODEL CHECKS
  2. NAME CHECKS. Note: Names in ER Schema should be case insensitive
  3. VALUE CHECKS.
  4. CONSTRAINT CHECKS.