-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRepas2018.sql
98 lines (89 loc) · 5.48 KB
/
Repas2018.sql
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
drop table LesPreferences;
drop table LeMenu;
drop table LesPlats;
drop table LesRepas;
CREATE TABLE LesRepas (
dateR date,
nomI varchar(100),
CONSTRAINT pk_repas PRIMARY KEY (dateR, nomI)
);
CREATE TABLE LesPlats (
nomP varchar(100) PRIMARY KEY,
typeP varchar(100)
);
CREATE TABLE LeMenu (
dateR date,
nomP varchar(100),
nomV varchar(100),
CONSTRAINT pk_menu PRIMARY KEY (dateR, nomP),
CONSTRAINT fk_menu_nomP FOREIGN KEY (nomP) REFERENCES LesPlats(nomP)
);
CREATE TABLE LesPreferences (
nomA varchar(100),
nomP varchar(100),
CONSTRAINT pk_pref PRIMARY KEY (nomA, nomP),
CONSTRAINT fk_pref_nomP FOREIGN KEY (nomP) REFERENCES LesPlats(nomP)
);
grant select on LesPreferences to public;
grant select on LeMenu to public;
grant select on LesPlats to public;
grant select on LesRepas to public;
INSERT INTO LesPlats ("NOMP", "TYPEP") VALUES ('Mousse chocolat', 'dessert');
INSERT INTO LesPlats ("NOMP", "TYPEP") VALUES ('Medaillon langouste', 'crustaces');
INSERT INTO LesPlats ("NOMP", "TYPEP") VALUES ('Soupe champignons', 'soupe');
INSERT INTO LesPlats ("NOMP", "TYPEP") VALUES ('Pates beurre', 'pates');
INSERT INTO LesPlats ("NOMP", "TYPEP") VALUES ('Salade nicoise', 'salade');
INSERT INTO LesPlats ("NOMP", "TYPEP") VALUES ('Steak hache', 'viande');
INSERT INTO LesPlats ("NOMP", "TYPEP") VALUES ('Saumon', 'poisson');
INSERT INTO LesPlats ("NOMP", "TYPEP") VALUES ('Mousse citron', 'dessert');
INSERT INTO LesPlats ("NOMP", "TYPEP") VALUES ('Plateau fromages', 'fromages');
INSERT INTO LesPlats ("NOMP", "TYPEP") VALUES ('Ile flottante', 'dessert');
INSERT INTO LesPlats ("NOMP", "TYPEP") VALUES ('Foie gras', 'charcuterie');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('21-OCT-16', 'Adrian');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('21-OCT-16', 'Marie');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('21-OCT-16', 'Myriam');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('21-OCT-16', 'Thomas');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('31-DEC-17', 'Adrian');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('31-DEC-17', 'Jacques');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('31-DEC-17', 'Malou');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('31-DEC-17', 'Marie');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('31-DEC-17', 'Patrick');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('31-DEC-17', 'Thomas');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('06-MAR-18', 'Adrian');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('06-MAR-18', 'Jackie');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('06-MAR-18', 'Marie');
INSERT INTO LesRepas ("DATER", "NOMI") VALUES ('06-MAR-18', 'Phil');
INSERT INTO LeMenu ("DATER", "NOMP", "NOMV") VALUES ('31-Dec-17', 'Medaillon langouste', 'Tariquet');
INSERT INTO LeMenu ("DATER", "NOMP", "NOMV") VALUES ('31-Dec-17', 'Mousse chocolat', 'Tariquet');
INSERT INTO LeMenu ("DATER", "NOMP", "NOMV") VALUES ('31-Dec-17', 'Plateau fromages', 'Tariquet');
INSERT INTO LeMenu ("DATER", "NOMP", "NOMV") VALUES ('21-Oct-16', 'Foie gras', 'Veuve Cliquot');
INSERT INTO LeMenu ("DATER", "NOMP", "NOMV") VALUES ('21-Oct-16', 'Steak hache', 'Cote de Nuits');
INSERT INTO LeMenu ("DATER", "NOMP", "NOMV") VALUES ('21-Oct-16', 'Ile flottante', 'Tariquet');
INSERT INTO LeMenu ("DATER", "NOMP", "NOMV") VALUES ('21-Oct-16', 'Mousse chocolat', 'Tariquet');
INSERT INTO LeMenu ("DATER", "NOMP", "NOMV") VALUES ('06-Mar-18', 'Pates beurre', 'Vasse Felix');
INSERT INTO LeMenu ("DATER", "NOMP", "NOMV") VALUES ('06-Mar-18', 'Mousse chocolat', 'Vasse Felix');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Adrian', 'Foie gras');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Adrian', 'Ile flottante');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Adrian', 'Medaillon langouste');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Adrian', 'Mousse chocolat');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Adrian', 'Mousse citron');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Adrian', 'Pates beurre');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Adrian', 'Plateau fromages');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Adrian', 'Salade nicoise');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Adrian', 'Saumon');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Adrian', 'Soupe champignons');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Adrian', 'Steak hache');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Jackie', 'Medaillon langouste');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Jacques', 'Mousse chocolat');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Malou', 'Ile flottante');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Malou', 'Mousse chocolat');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Malou', 'Mousse citron');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Martin', 'Ile flottante');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Patrick', 'Mousse chocolat');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Patrick', 'Pates beurre');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Patrick', 'Salade nicoise');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Phil', 'Medaillon langouste');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Pierre', 'Medaillon langouste');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Pierre', 'Mousse chocolat');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Pierre', 'Soupe champignons');
INSERT INTO LesPreferences ("NOMA", "NOMP") VALUES ('Thomas', 'Mousse chocolat');