]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/reporter/tables.example.xml
1877895d685634842cd8d731720ee430d4f09ac9
[Evergreen.git] / Open-ILS / src / reporter / tables.example.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <tables>
3
4         <table id="wide-copy" partition="false" fact-table="true">
5                 <label>Wide Copy info</label>
6                 <description>Base table for creating snapshot reports on copy information</description>
7                 <tablename>stats.fleshed_copy</tablename>
8
9                 <fields>
10                         <field
11                           name="id"
12                           primary="true"
13                           create-type="serial"
14                           datatype="int">
15                                 <label>ID</label>
16                                 <description>Copy ID</description>
17                         </field>
18                         <field
19                           name="barcode"
20                           widget-family="string-input"
21                           datatype="text">
22                                 <label>Barcode</label>
23                                 <description>Copy Barcode</description>
24                         </field>
25                         <field
26                           name="owning_lib"
27                           datatype="int"
28                           indexed="true">
29                                 <label>Owner</label>
30                                 <description>ID of the Owning Library</description>
31                         </field>
32                         <field
33                           name="circ_lib"
34                           datatype="int"
35                           indexed="true">
36                                 <label>Circulator</label>
37                                 <description>ID of the Circulating Library</description>
38                         </field>
39                         <field
40                           name="create_date_day"
41                           datatype="date">
42                                 <label>Create Date</label>
43                                 <description>Date of the copy's cataloging</description>
44                         </field>
45                         <field
46                           name="create_date_hour"
47                           datatype="timestamptz">
48                                 <label>Create Date and Hour</label>
49                                 <description>Date and Hour of the copy's cataloging</description>
50                         </field>
51                         <field
52                           name="create_date"
53                           datatype="timestamptz"
54                           indexed="true"
55                           default="now()">
56                                 <label>Create Date</label>
57                                 <description>Timestamp of the copy's cataloging</description>
58                         </field>
59                         <field
60                           name="edit_date"
61                           datatype="timestamptz"
62                           indexed="true"
63                           default="now()">
64                                 <label>Edit Date</label>
65                                 <description>Timestamp of the copy's last edit</description>
66                         </field>
67                         <field
68                           name="edit_date_day"
69                           datatype="date">
70                                 <label>Edit Date</label>
71                                 <description>Date of the copy's last edit</description>
72                         </field>
73                         <field
74                           name="edit_date_hour"
75                           datatype="timestamptz">
76                                 <label>Edit Date and Hour</label>
77                                 <description>Date and Hour of the copy's last edit</description>
78                         </field>
79                         <field
80                           name="item_lang"
81                           datatype="text">
82                                 <label>Language</label>
83                                 <description>MARC Item Language</description>
84                         </field>
85                         <field
86                           name="item_form"
87                           datatype="text">
88                                 <label>Form</label>
89                                 <description>MARC Item Form of Material</description>
90                         </field>
91                         <field
92                           name="item_type"
93                           datatype="text">
94                                 <label>Type</label>
95                                 <description>MARC Item Type</description>
96                         </field>
97                         <field
98                           name="call_number_label"
99                           transform-group="call_number"
100                           widget-family="string-input"
101                           datatype="text">
102                                 <label>Call Number</label>
103                                 <description>Copy Call Number Label</description>
104                         </field>
105                 </fields>
106
107                 <links>
108                         <link
109                           field="create_date_day"
110                           table="generic_day_series"
111                           id="copy_create_day"
112                           key="date"
113                           type="has_a"/>
114                         <link
115                           field="create_date_hour"
116                           table="generic_hour_series"
117                           id="copy_create_hour"
118                           key="date_hour"
119                           type="has_a"/>
120                         <link
121                           field="edit_date_day"
122                           table="generic_day_series"
123                           id="copy_edit_day"
124                           key="date"
125                           type="has_a"/>
126                         <link
127                           field="edit_date_hour"
128                           table="generic_hour_series"
129                           id="copy_edit_hour"
130                           key="date_hour"
131                           type="has_a"/>
132                         <link
133                           field="owning_lib"
134                           table="org_unit"
135                           id="copy_owning_lib"
136                           key="id"
137                           type="has_a"/>
138                         <link
139                           field="item_lang"
140                           table="marc_lang_map"
141                           id="copy_language"
142                           key="code"
143                           type="has_a"/>
144                         <link
145                           field="item_form"
146                           table="marc_form_map"
147                           id="copy_item_form"
148                           key="code"
149                           type="has_a"/>
150                         <link
151                           field="item_type"
152                           table="marc_type_map"
153                           id="copy_item_type"
154                           key="code"
155                           type="has_a"/>
156                         <link
157                           field="circ_lib"
158                           table="org_unit"
159                           id="copy_circ_lib"
160                           key="id"
161                           type="has_a"/>
162                 </links>
163
164         </table>
165                 
166         <table id="org_unit" partition="false" fact-table="false">
167                 <label>Organizational Units</label>
168                 <description>Table containing library hierarchy definition</description>
169                 <tablename>actor.org_unit</tablename>
170
171                 <fields>
172                         <field
173                           name="id"
174                           primary="true"
175                           filterable='true'
176                           widget-family="lib-choose"
177                           create-type="serial"
178                           datatype="int">
179                                 <label>Unique Library ID</label>
180                                 <description>Unique Library ID</description>
181                         </field>
182                         <field
183                           name="name"
184                           widget-family="string-choose"
185                           datatype="text">
186                                 <label>Name</label>
187                                 <description>Library Name</description>
188                         </field>
189                         <field
190                           name="shortname"
191                           widget-family="string-choose"
192                           datatype="text">
193                                 <label>Short Name</label>
194                                 <description>Library Short (Policy) Name</description>
195                         </field>
196                 </fields>
197         </table>
198
199         <table id="marc_lang_map" partition="false" fact-table="false">
200                 <label>MARC Language Codes</label>
201                 <description>Table mapping MARC three character codes to language names</description>
202                 <tablename>config.language_map</tablename>
203
204                 <fields>
205                         <field
206                           name="code"
207                           primary='true'
208                           datatype="text">
209                                 <label>Code</label>
210                                 <description>MARC Language Code</description>
211                         </field>
212                         <field
213                           name="value"
214                           widget-family="string-choose"
215                           datatype="text">
216                                 <label>Language Name</label>
217                                 <description>Name associated with the MARC code</description>
218                         </field>
219                 </fields>
220         </table>
221
222         <table id="generic_day_series" partition="false" fact-table="false">
223                 <label>Constant day series</label>
224                 <description>View providing a day series starting at 1900 and ending at 'now'</description>
225                 <tablename>reporter.date_series</tablename>
226
227                 <fields>
228                         <field
229                           name="date"
230                           primary='true'
231                           filterable='true'
232                           hidden='false'
233                           datatype="timestamptz">
234                                 <label>Date</label>
235                                 <description>Date</description>
236                         </field>
237                 </fields>
238         </table>
239
240         <table id="generic_hour_series" partition="false" fact-table="false">
241                 <label>Constant hour series</label>
242                 <description>View providing a hour series starting at 1900 and ending at 'now'</description>
243                 <tablename>reporter.date_hour_series</tablename>
244
245                 <fields>
246                         <field
247                           name="date_hour"
248                           primary='true'
249                           filterable='true'
250                           hidden='false'
251                           datatype="timestamptz">
252                                 <label>Date and Hour</label>
253                                 <description>Date and Hour</description>
254                         </field>
255                 </fields>
256         </table>
257
258         <table id="marc_form_map" partition="false" fact-table="false">
259                 <label>MARC Item Form Codes</label>
260                 <description>Table mapping MARC three character codes to Item Form names</description>
261                 <tablename>config.item_form_map</tablename>
262
263                 <fields>
264                         <field
265                           name="code"
266                           primary='true'
267                           datatype="text">
268                                 <label>Code</label>
269                                 <description>MARC Item Form Code</description>
270                         </field>
271                         <field
272                           name="value"
273                           widget-family="string-choose"
274                           datatype="text">
275                                 <label>Item Form Name</label>
276                                 <description>Name associated with the MARC code</description>
277                         </field>
278                 </fields>
279         </table>
280
281         <table id="marc_type_map" partition="false" fact-table="false">
282                 <label>MARC Item Type Codes</label>
283                 <description>Table mapping MARC three character codes to Item Type names</description>
284                 <tablename>config.item_type_map</tablename>
285
286                 <fields>
287                         <field
288                           name="code"
289                           primary='true'
290                           datatype="text">
291                                 <label>Code</label>
292                                 <description>MARC Item Type Code</description>
293                         </field>
294                         <field
295                           name="value"
296                           widget-family="string-choose"
297                           datatype="text">
298                                 <label>Item Type Name</label>
299                                 <description>Name associated with the MARC code</description>
300                         </field>
301                 </fields>
302         </table>
303
304         <table id="silly.fact" partition="true" fact-table="false">
305                 <label>Silly Fact table</label>
306                 <description>Base table for creating reports on silly words</description>
307                 <tablename>stats.silly_fact</tablename>
308
309                 <partition>
310                         <field>said_when</field>
311                         <!-- Valid options:  years, months, weeks, days, hours, minutes, seconds  -->
312                         <chunk>months</chunk>
313                         <start>2005-09-01</start>
314                         <end>2005-12-31</end>
315                 </partition>
316
317                 <fields>
318                         <field
319                           name="id"
320                           primary="true"
321                           create-type="serial"
322                           datatype="int">
323                                 <label>Silly entry id</label>
324                                 <description>Silly entry id</description>
325                         </field>
326                         <field
327                           name="silly_word_dim"
328                           datatype="int"
329                           indexed="true">
330                                 <label>Silly word dim</label>
331                                 <description>Silly word entry dimension link</description>
332                         </field>
333                         <field
334                           name="silly_sayer_dim"
335                           datatype="int"
336                           indexed="true">
337                                 <label>Silly sayer dim</label>
338                                 <description>Silly sayer entry dimension link</description>
339                         </field>
340                         <field
341                           name="said_when"
342                           datatype="timestamptz"
343                           core="true"
344                           indexed="true"
345                           default="now()">
346                                 <label>Silly word timestamp</label>
347                                 <description>Silly word entry timestamp</description>
348                         </field>
349                 </fields>
350                 <links>
351                         <link
352                           field="silly_word_dim"
353                           table="silly.word_dim"
354                           key="id"
355                           type="has_a"/>
356                         <link
357                           field="silly_sayer_dim"
358                           table="silly.sayer_dim"
359                           key="id"
360                           type="has_a"/>
361                 </links>
362         </table>
363
364         <table id="silly.word_dim">
365                 <label>Silly word list</label>
366                 <description>Silly word list</description>
367                 <tablename>stats.words</tablename>
368                 <fields>
369                         <field
370                           name="id"
371                           primary="true"
372                           create-type="serial"
373                           datatype="int">
374                                 <label>Silly word id</label>
375                         </field>
376                         <field
377                           name="word"
378                           datatype="text"
379                           indexed="true"
380                           index-type="BTREE">
381                                 <label>Silly word</label>
382                         </field>
383                 </fields>
384         </table>
385
386         <table id="silly.sayer_dim">
387                 <label>Silly word sayer list</label>
388                 <description>Silly word sayer list</description>
389                 <tablename>stats.silly_sayers</tablename>
390                 <fields>
391                         <field
392                           name="id"
393                           primary="true"
394                           create-type="serial"
395                           datatype="int">
396                                 <label>Silly person id</label>
397                         </field>
398                         <field
399                           name="sayer"
400                           widget-family="string-choose"
401                           datatype="text"
402                           indexed="true"
403                           index-type="BTREE">
404                                 <label>Silly person</label>
405                         </field>
406                 </fields>
407         </table>
408
409 </tables>
410