· 9 years ago · Mar 07, 2017, 03:40 PM
1--
2-- PostgreSQL database dump
3--
4
5-- Dumped from database version 9.5.5
6-- Dumped by pg_dump version 9.5.5
7
8SET statement_timeout = 0;
9SET lock_timeout = 0;
10SET client_encoding = 'UTF8';
11SET standard_conforming_strings = on;
12SET check_function_bodies = false;
13SET client_min_messages = warning;
14SET row_security = off;
15
16--
17-- Name: postgres; Type: COMMENT; Schema: -; Owner: postgres
18--
19
20COMMENT ON DATABASE postgres IS 'default administrative connection database';
21
22
23--
24-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
25--
26
27CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
28
29
30--
31-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
32--
33
34COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
35
36
37SET search_path = public, pg_catalog;
38
39SET default_tablespace = '';
40
41SET default_with_oids = false;
42
43--
44-- Name: person; Type: TABLE; Schema: public; Owner: postgres
45--
46
47CREATE TABLE person (
48 id_pers integer NOT NULL,
49 first_name character(20),
50 name character(20) NOT NULL
51);
52
53
54ALTER TABLE person OWNER TO postgres;
55
56--
57-- Name: PERSON_ID_PERS_seq; Type: SEQUENCE; Schema: public; Owner: postgres
58--
59
60CREATE SEQUENCE "PERSON_ID_PERS_seq"
61 START WITH 1
62 INCREMENT BY 1
63 NO MINVALUE
64 NO MAXVALUE
65 CACHE 1;
66
67
68ALTER TABLE "PERSON_ID_PERS_seq" OWNER TO postgres;
69
70--
71-- Name: PERSON_ID_PERS_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
72--
73
74ALTER SEQUENCE "PERSON_ID_PERS_seq" OWNED BY person.id_pers;
75
76
77--
78-- Name: client; Type: TABLE; Schema: public; Owner: postgres
79--
80
81CREATE TABLE client (
82 id_client integer NOT NULL,
83 gender character varying(45) NOT NULL,
84 birth_last_name character varying(45) NOT NULL,
85 common_last_name character varying(45) NOT NULL,
86 first_name character varying(45) NOT NULL,
87 email character varying(45) NOT NULL,
88 birthdate date NOT NULL,
89 birthplace_city character varying(45) NOT NULL,
90 birthplace_county character varying(45) NOT NULL,
91 login integer NOT NULL,
92 password integer NOT NULL,
93 address character varying(45) NOT NULL,
94 postcode integer NOT NULL,
95 city character varying(45) NOT NULL,
96 country character varying(45) NOT NULL,
97 nationality character varying(45) NOT NULL,
98 phone_number integer NOT NULL,
99 socioprofessional_group character varying(45) NOT NULL,
100 salary numeric,
101 status character varying(45) NOT NULL,
102 id_group integer
103);
104
105
106ALTER TABLE client OWNER TO postgres;
107
108--
109-- Name: client_id_client_seq; Type: SEQUENCE; Schema: public; Owner: postgres
110--
111
112CREATE SEQUENCE client_id_client_seq
113 START WITH 1
114 INCREMENT BY 1
115 NO MINVALUE
116 NO MAXVALUE
117 CACHE 1;
118
119
120ALTER TABLE client_id_client_seq OWNER TO postgres;
121
122--
123-- Name: client_id_client_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
124--
125
126ALTER SEQUENCE client_id_client_seq OWNED BY client.id_client;
127
128
129--
130-- Name: conseiller; Type: TABLE; Schema: public; Owner: postgres
131--
132
133CREATE TABLE conseiller (
134 id_pers integer NOT NULL,
135 first_name character varying(40) NOT NULL,
136 name character varying(40) NOT NULL,
137 email character varying(40) NOT NULL,
138 birthdate date,
139 startdate date,
140 phonenumber character varying,
141 group_fa character varying
142);
143
144
145ALTER TABLE conseiller OWNER TO postgres;
146
147--
148-- Name: conseiller_id_pers_seq; Type: SEQUENCE; Schema: public; Owner: postgres
149--
150
151CREATE SEQUENCE conseiller_id_pers_seq
152 START WITH 1
153 INCREMENT BY 1
154 NO MINVALUE
155 NO MAXVALUE
156 CACHE 1;
157
158
159ALTER TABLE conseiller_id_pers_seq OWNER TO postgres;
160
161--
162-- Name: conseiller_id_pers_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
163--
164
165ALTER SEQUENCE conseiller_id_pers_seq OWNED BY conseiller.id_pers;
166
167
168--
169-- Name: param_agios; Type: TABLE; Schema: public; Owner: postgres
170--
171
172CREATE TABLE param_agios (
173 id_agios integer NOT NULL,
174 begin_mt double precision,
175 last_mt double precision,
176 nb_days integer,
177 rate_agios double precision,
178 id_cat integer
179);
180
181
182ALTER TABLE param_agios OWNER TO postgres;
183
184--
185-- Name: seq_id_param; Type: SEQUENCE; Schema: public; Owner: postgres
186--
187
188CREATE SEQUENCE seq_id_param
189 START WITH 1
190 INCREMENT BY 1
191 NO MINVALUE
192 NO MAXVALUE
193 CACHE 1;
194
195
196ALTER TABLE seq_id_param OWNER TO postgres;
197
198--
199-- Name: seq_id_wk; Type: SEQUENCE; Schema: public; Owner: postgres
200--
201
202CREATE SEQUENCE seq_id_wk
203 START WITH 24
204 INCREMENT BY 1
205 NO MINVALUE
206 NO MAXVALUE
207 CACHE 1;
208
209
210ALTER TABLE seq_id_wk OWNER TO postgres;
211
212--
213-- Name: status; Type: TABLE; Schema: public; Owner: postgres
214--
215
216CREATE TABLE status (
217 id_status integer NOT NULL,
218 name_status character varying(40) NOT NULL,
219 slice_top real NOT NULL,
220 slice_low real NOT NULL,
221 alert_type character varying(255),
222 banktransfer integer,
223 overdraft integer
224);
225
226
227ALTER TABLE status OWNER TO postgres;
228
229--
230-- Name: status_id_status_seq; Type: SEQUENCE; Schema: public; Owner: postgres
231--
232
233CREATE SEQUENCE status_id_status_seq
234 START WITH 1
235 INCREMENT BY 1
236 NO MINVALUE
237 NO MAXVALUE
238 CACHE 1;
239
240
241ALTER TABLE status_id_status_seq OWNER TO postgres;
242
243--
244-- Name: status_id_status_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
245--
246
247ALTER SEQUENCE status_id_status_seq OWNED BY status.id_status;
248
249
250--
251-- Name: workgroup; Type: TABLE; Schema: public; Owner: postgres
252--
253
254CREATE TABLE workgroup (
255 id_workgroup integer NOT NULL,
256 id_categorie integer NOT NULL,
257 name character varying(10) NOT NULL
258);
259
260
261ALTER TABLE workgroup OWNER TO postgres;
262
263--
264-- Name: id_client; Type: DEFAULT; Schema: public; Owner: postgres
265--
266
267ALTER TABLE ONLY client ALTER COLUMN id_client SET DEFAULT nextval('client_id_client_seq'::regclass);
268
269
270--
271-- Name: id_pers; Type: DEFAULT; Schema: public; Owner: postgres
272--
273
274ALTER TABLE ONLY conseiller ALTER COLUMN id_pers SET DEFAULT nextval('conseiller_id_pers_seq'::regclass);
275
276
277--
278-- Name: id_status; Type: DEFAULT; Schema: public; Owner: postgres
279--
280
281ALTER TABLE ONLY status ALTER COLUMN id_status SET DEFAULT nextval('status_id_status_seq'::regclass);
282
283
284--
285-- Name: PERSON_ID_PERS_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
286--
287
288SELECT pg_catalog.setval('"PERSON_ID_PERS_seq"', 3, true);
289
290
291--
292-- Data for Name: client; Type: TABLE DATA; Schema: public; Owner: postgres
293--
294
295COPY client (id_client, gender, birth_last_name, common_last_name, first_name, email, birthdate, birthplace_city, birthplace_county, login, password, address, postcode, city, country, nationality, phone_number, socioprofessional_group, salary, status, id_group) FROM stdin;
2962 Masculin Lesguer Lesguer Florian florian.lesguer@laposte.net 1994-07-08 Chartres Eure-et-Loir 1234567890 12345 14 rue des Alouettes 94000 Créteil \tFrance Français 620764590 Salariés de l’agriculture 535 Célibataire 1
2971 Masculin Lesguer Lesguer Florian florian.lesguer@laposte.net 1994-07-08 Chartres Eure-et-loi 1234567890 12345 14 rue des Alouettes 94000 14 rue des Alouettes France France 689979262 Ouvriers 535 Célibataire \N
2983 Masculin Lesguer Lesguer Florian florian.lesguer@laposte.net 1994-08-07 Chartres Eur-et-loir 1234567890 12345 14 rue des Alouettes 53000 14 rue des Alouettes France France 1234567890 Agriculteurs exploitants 535 Célibataire \N
2994 Masculin Lesguer Lesguer Florian florian.lesguer@laposte.net 1994-07-08 Chartres Eure-et-loi 1234567890 12345 14 rue des Alouettes 94000 14 rue des Alouettes France France 766554433 Ouvriers 535 Célibataire \N
3005 Masculin Lesguer Lesguer Florian florian.lesguer@laposte.net 1994-07-08 Chartres Eure-et-loi 1234567890 12345 14 rue des Alouettes 94000 14 rue des Alouettes France France 766554433 Professions libérales et cadres supérieurs 535 Célibataire \N
301\.
302
303
304--
305-- Name: client_id_client_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
306--
307
308SELECT pg_catalog.setval('client_id_client_seq', 5, true);
309
310
311--
312-- Data for Name: conseiller; Type: TABLE DATA; Schema: public; Owner: postgres
313--
314
315COPY conseiller (id_pers, first_name, name, email, birthdate, startdate, phonenumber, group_fa) FROM stdin;
3161 Anne Barthes anne.barthes@bem.fr 1970-01-30 2000-01-10 0648375840 2
3176 Carole Paul carole.paul@bem.fr 1975-01-13 2000-01-14 0164264348 3
318\.
319
320
321--
322-- Name: conseiller_id_pers_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
323--
324
325SELECT pg_catalog.setval('conseiller_id_pers_seq', 7, true);
326
327
328--
329-- Data for Name: param_agios; Type: TABLE DATA; Schema: public; Owner: postgres
330--
331
332COPY param_agios (id_agios, begin_mt, last_mt, nb_days, rate_agios, id_cat) FROM stdin;
333352 12 13 14 15 10
334355 10 32 2 19 10
335\.
336
337
338--
339-- Data for Name: person; Type: TABLE DATA; Schema: public; Owner: postgres
340--
341
342COPY person (id_pers, first_name, name) FROM stdin;
3431 Baptiste SARDA
3442 Van DUONG
3453 Zouhair HAJJI
3464 Baptiste SARDA
3475 Mouna Izouggarhan
3486 Florian LESGUER
3497 Coline MARIN
3508 Aicha DIOP
3519 Anthony PERAULT
35210 Jacques PAUL
353\.
354
355
356--
357-- Name: seq_id_param; Type: SEQUENCE SET; Schema: public; Owner: postgres
358--
359
360SELECT pg_catalog.setval('seq_id_param', 8, true);
361
362
363--
364-- Name: seq_id_wk; Type: SEQUENCE SET; Schema: public; Owner: postgres
365--
366
367SELECT pg_catalog.setval('seq_id_wk', 40, true);
368
369
370--
371-- Data for Name: status; Type: TABLE DATA; Schema: public; Owner: postgres
372--
373
374COPY status (id_status, name_status, slice_top, slice_low, alert_type, banktransfer, overdraft) FROM stdin;
3755 Cadre supérieur 10000 5000 Message 1250 1500
3764 Cadre 5000 2500 Message 500 750
3778 Très grande fortune 10000000 100000 Appel 15250 15000
3786 Fortune 50000 10000 Appel 5000 7500
37910 Inactif/Etudaint 800 0 SMS 100 50
3803 Actif supérieur 2500 1500 Message 270 250
3817 Grande fortune 50000 100000 Appel 15250 15000
38212 Actif 1500 800 Message 150 100
383\.
384
385
386--
387-- Name: status_id_status_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
388--
389
390SELECT pg_catalog.setval('status_id_status_seq', 12, true);
391
392
393--
394-- Data for Name: workgroup; Type: TABLE DATA; Schema: public; Owner: postgres
395--
396
397COPY workgroup (id_workgroup, id_categorie, name) FROM stdin;
39831 1 Cadre-1
39932 1 Cadre-2
40033 2 Fortune-2
401\.
402
403
404--
405-- Name: PARAM_AGIOS_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
406--
407
408ALTER TABLE ONLY param_agios
409 ADD CONSTRAINT "PARAM_AGIOS_pkey" PRIMARY KEY (id_agios);
410
411
412--
413-- Name: PERSON_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
414--
415
416ALTER TABLE ONLY person
417 ADD CONSTRAINT "PERSON_pkey" PRIMARY KEY (id_pers);
418
419
420--
421-- Name: client_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
422--
423
424ALTER TABLE ONLY client
425 ADD CONSTRAINT client_pkey PRIMARY KEY (id_client);
426
427
428--
429-- Name: pk_id; Type: CONSTRAINT; Schema: public; Owner: postgres
430--
431
432ALTER TABLE ONLY conseiller
433 ADD CONSTRAINT pk_id PRIMARY KEY (id_pers);
434
435
436--
437-- Name: status_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
438--
439
440ALTER TABLE ONLY status
441 ADD CONSTRAINT status_pkey PRIMARY KEY (id_status);
442
443
444--
445-- Name: workgroup_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
446--
447
448ALTER TABLE ONLY workgroup
449 ADD CONSTRAINT workgroup_pkey PRIMARY KEY (id_workgroup);
450
451
452--
453-- Name: public; Type: ACL; Schema: -; Owner: postgres
454--
455
456REVOKE ALL ON SCHEMA public FROM PUBLIC;
457REVOKE ALL ON SCHEMA public FROM postgres;
458GRANT ALL ON SCHEMA public TO postgres;
459GRANT ALL ON SCHEMA public TO PUBLIC;
460
461
462--
463-- PostgreSQL database dump complete
464--