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:
- 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).
- Design XML Schema for Model XML file.
- Design XML Schema for Data XML file.
- 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.
- MODEL CHECKS
- Check if primary key attribute name is correct.
- NAME CHECKS. Note: Names in ER Schema should be case insensitive
- Entity.
- Entity Names
- Attribute Names
- Relationship.
- Relationship Names
- Correct Entities are involved (number and name)
- Key Attribute Names are correct (number and name)
- Ordinary Attribute Names
- VALUE CHECKS.
- Data Type Checks for Attributes (type and size) - We can assume that
there are only "integer" and "string" data types. You may change
the "time" and "date" data types to "string".
- Check for missing or extra or repeated attributes in the
data file.
- Missing values.
- CONSTRAINT CHECKS.
- Primary Key Check for Entity Sets
- Cardinality Check for Relationship Sets
- Participation Check for Relationship Sets