File: database-schema.html

package info (click to toggle)
gnome-video-arcade 0.8.6-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,968 kB
  • ctags: 2,052
  • sloc: sh: 11,650; ansic: 11,469; xml: 630; makefile: 276
file content (219 lines) | stat: -rw-r--r-- 7,887 bytes parent folder | download
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GNOME Video Arcade Reference Manual: Appendix A. Game Database Schema</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GNOME Video Arcade Reference Manual">
<link rel="up" href="index.html" title="GNOME Video Arcade Reference Manual">
<link rel="prev" href="GvaScreenSaver.html" title="GvaScreenSaver">
<link rel="next" href="api-index-full.html" title="Index">
<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="GvaScreenSaver.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="api-index-full.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="appendix">
<div class="titlepage"><div><div><h1 class="title">
<a name="database-schema"></a>Appendix A. Game Database Schema</h1></div></div></div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.2"></a>Table: mame</h2></div></div></div>
<pre class="programlisting">
CREATE TABLE mame (
        build,
        debug DEFAULT 'no' CHECK (debug in ('yes', 'no')));
</pre>
</div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.3"></a>Table: game</h2></div></div></div>
<pre class="programlisting">
CREATE TABLE game (
        name PRIMARY KEY,
        sourcefile,
        isbios DEFAULT 'no' CHECK (isbios in ('yes', 'no')),
        runnable DEFAULT 'yes' CHECK (runnable in ('yes', 'no')),
        cloneof,
        romof,
        romset CHECK (romset in ('good', 'best available', 'bad')),
        sampleof,
        sampleset CHECK (sampleset in ('good', 'best available', 'bad')),
        description NOT NULL,
        year,
        manufacturer NOT NULL,
        sound_channels,
        input_service DEFAULT 'no' CHECK (input_service in ('yes', 'no')),
        input_tilt DEFAULT 'no' CHECK (input_tilt in ('yes', 'no')),
        input_players,
        input_buttons,
        input_coins,
        driver_status CHECK (driver_status in ('good', 'imperfect', 'preliminary')),
        driver_emulation CHECK (driver_emulation in ('good', 'imperfect', 'preliminary')),
        driver_color CHECK (driver_color in ('good', 'imperfect', 'preliminary')),
        driver_sound CHECK (driver_sound in ('good', 'imperfect', 'preliminary')),
        driver_graphic CHECK (driver_graphic in ('good', 'imperfect', 'preliminary')),
        driver_cocktail CHECK (driver_cocktail in ('good', 'imperfect', 'preliminary')),
        driver_protection CHECK (driver_protection in ('good', 'imperfect', 'preliminary')),
        driver_savestate CHECK (driver_savestate in ('supported', 'unsupported')),
        driver_palettesize);
</pre>
</div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.4"></a>Table: biosset</h2></div></div></div>
<pre class="programlisting">
CREATE TABLE biosset (
        game NOT NULL,
        name NOT NULL,
        description NOT NULL,
        default_ DEFAULT 'no' CHECK (default_ in ('yes', 'no')));
</pre>
</div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.5"></a>Table: rom</h2></div></div></div>
<pre class="programlisting">
CREATE TABLE rom (
        game NOT NULL,
        name NOT NULL,
        bios,
        size NOT NULL,
        crc,
        md5,
        sha1,
        merge,
        region,
        offset,
        status DEFAULT 'good' CHECK (status in ('baddump', 'nodump', 'good')),
        dispose DEFAULT 'no' CHECK (dispose in ('yes', 'no')));
</pre>
</div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.6"></a>Table: disk</h2></div></div></div>
<pre class="programlisting">
CREATE TABLE disk (
        game NOT NULL,
        name NOT NULL,
        md5,
        sha1,
        merge,
        region,
        index_,
        status DEFAULT 'good' CHECK (status in ('baddump', 'nodump', 'good')));
</pre>
</div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.7"></a>Table: sample</h2></div></div></div>
<pre class="programlisting">
CREATE TABLE sample (
        game NOT NULL,
        name NOT NULL);
</pre>
</div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.8"></a>Table: chip</h2></div></div></div>
<pre class="programlisting">
CREATE TABLE chip (
        game NOT NULL,
        name NOT NULL,
        type NOT NULL CHECK (type in ('cpu', 'audio')),
        clock);
</pre>
</div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.9"></a>Table: display</h2></div></div></div>
<pre class="programlisting">
CREATE TABLE display (
        game NOT NULL,
        type NOT NULL CHECK (type in ('raster', 'vector', 'lcd', 'unknown')),
        rotate NOT NULL CHECK (rotate in ('0', '90', '180', '270')),
        flipx DEFAULT 'no' CHECK (flipx in ('yes', 'no')),
        width,
        height,
        refresh NOT NULL,
        pixclock,
        htotal,
        hbend,
        hbstart,
        vtotal,
        vbend
        vbstart);
</pre>
</div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.10"></a>Table: control</h2></div></div></div>
<pre class="programlisting">
CREATE TABLE control (
        game NOT NULL,
        type NOT NULL,
        minimum,
        maximum,
        sensitivity,
        keydelta,
        reverse DEFAULT 'no' CHECK (reverse in ('yes', 'no')));
</pre>
</div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.11"></a>Table: dipvalue</h2></div></div></div>
<pre class="programlisting">
CREATE TABLE dipvalue (
        game NOT NULL,
        dipswitch NOT NULL,
        name NOT NULL,
        default_ DEFAULT 'no' CHECK (default_ in ('yes', 'no')));
</pre>
</div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.12"></a>Table: playback</h2></div></div></div>
<pre class="programlisting">
CREATE TABLE playback (
        name NOT NULL,
        inode NOT NULL,
        comment);
</pre>
</div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.13"></a>Table: window</h2></div></div></div>
<pre class="programlisting">
CREATE TABLE window (
	name PRIMARY KEY,
	x,
	y,
	width,
	height,
	maximized);
</pre>
</div>
<div class="simplesect">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.5.14"></a>View: available</h2></div></div></div>
<pre class="programlisting">
CREATE VIEW available AS SELECT
        *,
        getcategory(name) AS category,
        isfavorite(name) AS favorite FROM game
        WHERE (romset IN ('good', 'best available')
        AND isbios = 'no');
</pre>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.21</div>
</body>
</html>