]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/reporter/tables.example.xml
a721354c7586afdd2fc3639309c64d586cd7d05f
[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                           datatype="text">
21                                 <label>Barcode</label>
22                                 <description>Copy Barcode</description>
23                         </field>
24                         <field
25                           name="owning_lib"
26                           datatype="int"
27                           indexed="true">
28                                 <label>Owner</label>
29                                 <description>ID of the Owning Library</description>
30                         </field>
31                         <field
32                           name="circ_lib"
33                           datatype="int"
34                           indexed="true">
35                                 <label>Circulator</label>
36                                 <description>ID of the Circulating Library</description>
37                         </field>
38                         <field
39                           name="create_date"
40                           datatype="timestamptz"
41                           indexed="true"
42                           default="now()">
43                                 <label>Create Date</label>
44                                 <description>Timestamp of the copy's cataloging</description>
45                         </field>
46                         <field
47                           name="item_lang"
48                           datatype="text">
49                                 <label>Language</label>
50                                 <description>MARC Item Language</description>
51                         </field>
52                         <field
53                           name="item_form"
54                           datatype="text">
55                                 <label>Form</label>
56                                 <description>MARC Item Form of Material</description>
57                         </field>
58                         <field
59                           name="item_type"
60                           datatype="text">
61                                 <label>Type</label>
62                                 <description>MARC Item Type</description>
63                         </field>
64                         <field
65                           name="call_number_label"
66                           datatype="text">
67                                 <label>Call Number</label>
68                                 <description>Copy Call Number Label</description>
69                         </field>
70                 </fields>
71
72                 <links>
73                         <link
74                           field="owning_lib"
75                           table="org_unit"
76                           id="copy_owning_lib"
77                           key="id"
78                           type="has_a"/>
79                         <link
80                           field="item_lang"
81                           table="marc_lang_map"
82                           id="copy_language"
83                           key="code"
84                           type="has_a"/>
85                         <link
86                           field="item_form"
87                           table="marc_form_map"
88                           id="copy_item_form"
89                           key="code"
90                           type="has_a"/>
91                         <link
92                           field="item_type"
93                           table="marc_type_map"
94                           id="copy_item_type"
95                           key="code"
96                           type="has_a"/>
97                         <link
98                           field="circ_lib"
99                           table="org_unit"
100                           id="copy_circ_lib"
101                           key="id"
102                           type="has_a"/>
103                 </links>
104
105         </table>
106                 
107         <table id="org_unit" partition="false" fact-table="false">
108                 <label>Organizational Units</label>
109                 <description>Table containing library hierarchy definition</description>
110                 <tablename>actor.org_unit</tablename>
111
112                 <fields>
113                         <field
114                           name="id"
115                           primary="true"
116                           create-type="serial"
117                           datatype="int">
118                                 <label>ID</label>
119                                 <description>Library ID</description>
120                         </field>
121                         <field
122                           name="name"
123                           datatype="text">
124                                 <label>Name</label>
125                                 <description>Library Name</description>
126                         </field>
127                         <field
128                           name="shortname"
129                           datatype="text">
130                                 <label>Short Name</label>
131                                 <description>Library Short (Policy) Name</description>
132                         </field>
133                 </fields>
134         </table>
135
136         <table id="marc_lang_map" partition="false" fact-table="false">
137                 <label>MARC Language Codes</label>
138                 <description>Table mapping MARC three character codes to language names</description>
139                 <tablename>config.language_map</tablename>
140
141                 <fields>
142                         <field
143                           name="code"
144                           primary='true'
145                           datatype="text">
146                                 <label>Code</label>
147                                 <description>MARC Language Code</description>
148                         </field>
149                         <field
150                           name="value"
151                           datatype="text">
152                                 <label>Language Name</label>
153                                 <description>Name associated with the MARC code</description>
154                         </field>
155                 </fields>
156         </table>
157
158         <table id="marc_form_map" partition="false" fact-table="false">
159                 <label>MARC Item Form Codes</label>
160                 <description>Table mapping MARC three character codes to Item Form names</description>
161                 <tablename>config.item_form_map</tablename>
162
163                 <fields>
164                         <field
165                           name="code"
166                           primary='true'
167                           datatype="text">
168                                 <label>Code</label>
169                                 <description>MARC Item Form Code</description>
170                         </field>
171                         <field
172                           name="value"
173                           datatype="text">
174                                 <label>Item Form Name</label>
175                                 <description>Name associated with the MARC code</description>
176                         </field>
177                 </fields>
178         </table>
179
180         <table id="marc_type_map" partition="false" fact-table="false">
181                 <label>MARC Item Type Codes</label>
182                 <description>Table mapping MARC three character codes to Item Type names</description>
183                 <tablename>config.item_type_map</tablename>
184
185                 <fields>
186                         <field
187                           name="code"
188                           primary='true'
189                           datatype="text">
190                                 <label>Code</label>
191                                 <description>MARC Item Type Code</description>
192                         </field>
193                         <field
194                           name="value"
195                           datatype="text">
196                                 <label>Item Type Name</label>
197                                 <description>Name associated with the MARC code</description>
198                         </field>
199                 </fields>
200         </table>
201
202         <table id="silly.fact" partition="true" fact-table="false">
203                 <label>Silly Fact table</label>
204                 <description>Base table for creating reports on silly words</description>
205                 <tablename>stats.silly_fact</tablename>
206
207                 <partition>
208                         <field>said_when</field>
209                         <!-- Valid options:  years, months, weeks, days, hours, minutes, seconds  -->
210                         <chunk>months</chunk>
211                         <start>2005-09-01</start>
212                         <end>2005-12-31</end>
213                 </partition>
214
215                 <fields>
216                         <field
217                           name="id"
218                           primary="true"
219                           create-type="serial"
220                           datatype="int">
221                                 <label>Silly entry id</label>
222                                 <description>Silly entry id</description>
223                         </field>
224                         <field
225                           name="silly_word_dim"
226                           datatype="int"
227                           indexed="true">
228                                 <label>Silly word dim</label>
229                                 <description>Silly word entry dimension link</description>
230                         </field>
231                         <field
232                           name="silly_sayer_dim"
233                           datatype="int"
234                           indexed="true">
235                                 <label>Silly sayer dim</label>
236                                 <description>Silly sayer entry dimension link</description>
237                         </field>
238                         <field
239                           name="said_when"
240                           datatype="timestamptz"
241                           core="true"
242                           indexed="true"
243                           default="now()">
244                                 <label>Silly word timestamp</label>
245                                 <description>Silly word entry timestamp</description>
246                         </field>
247                 </fields>
248                 <links>
249                         <link
250                           field="silly_word_dim"
251                           table="silly.word_dim"
252                           key="id"
253                           type="has_a"/>
254                         <link
255                           field="silly_sayer_dim"
256                           table="silly.sayer_dim"
257                           key="id"
258                           type="has_a"/>
259                 </links>
260         </table>
261
262         <table id="silly.word_dim">
263                 <label>Silly word list</label>
264                 <description>Silly word list</description>
265                 <tablename>stats.words</tablename>
266                 <fields>
267                         <field
268                           name="id"
269                           primary="true"
270                           create-type="serial"
271                           datatype="int">
272                                 <label>Silly word id</label>
273                         </field>
274                         <field
275                           name="word"
276                           datatype="text"
277                           indexed="true"
278                           index-type="BTREE">
279                                 <label>Silly word</label>
280                         </field>
281                 </fields>
282         </table>
283
284         <table id="silly.sayer_dim">
285                 <label>Silly word sayer list</label>
286                 <description>Silly word sayer list</description>
287                 <tablename>stats.silly_sayers</tablename>
288                 <fields>
289                         <field
290                           name="id"
291                           primary="true"
292                           create-type="serial"
293                           datatype="int">
294                                 <label>Silly person id</label>
295                         </field>
296                         <field
297                           name="sayer"
298                           widget-family="string-choose"
299                           datatype="text"
300                           indexed="true"
301                           index-type="BTREE">
302                                 <label>Silly person</label>
303                         </field>
304                 </fields>
305         </table>
306
307 </tables>
308