[Bio] / Sprout / AttributesDBD.xml Repository:
ViewVC logotype

View of /Sprout/AttributesDBD.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (download) (as text) (annotate)
Wed Jul 2 04:50:17 2008 UTC (11 years, 4 months ago) by parrello
Branch: MAIN
Changes since 1.7: +32 -3 lines
Added evidence code table.

<?xml version='1.0' standalone='yes'?>
<Database>
  <Title>Attributes Database</Title>
  <Entities>
    <Entity name="AttributeGroup" keyType="name-string">
      <Notes>A _group_ is a named set of attribute keys. An attribute key can belong to
      many groups or none at all.</Notes>
    </Entity>
    <Entity name="AttributeKey" keyType="name-string">
      <Notes>An _attribute key_ describes named values attached to a particular type of object.
      Each instance of this entity contains the attribute's description and its name. An attribute
      key name must consist of letters, numbers, periods, underscores, and hyphens.</Notes>
      <Fields>
        <Field name="description" type="text">
          <Notes>Text describing the attribute. This should explain what the attribute means and
          what kinds of values are appropriate.</Notes>
        </Field>
        <Field name="data-type" type="name-string">
          <Notes>ERDB data type for the attribute. This serves as documentation only, but
          that may change at some future point.</Notes>
        </Field>
      </Fields>
    </Entity>
    <Entity name="TargetObject" keyType="string">
      <Notes>An _object_ represents a keyed thing to which an attribute can be assigned.
      In order to improve performance, this table has no data in it. It is simply required by
      the semantics of the database.</Notes>
    </Entity>
    <Entity name="EvidenceClass" keyType="name-string">
      <Notes>An _evidence class_ describes a general type of evidence code. An actual evidence
      code consists of its class (e.g. =dlit=, =ff=) and an optional modifier. The modifier
      is contained in the relationship between the class and the target object.</Notes>
      <Fields>
        <Field name="format" keyType="string">
          <Notes>The format string is an example showing how the modifier portion of the
          evidence code is formatted.  It may contain HTML markup.</Notes>
        </Field>
        <Field name="short-description" type="string">
          <Notes>The short description is a brief noun phrase explanation of the evidence class.</Notes>
        </Field>
        <Field name="description" type="text">
          <Notes>The description is a long text description of the evidence class and its
          format string.</Notes>
        </Field>
      </Fields>
    </Entity>
  </Entities>
  <Relationships>
    <Relationship name="IsEvidencedBy" from="TargetObject" to="EvidenceClass" arity="MM">
      <Notes>This relationship connects a feature (target object) to its evidence.</Notes>
      <Fields>
        <Field name="modifier" type="string">
          <Notes>The modifier contains ancillary information about the evidence, including
          counts for clustering codes, pubmed IDs for literature codes, and so forth.
          The modifier contains its own punctuation, and the full code is computed by
          concatenating the modifier directly to the evidence class.</Notes>
        </Field>
      </Fields>
    </Relationship>
    <Relationship name="IsInGroup" from="AttributeKey" to="AttributeGroup" arity="MM">
      <Notes>This relationship connects an attribute key to the groups of which it is a member.</Notes>
    </Relationship>
    <Relationship name="HasValueFor" from="AttributeKey" to="TargetObject" arity="MM">
      <Notes>This relationship connects an attribute key to its objects. It contains the
      attribute values, and is therefore the primary data repository for the database.</Notes>
      <Fields>
        <Field name="subkey" type="string">
            <Notes>Some attribute keys are split into two parts. The real key is controlled and
            must correspond to a key in the AttributeKey table. The second part of the key
            resides in this field. When the attribute value is presented to the user, the two
            parts of the key are joined together around the splitter value.</Notes>
        </Field>
        <Field name="value" type="text">
          <Notes>This is the actual attribute value. Note that a single key/object pair may in fact
          have many values, and therefore many entries in this table.</Notes>
        </Field>
      </Fields>
      <FromIndex>
        <Notes>This index sorts all the values for a single attribute key by the subkey value.</Notes>
        <IndexFields>
            <IndexField name="subkey" order="ascending" />
        </IndexFields>
      </FromIndex>
      <ToIndex>
        <Notes>This index sorts all the values for an object by attribute key and the subkey.</Notes>
        <IndexFields>
            <IndexField name="from-link" order="ascending" />
            <IndexField name="subkey" order="ascending" />
        </IndexFields>
      </ToIndex>
      <Indexes>
        <Index>
            <Notes>This index allows searching for an attribute value by its prefix.</Notes>
            <IndexFields>
                <IndexField name="value" order="ascending" />
            </IndexFields>
        </Index>
        <Index>
            <Notes>This index allows searching for values within keys.</Notes>
            <IndexFields>
                <IndexField name="from-link" order="ascending" />
                <IndexField name="value" order="ascending" />
            </IndexFields>
        </Index>
        <Index>
            <Notes>This index sorts all the values for a single attribute key by the target object ID.</Notes>
            <IndexFields>
                <IndexField name="from-link" order="ascending" />
                <IndexField name="to-link" order="ascending" />
            </IndexFields>
        </Index>
      </Indexes>
    </Relationship>
  </Relationships>
</Database>

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3