Chapter 3 Building an XML model


Defining a keyRef constraint

A keyRef constraint specifies that an element or attribute value (or set of values) corresponds to the value of a specified key or unique constraint.

A keyRef is a reference to a key or a unique constraint.

For example:


Generated schema:


The KEYREF_UNIGOLD keyRef, defined on the product element, by reference to the UNIGOLD unique constraint, specifies that the gold attribute must be unique or null within the component_2 element, as well as it must be unique or null within the component_1 element (See UNIGOLD).

To display a keyRef property sheet, double-click its name or its icon in the Browser tree view.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.