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

Annotation of /Sprout/AttributesDBD.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (view) (download) (as text)

1 : parrello 1.1 <?xml version='1.0' standalone='yes'?>
2 :     <Database>
3 :     <Title>Attributes Database</Title>
4 :     <Entities>
5 :     <Entity name="AttributeGroup" keyType="name-string">
6 :     <Notes>A [i]group[/i] is a named set of attribute keys. An attribute key can belong to
7 :     many groups or none at all.</Notes>
8 :     </Entity>
9 :     <Entity name="AttributeKey" keyType="name-string">
10 :     <Notes>An [i]attribute key[/i] describes named values attached to a particular type of object.
11 :     Each instance of this entity contains the attribute's description and its name. An attribute
12 :     key name must consist of letters, numbers, periods, underscores, and hyphens.</Notes>
13 :     <Fields>
14 :     <Field name="description" type="text">
15 :     <Notes>Text describing the attribute. This should explain what the attribute means and
16 :     what kinds of values are appropriate.</Notes>
17 :     </Field>
18 :     <Field name="data-type" type="name-string">
19 :     <Notes>ERDB data type for the attribute. This serves as documentation only, but
20 :     that may change at some future point.</Notes>
21 :     </Field>
22 :     </Fields>
23 :     </Entity>
24 : parrello 1.2 <Entity name="TargetObject" keyType="string">
25 :     <Notes>An [i]object[/i] represents a keyed thing to which an attribute can be assigned.
26 :     In order to improve performance, this table has no data in it. It is simply required by
27 :     the semantics of the database.</Notes>
28 : parrello 1.1 </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 : parrello 1.2 <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>
38 : parrello 1.5 <Field name="subkey" type="string">
39 :     <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>
44 :     <Field name="value" type="text">
45 : parrello 1.2 <Notes>This is the actual attribute value. Note that a single key/object pair may in fact
46 :     have many values, and therefore many entries in this table.</Notes>
47 :     </Field>
48 :     </Fields>
49 : parrello 1.5 <FromIndex>
50 :     <Notes>This index sorts all the values for a single attribute key by the subkey value.</Notes>
51 :     <IndexFields>
52 :     <IndexField name="subkey" order="ascending" />
53 :     </IndexFields>
54 :     </FromIndex>
55 : parrello 1.7 <ToIndex>
56 :     <Notes>This index sorts all the values for an object by attribute key and the subkey.</Notes>
57 :     <IndexFields>
58 :     <IndexField name="from-link" order="ascending" />
59 :     <IndexField name="subkey" order="ascending" />
60 :     </IndexFields>
61 :     </ToIndex>
62 : parrello 1.5 <Indexes>
63 :     <Index>
64 :     <Notes>This index allows searching for an attribute value by its prefix.</Notes>
65 :     <IndexFields>
66 :     <IndexField name="value" order="ascending" />
67 :     </IndexFields>
68 :     </Index>
69 : parrello 1.6 <Index>
70 :     <Notes>This index allows searching for values within keys.</Notes>
71 :     <IndexFields>
72 :     <IndexField name="from-link" order="ascending" />
73 :     <IndexField name="value" order="ascending" />
74 :     </IndexFields>
75 :     </Index>
76 : parrello 1.7 <Index>
77 :     <Notes>This index sorts all the values for a single attribute key by the target object ID.</Notes>
78 :     <IndexFields>
79 :     <IndexField name="from-link" order="ascending" />
80 :     <IndexField name="to-link" order="ascending" />
81 :     </IndexFields>
82 :     </Index>
83 : parrello 1.5 </Indexes>
84 : parrello 1.1 </Relationship>
85 :     </Relationships>
86 :     </Database>

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3