1 |
|
---|
2 | set search_path = project;
|
---|
3 |
|
---|
4 | delete from se_naogja2;
|
---|
5 | delete from se_naogja1;
|
---|
6 | delete from ja_ima;
|
---|
7 | delete from so_koi;
|
---|
8 | delete from opsluzuva;
|
---|
9 | delete from od_kade;
|
---|
10 | delete from sodrzi;
|
---|
11 | delete from pripagja;
|
---|
12 | delete from zadolzen_za;
|
---|
13 |
|
---|
14 | delete from komentari;
|
---|
15 | delete from naracki;
|
---|
16 | delete from sliki;
|
---|
17 | delete from posetiteli;
|
---|
18 | delete from vraboteni;
|
---|
19 | delete from korisnici;
|
---|
20 | delete from restorani;
|
---|
21 | delete from lokacii;
|
---|
22 | delete from prodavnici;
|
---|
23 | delete from recepti;
|
---|
24 | delete from potekla;
|
---|
25 | delete from sostojki;
|
---|
26 | delete from kategorii;
|
---|
27 |
|
---|
28 | insert into kategorii (kat_id, kat_ime, opis) values
|
---|
29 | (1, 'Пред јадење', 'Опис на категоријата пред јадење'),
|
---|
30 | (2, 'Главно јадење', 'Опис на категоријата главно јадење'),
|
---|
31 | (3, 'Десерт', 'Опис на категоријата десерт'),
|
---|
32 | (4, 'Доручек', 'Опис на категоријата Доручек');
|
---|
33 |
|
---|
34 | insert into sostojki (s_id, s_naziv) values
|
---|
35 | (1, 'Млеко'),
|
---|
36 | (2, 'Брашно'),
|
---|
37 | (3, 'Јајца'),
|
---|
38 | (4, 'Шеќер'),
|
---|
39 | (5, 'Сол'),
|
---|
40 | (6, 'Пилешки стек');
|
---|
41 |
|
---|
42 | insert into potekla (pot_id, pot_naziv) values
|
---|
43 | (1, 'Медитеранско'),
|
---|
44 | (2, 'Азиско'),
|
---|
45 | (3, 'Индијско'),
|
---|
46 | (4, 'Африканско'),
|
---|
47 | (5, 'Европско' );
|
---|
48 |
|
---|
49 | insert into recepti (rec_id, postapka, rec_ime) values
|
---|
50 | (1, 'Начин на подготовка 1', 'Бајадера'),
|
---|
51 | (2, 'Начин на подготовка 2', 'Крофни'),
|
---|
52 | (3, 'Начин на подготовка 3', 'Баничка со јаболка'),
|
---|
53 | (4, 'Начин на подготовка 4', 'Сок од боровики');
|
---|
54 |
|
---|
55 | insert into prodavnici (pro_id, pro_naziv) values
|
---|
56 | (1, 'Тинекс'),
|
---|
57 | (2, 'Веро'),
|
---|
58 | (3, 'Рамстор'),
|
---|
59 | (4, 'Кид го');
|
---|
60 |
|
---|
61 | insert into lokacii (l_id, adresa) values
|
---|
62 | (1, 'Улица 1 бр. 1 / 1'),
|
---|
63 | (2, 'Улица 2 бр. 2 / 2'),
|
---|
64 | (3, 'Улица 3 бр. 3 / 3'),
|
---|
65 | (4, 'Улица 4 бр. 4 / 4'),
|
---|
66 | (5, 'Улица 5 бр. 5 / 5');
|
---|
67 |
|
---|
68 | insert into restorani (res_id, res_naziv) values
|
---|
69 | (1, 'Дома'),
|
---|
70 | (2, 'Ресторан 1'),
|
---|
71 | (3, 'Ресторан 2'),
|
---|
72 | (4, 'Ресторан 3');
|
---|
73 |
|
---|
74 | insert into korisnici (telefon, kor_ime, prezime) values
|
---|
75 | ('070000000', 'Александар', 'Блажевски'),
|
---|
76 | ('071000000', 'Кристијан', 'Мирковски'),
|
---|
77 | ('072000000', 'Бојана', 'Крстева'),
|
---|
78 | ('073000000', 'Марко', 'Андревски'),
|
---|
79 | ('074000000', 'Ана Марија', 'Тодорова'),
|
---|
80 | ('075000000', 'Ѓорѓи', 'Скендеровски'),
|
---|
81 | ('076000000', 'Некој', 'Човек');
|
---|
82 |
|
---|
83 | insert into vraboteni (telefon) values
|
---|
84 | ('070000000'),
|
---|
85 | ('072000000'),
|
---|
86 | ('074000000');
|
---|
87 |
|
---|
88 | insert into posetiteli (telefon) values
|
---|
89 | ('071000000'),
|
---|
90 | ('073000000'),
|
---|
91 | ('076000000');
|
---|
92 |
|
---|
93 | insert into sliki (reden_broj, rec_id, slika) values
|
---|
94 | (1, 1, 'slika1ZaRec1'),
|
---|
95 | (2, 1, 'slika2ZaRec1'),
|
---|
96 | (3, 1, 'slika3ZaRec1'),
|
---|
97 | (1, 2, 'slika1ZaRec2'),
|
---|
98 | (1, 3, 'slika1ZaRec3'),
|
---|
99 | (1, 4, 'slika1ZaRec4');
|
---|
100 |
|
---|
101 | insert into naracki (vreme, telefon) values
|
---|
102 | ('2023-12-04 11:30:30', '071000000'),
|
---|
103 | ('2023-12-04 12:32:24', '073000000'),
|
---|
104 | ('2023-12-09 18:30:30', '071000000'),
|
---|
105 | ('2023-12-10 11:30:30', '073000000'),
|
---|
106 | ('2023-12-11 20:30:00', '071000000'),
|
---|
107 | ('2023-12-11 09:07:50', '071000000'),
|
---|
108 | ('2023-12-13 09:20:47', '076000000');
|
---|
109 |
|
---|
110 | insert into komentari (kom_data, telefon, rec_id, ocena, text) values
|
---|
111 | ('2023-12-04 12:32:24', '071000000', 2, 9, 'Многу бил задоволено од крофните'),
|
---|
112 | ('2023-12-10 11:50:30', '073000000', 4, 2, 'Сокот бил редок'),
|
---|
113 | ('2023-12-13 09:20:47', '076000000', 3, 8, 'Ок');
|
---|
114 |
|
---|
115 | --relacii
|
---|
116 |
|
---|
117 | insert into zadolzen_za (v_telefon, vreme, p_telefon) values
|
---|
118 | ('070000000', '2023-12-04 11:30:30', '071000000'),
|
---|
119 | ('070000000', '2023-12-04 12:32:24', '073000000'),
|
---|
120 | ('072000000', '2023-12-09 18:30:30', '071000000'),
|
---|
121 | ('072000000', '2023-12-10 11:30:30', '073000000'),
|
---|
122 | ('070000000', '2023-12-11 20:30:00', '071000000'),
|
---|
123 | ('070000000', '2023-12-11 09:07:50', '071000000'),
|
---|
124 | ('072000000', '2023-12-13 09:20:47', '076000000');
|
---|
125 |
|
---|
126 |
|
---|
127 | insert into pripagja (kat_id, rec_id) values
|
---|
128 | (3, 1),
|
---|
129 | (2, 3),
|
---|
130 | (3, 4);
|
---|
131 |
|
---|
132 |
|
---|
133 | insert into sodrzi (s_id, rec_id) values
|
---|
134 | (1, 2),
|
---|
135 | (2, 2),
|
---|
136 | (3, 2),
|
---|
137 | (4, 2),
|
---|
138 | (1, 1),
|
---|
139 | (2, 1),
|
---|
140 | (5, 1),
|
---|
141 | (4, 1),
|
---|
142 | (2, 3),
|
---|
143 | (3, 3),
|
---|
144 | (4, 3);
|
---|
145 |
|
---|
146 | insert into od_kade (pot_id, rec_id) values
|
---|
147 | (5, 1),
|
---|
148 | (5, 3),
|
---|
149 | (3, 2),
|
---|
150 | (1, 4);
|
---|
151 |
|
---|
152 |
|
---|
153 | insert into opsluzuva (res_id, rec_id) values
|
---|
154 | (1, 1),
|
---|
155 | (2, 3),
|
---|
156 | (3, 2),
|
---|
157 | (4, 4);
|
---|
158 |
|
---|
159 | insert into so_koi (vreme, telefon, rec_id, nacin) values
|
---|
160 | ('2023-12-04 11:30:30', '071000000', 2, 'Готово'),
|
---|
161 | ('2023-12-04 11:30:30', '071000000', 1, 'Состојки'),
|
---|
162 | ('2023-12-10 11:30:30', '073000000' , 4, 'Состојки'),
|
---|
163 | ('2023-12-13 09:20:47', '076000000', 1, 'Состојки'),
|
---|
164 | ('2023-12-04 12:32:24', '073000000', 3, 'Состојки'),
|
---|
165 | ('2023-12-09 18:30:30', '071000000', 2, 'Готово'),
|
---|
166 | ('2023-12-11 20:30:00', '071000000', 2, 'Готово'),
|
---|
167 | ('2023-12-11 09:07:50', '071000000', 2, 'Состојки');
|
---|
168 |
|
---|
169 | insert into ja_ima (s_id, pro_id, kolicina, cena) values
|
---|
170 | (1, 1, '1l', 67),
|
---|
171 | (1, 2, '800ml', 50),
|
---|
172 | (2, 3, '4kg', 120),
|
---|
173 | (2, 1, '1kg', 30),
|
---|
174 | (4, 4, '800g', 60),
|
---|
175 | (3, 4, '10', 90),
|
---|
176 | (5, 2, '800g', 50),
|
---|
177 | (6, 3, '1kg', 220);
|
---|
178 |
|
---|
179 | insert into se_naogja1 (res_id, l_id) values
|
---|
180 | (1, 1),
|
---|
181 | (2, 2),
|
---|
182 | (3, 3),
|
---|
183 | (4, 4);
|
---|
184 |
|
---|
185 | insert into se_naogja2 (pro_id, l_id) values
|
---|
186 | (1, 5),
|
---|
187 | (2, 2),
|
---|
188 | (3, 3),
|
---|
189 | (4, 4);
|
---|
190 |
|
---|
191 |
|
---|
192 |
|
---|
193 |
|
---|
194 |
|
---|
195 |
|
---|
196 |
|
---|
197 |
|
---|