This file is indexed.

/usr/share/pgmodeler/samples/demo.dbm is in pgmodeler-common 0.8.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<?xml version="1.0" encoding="UTF-8"?>
<!--
CAUTION: Do not modify this file unless you know what you are doing.
         Unexpected results may occur if the code is changed deliberately.
-->
<dbmodel pgmodeler-ver="0.8.0-beta" last-position="0,0" last-zoom="1"
	 default-schema="public" default-owner="postgres">
<database name="demodb">
</database>

<tag name="red_tables">
	<style id="table-body" colors="#fcfcfc,#fcfcfc,#808080"/>
	<style id="table-ext-body" colors="#fcfcfc,#fcfcfc,#808080"/>
	<style id="table-name" colors="#ffffff"/>
	<style id="table-schema-name" colors="#ffffff"/>
	<style id="table-title" colors="#ff0000,#aa0000,#710000"/>
</tag>
<schema name="public" protected="true" rect-visible="true" fill-color="#6abdb2" sql-disabled="true">
</schema>

<schema name="schema_a" rect-visible="true" fill-color="#df83eb">
	<role name="postgres"/>
</schema>

<schema name="schema_b" rect-visible="true" fill-color="#fbe97f">
	<role name="postgres"/>
</schema>

<table name="table_a">
	<schema name="public"/>
	<role name="postgres"/>
	<position x="239" y="389"/>
	<column name="id_a" not-null="true">
		<type name="serial"/>
	</column>
	<column name="name">
		<type name="varchar" length="200"/>
	</column>
	<constraint name="table_a_pk" type="pk-constr" table="public.table_a">
		<columns names="id_a" ref-type="src-columns"/>
	</constraint>
	<constraint name="table_a_uq" type="uq-constr" table="public.table_a">
		<columns names="name" ref-type="src-columns"/>
	</constraint>
</table>

<table name="table_b">
	<schema name="public"/>
	<role name="postgres"/>
	<position x="261" y="528"/>
	<column name="id_b" not-null="true">
		<type name="serial"/>
	</column>
	<column name="sku" not-null="true">
		<type name="integer"/>
	</column>
	<constraint name="table_b_pk" type="pk-constr" table="public.table_b">
		<columns names="id_b" ref-type="src-columns"/>
	</constraint>
</table>

<domain name="email" not-null="true">
	<schema name="public"/>
	<role name="postgres"/>
		<type name="varchar" length="256"/>
</domain>

<table name="table_f">
	<schema name="schema_a"/>
	<role name="postgres"/>
	<position x="730" y="914.8"/>
	<column name="id_f" not-null="true">
		<type name="bigserial"/>
	</column>
	<constraint name="table_f_pk" type="pk-constr" table="schema_a.table_f">
		<columns names="id_f" ref-type="src-columns"/>
	</constraint>
</table>

<table name="table_c">
	<schema name="public"/>
	<role name="postgres"/>
	<position x="230" y="618"/>
	<column name="id_c" not-null="true">
		<type name="serial"/>
	</column>
	<column name="name">
		<type name="varchar" length="200"/>
	</column>
	<column name="date">
		<type name="date"/>
	</column>
	<column name="email">
		<type name="public.email"/>
	</column>
	<constraint name="table_c_pk" type="pk-constr" table="public.table_c">
		<columns names="id_c" ref-type="src-columns"/>
	</constraint>
</table>

<table name="table_d">
	<schema name="schema_a"/>
	<role name="postgres"/>
	<position x="732" y="389"/>
</table>

<table name="table_h">
	<schema name="schema_a"/>
	<role name="postgres"/>
	<position x="728" y="771.2"/>
	<column name="id_h" not-null="true">
		<type name="serial"/>
	</column>
	<column name="table_a_id">
		<type name="integer"/>
	</column>
	<column name="table_e_id">
		<type name="integer"/>
	</column>
	<column name="table_f_id">
		<type name="integer"/>
	</column>
	<constraint name="table_h_pk" type="pk-constr" table="schema_a.table_h">
		<columns names="id_h" ref-type="src-columns"/>
	</constraint>
</table>

<table name="table_g">
	<schema name="schema_b"/>
	<role name="postgres"/>
	<tag name="red_tables"/>
	<position x="242" y="235"/>
</table>

<relationship name="table_a_has_many_table_d" type="rel1n"
	 src-col-pattern="{sc}_{st}"
	 pk-pattern="{dt}_pk" uq-pattern="{dt}_uq"
	 src-fk-pattern="{st}_fk"
	 custom-color="#678013"
	 src-table="public.table_a"
	 dst-table="schema_a.table_d"
	 src-required="true" dst-required="false"
	 identifier="true"
>
	<label ref-type="src-label">
		<position x="15.01" y="-12.2"/>
	</label>
	<label ref-type="name-label">
		<position x="-8.98035" y="-51.1607"/>
	</label>
	<column name="test_attrib" not-null="true">
		<type name="smallint"/>
	</column>
</relationship>

<relationship name="table_g_copies_table_a" type="reldep"
	 pk-pattern="{dt}_pk"
	 custom-color="#145d49"
	 src-table="schema_b.table_g"
	 dst-table="public.table_a">
	<special-pk-cols indexes="0"/>
</relationship>

<relationship name="table_b_has_many_table_d" type="rel1n"
	 src-col-pattern="{sc}_{st}"
	 pk-pattern="{dt}_pk" uq-pattern="{dt}_uq"
	 src-fk-pattern="{st}_fk"
	 custom-color="#fe0300"
	 src-table="public.table_b"
	 dst-table="schema_a.table_d"
	 src-required="true" dst-required="false">
	<line>
		<position x="568.85" y="556.6"/>
	<position x="568.85" y="445.6"/>
	</line>
	<label ref-type="name-label">
		<position x="98.5197" y="-25.1606"/>
	</label>
</relationship>

<table name="table_e">
	<schema name="schema_a"/>
	<role name="postgres"/>
	<position x="730" y="617.4"/>
</table>

<relationship name="table_f_has_many_table_c" type="rel1n"
	 src-col-pattern="{sc}_{st}"
	 pk-pattern="{dt}_pk" uq-pattern="{dt}_uq"
	 src-fk-pattern="{st}_fk"
	 custom-color="#456796"
	 src-table="schema_a.table_f"
	 dst-table="public.table_c"
	 src-required="false" dst-required="false">
	<line>
		<position x="590.85" y="943.4"/>
	<position x="590.85" y="702.6"/>
	</line>
	<label ref-type="src-label">
		<position x="-46.91" y="0"/>
	</label>
	<label ref-type="name-label">
		<position x="35.5197" y="9.93933"/>
	</label>
</relationship>

<function name="dummy_trig_func"
		window-func="false"
		returns-setof="false"
		behavior-type="CALLED ON NULL INPUT"
		function-type="VOLATILE"
		security-type="SECURITY INVOKER"
		execution-cost="1"
		row-amount="0">
	<schema name="schema_b"/>
	<role name="postgres"/>
	<language name="plpgsql" protected="true" sql-disabled="true"/>
	<return-type>
	<type name="trigger"/>
	</return-type>
	<definition><![CDATA[BEGIN
  -- this functions does nothing! --
  RETURN NEW;
END;]]></definition>
</function>

<trigger name="dummy_trigger" firing-type="BEFORE" per-line="true" constraint="false"
	 ins-event="true" del-event="false" upd-event="false" trunc-event="false"
	 table="schema_a.table_h">
		<function signature="schema_b.dummy_trig_func()"/>
</trigger>

<view name="view_test">
	<schema name="schema_b"/>
	<role name="postgres"/>
	<position x="741" y="229.6"/>
	<reference table="schema_a.table_d" column="id_a_table_a" alias="td" column-alias="id"/>
	<reference table="public.table_a" alias="ta"/>
	<reference alias="_expr">
		<expression><![CDATA[(SELECT random())]]></expression>
	</reference>
	<expression type="select-exp">0,1,2</expression>
	<expression type="from-exp">0,1</expression>
</view>

<relationship name="rel_view_test_table_d" type="reltv"
	 src-table="schema_b.view_test"
	 dst-table="schema_a.table_d"
	 src-required="false" dst-required="false"/>

<relationship name="rel_view_test_table_a" type="reltv"
	 custom-color="#8a114b"
	 src-table="schema_b.view_test"
	 dst-table="public.table_a"
	 src-required="false" dst-required="false">
	<line>
		<position x="697" y="265"/>
	<position x="514" y="296"/>
	</line>
</relationship>

<textbox name="pagila_desc" font-size="11">
	<position x="9" y="10.273"/>
	<comment><![CDATA[[ demodb database ]

This database model demonstrate some features when designing
database models. It does not represent any specific context but can
be exported to the database since it generates well formed SQL syntax.]]></comment>
</textbox>

<textbox name="view_test_txt" font-size="9">
	<position x="723" y="151"/>
	<comment><![CDATA[Views can be constructed from
references to tables or using 
SQL expressions.]]></comment>
</textbox>

<textbox name="tag_txt" font-size="9">
	<position x="197" y="138"/>
	<comment><![CDATA[Note the table below with a different color.
pgModeler implements the concept of "tags"
in order to permit user to graphically separate
tables through different colors.]]></comment>
</textbox>

<textbox name="col_propag_txt" font-size="9">
	<position x="213" y="739"/>
	<comment><![CDATA[pgModeler implements a mechanism
called "column propagation" when using
relationships 1:1, 1:n and generalization.

This mechanism creates the needed columns
and constraints in a cascade way on all set
of tables affected by one or more relationships.

For instance, the "table_c" is linked to "table_f"
through the column "id_f_table_f" generated by
the relationship that connects them. Ahead,
the "table_e" inherits "table_c", and, as a
result, all columns of the latter are copied
to the first, including the column "id_f_table_f"
product of another relationship.]]></comment>
</textbox>

<textbox name="fk_rel_txt" font-size="9">
	<position x="978" y="771"/>
	<comment><![CDATA[User is not obligated to use the relationships
to generate the foreign keys. You can manually
create your own foreign keys on the desired tables
and pgModeler will automatically create the
relationships to graphically represent the 
link between them.

You can check that situation on "table_h". There
we have three foreign keys created by hand 
pointing repectively to "table_a", "table_e" and 
"table_f". Note the relationships linking the 
mentioned tables, those objects weren't created
by the user.]]></comment>
</textbox>

<constraint name="table_a_fk" type="fk-constr" comparison-type="MATCH FULL"
	 upd-action="NO ACTION" del-action="NO ACTION" ref-table="public.table_a" table="schema_a.table_h">
	<columns names="table_a_id" ref-type="src-columns"/>
	<columns names="id_a" ref-type="dst-columns"/>
</constraint>

<constraint name="table_g_fk" type="fk-constr" comparison-type="MATCH FULL"
	 upd-action="NO ACTION" del-action="NO ACTION" ref-table="schema_a.table_f" table="schema_a.table_h">
	<columns names="table_f_id" ref-type="src-columns"/>
	<columns names="id_f" ref-type="dst-columns"/>
</constraint>

<relationship name="rel_table_h_table_a" type="relfk"
	 custom-color="#0a21ad"
	 src-table="schema_a.table_h"
	 dst-table="public.table_a"
	 src-required="false" dst-required="false">
	<line>
		<position x="708" y="652"/>
	<position x="536" y="502"/>
	</line>
	<label ref-type="dst-label">
		<position x="9.54001" y="35.8"/>
	</label>
</relationship>

<relationship name="rel_table_h_table_f" type="relfk"
	 custom-color="#1c70ed"
	 src-table="schema_a.table_h"
	 dst-table="schema_a.table_f"
	 src-required="false" dst-required="false"/>

<relationship name="table_e_inherits_table_c" type="relgen"
         pk-pattern="{dt}_pk"
         custom-color="#124544"
         src-table="schema_a.table_e"
         dst-table="public.table_c">
        <special-pk-cols indexes="0"/>
</relationship>

<relationship name="many_table_e_has_many_table_e" type="relnn"
         src-col-pattern="{sc}_{st}" dst-col-pattern="{sc}_{dt}"
         pk-pattern="{gt}_pk" uq-pattern="{gt}_uq"
         src-fk-pattern="{st}_fk" dst-fk-pattern="{dt}_fk"
         pk-col-pattern="id"
         custom-color="#d28818"
         src-table="schema_a.table_e"
         dst-table="schema_a.table_e"
         src-required="false" dst-required="false"
         table-name="many_table_e_has_many_table_e">
        <line>
                <position x="928" y="649.16"/>
        <position x="928" y="607.4"/>
        <position x="855.333" y="607.4"/>
        </line>
        <label ref-type="src-label">
                <position x="8" y="-15.76"/>
        </label>
        <label ref-type="name-label">
                <position x="-71.6303" y="-3.60001"/>
        </label>
</relationship>

<constraint name="table_e_fk" type="fk-constr" comparison-type="MATCH FULL"
         upd-action="NO ACTION" del-action="NO ACTION" ref-table="schema_a.table_e" table="schema_a.table_h">
        <columns names="table_e_id" ref-type="src-columns"/>
        <columns names="id_c" ref-type="dst-columns"/>
</constraint>


<relationship name="rel_table_h_table_e" type="relfk"
         custom-color="#127d6b"
         src-table="schema_a.table_h"
         dst-table="schema_a.table_e"
         src-required="false" dst-required="false">
        <line>
                <position x="972" y="788"/>
        </line>
        <label ref-type="dst-label">
                <position x="15.54" y="25.4"/>
        </label>
</relationship>

</dbmodel>