-
Notifications
You must be signed in to change notification settings - Fork 0
/
tables.html
154 lines (126 loc) · 9.78 KB
/
tables.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Database Format — xdapy 0.9.0 documentation</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/print.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '0.9.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/theme_extras.js"></script>
<link rel="top" title="xdapy 0.9.0 documentation" href="index.html" />
<link rel="next" title="API" href="api/index.html" />
<link rel="prev" title="Usage" href="usage.html" />
</head>
<body>
<div class="header"><h1 class="heading"><a href="index.html">
<span>xdapy 0.9.0 documentation</span></a></h1>
<h2 class="heading"><span>Database Format</span></h2>
</div>
<div class="topnav">
<p>
«  <a href="usage.html">Usage</a>
  ::  
<a class="uplink" href="index.html">Contents</a>
  ::  
<a href="api/index.html">API</a>  »
</p>
</div>
<div class="content">
<div class="section" id="database-format">
<h1>Database Format<a class="headerlink" href="#database-format" title="Permalink to this headline">¶</a></h1>
<p>PostgreSQL database dump:</p>
<div class="highlight-sql"><div class="highlight"><pre><span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">contexts</span> <span class="p">(</span>
<span class="n">entity_id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">connected_id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">connection_type</span> <span class="nb">character</span> <span class="nb">varying</span><span class="p">(</span><span class="mi">500</span><span class="p">)</span>
<span class="p">);</span>
<span class="k">CREATE</span> <span class="k">TABLE</span> <span class="k">data</span> <span class="p">(</span>
<span class="n">id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">entity_id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="k">key</span> <span class="nb">character</span> <span class="nb">varying</span><span class="p">(</span><span class="mi">40</span><span class="p">),</span>
<span class="n">mimetype</span> <span class="nb">character</span> <span class="nb">varying</span><span class="p">(</span><span class="mi">40</span><span class="p">)</span>
<span class="p">);</span>
<span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">data_chunks</span> <span class="p">(</span>
<span class="n">id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">data_id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="k">index</span> <span class="nb">integer</span><span class="p">,</span>
<span class="k">data</span> <span class="n">bytea</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="k">length</span> <span class="nb">integer</span>
<span class="p">);</span>
<span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">entities</span> <span class="p">(</span>
<span class="n">id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="k">type</span> <span class="nb">character</span> <span class="nb">varying</span><span class="p">(</span><span class="mi">60</span><span class="p">),</span>
<span class="n">unique_id</span> <span class="nb">varying</span><span class="p">(</span><span class="mi">60</span><span class="p">)</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">parent_id</span> <span class="nb">integer</span>
<span class="p">);</span>
<span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">parameter_declarations</span> <span class="p">(</span>
<span class="n">entity_name</span> <span class="nb">character</span> <span class="nb">varying</span><span class="p">(</span><span class="mi">60</span><span class="p">)</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">parameter_name</span> <span class="nb">character</span> <span class="nb">varying</span><span class="p">(</span><span class="mi">40</span><span class="p">)</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">parameter_type</span> <span class="nb">character</span> <span class="nb">varying</span><span class="p">(</span><span class="mi">40</span><span class="p">)</span>
<span class="p">);</span>
<span class="k">CREATE</span> <span class="k">TABLE</span> <span class="k">parameters</span> <span class="p">(</span>
<span class="n">id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">entity_id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">name</span> <span class="nb">character</span> <span class="nb">varying</span><span class="p">(</span><span class="mi">40</span><span class="p">),</span>
<span class="k">type</span> <span class="nb">character</span> <span class="nb">varying</span><span class="p">(</span><span class="mi">20</span><span class="p">)</span> <span class="k">NOT</span> <span class="k">NULL</span>
<span class="p">);</span>
<span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">parameters_boolean</span> <span class="p">(</span>
<span class="n">id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">value</span> <span class="nb">boolean</span>
<span class="p">);</span>
<span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">parameters_date</span> <span class="p">(</span>
<span class="n">id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">value</span> <span class="nb">date</span>
<span class="p">);</span>
<span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">parameters_datetime</span> <span class="p">(</span>
<span class="n">id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">value</span> <span class="k">timestamp</span> <span class="k">without</span> <span class="n">time</span> <span class="k">zone</span>
<span class="p">);</span>
<span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">parameters_float</span> <span class="p">(</span>
<span class="n">id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">value</span> <span class="n">double</span> <span class="k">precision</span>
<span class="p">);</span>
<span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">parameters_integer</span> <span class="p">(</span>
<span class="n">id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">value</span> <span class="nb">integer</span>
<span class="p">);</span>
<span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">parameters_string</span> <span class="p">(</span>
<span class="n">id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">value</span> <span class="nb">character</span> <span class="nb">varying</span><span class="p">(</span><span class="mi">40</span><span class="p">)</span>
<span class="p">);</span>
<span class="k">CREATE</span> <span class="k">TABLE</span> <span class="n">parameters_time</span> <span class="p">(</span>
<span class="n">id</span> <span class="nb">integer</span> <span class="k">NOT</span> <span class="k">NULL</span><span class="p">,</span>
<span class="n">value</span> <span class="n">time</span> <span class="k">without</span> <span class="n">time</span> <span class="k">zone</span>
<span class="p">);</span>
</pre></div>
</div>
</div>
</div>
<div class="bottomnav">
<p>
«  <a href="usage.html">Usage</a>
  ::  
<a class="uplink" href="index.html">Contents</a>
  ::  
<a href="api/index.html">API</a>  »
</p>
</div>
<div class="footer">
© Copyright 2012, Hannah Dold, Rike-Benjamin Schuppner.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>