RE: the composite ID attribute

The concept of composite key which is available in Relational Database is it
also available in the XML DTD or XML RDF?  ..I tried to declare an element
attributes of a course relation as the following:
 1. <!ELEMENT  COURSE (course_id, dep_id , title, units)>
   2.  <!ATTLIST  COURSE  (course_id, dep_id) ID    # REQUIRED>
as you can see  the two attributes course_id and dep_id  of the main Element
(relation) COURSE are key (composite key) .
my question: Is the syntax of line no.2 right or not and why?
------------------------------------------------------------

The syntax of 2 is completely wrong.

ID matches the concept of a single-field key. In particular it is used in
fragment identifiers (this is the only way in which it is used with RDF).

Other "keying" mechanisms are possible, for instance XML Schema allows you
to define uniqueness constraints on richer items than a single attribute,
XSLT allows you to identify items by more than just a single attribute, and
so on.

These are useful in many ways but don't match URIs all that well.

RDF could make use of a URI with an XPointer portion, which in turn could
identify items in a manner close to what you suggest. It wouldn't match the
use of IDs in RDF/XML all that closely though. Indeed I'm finding it hard to
see a purpose for this in RDF/XML.

Received on Thursday, 13 March 2003 12:29:30 UTC