]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/reporter/tables.example.xml
reporter fixups ... bar and pie charts are working
[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="circ_lib"
87                           table="org_unit"
88                           id="copy_circ_lib"
89                           key="id"
90                           type="has_a"/>
91                 </links>
92
93         </table>
94                 
95         <table id="org_unit" partition="false" fact-table="false">
96                 <label>Organizational Units</label>
97                 <description>Table containing library hierarchy definition</description>
98                 <tablename>actor.org_unit</tablename>
99
100                 <fields>
101                         <field
102                           name="id"
103                           primary="true"
104                           create-type="serial"
105                           datatype="int">
106                                 <label>ID</label>
107                                 <description>Library ID</description>
108                         </field>
109                         <field
110                           name="name"
111                           datatype="text">
112                                 <label>Name</label>
113                                 <description>Library Name</description>
114                         </field>
115                         <field
116                           name="shortname"
117                           datatype="text">
118                                 <label>Short Name</label>
119                                 <description>Library Short (Policy) Name</description>
120                         </field>
121                 </fields>
122         </table>
123
124         <table id="marc_lang_map" partition="false" fact-table="false">
125                 <label>MARC Language Codes</label>
126                 <description>Table mapping MARC three character codes to language names</description>
127                 <tablename>config.language_map</tablename>
128
129                 <fields>
130                         <field
131                           name="code"
132                           primary='true'
133                           datatype="text">
134                                 <label>Code</label>
135                                 <description>MARC Language Code</description>
136                         </field>
137                         <field
138                           name="value"
139                           datatype="text">
140                                 <label>Language Name</label>
141                                 <description>Name associated with the MARC code</description>
142                         </field>
143                 </fields>
144         </table>
145
146         <table id="silly.fact" partition="true" fact-table="false">
147                 <label>Silly Fact table</label>
148                 <description>Base table for creating reports on silly words</description>
149                 <tablename>stats.silly_fact</tablename>
150
151                 <partition>
152                         <field>said_when</field>
153                         <!-- Valid options:  years, months, weeks, days, hours, minutes, seconds  -->
154                         <chunk>months</chunk>
155                         <start>2005-09-01</start>
156                         <end>2005-12-31</end>
157                 </partition>
158
159                 <fields>
160                         <field
161                           name="id"
162                           primary="true"
163                           create-type="serial"
164                           datatype="int">
165                                 <label>Silly entry id</label>
166                                 <description>Silly entry id</description>
167                         </field>
168                         <field
169                           name="silly_word_dim"
170                           datatype="int"
171                           indexed="true">
172                                 <label>Silly word dim</label>
173                                 <description>Silly word entry dimension link</description>
174                         </field>
175                         <field
176                           name="silly_sayer_dim"
177                           datatype="int"
178                           indexed="true">
179                                 <label>Silly sayer dim</label>
180                                 <description>Silly sayer entry dimension link</description>
181                         </field>
182                         <field
183                           name="said_when"
184                           datatype="timestamptz"
185                           core="true"
186                           indexed="true"
187                           default="now()">
188                                 <label>Silly word timestamp</label>
189                                 <description>Silly word entry timestamp</description>
190                         </field>
191                 </fields>
192                 <links>
193                         <link
194                           field="silly_word_dim"
195                           table="silly.word_dim"
196                           key="id"
197                           type="has_a"/>
198                         <link
199                           field="silly_sayer_dim"
200                           table="silly.sayer_dim"
201                           key="id"
202                           type="has_a"/>
203                 </links>
204         </table>
205
206         <table id="silly.word_dim">
207                 <label>Silly word list</label>
208                 <description>Silly word list</description>
209                 <tablename>stats.words</tablename>
210                 <fields>
211                         <field
212                           name="id"
213                           primary="true"
214                           create-type="serial"
215                           datatype="int">
216                                 <label>Silly word id</label>
217                         </field>
218                         <field
219                           name="word"
220                           datatype="text"
221                           indexed="true"
222                           index-type="BTREE">
223                                 <label>Silly word</label>
224                         </field>
225                 </fields>
226         </table>
227
228         <table id="silly.sayer_dim">
229                 <label>Silly word sayer list</label>
230                 <description>Silly word sayer list</description>
231                 <tablename>stats.silly_sayers</tablename>
232                 <fields>
233                         <field
234                           name="id"
235                           primary="true"
236                           create-type="serial"
237                           datatype="int">
238                                 <label>Silly person id</label>
239                         </field>
240                         <field
241                           name="sayer"
242                           widget-family="string-choose"
243                           datatype="text"
244                           indexed="true"
245                           index-type="BTREE">
246                                 <label>Silly person</label>
247                         </field>
248                 </fields>
249         </table>
250
251 </tables>
252