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

Annotation of /Sprout/AttributesDBD.xml

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : parrello 1.1 <Database>
2 : parrello 1.11 <Title>Attributes Database</Title>
3 :     <Notes>The Attributes Database allows applications to upload and retrieve custom data for NMPDR data objects. It uses the ERDB database system (which is also used by the [[SproutDatabase]] and the [[SaplingDatabase]]) to store the attributes. Attributes differ from conventional data in that they are unstructured: new attributes can be added without modifying the database design. A single attribute database services the entire NMPDR complex. %BR%%BR% Attributes are organized by _attribute key_. Attribute values are assigned to _objects_. In the real world, objects have types and IDs; however, to the attribute database only the ID matters. In general, it is possible to determine the object type from the format of the ID, but it doesn't matter to the database. %BR%%BR% The actual attribute values are stored as a relationship between the attribute keys and the objects. There can be multiple values for a single key/object pair.</Notes>
4 :     <Entities>
5 :     <Entity name="AttributeGroup" keyType="string">
6 :     <DisplayInfo theme="seed" col="3" row="1" caption="Attribute Group" />
7 :     <Notes>A group is a named set of attribute keys. An attribute key
8 :     can belong to many groups or none at all.</Notes>
9 :     <Asides>Groups provide a useful mechanism for classifying certain
10 :     types of attribute keys. An attribute key's group membership is
11 :     updated using a table of checkboxes in the attribute web interface.
12 :     The interface also allows new groups to be created. There is a group
13 :     for attributes that are only used for %FIG{ProteinEncodingGroups}%
14 :     and another for attributes that require NMPDR support. Groups can
15 :     also be used to specify attribute key white lists for individual
16 :     applications.</Asides>
17 :     </Entity>
18 :     <Entity name="AttributeKey" keyType="string">
19 :     <DisplayInfo theme="seed" col="3" row="3" caption="Attribute Key" />
20 :     <Notes>An attribute key describes named values attached to a
21 :     particular type of object. Each instance of this entity contains the
22 :     attribute's description and its name. An attribute key name must
23 :     consist of letters, numbers, periods, underscores, and/or
24 :     hyphens.</Notes>
25 :     <Fields>
26 :     <Field name="description" type="text">
27 :     <Notes>Text describing the attribute. This should explain
28 :     what the attribute means and what kinds of values are
29 :     appropriate.</Notes>
30 :     </Field>
31 :     <Field name="relationship-name" type="string">
32 :     <Notes>Name of the relationship containing the attribute
33 :     data. This relationship must look exactly like HasValueFor.
34 :     The only difference is the table name.</Notes>
35 :     <Asides>In order to improve performance of batch updates,
36 :     some attributes are stored in private relationship tables.
37 :     When retrieving attributes, we need to check each attribute
38 :     key's private table for the data. The tables have the same
39 :     structure as HasValueFor. They are separated solely for
40 :     performance reasons.</Asides>
41 :     </Field>
42 :     </Fields>
43 :     </Entity>
44 :     <Entity name="TargetObject" keyType="string">
45 :     <DisplayInfo theme="neutral" col="3" row="5" caption="Target Object" />
46 :     <Notes>An object represents a keyed thing to which an attribute can
47 :     be assigned. In order to improve performance, this table has no data
48 :     in it. It is simply required by the semantics of the
49 :     database.</Notes>
50 :     </Entity>
51 :     </Entities>
52 :     <Relationships>
53 :     <Relationship name="IsEvidencedBy" to="TargetObject" from="AttributeKey" arity="MM" converse="HasEvidence">
54 :     <DisplayInfo theme="seed" col="3.5" row="4" fixed="1" caption="Is\nEvidenced\nBy" />
55 :     <Notes>This relationship connects a feature (target object) to its
56 :     evidence attributes.</Notes>
57 :     <Asides>This table exists to separate evidence codes from other
58 :     attributes for performance reasons. Evidence codes are built from
59 :     scratch several times a week. Erasing an entire table is faster than
60 :     erasing individual rows, so putting the evidence codes in their own
61 :     private table provides significant benefits.</Asides>
62 :     <Fields>
63 :     <Field name="subkey" type="string">
64 :     <Notes>Some attribute keys are split into two parts. The
65 :     real key is controlled and must correspond to a key in the
66 :     AttributeKey table. The second part of the key resides in
67 :     this field. When the attribute value is presented to the
68 :     user, the two parts of the key are joined together around
69 :     the splitter value.</Notes>
70 :     </Field>
71 :     <Field name="value" type="text">
72 :     <Notes>This is the actual attribute value. Note that a
73 :     single key/object pair may in fact have many values, and
74 :     therefore many entries in this table.</Notes>
75 :     </Field>
76 :     </Fields>
77 :     <FromIndex>
78 :     <Notes>This index sorts all the values for a single attribute
79 :     key by the subkey value.</Notes>
80 :     <IndexFields>
81 :     <IndexField name="subkey" order="ascending" />
82 :     </IndexFields>
83 :     </FromIndex>
84 :     <ToIndex>
85 :     <Notes>This index sorts all the values for an object by
86 :     attribute key and the subkey.</Notes>
87 :     <IndexFields>
88 :     <IndexField name="from-link" order="ascending" />
89 :     <IndexField name="subkey" order="ascending" />
90 :     </IndexFields>
91 :     </ToIndex>
92 :     <Indexes>
93 :     <Index>
94 :     <Notes>This index allows searching for an attribute value by
95 :     its prefix.</Notes>
96 :     <IndexFields>
97 :     <IndexField name="value" order="ascending" />
98 :     </IndexFields>
99 :     </Index>
100 :     <Index>
101 :     <Notes>This index allows searching for values within
102 :     keys.</Notes>
103 :     <IndexFields>
104 :     <IndexField name="from-link" order="ascending" />
105 :     <IndexField name="value" order="ascending" />
106 :     </IndexFields>
107 :     </Index>
108 :     <Index>
109 :     <Notes>This index sorts all the values for a single
110 :     attribute key by the target object ID.</Notes>
111 :     <IndexFields>
112 :     <IndexField name="from-link" order="ascending" />
113 :     <IndexField name="to-link" order="ascending" />
114 :     </IndexFields>
115 :     </Index>
116 :     </Indexes>
117 :     </Relationship>
118 :     <Relationship name="IsInGroup" from="AttributeKey" to="AttributeGroup" arity="MM">
119 :     <DisplayInfo theme="seed" caption="Is\nGroup\nOf" />
120 :     <Notes>This relationship connects an attribute key to the groups of
121 :     which it is a member.</Notes>
122 :     </Relationship>
123 :     <Relationship name="HasValueFor" from="AttributeKey" to="TargetObject" arity="MM" converse="HasValueOf">
124 :     <DisplayInfo theme="seed" col="2.5" row="4" fixed="1" caption="Has\nValue\nFor" />
125 :     <Notes>This relationship connects an attribute key to its objects.
126 :     It contains the attribute values, and is therefore the primary data
127 :     repository for the database.</Notes>
128 :     <Fields>
129 :     <Field name="subkey" type="string">
130 :     <Notes>Some attribute keys are split into two parts. The
131 :     real key is controlled and must correspond to a key in the
132 :     AttributeKey table. The second part of the key resides in
133 :     this field. When the attribute value is presented to the
134 :     user, the two parts of the key are joined together around
135 :     the splitter value.</Notes>
136 :     </Field>
137 :     <Field name="value" type="text">
138 :     <Notes>This is the actual attribute value. Note that a
139 :     single key/object pair may in fact have many values, and
140 :     therefore many entries in this table.</Notes>
141 :     </Field>
142 :     </Fields>
143 :     <FromIndex>
144 :     <Notes>This index sorts all the values for a single attribute
145 :     key by the subkey value.</Notes>
146 :     <IndexFields>
147 :     <IndexField name="subkey" order="ascending" />
148 :     </IndexFields>
149 :     </FromIndex>
150 :     <ToIndex>
151 :     <Notes>This index sorts all the values for an object by
152 :     attribute key and the subkey.</Notes>
153 :     <IndexFields>
154 :     <IndexField name="from-link" order="ascending" />
155 :     <IndexField name="subkey" order="ascending" />
156 :     </IndexFields>
157 :     </ToIndex>
158 :     <Indexes>
159 :     <Index>
160 :     <Notes>This index allows searching for an attribute value by
161 :     its prefix.</Notes>
162 :     <IndexFields>
163 :     <IndexField name="value" order="ascending" />
164 :     </IndexFields>
165 :     </Index>
166 :     <Index>
167 :     <Notes>This index allows searching for values within
168 :     keys.</Notes>
169 :     <IndexFields>
170 :     <IndexField name="from-link" order="ascending" />
171 :     <IndexField name="value" order="ascending" />
172 :     </IndexFields>
173 :     </Index>
174 :     <Index>
175 :     <Notes>This index sorts all the values for a single
176 :     attribute key by the target object ID.</Notes>
177 :     <IndexFields>
178 :     <IndexField name="from-link" order="ascending" />
179 :     <IndexField name="to-link" order="ascending" />
180 :     </IndexFields>
181 :     </Index>
182 :     </Indexes>
183 :     </Relationship>
184 :     </Relationships>
185 :     <Shapes></Shapes>
186 : parrello 1.1 </Database>

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3