2 <!DOCTYPE para PUBLIC "-//OASIS//DTD DocBook XML 5.0//EN"
3 "http://www.oasis-open.org/docbook/xml/5.0/dtd/docbook.dtd" [
4 <!-- Use symbols for repeating text. -->
5 <!ENTITY % entities SYSTEM "../entities">
7 <!ENTITY % constants SYSTEM "../constants">
10 <!-- Copyright (C) 2013, 2014, 2018 The Meme Factory, Inc. http://www.meme.com
11 - Copyright (C) 2005, 2007, 2010 Karl O. Pinc <kop@meme.com> and others
12 - See document output for full copyright information. -->
14 <!-- Core documentation on the DATASHEET_EVENTS view.
16 - This is indeed the query that makes the view, so don't break it!
18 - The "code" element must have a 'role="view"' attribute
19 - so that Gombe-MI code generation can get the code
20 - and actually make the view!
23 <para xmlns="http://docbook.org/ns/docbook"
26 <figure xml:id="datasheet_events-code">
27 <title>Query Defining the DATASHEET_EVENTS View: Part I</title>
29 <code role="view">SELECT family_events.followid AS followid
30 , family_events.intid AS intid
31 , family_events.eid AS eid
32 , family_events.e_mompid AS e_mompid
33 , family_events.e_infantpid AS e_infantpid
34 , family_events.e_sibpid AS e_sibpid
35 , family_events.e_nonfocalpid AS e_nonfocalpid
36 , family_events.date AS date
37 , family_events.time AS time
38 , family_events.mom AS mom
39 , family_events.infant AS infant
40 , family_events.infant2 AS infant2
41 , family_events.sib AS sib
42 , family_events.sib2 AS sib2
43 , family_events.behavior AS behavior
44 , family_events.position AS position
45 , family_events.uncertain AS uncertain
46 </code></literallayout>
48 <figure xml:id="datasheet_events-code-part2">
49 <title>Query Defining the DATASHEET_EVENTS View: Part II</title>
50 <literallayout><code role="view"> , family_events.e_mom AS e_mom
51 , family_events.e_mompart AS e_mompart
53 WHEN family_events.e_mom IS NOT NULL THEN
59 WHEN family_events.e_mom IS NOT NULL THEN
65 WHEN family_events.e_mom IS NOT NULL THEN
71 WHEN family_events.e_mom IS NOT NULL THEN
77 WHEN family_events.e_mom IS NOT NULL THEN
81 END AS e_mom_fishresult
83 WHEN family_events.e_mom IS NOT NULL THEN
89 WHEN family_events.e_mom IS NOT NULL THEN
95 WHEN family_events.e_mom IS NOT NULL THEN
100 </code></literallayout>
102 <figure xml:id="datasheet_events-code-part3">
103 <title>Query Defining the DATASHEET_EVENTS View: Part III</title>
104 <literallayout><code role="view"> , family_events.e_infant AS e_infant
105 , family_events.e_infantpart AS e_infantpart
107 WHEN family_events.e_infant IS NOT NULL THEN
111 END AS e_infant_foodpart
113 WHEN family_events.e_infant IS NOT NULL THEN
117 END AS e_infant_foodkind
119 WHEN family_events.e_infant IS NOT NULL THEN
123 END AS e_infant_fishpart
125 WHEN family_events.e_infant IS NOT NULL THEN
129 END AS e_infant_fishkind
131 WHEN family_events.e_infant IS NOT NULL THEN
135 END AS e_infant_fishresult
137 WHEN family_events.e_infant IS NOT NULL THEN
138 inf_vocs.vocalization
143 WHEN family_events.e_infant IS NOT NULL THEN
149 WHEN family_events.e_infant IS NOT NULL THEN
155 WHEN family_events.e_infant IS NOT NULL THEN
160 </code></literallayout>
162 <figure xml:id="datasheet_events-code-part4">
163 <title>Query Defining the DATASHEET_EVENTS View: Part IV</title>
164 <literallayout><code role="view"> , family_events.e_sib as e_sib
165 , family_events.e_sibpart AS e_sibpart
167 WHEN family_events.e_sib IS NOT NULL THEN
171 END AS e_sib_foodpart
173 WHEN family_events.e_sib IS NOT NULL THEN
177 END AS e_sib_foodkind
179 WHEN family_events.e_sib IS NOT NULL THEN
183 END AS e_sib_fishpart
185 WHEN family_events.e_sib IS NOT NULL THEN
189 END AS e_sib_fishkind
191 WHEN family_events.e_sib IS NOT NULL THEN
195 END AS e_sib_fishresult
197 WHEN family_events.e_sib IS NOT NULL THEN
198 sib_vocs.vocalization
203 WHEN family_events.e_sib IS NOT NULL THEN
209 WHEN family_events.e_sib IS NOT NULL THEN
215 WHEN family_events.e_sib IS NOT NULL THEN
220 </code></literallayout>
222 <figure xml:id="datasheet_events-code-part5">
223 <title>Query Defining the DATASHEET_EVENTS View: Part V</title>
224 <literallayout><code role="view"> , family_events.e_nonfocal AS e_nonfocal
225 , family_events.e_nonfocalpart as e_nonfocalpart
226 , family_events.e_baboon AS e_baboon
227 , family_events.e_baboonpart AS e_baboonpart
228 , family_events.e_comment AS e_comment
229 , family_events.i_comment AS i_comment
230 </code></literallayout>
232 <figure xml:id="datasheet_events-code-part6">
233 <title>Query Defining the DATASHEET_EVENTS View: Part VI</title>
234 <literallayout><code role="view"> FROM family_events
235 LEFT OUTER JOIN vocs AS mom_vocs
236 ON (mom_vocs.eid = family_events.eid
237 AND family_events.e_mom IS NOT NULL)
238 LEFT OUTER JOIN plays AS mom_plays
239 ON (mom_plays.eid = family_events.eid
240 AND family_events.e_mom IS NOT NULL)
241 LEFT OUTER JOIN rests AS mom_rests
242 ON (mom_rests.eid = family_events.eid
243 AND family_events.e_mom IS NOT NULL)
244 LEFT OUTER JOIN eats AS mom_eats
245 ON (mom_eats.eid = family_events.eid
246 AND family_events.e_mom IS NOT NULL)
247 LEFT OUTER JOIN fished AS mom_fished
248 ON (mom_fished.eid = family_events.eid
249 AND family_events.e_mom IS NOT NULL)
250 LEFT OUTER JOIN vocs AS inf_vocs
251 ON (inf_vocs.eid = family_events.eid
252 AND family_events.e_infant IS NOT NULL)
253 LEFT OUTER JOIN plays AS inf_plays
254 ON (inf_plays.eid = family_events.eid
255 AND family_events.e_infant IS NOT NULL)
256 LEFT OUTER JOIN rides AS inf_rides
257 ON (inf_rides.eid = family_events.eid
258 AND family_events.e_infant IS NOT NULL)
259 LEFT OUTER JOIN rests AS inf_rests
260 ON (inf_rests.eid = family_events.eid
261 AND family_events.e_infant IS NOT NULL)
262 LEFT OUTER JOIN eats AS inf_eats
263 ON (inf_eats.eid = family_events.eid
264 AND family_events.e_infant IS NOT NULL)
265 LEFT OUTER JOIN fished AS inf_fished
266 ON (inf_fished.eid = family_events.eid
267 AND family_events.e_infant IS NOT NULL)
268 LEFT OUTER JOIN vocs AS sib_vocs
269 ON (sib_vocs.eid = family_events.eid
270 AND family_events.e_sib IS NOT NULL)
271 LEFT OUTER JOIN plays AS sib_plays
272 ON (sib_plays.eid = family_events.eid
273 AND family_events.e_sib IS NOT NULL)
274 LEFT OUTER JOIN rides AS sib_rides
275 ON (sib_rides.eid = family_events.eid
276 AND family_events.e_sib IS NOT NULL)
277 LEFT OUTER JOIN rests AS sib_rests
278 ON (sib_rests.eid = family_events.eid
279 AND family_events.e_sib IS NOT NULL)
280 LEFT OUTER JOIN eats AS sib_eats
281 ON (sib_eats.eid = family_events.eid
282 AND family_events.e_sib IS NOT NULL)
283 LEFT OUTER JOIN fished AS sib_fished
284 ON (sib_fished.eid = family_events.eid
285 AND family_events.e_sib IS NOT NULL);</code></literallayout>
288 <!-- Figure containing DATASHEET_EVENTS view diagram. -->
290 <!-- Use mediaobject role attribute to select either xhtml (html)
291 or pdf (dblatex) file paths. -->
293 <figure xml:id="datasheet_events-erd">
294 <title>Entity Relationship Diagram of the DATASHEET_EVENTS View</title>
296 <textobject> <phrase>The DATASHEET_EVENTS view ER diagram
297 intentionally omitted due to query size.</phrase>