CS145 - Spring 2003
Introduction to Databases

Online (OTC) Homework-Account Information

Logins for OTC homework have been assigned to students who filled out the course registration form, or requested an auditor account, by the Tue 9 Apr 2003 deadline. Email describing these assigned logins were sent by 1:45am PDT Wed 9 Apr 2003.

Please email course staff at cs145@cs.stanford.edu for further assistance setting up your OTC account.

Homework 1 Questions and Answers

  1. Is an ID attribute value unique per attribute, per element, or per document?

    In a valid XML document, each value of an ID attribute is unique for the entire XML document.

  2. Can IDREF[S] point to an ID that does not exist?

    In a valid XML document, no; IDREF[S] point to any ID that exists within the XML document, without limitation.

  3. Why? (Is there some intuition for ID and IDREF?)

    An ID attribute only uniquely identifies an XML element, one of those <tag>...</tag> productions. An IDREF attribute only uniquely identifies another element in the XML document, so that one element can be connected to another element not its container (parent or ancestor). This is also why no more than one attribute of an element may be of type ID in a valid XML document.


CS145 Web pages - email the staff