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

Diff of /Sprout/AttributesDBD.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Tue Nov 28 01:01:01 2006 UTC revision 1.5, Sun Feb 18 21:25:03 2007 UTC
# Line 21  Line 21 
21          </Field>          </Field>
22        </Fields>        </Fields>
23      </Entity>      </Entity>
24      <Entity name="Assignment" keyType="hash-string">      <Entity name="TargetObject" keyType="string">
25        <Notes>An [i]assignment[/i] represents the relationship between an attribute key and        <Notes>An [i]object[/i] represents a keyed thing to which an attribute can be assigned.
26        an object. The key is the digest of a string formed by the attribute key name, an equal sign,        In order to improve performance, this table has no data in it. It is simply required by
27        and the object ID. Since the key name cannot contain equal signs, the string is enough        the semantics of the database.</Notes>
28        to uniquely identify an assignment.</Notes>      </Entity>
29      </Entities>
30      <Relationships>
31        <Relationship name="IsInGroup" from="AttributeKey" to="AttributeGroup" arity="MM">
32          <Notes>This relationship connects an attribute key to the groups of which it is a member.</Notes>
33        </Relationship>
34        <Relationship name="HasValueFor" from="AttributeKey" to="TargetObject" arity="MM">
35          <Notes>This relationship connects an attribute key to its objects. It contains the
36          attribute values, and is therefore the primary data repository for the database.</Notes>
37        <Fields>        <Fields>
38          <Field name="object-id" type="string">          <Field name="subkey" type="string">
39            <Notes>This is the ID of the object to which the assignment is made.</Notes>              <Notes>Some attribute keys are split into two parts. The real key is controlled and
40                must correspond to a key in the AttributeKey table. The second part of the key
41                resides in this field. When the attribute value is presented to the user, the two
42                parts of the key are joined together around the splitter value.</Notes>
43          </Field>          </Field>
44          <Field name="value" relation="AssignmentValue" type="text">          <Field name="value" type="text">
45            <Notes>Value assigned to the object for the specified key. There may be more than            <Notes>This is the actual attribute value. Note that a single key/object pair may in fact
46            one value assigned.</Notes>            have many values, and therefore many entries in this table.</Notes>
47          </Field>          </Field>
48        </Fields>        </Fields>
49        <Indexes>        <FromIndex>
50          <Index>          <Notes>This index sorts all the values for a single attribute key by the subkey value.</Notes>
           <Notes>This index allows the user to search for assignments with a particular value.</Notes>  
51            <IndexFields>            <IndexFields>
52              <IndexField name="value" order="ascending" />              <IndexField name="subkey" order="ascending" />
53            </IndexFields>            </IndexFields>
54          </Index>        </FromIndex>
55          <Indexes>
56          <Index>          <Index>
57            <Notes>This index allows the user to search for all assignments to a particular object.</Notes>              <Notes>This index allows searching for an attribute value by its prefix.</Notes>
58            <IndexFields>            <IndexFields>
59              <IndexField name="object-id" order="ascending" />                  <IndexField name="value" order="ascending" />
60            </IndexFields>            </IndexFields>
61          </Index>          </Index>
62        </Indexes>        </Indexes>
     </Entity>  
   </Entities>  
   <Relationships>  
     <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="IsKeyOf" from="AttributeKey" to="Assignment" arity="1M">  
       <Notes>This relationship connects an attribute key to its assignments.</Notes>  
63      </Relationship>      </Relationship>
64    </Relationships>    </Relationships>
65  </Database>  </Database>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3