LogicDesign: polnenje_podatoci_final.sql

File polnenje_podatoci_final.sql, 5.2 KB (added by 153081, 3 years ago)
Line 
1
2insert into vraboteni (ime,prezime,embg,datum_ragjanje,obrazovanie)
3values('Kjazim','Demirov','1205996649005',to_date('19960512','YYYYMMDD'),'Sredno Strucno Obrazovanie'),
4('Trajko','Petkov','0203970560556',to_date('19700302','YYYYMMDD'),'Diplomiran Inziner'),
5('Marko', 'Markov','1806985960665',to_date('19850618','YYYYMMDD'),'Sredno Strucno Obrazovanie'),
6('Finki','Finkov','1204970123003',to_date('19700412','YYYYMMDD'),'Sredno Obrazovanie'),
7('Petko','Trajkov','3004987234009',to_date('19870430','YYYYMMDD'),'Osnovno Obrazovanie'),
8('Marija','Mariovska','2708978567002',to_date('19780827','YYYYMMDD'),'Magister za mebel i enterier'),
9('Fatima','Fatimovska','2404988123008',to_date('19880424','YYYYMMDD'),'Dipromiran mashinski inziner');
10
11insert into menadzeri (id_vraboten)
12values
13(2),
14(3);
15insert into direktor (id_vraboten)
16values
17(6);
18insert into magacioneri (id_vraboten)
19values(1);
20insert into shefovi (id_vraboten)
21values(7);
22insert into vraboteni_vo_proizvodstvo (id_vraboten)
23values(4),(5);
24insert into korisnik (korisnicko_ime,lozinka,"role")
25values('kdemirov','kd','ROLE_WAREHOUSEMAN'),
26('tpetkov','tp','ROLE_MANAGER'),
27('mmarkov','mm','ROLE_MANAGER'),
28('mmariovska','mm','ROLE_DIRECTOR'),
29('ffatimovska','ff','ROLE_CHIEF');
30insert into delovi (vid_na_del,cena)
31values('zadna noga houston',150),('predna noga houston',150),('sediste houston',150),('naslon houston',200),('sprosna gurga',50),('kapak gurga',50);
32insert into materijali (velicina,naziv,dostapen_broj)
33values
34(10,'ramna ploca otpresok',300),
35(15,'ramna ploca otrpesok',300),
36(10,'tabu otpresok',150),
37(15,'tabu otpresok',150),
38(15,'luis otpresok',200),
39(10,'napoli otpresok',200);
40insert into mashini (naziv)
41values
42('cnc 530'),('banzik'),('cetkara'),('dreban'),('busalki'),('masina za glancanje');
43insert into oddelenija (naziv)
44values
45('masinsko'),('tapacersko'),('lakirnica'),('sklopnica');
46insert into mebel(tip,naziv,cena)
47values('stol','semifredo',900),
48('stol','gurga',1100),
49('stol','houston',1200),
50('masa','dinner table',15000);
51insert into klienti (korisnicko_ime,lozinka,ime,prezime,"role")
52values
53('amedov','am','Ahmet','Amedov','ROLE_CLIENT'),
54('jdoe','jd','John','Doe','ROLE_CLIENT'),
55('rredington','rr','Reymond','Reddington','ROLE_CLIENT');
56
57insert into nalozi(pocetna_data,krajna_data,id_vraboten)
58values(to_date('20210312','YYYYMMDD'),to_date('20210319','YYYYMMDD'),2),
59(to_date('20210301','YYYYMMDD'),to_date('20210308','YYYYMMDD'),3),
60(now(),null,2);
61
62insert into naracka (naslov,opis,id_klient,datum_napravena,datum_isporacana)
63values
64('Stolovi za bar cafe','Potrebni stolovi za bar cafe Houston',1,now(),null),
65('Stolovi za meana','Potrebni stolovi za meana',2,to_date('20210312','YYYYMMDD'),null),
66('Masa za vecera','Obicna masa za vecera boja so obicen lak',3,to_date('20210301','YYYYMMDD'),now());
67
68insert into dogovori (id_vraboten,aktiven,pocetok,kraj,plata)
69values
70(1,1,to_date('12092018','DDMMYYYY'),to_date('12092022','DDMMYYYY'),14500),
71(2,1,to_date('12092018','DDMMYYYY'),to_date('12092022','DDMMYYYY'),18500),
72(3,1,to_date('12092018','DDMMYYYY'),to_date('12092022','DDMMYYYY'),18500),
73(4,1,to_date('12092018','DDMMYYYY'),to_date('12092022','DDMMYYYY'),14500),
74(5,1,to_date('12092018','DDMMYYYY'),to_date('12092022','DDMMYYYY'),14500),
75(6,1,to_date('12092018','DDMMYYYY'),to_date('12092022','DDMMYYYY'),22500),
76(7,1,to_date('12092018','DDMMYYYY'),to_date('12092022','DDMMYYYY'),18500);
77
78
79insert into evidencija_na_naracki (datum,id_naracka)
80values
81(to_date('13032021','DDMMYYYY'),2),
82(to_date('14032021','DDMMYYYY'),2),
83(to_date('15032021','DDMMYYYY'),2),
84(to_date('02032021','DDMMYYYY'),3),
85(to_date('03032021','DDMMYYYY'),3),
86(to_date('04032021','DDMMYYYY'),3),
87(to_date('05032021','DDMMYYYY'),3);
88
89insert into ima_napraveno_servis (id_mashina,datum,zabeleska,cena)
90values
91(1,to_date('12032021','DDMMYYYY'),'Popravka na motor na pumpa za vakum',18000),
92(2,to_date('01022021','DDMMYYYY'),'Zamena na mehanizmot',9000),
93(4,to_date('30012021','DDMMYYYY'),'Popravka na drzac za dreban',12000);
94
95insert into naracka_se_sostoi_od_mebel (id_mebel,id_naracka,kolicina)
96values(3,1,100),(2,2,120),(4,3,1);
97
98insert into dopolniteli_delovi_za_naracka (id_naracka,id_del,kolicina)
99values(1,1,2),(1,2,2),(2,1,2),(2,2,2);
100
101insert into mebel_se_sostoi_od_delovi (id_mebel,id_del,kolicina)
102values
103(1,1,2),(1,2,2),(1,3,1),(1,4,1),(2,1,2),(2,2,2),(2,3,1),(2,4,1),(2,5,2),(2,6,1);
104
105insert into evidencija_naracki_izraboteni_delovi (id_evidencija,id_del,br_na_zavrseni_delovi)
106values (1,1,50),(1,2,50),(2,3,50),(2,4,50);
107
108insert into nalozi_kreira_naracka (id_naracka,id_nalog)
109values(1,3),(2,1),(3,2);
110insert into evidencija_se_odnesuva_na_mebel (id_evidencija,id_mebel)
111values
112(1,2),(2,2),(3,2),(4,4),(5,4),(6,4),(7,4);
113
114insert into delovi_izraboteni_od_materijal (id_del,id_materijal)
115values
116(3,2),(1,1),(2,3);
117insert into delovi_izraboteni_od_mashina (id_del,id_mashina)
118values(1,2),(1,1),(2,1),(2,2),(3,1),(4,1),(5,1),(6,1);
119
120insert into mashina_pripaga_oddelenie (id_mashina ,id_oddelenie )
121values(1,1),(2,1),(3,1),(4,1),(5,1),(6,1);
122
123insert into vraboteni_se_korisnici (id_vraboten,id_korisnik)
124values
125(1,1),(2,2),(3,3),(6,4),(7,5);
126insert into vraboteni_vo_proizvodstvo_raboti_vo_oddelenija (id_vraboten,id_oddelenie)
127values(4,1),(5,1);
128
129INSERT INTO vraboteni_vo_proizvodstvo_raboti_na_mashina (id_vraboten,id_mashina)
130values(4,1),(5,2);