RelationalDesign: polnenje.sql

File polnenje.sql, 4.2 KB (added by 201045, 2 years ago)
Line 
1insert into lokacija(adresa, broj)
2values ('veselin mashlesha', 3),
3('dame gruev', 12),
4('bulevar partizanski odredi', 15),
5('marko cepenkov', 50),
6('varshavska', 1);
7
8insert into franshiza (ime)
9values ('royal burger'),
10('baking bread'),
11('teteks'),
12('gustoso'),
13('vega'),
14('fitness house');
15
16insert into kategorija (ime_kat)
17values ('burger'),
18('pijalok'),
19('desert'),
20('pica'),
21('riba');
22insert into kategorija (ime_kat) values('dodatok');
23
24
25insert into namirnica(ime_name, dali_alergent)
26values ('mleko', true),
27('kikiritki', true),
28('meso', false),
29('sol', false),
30('sekjer', false);
31
32insert into namirnica (ime_name, dali_alergent)
33values ('kechap', false), ('majonez', false);
34
35insert into korisnik(ime, datum_kreiranje, username)
36values ('jovan manchev', now() - interval '3 months', 'jovan.manchev'),
37('ivana trpeska', now() - interval '1 year', 'ivana.trpeska'),
38('mile pelivanov', now(), 'mile.pelivanov'),
39('kiril gurev', now() - interval '2 years', 'kire.gurev'),
40('jordan netkov', now() - interval '2 months', 'jordan.netkov'),
41('nikola aleksov', now(), 'koki.aleksov'),
42('nenad petreski', now() - interval '1 month', 'nenad.petreski'),
43('martina velkovikj', now(), 'martina.velkovvikj');
44
45insert into korisnik(ime, datum_kreiranje, username)
46values ('oakley romy', now() - interval '3 months', 'oakley.romy'),
47('brigham kennet', now() - interval '1 year', 'brigham.kennet'),
48('dennis berenice', now(), 'dennis.berenica'),
49('alex juliet', now() - interval '2 years', 'alex.juliet'),
50('sherie jessica', now() - interval '2 months', 'sherie.jessica'),
51('royal lexie', now(), 'royal.lexie');
52
53
54
55insert into vozilo(tip_vozilo)
56values ('velosiped'),
57('avtomobil'),
58('moped');
59
60insert into potrosuvac
61values (4, 3, 1),
62(5, 0, 1),
63(8, 2, 2);
64
65insert into admin_table values (1), (2), (3);
66
67insert into dostavuvac values (6, 1, 2), (7, 2, 3), (9, 3, 1);
68
69insert into prodazhnomesto (ime, ulica, broj, franshiza_id, admin_id)
70values ('royal burger debar maalo', 'debar maalo', 5, 1, 1),
71('royal burger lisice', 'novo lisice', 10, 1, 1),
72('baking bread centar', 'partizanski odredi', 20, 2, 1),
73('fitness house centar', 'partizanski odredi', 10, 6, 1);
74
75insert into naplata(potrosuvac_id, dostavuvac_id, iznos, nplakjanje)
76values(4, 6, 200, 'gotovo'),
77(4, 7, 100, 'kartica'),
78(4, 6, 50, 'gotovo'),
79(8, 9, 300, 'kartica'),
80(8, 6, 250, 'gotovo');
81
82
83insert into naracka(dostavuvac_id, id_mesto, status, potrosuvac_id, naplata_id)
84values (6, 1, 'zavrsena', 4, 1),
85(7, 3, 'zavrsena', 4, 2),
86(6, 2, 'zavrsena', 4, 3),
87(9, 1, 'zavrsena', 8, 4),
88(6, 1, 'zavrsena', 8, 5);
89
90
91
92
93insert into kupon(iznos_kupon, potrosuvac_id, naracka_id, naplata_id)
94values(10, 4, 1, 1),
95(30, 4, 2, 2),
96(15, 4, 3, 3),
97(20, 8, 4, 4),
98(5, 8, 5, 5);
99
100
101insert into vrabotenpd(korisnik_id, id_mesto)
102values(10, 1),(11, 2),(12,3),(13,4),(14,1);
103
104
105insert into hrana(ime_hra, vrabotenpd_id, id_mesto)
106values ('royal burger', 10, 1),
107('royal chicken', 14, 1),
108('walter junior', 12, 3),
109('stek i oriz', 13, 4);
110
111insert into hrana(ime_hra, vrabotenpd_id, id_mesto)
112values('pepsi', 10, 1);
113
114
115insert into paket(vraboten_id)
116values(10),(14),(10),(12),(13);
117
118
119insert into zaliha(id_stavka, kolicina)
120values(1, 10),
121(2, 30),
122(3, 5),
123(4, 30);
124
125
126
127insert into cena(id_stavka, iznos, vazi_od)
128values(1, 220, now()),
129(2, 230, now()),
130(3, 190, now()),
131(4, 250, now());
132
133insert into prodazhnomesto_nudi_paket
134values(1, 1), (1,2), (1, 3), (3, 4),(4, 4);
135
136insert into naracka_sodrzi_hrana (naracka_id, id_stavka, kolicina)
137values (1,1,1),(2,4,2),(3,2,1),(4,3,3),(5,1,1);
138
139insert into paket_sodrzi_hrana (paket_id, id_stavka)
140values(1, 1), (1, 2), (1, 5);
141
142insert into hrana_e_napravena_namirnica (id_stavka, id_namirnica)
143values(1, 3), (2, 3), (3,3),(4,3);
144
145insert into naracka_ima_paket (naracka_id, paket_id, kolicina)
146values (1, 1, 1), (2, 2,2),(3,1,1);
147
148insert into hrana_pripagja_kategorija(id_stavka, id_kategorija) values (1, 1), (2,1),(3,1);
149
150insert into namirnica_e_dodatok_hrana (id_namirnica, id_stavka)
151values (6,1), (7,1),(6,2),(7,2),(6,3),(7,3);
152
153insert into namirnica_pripagja_kategorija (id_namirnica, id_kategorija)
154values (1,2), (6,6),(7,6);
155
156