Projekt

Obecné

Profil

Stáhnout (7 KB) Statistiky
| Větev: | Tag: | Revize:
1
--
2
-- PostgreSQL database dump
3
--
4

    
5
-- Dumped from database version 10.5
6
-- Dumped by pg_dump version 10.5
7

    
8
SET statement_timeout = 0;
9
SET lock_timeout = 0;
10
SET idle_in_transaction_session_timeout = 0;
11
SET client_encoding = 'UTF8';
12
SET standard_conforming_strings = on;
13
SELECT pg_catalog.set_config('search_path', '', false);
14
SET check_function_bodies = false;
15
SET client_min_messages = warning;
16
SET row_security = off;
17

    
18
--
19
-- Name: DATABASE "Cviceni"; Type: COMMENT; Schema: -; Owner: postgres
20
--
21

    
22
COMMENT ON DATABASE "Cviceni" IS 'Datab?ze obsahuj?c? ?daje p??slu?n? k 3d cvi?ebn?mu stroji';
23

    
24

    
25
--
26
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
27
--
28

    
29
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
30

    
31

    
32
--
33
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
34
--
35

    
36
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
37

    
38

    
39
SET default_tablespace = '';
40

    
41
SET default_with_oids = false;
42

    
43
--
44
-- Name: indications; Type: TABLE; Schema: public; Owner: postgres
45
--
46

    
47
CREATE TABLE public.indications (
48
    ind_id integer NOT NULL,
49
    indication text,
50
    description text,
51
    curve_name text,
52
    procedure_time integer
53
);
54

    
55

    
56
ALTER TABLE public.indications OWNER TO postgres;
57

    
58
--
59
-- Name: TABLE indications; Type: COMMENT; Schema: public; Owner: postgres
60
--
61

    
62
COMMENT ON TABLE public.indications IS 'Indikace pacientů';
63

    
64

    
65
--
66
-- Name: Indications_Ind_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
67
--
68

    
69
CREATE SEQUENCE public."Indications_Ind_id_seq"
70
    START WITH 1
71
    INCREMENT BY 1
72
    NO MINVALUE
73
    NO MAXVALUE
74
    CACHE 1;
75

    
76

    
77
ALTER TABLE public."Indications_Ind_id_seq" OWNER TO postgres;
78

    
79
--
80
-- Name: Indications_Ind_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
81
--
82

    
83
ALTER SEQUENCE public."Indications_Ind_id_seq" OWNED BY public.indications.ind_id;
84

    
85

    
86
--
87
-- Name: actual_indication; Type: TABLE; Schema: public; Owner: postgres
88
--
89

    
90
CREATE TABLE public.actual_indication (
91
    id_p integer NOT NULL,
92
    id_ind integer NOT NULL
93
);
94

    
95

    
96
ALTER TABLE public.actual_indication OWNER TO postgres;
97

    
98
--
99
-- Name: patient; Type: TABLE; Schema: public; Owner: postgres
100
--
101

    
102
CREATE TABLE public.patient (
103
    id integer NOT NULL,
104
    name text,
105
    surname text NOT NULL,
106
    birthdate date NOT NULL,
107
    id_number text NOT NULL
108
);
109

    
110

    
111
ALTER TABLE public.patient OWNER TO postgres;
112

    
113
--
114
-- Name: TABLE patient; Type: COMMENT; Schema: public; Owner: postgres
115
--
116

    
117
COMMENT ON TABLE public.patient IS 'Seznam pacientů a příslušných údajů';
118

    
119

    
120
--
121
-- Name: patient_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
122
--
123

    
124
CREATE SEQUENCE public.patient_id_seq
125
    START WITH 1
126
    INCREMENT BY 1
127
    NO MINVALUE
128
    NO MAXVALUE
129
    CACHE 1;
130

    
131

    
132
ALTER TABLE public.patient_id_seq OWNER TO postgres;
133

    
134
--
135
-- Name: patient_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
136
--
137

    
138
ALTER SEQUENCE public.patient_id_seq OWNED BY public.patient.id;
139

    
140

    
141
--
142
-- Name: results; Type: TABLE; Schema: public; Owner: postgres
143
--
144

    
145
CREATE TABLE public.results (
146
    p_id integer NOT NULL,
147
    ind_id integer NOT NULL,
148
    cycles integer NOT NULL,
149
    result integer[],
150
    result_id integer NOT NULL
151
);
152

    
153

    
154
ALTER TABLE public.results OWNER TO postgres;
155

    
156
--
157
-- Name: results_result_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
158
--
159

    
160
CREATE SEQUENCE public.results_result_id_seq
161
    AS integer
162
    START WITH 1
163
    INCREMENT BY 1
164
    NO MINVALUE
165
    NO MAXVALUE
166
    CACHE 1;
167

    
168

    
169
ALTER TABLE public.results_result_id_seq OWNER TO postgres;
170

    
171
--
172
-- Name: results_result_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
173
--
174

    
175
ALTER SEQUENCE public.results_result_id_seq OWNED BY public.results.result_id;
176

    
177

    
178
--
179
-- Name: indications ind_id; Type: DEFAULT; Schema: public; Owner: postgres
180
--
181

    
182
ALTER TABLE ONLY public.indications ALTER COLUMN ind_id SET DEFAULT nextval('public."Indications_Ind_id_seq"'::regclass);
183

    
184

    
185
--
186
-- Name: patient id; Type: DEFAULT; Schema: public; Owner: postgres
187
--
188

    
189
ALTER TABLE ONLY public.patient ALTER COLUMN id SET DEFAULT nextval('public.patient_id_seq'::regclass);
190

    
191

    
192
--
193
-- Name: results result_id; Type: DEFAULT; Schema: public; Owner: postgres
194
--
195

    
196
ALTER TABLE ONLY public.results ALTER COLUMN result_id SET DEFAULT nextval('public.results_result_id_seq'::regclass);
197

    
198

    
199
--
200
-- Data for Name: actual_indication; Type: TABLE DATA; Schema: public; Owner: postgres
201
--
202

    
203
COPY public.actual_indication (id_p, id_ind) FROM stdin;
204
\.
205

    
206

    
207
--
208
-- Data for Name: indications; Type: TABLE DATA; Schema: public; Owner: postgres
209
--
210

    
211
COPY public.indications (ind_id, indication, description, curve_name, procedure_time) FROM stdin;
212
\.
213

    
214

    
215
--
216
-- Data for Name: patient; Type: TABLE DATA; Schema: public; Owner: postgres
217
--
218

    
219
COPY public.patient (id, name, surname, birthdate, id_number) FROM stdin;
220
\.
221

    
222

    
223
--
224
-- Data for Name: results; Type: TABLE DATA; Schema: public; Owner: postgres
225
--
226

    
227
COPY public.results (p_id, ind_id, cycles, result, result_id) FROM stdin;
228
\.
229

    
230

    
231
--
232
-- Name: Indications_Ind_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
233
--
234

    
235
SELECT pg_catalog.setval('public."Indications_Ind_id_seq"', 5, true);
236

    
237

    
238
--
239
-- Name: patient_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
240
--
241

    
242
SELECT pg_catalog.setval('public.patient_id_seq', 9, true);
243

    
244

    
245
--
246
-- Name: results_result_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
247
--
248

    
249
SELECT pg_catalog.setval('public.results_result_id_seq', 7, true);
250

    
251

    
252
--
253
-- Name: patient id_num; Type: CONSTRAINT; Schema: public; Owner: postgres
254
--
255

    
256
ALTER TABLE ONLY public.patient
257
    ADD CONSTRAINT id_num UNIQUE (id_number);
258

    
259

    
260
--
261
-- Name: indications indication_name; Type: CONSTRAINT; Schema: public; Owner: postgres
262
--
263

    
264
ALTER TABLE ONLY public.indications
265
    ADD CONSTRAINT indication_name UNIQUE (indication);
266

    
267

    
268
--
269
-- Name: indications indications_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
270
--
271

    
272
ALTER TABLE ONLY public.indications
273
    ADD CONSTRAINT indications_pkey PRIMARY KEY (ind_id);
274

    
275

    
276
--
277
-- Name: patient patient_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
278
--
279

    
280
ALTER TABLE ONLY public.patient
281
    ADD CONSTRAINT patient_pkey PRIMARY KEY (id);
282

    
283

    
284
--
285
-- Name: results results_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
286
--
287

    
288
ALTER TABLE ONLY public.results
289
    ADD CONSTRAINT results_pkey PRIMARY KEY (result_id);
290

    
291

    
292
--
293
-- Name: actual_indication id_ind; Type: FK CONSTRAINT; Schema: public; Owner: postgres
294
--
295

    
296
ALTER TABLE ONLY public.actual_indication
297
    ADD CONSTRAINT id_ind FOREIGN KEY (id_p) REFERENCES public.indications(ind_id);
298

    
299

    
300
--
301
-- Name: actual_indication id_p; Type: FK CONSTRAINT; Schema: public; Owner: postgres
302
--
303

    
304
ALTER TABLE ONLY public.actual_indication
305
    ADD CONSTRAINT id_p FOREIGN KEY (id_p) REFERENCES public.patient(id);
306

    
307

    
308
--
309
-- Name: results indication; Type: FK CONSTRAINT; Schema: public; Owner: postgres
310
--
311

    
312
ALTER TABLE ONLY public.results
313
    ADD CONSTRAINT indication FOREIGN KEY (p_id) REFERENCES public.indications(ind_id);
314

    
315

    
316
--
317
-- Name: results patient; Type: FK CONSTRAINT; Schema: public; Owner: postgres
318
--
319

    
320
ALTER TABLE ONLY public.results
321
    ADD CONSTRAINT patient FOREIGN KEY (p_id) REFERENCES public.patient(id);
322

    
323

    
324
--
325
-- PostgreSQL database dump complete
326
--
327

    
(1-1/2)