RelationalDesign: polnenje.sql

File polnenje.sql, 8.4 KB (added by 191169, 2 years ago)
Line 
1insert into Kategorii (tip) values
2 ('A'),
3 ('A1'),
4 ('B'),
5 ('C'),
6 ('C1'),
7 ('D'),
8 ('D1'),
9 ('BE'),
10 ('CE'),
11 ('C1E'),
12 ('DE'),
13 ('D1E'),
14 ('F'),
15 ('G'),
16 ('T');
17
18--update izdavsaloni set imesal = 'Vehicle Rent LMK' where imesal = 'Veichal Rent LMK';
19
20
21insert into Vozila(idKat,model,marka,regTab,cenaVozi) values
22 (5,'Arteon','Volkswagen','SK2200AB',6000),
23 (5,'ID.4','Volkswagen','SK2568BA',7000),
24 (5,'A4','Audi','SK2111AK',5500),
25 (5,'Q2','Audi','SK3334OS',7500),
26 (3,'Dandy 125','Jawa','SK7755AU',3500),
27 (3,'GS 500 F','SUZUKI','SK9992AJ',5500),
28 (3,'YZF-R1','Yamaha','SK2899BA',6500),
29 (10,'SPRINTER','MERCEDES','SK1520UB',12000),
30 (10,'TRANSIT CUSTOM','FORD','SK1525US',9000),
31 (10,'Daily 3.0 HPI','Iveco','SK1400ME',13000);
32
33
34insert into Avtomobili(idVozia,brSedista) values
35 (1,5),
36 (2,5),
37 (3,5),
38 (4,5);
39
40
41insert into Motori(idVozim,kubikaza) values
42 (5,124),
43 (6,487),
44 (7,998);
45
46
47insert into Kombinja (idVozik,brSedista,nosivost) values
48 (8,23,3500),
49 (9,9,1111),
50 (10,28,3000);
51
52
53insert into IzdavSaloni (imeSal) values
54 ('Vehicle Rent LMK'),
55 ('Vehicle Rent LMK'),
56 ('Vehicle Rent LMK'),
57 ('Vehicle Rent LMK'),
58 ('Vehicle Rent LMK'),
59 ('Vehicle Rent LMK'),
60 ('Vehicle Rent LMK'),
61 ('Vehicle Rent LMK'),
62 ('Vehicle Rent LMK'),
63 ('Vehicle Rent LMK');
64
65
66insert into IzdavSaloniBr(idIs, telBrIs) values
67 (1,'+38976884225'),
68 (2,'+38975226666'),
69 (3, '+38971331545'),
70 (4,'+38975667778'),
71 (5,'+38976297789'),
72 (6,'+38976333444'),
73 (7,'+38971888777'),
74 (8,'+38976995795'),
75 (9,'+38976123569'),
76 (10,'+38976333259');
77
78
79insert into Klienti (EMBGK,imeK,adresaK,primiumK) values
80 ('2602000455031', 'Jovana Trifunovska','Partizanska 25/2',False),
81 ('1212993450002','Matej Pindzurovski','ASNOM 30',True),
82 ('2510989443061','Slavko Borisov','Lece Koteski 12/1',False),
83 ('1512992472001','Vikrot Najdenovski','Blagoja Toska 50',False),
84 ('2903972599006','Bojana Sotiroska','Pirinska 28b',True),
85 ('2989789555007','Alkaloid','Bulevar Aleksandar Makedonski 12',True),
86 ('1595455777236','Husqarno','Воден 17',False),
87 ('6542168546545','Replek','Козле 188',False),
88 ('4552135462133','FarmaHen','Кичевска 1',True);
89
90
91insert into FizickiL(EMBGKfl) values
92 ('2602000455031'),
93 ('1212993450002'),
94 ('2510989443061'),
95 ('1512992472001'),
96 ('2903972599006');
97
98
99insert into FizickiLBr(EMBGKfl,telBrFL ) values
100 ('2602000455031','+38972325965'),
101 ('1212993450002','+38971226694'),
102 ('2510989443061','+38976369741'),
103 ('1512992472001','+38975258159'),
104 ('2903972599006','+38976159357');
105
106
107insert into PravniL (EMBGKpl,direktor) values
108 ('2989789555007','Jovan Nikolovski'),
109 ('1595455777236','Kalina Jovanovska'),
110 ('6542168546545','Jorde Bozinovski'),
111 ('4552135462133','Martin Stojkoski');
112
113
114insert into Dogovori (EMBGK,idIS,cenaDog,sklucenNa,vaziDo) values
115 --'Q2','Audi'
116 ('2602000455031',1,45000,to_date('0305022','ddmmyyy'),to_date('0905022','ddmmyyy')),
117 --YZF-R1','Yamaha
118 ('1212993450002',2,32500,to_date('1503022','ddmmyyy'),to_date('2003002','ddmmyyy')),
119 --GS 500 F','SUZUKI
120 ('2510989443061',3,11000,to_date('1002022','ddmmyyy'),to_date('1202022','ddmmyyy')),
121 --ID.4','Volkswagen
122 ('1512992472001',4, 56000, to_date('0601022','ddmmyy'),to_date('1401022','ddmmyyy')),
123 --Dandy 12,Jawa
124 ('2903972599006',2,35000,to_date('2006022','ddmmyy'),to_date('3006022','ddmmyyy')),
125 --ID.4,Volkswagen
126 ('2989789555007',1,21000,to_date('1509022','ddmmyyy'),to_date('1809022','ddmmyyy')),
127 --A4,Audi
128 ('1595455777236',6,38500,to_date('2612022','ddmmyyy'),to_date('0201023','ddmmyyy')),
129 --Arteon,Volkswagen
130 ('6542168546545',10,24000,to_date('1010022','ddmmyyy'),to_date('1410022','ddmmyyy')),
131 -- SPRINTER,MERCEDES
132 ('4552135462133',9,60000,to_date('0112022','ddmmyyy'),to_date('0612022','ddmmyyy'));
133
134
135insert into Lokacii (idIS,adresaLok,gradLok ) values
136 (1,'MK Автопат „Александар Македонски MK MK, Петровец 1043','Skopje'),
137 (2,'Isaija Mazovski 30','Skopje'),
138 (3,'Pitu Guli 15','Tetovo'),
139 (4,'Охридска 26','Tetovo'),
140 (5,'Bistra 16','Bitola'),
141 (6,'Stiv Naumov 60','Strumica'),
142 (7,'Egejska 90','Kicevo'),
143 (8,'Sremska 5','Shtip'),
144 (9,'Борис Кидриќ 6','Gostivar'),
145 (10,'P.FAH 134 6000 MK','Ohrid');
146
147
148insert into Vozaci(EMBGVoza,imeVoza,adresaVoza,vozackaD) values
149 ('2602000455031', 'Jovana Trifunovska','Partizanska 25/2','A8964729'),
150 ('1609998455032', 'Nikola Bozinovski','Partizanska 25/2','A1235469'),
151 ('0906968450123', 'Kiril Pupinov','Partizanska 25/2','A7878950'),
152 ('3007998450013', 'Bosko Jordanov','Partizanska 25/2','A5632458'),
153 ('2609001450132', 'Daniel Simonovski','Partizanska 25/2','A3659874'),
154 ('2705995442032', 'David Stefanovski','Partizanska 25/2','A1235498'),
155 ('0409983450122', 'Stefan Dimitrovski','Partizanska 25/2','A3654780');
156
157
158insert into VozaciBr(EMBGVoza,telBrVoza) values
159 ('2602000455031','+38976422355'),
160 ('1609998455032','+38975214569'),
161 ('0906968450123','+38976125987'),
162 ('3007998450013','+38971569987'),
163 ('2609001450132','+38976159675'),
164 ('2705995442032','+38975456987'),
165 ('0409983450122','+39870268545');
166
167
168insert into Msteti (idMS,idVozi,EMBGVoza,cenaMS) values
169 (1,1, '2602000455031', 123),
170 (2,2, '1609998455032', 234),
171 (3,3, '0906968450123', 345),
172 (4,4, '3007998450013', 456),
173 (5,5, '2609001450132', 567);
174
175
176insert into Vraboteni (EMBGV,idIS,imeV) values
177 ('1129382121485',1,'Petar Nikolovski'),
178 ('3129382130405',2,'Jovan Nikolovski'),
179 ('2129382141415',3,'Sara Lilovska'),
180 ('2129382150425',4,'Marija Dimitrovska');
181
182
183insert into VraboteniBr (EMBGVbr, telBrV) values
184 ('1129382121485', '+38975669043'),
185 ('3129382130405', '+38975569423'),
186 ('2129382141415', '+38975689117'),
187 ('2129382150425', '+38975629793');
188
189
190insert into Menadzeri (EMBGVM) values
191 ('1129382121485'),
192 ('2129382141415'),
193 ('2129382150425');
194
195
196insert into Prodavachi (EMBGVP, EMBGVM) values
197 ('3129382130405', '1129382121485');
198
199
200insert into Rezervacii (EMBGVoza, idDog, naDatumRez, doDatumRez) values
201 ('2602000455031',1,to_date('0305022','ddmmyyy'),to_date('0906022','ddmmyyy')),
202 ('1609998455032',2,to_date('0405022','ddmmyyy'),to_date('1006022','ddmmyyy')),
203 ('0906968450123',3,to_date('1305022','ddmmyyy'),to_date('1905022','ddmmyyy')),
204 ('3007998450013',4,to_date('2305022','ddmmyyy'),to_date('2805022','ddmmyyy')),
205 ('2609001450132',5,to_date('1405022','ddmmyyy'),to_date('1905022','ddmmyyy')),
206 ('2705995442032',6,to_date('2405022','ddmmyyy'),to_date('2805022','ddmmyyy')),
207 ('0409983450122',7,to_date('1905022','ddmmyyy'),to_date('2905022','ddmmyyy'));
208
209
210insert into ServisKomp (brSK, imeSK, adresaSK) values
211 (1, 'VehicleRentService','Nikola Karev 56'),
212 (2, 'VehicleRentService2','Partizanska 40/2');
213
214
215insert into ServisKompBr (brSK, telBrSK) values
216 (1, '+389026759801'),
217 (2, '+389047138745');
218
219
220insert into Servisi (brSK, idVozi, cenaS, naDatumS) values
221 (1,1, 2500, to_date('0305022','ddmmyyy')),
222 (2,4, 4700, to_date('1411022','ddmmyyy'));
223
224
225insert into Smetki (idDog, cenaSm, datumSm) values
226 (1, 12500, to_date('0305022','ddmmyyy')),
227 (2, 15600, to_date('0305022','ddmmyyy')),
228 (3, 23500, to_date('0305022','ddmmyyy'));
229
230
231insert into Parkirani (od, doD, idVozi, idIs) values
232 (to_date('0305022','ddmmyyy'),to_date('2305022','ddmmyyy'),1,1),
233 (to_date('1407022','ddmmyyy'),to_date('0306022','ddmmyyy'),2,1),
234 (to_date('0101022','ddmmyyy'),to_date('0204022','ddmmyyy'),3,1);
235
236
237insert into Naplati (brSM, EMBGVP, kesh, kartica, datumNap) values
238 (1,'3129382130405',true,false,to_date('0206022','ddmmyyy'));
239-- (2,'3129382130405',false,true,to_date('1312022','ddmmyyy')),
240-- (3,'2129382141415',true,false,to_date('2207022','ddmmyyy'));
241
242
243insert into rezervacii_ima_za_vozila (idRez, idVozi) values
244 (1,1),
245 (2,2);
246
247
248insert into vozaci_e_na_klienti (EMBGVoza, EMBGK) values
249 ('2602000455031', '2602000455031'),
250 ('1609998455032', '1212993450002'),
251 ('0906968450123', '2510989443061'),
252 ('3007998450013', '1512992472001'),
253 ('2609001450132', '2903972599006'),
254 ('2705995442032', '2989789555007');
255
256
257insert into vozaci_ima_kategorii (EMBGVoza, idKat) values
258 ('2602000455031',1),
259 ('1609998455032',2),
260 ('0906968450123',3),
261 ('3007998450013',4),
262 ('2609001450132',5),
263 ('2705995442032',6),
264 ('0409983450122',7);